aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuanma Barranquero2006-11-19 01:36:04 +0000
committerJuanma Barranquero2006-11-19 01:36:04 +0000
commitce8831339caad2b812d4995df5e2747d043b0ae5 (patch)
treedfee2c9bd00c9c06052ba71cd9b551909e96f8a4
parentf7eb6f23d03369b03f32c308af36c72fc99b8d90 (diff)
downloademacs-ce8831339caad2b812d4995df5e2747d043b0ae5.tar.gz
emacs-ce8831339caad2b812d4995df5e2747d043b0ae5.zip
(ada-make-body-gnatstub): Fix typo.
(ada-xref-initialize): Fix typo. Use add-hook and remove-hook.
-rw-r--r--lisp/progmodes/ada-xref.el11
1 files changed, 6 insertions, 5 deletions
diff --git a/lisp/progmodes/ada-xref.el b/lisp/progmodes/ada-xref.el
index a24dbfffd6c..6c59560094a 100644
--- a/lisp/progmodes/ada-xref.el
+++ b/lisp/progmodes/ada-xref.el
@@ -2212,14 +2212,14 @@ This is a GNAT specific function that uses gnatkrunch."
2212(defun ada-make-body-gnatstub (&optional interactive) 2212(defun ada-make-body-gnatstub (&optional interactive)
2213 "Create an Ada package body in the current buffer. 2213 "Create an Ada package body in the current buffer.
2214This function uses the `gnatstub' program to create the body. 2214This function uses the `gnatstub' program to create the body.
2215This function typically is to be hooked into `ff-file-created-hooks'." 2215This function typically is to be hooked into `ff-file-created-hook'."
2216 (interactive "p") 2216 (interactive "p")
2217 (ada-require-project-file) 2217 (ada-require-project-file)
2218 2218
2219 (save-some-buffers nil nil) 2219 (save-some-buffers nil nil)
2220 2220
2221 ;; If the current buffer is the body (as is the case when calling this 2221 ;; If the current buffer is the body (as is the case when calling this
2222 ;; function from ff-file-created-hooks), then kill this temporary buffer 2222 ;; function from ff-file-created-hook), then kill this temporary buffer
2223 (unless interactive 2223 (unless interactive
2224 (progn 2224 (progn
2225 (set-buffer-modified-p nil) 2225 (set-buffer-modified-p nil)
@@ -2274,9 +2274,10 @@ This function typically is to be hooked into `ff-file-created-hooks'."
2274(defun ada-xref-initialize () 2274(defun ada-xref-initialize ()
2275 "Function called by `ada-mode-hook' to initialize the ada-xref.el package. 2275 "Function called by `ada-mode-hook' to initialize the ada-xref.el package.
2276For instance, it creates the gnat-specific menus, sets some hooks for 2276For instance, it creates the gnat-specific menus, sets some hooks for
2277find-file...." 2277`find-file'..."
2278 ;; This should really be an `add-hook'. -stef 2278 (remove-hook 'ff-file-created-hook 'ada-make-body) ; from global hook
2279 (setq ff-file-created-hook 'ada-make-body-gnatstub) 2279 (remove-hook 'ff-file-created-hook 'ada-make-body t) ; from local hook
2280 (add-hook 'ff-file-created-hook 'ada-make-body-gnatstub nil t)
2280 2281
2281 ;; Completion for file names in the mini buffer should ignore .ali files 2282 ;; Completion for file names in the mini buffer should ignore .ali files
2282 (add-to-list 'completion-ignored-extensions ".ali") 2283 (add-to-list 'completion-ignored-extensions ".ali")