summaryrefslogtreecommitdiff
path: root/lisp/cedet/semantic
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2012-10-23 11:06:07 -0400
committerStefan Monnier <monnier@iro.umontreal.ca>2012-10-23 11:06:07 -0400
commitd106953274d29b6be4ef7e2c442078c81a52ff2f (patch)
tree1daf5ea3f0c8d0ed1914ba3fc339b1dd23438e20 /lisp/cedet/semantic
parentf7eac6d887b7768034e40f16dacbb0c8fb569417 (diff)
downloademacs-d106953274d29b6be4ef7e2c442078c81a52ff2f.tar.gz
emacs-d106953274d29b6be4ef7e2c442078c81a52ff2f.tar.bz2
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'."
:group 'semanticdb
:type nil)
-(defcustom semanticdb-save-database-hooks nil
+(define-obsolete-variable-alias 'semanticdb-save-database-hooks
+ 'semanticdb-save-database-functions "24.3")
+(defcustom semanticdb-save-database-functions nil
"Abnormal hook run after a database is saved.
Each function is called with one argument, the object representing
the database recently written."
@@ -251,7 +253,7 @@ If DB is not specified, then use the current database."
(message "Save Error: %S: %s" (car (cdr foo))
objname)
(error "%S" (car (cdr foo))))))))
- (run-hook-with-args 'semanticdb-save-database-hooks
+ (run-hook-with-args 'semanticdb-save-database-functions
(or DB semanticdb-current-database))
;;(message "Saving tag summary for %s...done" objname)
)
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.
For language specific hooks, make sure you define this as a local hook.")
-(defvar semantic-change-hooks
+(define-obsolete-variable-alias 'semantic-change-hooks
+ 'semantic-change-functions "24.3")
+(defvar semantic-change-functions
'(semantic-edits-change-function-handle-changes)
"Abnormal hook run when semantic detects a change in a buffer.
Each 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.
For language specific hooks, make sure you define this as a local hook.
Not used yet; part of the next generation reparse mechanism.")
-(defvar semantic-edits-new-change-hooks nil
+(define-obsolete-variable-alias 'semantic-edits-new-change-hooks
+ 'semantic-edits-new-change-functions "24.3")
+(defvar semantic-edits-new-change-functions nil
"Abnormal hook run when a new change is found.
Functions must take one argument representing an overlay on that change.")
-(defvar semantic-edits-delete-change-hooks nil
+(define-obsolete-variable-alias 'semantic-edits-delete-change-hooks
+ 'semantic-edits-delete-change-functions "24.3")
+(defvar semantic-edits-delete-change-functions nil
"Abnormal hook run before a change overlay is deleted.
Deleted changes occur when multiple changes are merged.
Functions 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
will be moved.
Functions must take one argument representing an overlay being moved.")
-(defvar semantic-edits-reparse-change-hooks nil
+(define-obsolete-variable-alias 'semantic-edits-reparse-change-hooks
+ 'semantic-edits-reparse-change-functions "24.3")
+(defvar semantic-edits-reparse-change-functions nil
"Abnormal hook run after a change results in a reparse.
Functions are called before the overlay is deleted, and after the
incremental reparse.")
@@ -133,7 +141,7 @@ Argument START, END, and LENGTH specify the bounds of the change."
(setq semantic-unmatched-syntax-cache-check t)
(let ((inhibit-point-motion-hooks t)
)
- (run-hook-with-args 'semantic-change-hooks start end length)
+ (run-hook-with-args 'semantic-change-functions start end length)
))
(defun semantic-changes-in-region (start end &optional buffer)
@@ -168,7 +176,7 @@ Argument START, END, and LENGTH specify the bounds of the change."
;; function will be removed from the list of active change
;; functions.
(condition-case nil
- (run-hook-with-args 'semantic-edits-new-change-hooks o)
+ (run-hook-with-args 'semantic-edits-new-change-functions o)
(error nil)))
(let ((tmp changes-in-change))
;; Find greatest bounds of all changes
@@ -188,7 +196,7 @@ Argument START, END, and LENGTH specify the bounds of the change."
;; Delete other changes. They are now all bound here.
(while changes-in-change
(condition-case nil
- (run-hook-with-args 'semantic-edits-delete-change-hooks
+ (run-hook-with-args 'semantic-edits-delete-change-functions
(car changes-in-change))
(error nil))
(semantic-overlay-delete (car changes-in-change))
@@ -198,7 +206,7 @@ Argument START, END, and LENGTH specify the bounds of the change."
(defsubst semantic-edits-flush-change (change)
"Flush the CHANGE overlay."
(condition-case nil
- (run-hook-with-args 'semantic-edits-delete-change-hooks
+ (run-hook-with-args 'semantic-edits-delete-change-functions
change)
(error nil))
(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
start position of the block, and STREAM is the list of tokens in that
block.")
-(defvar semantic-lex-reset-hooks nil
+(define-obsolete-variable-alias 'semantic-lex-reset-hooks
+ 'semantic-lex-reset-functions "24.3")
+(defvar semantic-lex-reset-functions nil
"Abnormal hook used by major-modes to reset lexical analyzers.
Hook functions are called with START and END values for the
current lexical pass. Should be set with `add-hook', specifying
@@ -771,7 +773,7 @@ analyzer which might mistake a number for as a symbol."
;; Make sure the state of block parsing starts over.
(setq semantic-lex-block-streams nil)
;; Allow specialty reset items.
- (run-hook-with-args 'semantic-lex-reset-hooks start end)
+ (run-hook-with-args 'semantic-lex-reset-functions start end)
;; Lexing state.
(let* (;(starttime (current-time))
(starting-position (point))