aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/cedet/semantic
diff options
context:
space:
mode:
authorStefan Monnier2012-10-23 11:06:07 -0400
committerStefan Monnier2012-10-23 11:06:07 -0400
commitd106953274d29b6be4ef7e2c442078c81a52ff2f (patch)
tree1daf5ea3f0c8d0ed1914ba3fc339b1dd23438e20 /lisp/cedet/semantic
parentf7eac6d887b7768034e40f16dacbb0c8fb569417 (diff)
downloademacs-d106953274d29b6be4ef7e2c442078c81a52ff2f.tar.gz
emacs-d106953274d29b6be4ef7e2c442078c81a52ff2f.zip
Cleanup uses of "-hooks".
* doc/emacs/custom.texi (Hooks): * doc/lispref/hooks.texi (Standard Hooks): Clarify that -hooks is deprecated. * lisp/gnus/nndiary.el (nndiary-request-create-group-functions) (nndiary-request-update-info-functions) (nndiary-request-accept-article-functions): * lisp/gnus/gnus-start.el (gnus-subscribe-newsgroup-functions): * lisp/cedet/semantic/db-file.el (semanticdb-save-database-functions): * lisp/cedet/semantic/lex.el (semantic-lex-reset-functions): * lisp/cedet/semantic/edit.el (semantic-change-functions) (semantic-edits-new-change-functions) (semantic-edits-delete-change-functions) (semantic-edits-reparse-change-functions): * lisp/htmlfontify.el (hfy-post-html-hook): * lisp/filesets.el (filesets-cache-fill-content-hook): * lisp/arc-mode.el (archive-extract-hook): * lisp/progmodes/cc-mode.el (c-prepare-bug-report-hook): * lisp/net/rcirc.el (rcirc-sentinel-functions) (rcirc-receive-message-functions, rcirc-activity-functions) (rcirc-print-functions): * lisp/net/dbus.el (dbus-event-error-functions): * lisp/emacs-lisp/eieio.el (eieio-pre-method-execution-functions): * lisp/emacs-lisp/checkdoc.el (checkdoc-style-functions) (checkdoc-comment-style-functions): Don't use "-hooks" suffix. * lisp/term/sun.el (sun-raw-prefix-hooks): * lisp/mail/sendmail.el (mail-yank-hooks): * lisp/mh-e/mh-letter.el (mh-yank-hooks): Use make-obsolete-variable.
Diffstat (limited to 'lisp/cedet/semantic')
-rw-r--r--lisp/cedet/semantic/db-file.el6
-rw-r--r--lisp/cedet/semantic/edit.el24
-rw-r--r--lisp/cedet/semantic/lex.el6
3 files changed, 24 insertions, 12 deletions
diff --git a/lisp/cedet/semantic/db-file.el b/lisp/cedet/semantic/db-file.el
index 7b4a47bd260..4f8e93dc391 100644
--- a/lisp/cedet/semantic/db-file.el
+++ b/lisp/cedet/semantic/db-file.el
@@ -70,7 +70,9 @@ passes a list of predicates in `semanticdb-project-predicate-functions'."
70 :group 'semanticdb 70 :group 'semanticdb
71 :type nil) 71 :type nil)
72 72
73(defcustom semanticdb-save-database-hooks nil 73(define-obsolete-variable-alias 'semanticdb-save-database-hooks
74 'semanticdb-save-database-functions "24.3")
75(defcustom semanticdb-save-database-functions nil
74 "Abnormal hook run after a database is saved. 76 "Abnormal hook run after a database is saved.
75Each function is called with one argument, the object representing 77Each function is called with one argument, the object representing
76the database recently written." 78the database recently written."
@@ -251,7 +253,7 @@ If DB is not specified, then use the current database."
251 (message "Save Error: %S: %s" (car (cdr foo)) 253 (message "Save Error: %S: %s" (car (cdr foo))
252 objname) 254 objname)
253 (error "%S" (car (cdr foo)))))))) 255 (error "%S" (car (cdr foo))))))))
254 (run-hook-with-args 'semanticdb-save-database-hooks 256 (run-hook-with-args 'semanticdb-save-database-functions
255 (or DB semanticdb-current-database)) 257 (or DB semanticdb-current-database))
256 ;;(message "Saving tag summary for %s...done" objname) 258 ;;(message "Saving tag summary for %s...done" objname)
257 ) 259 )
diff --git a/lisp/cedet/semantic/edit.el b/lisp/cedet/semantic/edit.el
index 23b6784fe2a..5b39dec2628 100644
--- a/lisp/cedet/semantic/edit.el
+++ b/lisp/cedet/semantic/edit.el
@@ -72,7 +72,9 @@ updated in the current buffer.
72 72
73For language specific hooks, make sure you define this as a local hook.") 73For language specific hooks, make sure you define this as a local hook.")
74 74
75(defvar semantic-change-hooks 75(define-obsolete-variable-alias 'semantic-change-hooks
76 'semantic-change-functions "24.3")
77(defvar semantic-change-functions
76 '(semantic-edits-change-function-handle-changes) 78 '(semantic-edits-change-function-handle-changes)
77 "Abnormal hook run when semantic detects a change in a buffer. 79 "Abnormal hook run when semantic detects a change in a buffer.
78Each hook function must take three arguments, identical to the 80Each hook function must take three arguments, identical to the
@@ -89,11 +91,15 @@ If the hook returns non-nil, then declare that a reparse is needed.
89For language specific hooks, make sure you define this as a local hook. 91For language specific hooks, make sure you define this as a local hook.
90Not used yet; part of the next generation reparse mechanism.") 92Not used yet; part of the next generation reparse mechanism.")
91 93
92(defvar semantic-edits-new-change-hooks nil 94(define-obsolete-variable-alias 'semantic-edits-new-change-hooks
95 'semantic-edits-new-change-functions "24.3")
96(defvar semantic-edits-new-change-functions nil
93 "Abnormal hook run when a new change is found. 97 "Abnormal hook run when a new change is found.
94Functions must take one argument representing an overlay on that change.") 98Functions must take one argument representing an overlay on that change.")
95 99
96(defvar semantic-edits-delete-change-hooks nil 100(define-obsolete-variable-alias 'semantic-edits-delete-change-hooks
101 'semantic-edits-delete-change-functions "24.3")
102(defvar semantic-edits-delete-change-functions nil
97 "Abnormal hook run before a change overlay is deleted. 103 "Abnormal hook run before a change overlay is deleted.
98Deleted changes occur when multiple changes are merged. 104Deleted changes occur when multiple changes are merged.
99Functions must take one argument representing an overlay being deleted.") 105Functions must take one argument representing an overlay being deleted.")
@@ -104,7 +110,9 @@ Changes move when a new change overlaps an old change. The old change
104will be moved. 110will be moved.
105Functions must take one argument representing an overlay being moved.") 111Functions must take one argument representing an overlay being moved.")
106 112
107(defvar semantic-edits-reparse-change-hooks nil 113(define-obsolete-variable-alias 'semantic-edits-reparse-change-hooks
114 'semantic-edits-reparse-change-functions "24.3")
115(defvar semantic-edits-reparse-change-functions nil
108 "Abnormal hook run after a change results in a reparse. 116 "Abnormal hook run after a change results in a reparse.
109Functions are called before the overlay is deleted, and after the 117Functions are called before the overlay is deleted, and after the
110incremental reparse.") 118incremental reparse.")
@@ -133,7 +141,7 @@ Argument START, END, and LENGTH specify the bounds of the change."
133 (setq semantic-unmatched-syntax-cache-check t) 141 (setq semantic-unmatched-syntax-cache-check t)
134 (let ((inhibit-point-motion-hooks t) 142 (let ((inhibit-point-motion-hooks t)
135 ) 143 )
136 (run-hook-with-args 'semantic-change-hooks start end length) 144 (run-hook-with-args 'semantic-change-functions start end length)
137 )) 145 ))
138 146
139(defun semantic-changes-in-region (start end &optional buffer) 147(defun semantic-changes-in-region (start end &optional buffer)
@@ -168,7 +176,7 @@ Argument START, END, and LENGTH specify the bounds of the change."
168 ;; function will be removed from the list of active change 176 ;; function will be removed from the list of active change
169 ;; functions. 177 ;; functions.
170 (condition-case nil 178 (condition-case nil
171 (run-hook-with-args 'semantic-edits-new-change-hooks o) 179 (run-hook-with-args 'semantic-edits-new-change-functions o)
172 (error nil))) 180 (error nil)))
173 (let ((tmp changes-in-change)) 181 (let ((tmp changes-in-change))
174 ;; Find greatest bounds of all changes 182 ;; Find greatest bounds of all changes
@@ -188,7 +196,7 @@ Argument START, END, and LENGTH specify the bounds of the change."
188 ;; Delete other changes. They are now all bound here. 196 ;; Delete other changes. They are now all bound here.
189 (while changes-in-change 197 (while changes-in-change
190 (condition-case nil 198 (condition-case nil
191 (run-hook-with-args 'semantic-edits-delete-change-hooks 199 (run-hook-with-args 'semantic-edits-delete-change-functions
192 (car changes-in-change)) 200 (car changes-in-change))
193 (error nil)) 201 (error nil))
194 (semantic-overlay-delete (car changes-in-change)) 202 (semantic-overlay-delete (car changes-in-change))
@@ -198,7 +206,7 @@ Argument START, END, and LENGTH specify the bounds of the change."
198(defsubst semantic-edits-flush-change (change) 206(defsubst semantic-edits-flush-change (change)
199 "Flush the CHANGE overlay." 207 "Flush the CHANGE overlay."
200 (condition-case nil 208 (condition-case nil
201 (run-hook-with-args 'semantic-edits-delete-change-hooks 209 (run-hook-with-args 'semantic-edits-delete-change-functions
202 change) 210 change)
203 (error nil)) 211 (error nil))
204 (semantic-overlay-delete change)) 212 (semantic-overlay-delete change))
diff --git a/lisp/cedet/semantic/lex.el b/lisp/cedet/semantic/lex.el
index d7ab5911a67..274df355901 100644
--- a/lisp/cedet/semantic/lex.el
+++ b/lisp/cedet/semantic/lex.el
@@ -729,7 +729,9 @@ This is an alist of (ANCHOR . STREAM) elements where ANCHOR is the
729start position of the block, and STREAM is the list of tokens in that 729start position of the block, and STREAM is the list of tokens in that
730block.") 730block.")
731 731
732(defvar semantic-lex-reset-hooks nil 732(define-obsolete-variable-alias 'semantic-lex-reset-hooks
733 'semantic-lex-reset-functions "24.3")
734(defvar semantic-lex-reset-functions nil
733 "Abnormal hook used by major-modes to reset lexical analyzers. 735 "Abnormal hook used by major-modes to reset lexical analyzers.
734Hook functions are called with START and END values for the 736Hook functions are called with START and END values for the
735current lexical pass. Should be set with `add-hook', specifying 737current lexical pass. Should be set with `add-hook', specifying
@@ -771,7 +773,7 @@ analyzer which might mistake a number for as a symbol."
771 ;; Make sure the state of block parsing starts over. 773 ;; Make sure the state of block parsing starts over.
772 (setq semantic-lex-block-streams nil) 774 (setq semantic-lex-block-streams nil)
773 ;; Allow specialty reset items. 775 ;; Allow specialty reset items.
774 (run-hook-with-args 'semantic-lex-reset-hooks start end) 776 (run-hook-with-args 'semantic-lex-reset-functions start end)
775 ;; Lexing state. 777 ;; Lexing state.
776 (let* (;(starttime (current-time)) 778 (let* (;(starttime (current-time))
777 (starting-position (point)) 779 (starting-position (point))