aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman2003-09-30 12:54:32 +0000
committerRichard M. Stallman2003-09-30 12:54:32 +0000
commit2389f143245047b76a2ed26198f324eea9bef1f4 (patch)
tree2b11bea04e84a3bd29170425dc1037f3c1c366d2
parent35e376af6ac9fce074f4fd7df89487e7ebceb7bc (diff)
downloademacs-2389f143245047b76a2ed26198f324eea9bef1f4.tar.gz
emacs-2389f143245047b76a2ed26198f324eea9bef1f4.zip
(ada-mode): Don't use advice. Instead, set which-func-functions.
-rw-r--r--lisp/progmodes/ada-mode.el20
1 files changed, 3 insertions, 17 deletions
diff --git a/lisp/progmodes/ada-mode.el b/lisp/progmodes/ada-mode.el
index e5dacd7f258..310e2bc8889 100644
--- a/lisp/progmodes/ada-mode.el
+++ b/lisp/progmodes/ada-mode.el
@@ -1071,7 +1071,7 @@ name"
1071;;;###autoload 1071;;;###autoload
1072(defun ada-mode () 1072(defun ada-mode ()
1073 "Ada mode is the major mode for editing Ada code. 1073 "Ada mode is the major mode for editing Ada code.
1074This version was built on $Date: 2003/05/13 20:48:15 $. 1074This version was built on $Date: 2003/09/01 15:45:34 $.
1075 1075
1076Bindings are as follows: (Note: 'LFD' is control-j.) 1076Bindings are as follows: (Note: 'LFD' is control-j.)
1077\\{ada-mode-map} 1077\\{ada-mode-map}
@@ -1342,22 +1342,8 @@ If you use ada-xref.el:
1342 ;; Fix is: redefine a new function ada-which-function, and call it when the 1342 ;; Fix is: redefine a new function ada-which-function, and call it when the
1343 ;; major-mode is ada-mode. 1343 ;; major-mode is ada-mode.
1344 1344
1345 (unless (featurep 'xemacs) 1345 (make-local-variable 'which-func-functions)
1346 ;; This function do not require that we load which-func now. 1346 (setq which-func-functions '(ada-which-function))
1347 ;; This can be done by the user if he decides to use which-func-mode
1348
1349 (defadvice which-function (around ada-which-function activate)
1350 "In Ada buffers, should work with overloaded subprograms, and does not
1351use imenu."
1352 (if (equal major-mode 'ada-mode)
1353 (set 'ad-return-value (ada-which-function))
1354 ad-do-it))
1355
1356 ;; So that we can activate which-func-modes for Ada mode
1357 (if (and (boundp 'which-func-modes)
1358 (listp which-func-modes))
1359 (add-to-list 'which-func-modes 'ada-mode))
1360 )
1361 1347
1362 ;; Support for indent-new-comment-line (Especially for XEmacs) 1348 ;; Support for indent-new-comment-line (Especially for XEmacs)
1363 (setq comment-multi-line nil) 1349 (setq comment-multi-line nil)