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.
This commit is contained in:
Stefan Monnier 2012-10-23 11:06:07 -04:00
parent f7eac6d887
commit d106953274
40 changed files with 315 additions and 201 deletions

View file

@ -124,7 +124,7 @@
;; Adding your own checks:
;;
;; You can experiment with adding your own checks by setting the
;; hooks `checkdoc-style-hooks' and `checkdoc-comment-style-hooks'.
;; hooks `checkdoc-style-functions' and `checkdoc-comment-style-hooks'.
;; Return a string which is the error you wish to report. The cursor
;; position should be preserved.
;;
@ -274,17 +274,21 @@ made in the style guide relating to order."
:type 'boolean)
;;;###autoload(put 'checkdoc-arguments-in-order-flag 'safe-local-variable 'booleanp)
(defvar checkdoc-style-hooks nil
"Hooks called after the standard style check is completed.
All hooks must return nil or a string representing the error found.
(define-obsolete-variable-alias 'checkdoc-style-hooks
'checkdoc-style-functions "24.3")
(defvar checkdoc-style-functions nil
"Hook run after the standard style check is completed.
All functions must return nil or a string representing the error found.
Useful for adding new user implemented commands.
Each hook is called with two parameters, (DEFUNINFO ENDPOINT).
DEFUNINFO is the return value of `checkdoc-defun-info'. ENDPOINT is the
location of end of the documentation string.")
(defvar checkdoc-comment-style-hooks nil
"Hooks called after the standard comment style check is completed.
(define-obsolete-variable-alias 'checkdoc-comment-style-hooks
checkdoc-comment-style-functions "24.3")
(defvar checkdoc-comment-style-functions nil
"Hook run after the standard comment style check is completed.
Must return nil if no errors are found, or a string describing the
problem discovered. This is useful for adding additional checks.")
@ -1843,7 +1847,7 @@ Replace with \"%s\"? " original replace)
;; and reliance on the Ispell program.
(checkdoc-ispell-docstring-engine e)
;; User supplied checks
(save-excursion (checkdoc-run-hooks 'checkdoc-style-hooks fp e))
(save-excursion (checkdoc-run-hooks 'checkdoc-style-functions fp e))
;; Done!
)))
@ -2353,7 +2357,7 @@ Code:, and others referenced in the style guide."
err
(or
;; Generic Full-file checks (should be comment related)
(checkdoc-run-hooks 'checkdoc-comment-style-hooks)
(checkdoc-run-hooks 'checkdoc-comment-style-functions)
err))
;; Done with full file comment checks
err)))