diff options
| author | Stefan Monnier | 2012-10-23 11:06:07 -0400 |
|---|---|---|
| committer | Stefan Monnier | 2012-10-23 11:06:07 -0400 |
| commit | d106953274d29b6be4ef7e2c442078c81a52ff2f (patch) | |
| tree | 1daf5ea3f0c8d0ed1914ba3fc339b1dd23438e20 /lisp/net | |
| parent | f7eac6d887b7768034e40f16dacbb0c8fb569417 (diff) | |
| download | emacs-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/net')
| -rw-r--r-- | lisp/net/dbus.el | 6 | ||||
| -rw-r--r-- | lisp/net/rcirc.el | 24 |
2 files changed, 20 insertions, 10 deletions
diff --git a/lisp/net/dbus.el b/lisp/net/dbus.el index 772a0a9c626..c95e901c39d 100644 --- a/lisp/net/dbus.el +++ b/lisp/net/dbus.el | |||
| @@ -152,7 +152,9 @@ Otherwise, return result of last form in BODY, or all other errors." | |||
| 152 | (dbus-error (when dbus-debug (signal (car err) (cdr err)))))) | 152 | (dbus-error (when dbus-debug (signal (car err) (cdr err)))))) |
| 153 | (font-lock-add-keywords 'emacs-lisp-mode '("\\<dbus-ignore-errors\\>")) | 153 | (font-lock-add-keywords 'emacs-lisp-mode '("\\<dbus-ignore-errors\\>")) |
| 154 | 154 | ||
| 155 | (defvar dbus-event-error-hooks nil | 155 | (define-obsolete-variable-alias 'dbus-event-error-hooks |
| 156 | 'dbus-event-error-functions "24.3") | ||
| 157 | (defvar dbus-event-error-functions nil | ||
| 156 | "Functions to be called when a D-Bus error happens in the event handler. | 158 | "Functions to be called when a D-Bus error happens in the event handler. |
| 157 | Every function must accept two arguments, the event and the error variable | 159 | Every function must accept two arguments, the event and the error variable |
| 158 | caught in `condition-case' by `dbus-error'.") | 160 | caught in `condition-case' by `dbus-error'.") |
| @@ -947,7 +949,7 @@ If the HANDLER returns a `dbus-error', it is propagated as return message." | |||
| 947 | (dbus-method-error-internal | 949 | (dbus-method-error-internal |
| 948 | (nth 1 event) (nth 4 event) (nth 3 event) (cadr err)))) | 950 | (nth 1 event) (nth 4 event) (nth 3 event) (cadr err)))) |
| 949 | ;; Propagate D-Bus error messages. | 951 | ;; Propagate D-Bus error messages. |
| 950 | (run-hook-with-args 'dbus-event-error-hooks event err) | 952 | (run-hook-with-args 'dbus-event-error-functions event err) |
| 951 | (when (or dbus-debug (= dbus-message-type-error (nth 2 event))) | 953 | (when (or dbus-debug (= dbus-message-type-error (nth 2 event))) |
| 952 | (signal (car err) (cdr err)))))) | 954 | (signal (car err) (cdr err)))))) |
| 953 | 955 | ||
diff --git a/lisp/net/rcirc.el b/lisp/net/rcirc.el index dd345630b9b..e9828c5f813 100644 --- a/lisp/net/rcirc.el +++ b/lisp/net/rcirc.el | |||
| @@ -300,7 +300,9 @@ See `rcirc-dim-nick' face." | |||
| 300 | :type '(repeat string) | 300 | :type '(repeat string) |
| 301 | :group 'rcirc) | 301 | :group 'rcirc) |
| 302 | 302 | ||
| 303 | (defcustom rcirc-print-hooks nil | 303 | (define-obsolete-variable-alias 'rcirc-print-hooks |
| 304 | 'rcirc-print-functions "24.3") | ||
| 305 | (defcustom rcirc-print-functions nil | ||
| 304 | "Hook run after text is printed. | 306 | "Hook run after text is printed. |
| 305 | Called with 5 arguments, PROCESS, SENDER, RESPONSE, TARGET and TEXT." | 307 | Called with 5 arguments, PROCESS, SENDER, RESPONSE, TARGET and TEXT." |
| 306 | :type 'hook | 308 | :type 'hook |
| @@ -647,7 +649,9 @@ is non-nil." | |||
| 647 | "] " | 649 | "] " |
| 648 | text))))) | 650 | text))))) |
| 649 | 651 | ||
| 650 | (defvar rcirc-sentinel-hooks nil | 652 | (define-obsolete-variable-alias 'rcirc-sentinel-hooks |
| 653 | 'rcirc-sentinel-functions "24.3") | ||
| 654 | (defvar rcirc-sentinel-functions nil | ||
| 651 | "Hook functions called when the process sentinel is called. | 655 | "Hook functions called when the process sentinel is called. |
| 652 | Functions are called with PROCESS and SENTINEL arguments.") | 656 | Functions are called with PROCESS and SENTINEL arguments.") |
| 653 | 657 | ||
| @@ -664,7 +668,7 @@ Functions are called with PROCESS and SENTINEL arguments.") | |||
| 664 | sentinel | 668 | sentinel |
| 665 | (process-status process)) (not rcirc-target)) | 669 | (process-status process)) (not rcirc-target)) |
| 666 | (rcirc-disconnect-buffer))) | 670 | (rcirc-disconnect-buffer))) |
| 667 | (run-hook-with-args 'rcirc-sentinel-hooks process sentinel)))) | 671 | (run-hook-with-args 'rcirc-sentinel-functions process sentinel)))) |
| 668 | 672 | ||
| 669 | (defun rcirc-disconnect-buffer (&optional buffer) | 673 | (defun rcirc-disconnect-buffer (&optional buffer) |
| 670 | (with-current-buffer (or buffer (current-buffer)) | 674 | (with-current-buffer (or buffer (current-buffer)) |
| @@ -684,7 +688,9 @@ Functions are called with PROCESS and SENTINEL arguments.") | |||
| 684 | (process-list)) | 688 | (process-list)) |
| 685 | ps)) | 689 | ps)) |
| 686 | 690 | ||
| 687 | (defvar rcirc-receive-message-hooks nil | 691 | (define-obsolete-variable-alias 'rcirc-receive-message-hooks |
| 692 | 'rcirc-receive-message-functions "24.3") | ||
| 693 | (defvar rcirc-receive-message-functions nil | ||
| 688 | "Hook functions run when a message is received from server. | 694 | "Hook functions run when a message is received from server. |
| 689 | Function is called with PROCESS, COMMAND, SENDER, ARGS and LINE.") | 695 | Function is called with PROCESS, COMMAND, SENDER, ARGS and LINE.") |
| 690 | (defun rcirc-filter (process output) | 696 | (defun rcirc-filter (process output) |
| @@ -738,7 +744,7 @@ Function is called with PROCESS, COMMAND, SENDER, ARGS and LINE.") | |||
| 738 | (if (not (fboundp handler)) | 744 | (if (not (fboundp handler)) |
| 739 | (rcirc-handler-generic process cmd sender args text) | 745 | (rcirc-handler-generic process cmd sender args text) |
| 740 | (funcall handler process sender args text)) | 746 | (funcall handler process sender args text)) |
| 741 | (run-hook-with-args 'rcirc-receive-message-hooks | 747 | (run-hook-with-args 'rcirc-receive-message-functions |
| 742 | process cmd sender args text))) | 748 | process cmd sender args text))) |
| 743 | (message "UNHANDLED: %s" text))) | 749 | (message "UNHANDLED: %s" text))) |
| 744 | 750 | ||
| @@ -1625,7 +1631,7 @@ record activity." | |||
| 1625 | (rcirc-log process sender response target text)) | 1631 | (rcirc-log process sender response target text)) |
| 1626 | 1632 | ||
| 1627 | (sit-for 0) ; displayed text before hook | 1633 | (sit-for 0) ; displayed text before hook |
| 1628 | (run-hook-with-args 'rcirc-print-hooks | 1634 | (run-hook-with-args 'rcirc-print-functions |
| 1629 | process sender response target text))))) | 1635 | process sender response target text))))) |
| 1630 | 1636 | ||
| 1631 | (defun rcirc-generate-log-filename (process target) | 1637 | (defun rcirc-generate-log-filename (process target) |
| @@ -1927,7 +1933,9 @@ With prefix ARG, go to the next low priority buffer with activity." | |||
| 1927 | (key-description (this-command-keys)) | 1933 | (key-description (this-command-keys)) |
| 1928 | " for low priority activity.")))))))) | 1934 | " for low priority activity.")))))))) |
| 1929 | 1935 | ||
| 1930 | (defvar rcirc-activity-hooks nil | 1936 | (define-obsolete-variable-alias 'rcirc-activity-hooks |
| 1937 | 'rcirc-activity-functions "24.3") | ||
| 1938 | (defvar rcirc-activity-functions nil | ||
| 1931 | "Hook to be run when there is channel activity. | 1939 | "Hook to be run when there is channel activity. |
| 1932 | 1940 | ||
| 1933 | Functions are called with a single argument, the buffer with the | 1941 | Functions are called with a single argument, the buffer with the |
| @@ -1950,7 +1958,7 @@ activity. Only run if the buffer is not visible and | |||
| 1950 | (unless (and (equal rcirc-activity old-activity) | 1958 | (unless (and (equal rcirc-activity old-activity) |
| 1951 | (member type old-types)) | 1959 | (member type old-types)) |
| 1952 | (rcirc-update-activity-string))))) | 1960 | (rcirc-update-activity-string))))) |
| 1953 | (run-hook-with-args 'rcirc-activity-hooks buffer)) | 1961 | (run-hook-with-args 'rcirc-activity-functions buffer)) |
| 1954 | 1962 | ||
| 1955 | (defun rcirc-clear-activity (buffer) | 1963 | (defun rcirc-clear-activity (buffer) |
| 1956 | "Clear the BUFFER activity." | 1964 | "Clear the BUFFER activity." |