aboutsummaryrefslogtreecommitdiffhomepage
path: root/generic
diff options
context:
space:
mode:
authorGravatar Thomas Kleymann <da+pg-tms@inf.ed.ac.uk>1998-10-22 13:21:23 +0000
committerGravatar Thomas Kleymann <da+pg-tms@inf.ed.ac.uk>1998-10-22 13:21:23 +0000
commit18021e2580cd8e667bf40a850bc2b30b3c54e0cf (patch)
treec47351402f5ba9d1c109f2fa31c94e0b59f260a0 /generic
parent9c1fb98ea7e2ddadacc56d46215f58c5abc56174 (diff)
renamed fume-match-find-next-function-name
Diffstat (limited to 'generic')
-rw-r--r--generic/proof.el39
1 files changed, 19 insertions, 20 deletions
diff --git a/generic/proof.el b/generic/proof.el
index 7fe152e5..91036383 100644
--- a/generic/proof.el
+++ b/generic/proof.el
@@ -687,6 +687,24 @@ is resynchronised. It contains files in canonical truename format")
;; A few small utilities ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+(defun proof-match-find-next-function-name (buffer)
+ "General next function name in BUFFER finder using match.
+The regexp is assumed to be a two item list the car of which is the regexp
+to use, and the cdr of which is the match position of the function
+name. Moves point after the match.
+
+The package fume-func provides the function
+`fume-match-find-next-function-name' with the same specification.
+However, fume-func's version is incorrec"
+ ;; DO NOT USE save-excursion; we need to move point!
+ ;; save-excursion is called at a higher level in the func-menu
+ ;; package
+ (set-buffer buffer)
+ (let ((r (car fume-function-name-regexp))
+ (p (cdr fume-function-name-regexp)))
+ (and (re-search-forward r nil t)
+ (cons (buffer-substring (setq p (match-beginning p)) (point)) p))))
+
(defun proof-message (str)
"Output STR in minibuffer."
(message (concat "[" proof-assistant "] " str)))
@@ -951,25 +969,6 @@ buffer is closed off atomically."
nil (or history
'shell-command-history)))))
-;; The package fume-func provides a function with the same name and
-;; specification. However, fume-func's version is incorrect.
-;; da: make this hack more prominent so someone remembers to remove it
-;; later on.
-(and (fboundp 'fume-match-find-next-function-name)
-(defun fume-match-find-next-function-name (buffer)
- "General next function name in BUFFER finder using match.
-The regexp is assumed to be a two item list the car of which is the regexp
-to use, and the cdr of which is the match position of the function
-name. Moves point after the match."
- ;; DO NOT USE save-excursion; we need to move point!
- ;; save-excursion is called at a higher level in the func-menu
- ;; package
- (set-buffer buffer)
- (let ((r (car fume-function-name-regexp))
- (p (cdr fume-function-name-regexp)))
- (and (re-search-forward r nil t)
- (cons (buffer-substring (setq p (match-beginning p)) (point)) p)))))
-
;;; end messy COMPATIBILITY HACKING
@@ -2864,7 +2863,7 @@ finish setup which depends on specific proof assistant configuration."
(push (cons major-mode 'fume-function-name-regexp-proof)
fume-function-name-regexp-alist))
(and (boundp 'fume-find-function-name-method-alist)
- (push (cons major-mode 'fume-match-find-next-function-name)
+ (push (cons major-mode 'proof-match-find-next-function-name)
fume-find-function-name-method-alist))
;; Additional key definitions which depend on configuration for