diff options
| -rw-r--r-- | etc/NEWS | 3 | ||||
| -rw-r--r-- | lisp/ChangeLog | 7 | ||||
| -rw-r--r-- | lisp/gnus/ChangeLog | 4 | ||||
| -rw-r--r-- | lisp/gnus/gnus-util.el | 8 | ||||
| -rw-r--r-- | lisp/progmodes/cc-mode.el | 10 | ||||
| -rw-r--r-- | lisp/progmodes/cc-styles.el | 3 | ||||
| -rw-r--r-- | lisp/subr.el | 31 |
7 files changed, 22 insertions, 44 deletions
| @@ -551,7 +551,8 @@ frame-update-face-colors, x-frob-font-weight, x-frob-font-slant, | |||
| 551 | x-make-font-bold, x-make-font-demibold, x-make-font-unbold | 551 | x-make-font-bold, x-make-font-demibold, x-make-font-unbold |
| 552 | x-make-font-italic, x-make-font-oblique, x-make-font-unitalic | 552 | x-make-font-italic, x-make-font-oblique, x-make-font-unitalic |
| 553 | x-make-font-bold-italic, mldrag-drag-mode-line, mldrag-drag-vertical-line, | 553 | x-make-font-bold-italic, mldrag-drag-mode-line, mldrag-drag-vertical-line, |
| 554 | iswitchb-default-keybindings, char-bytes, isearch-return-char | 554 | iswitchb-default-keybindings, char-bytes, isearch-return-char, |
| 555 | make-local-hook | ||
| 555 | 556 | ||
| 556 | ** The following variables and aliases, obsolete since at least Emacs 21.1, | 557 | ** The following variables and aliases, obsolete since at least Emacs 21.1, |
| 557 | have been removed: | 558 | have been removed: |
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index c4e1ab16ce1..d31abc287e8 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,12 @@ | |||
| 1 | 2010-10-03 Glenn Morris <rgm@gnu.org> | 1 | 2010-10-03 Glenn Morris <rgm@gnu.org> |
| 2 | 2 | ||
| 3 | * subr.el (make-local-hook): Remove function obsolete since 21.1. | ||
| 4 | * progmodes/cc-mode.el (make-local-hook): Don't do cc-bytecomp stuff. | ||
| 5 | (c-basic-common-init, c-font-lock-init): Only call make-local-hook on | ||
| 6 | XEmacs. | ||
| 7 | * progmodes/cc-styles.el (make-local-hook): Don't do cc-bytecomp stuff. | ||
| 8 | (c-make-styles-buffer-local): Only call make-local-hook on XEmacs. | ||
| 9 | |||
| 3 | * ps-def.el (leading-code-private-22, charset-bytes, charset-id) | 10 | * ps-def.el (leading-code-private-22, charset-bytes, charset-id) |
| 4 | (charset-width, find-charset-region, chars-in-region, forward-point) | 11 | (charset-width, find-charset-region, chars-in-region, forward-point) |
| 5 | (encode-coding-string, coding-system-p, ccl-execute-on-string) | 12 | (encode-coding-string, coding-system-p, ccl-execute-on-string) |
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 8d227906aca..3a8f3dac83c 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2010-10-03 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * gnus-util.el (gnus-make-local-hook): Simplify. | ||
| 4 | |||
| 1 | 2010-10-02 Julien Danjou <julien@danjou.info> | 5 | 2010-10-02 Julien Danjou <julien@danjou.info> |
| 2 | 6 | ||
| 3 | * gnus-util.el (gnus-iswitchb-completing-read): New function. | 7 | * gnus-util.el (gnus-iswitchb-completing-read): New function. |
diff --git a/lisp/gnus/gnus-util.el b/lisp/gnus/gnus-util.el index 0bf5b66a71d..8a6d9241f07 100644 --- a/lisp/gnus/gnus-util.el +++ b/lisp/gnus/gnus-util.el | |||
| @@ -149,11 +149,9 @@ This is a compatibility function for different Emacsen." | |||
| 149 | ;; XEmacs. In Emacs we don't need to call `make-local-hook' first. | 149 | ;; XEmacs. In Emacs we don't need to call `make-local-hook' first. |
| 150 | ;; It's harmless, though, so the main purpose of this alias is to shut | 150 | ;; It's harmless, though, so the main purpose of this alias is to shut |
| 151 | ;; up the byte compiler. | 151 | ;; up the byte compiler. |
| 152 | (defalias 'gnus-make-local-hook | 152 | (defalias 'gnus-make-local-hook (if (featurep 'xemacs) |
| 153 | (if (eq (get 'make-local-hook 'byte-compile) | 153 | 'make-local-hook |
| 154 | 'byte-compile-obsolete) | 154 | 'ignore) |
| 155 | 'ignore ; Emacs | ||
| 156 | 'make-local-hook)) ; XEmacs | ||
| 157 | 155 | ||
| 158 | (defun gnus-delete-first (elt list) | 156 | (defun gnus-delete-first (elt list) |
| 159 | "Delete by side effect the first occurrence of ELT as a member of LIST." | 157 | "Delete by side effect the first occurrence of ELT as a member of LIST." |
diff --git a/lisp/progmodes/cc-mode.el b/lisp/progmodes/cc-mode.el index 6a76a657829..505a5663ebc 100644 --- a/lisp/progmodes/cc-mode.el +++ b/lisp/progmodes/cc-mode.el | |||
| @@ -100,7 +100,6 @@ | |||
| 100 | (cc-bytecomp-defvar adaptive-fill-first-line-regexp) ; Emacs | 100 | (cc-bytecomp-defvar adaptive-fill-first-line-regexp) ; Emacs |
| 101 | (cc-bytecomp-defun set-keymap-parents) ; XEmacs | 101 | (cc-bytecomp-defun set-keymap-parents) ; XEmacs |
| 102 | (cc-bytecomp-defun run-mode-hooks) ; Emacs 21.1 | 102 | (cc-bytecomp-defun run-mode-hooks) ; Emacs 21.1 |
| 103 | (cc-bytecomp-obsolete-fun make-local-hook) ; Marked obsolete in Emacs 21.1. | ||
| 104 | 103 | ||
| 105 | ;; We set these variables during mode init, yet we don't require | 104 | ;; We set these variables during mode init, yet we don't require |
| 106 | ;; font-lock. | 105 | ;; font-lock. |
| @@ -600,9 +599,10 @@ that requires a literal mode spec at compile time." | |||
| 600 | 599 | ||
| 601 | ;; Install the functions that ensure that various internal caches | 600 | ;; Install the functions that ensure that various internal caches |
| 602 | ;; don't become invalid due to buffer changes. | 601 | ;; don't become invalid due to buffer changes. |
| 603 | (make-local-hook 'before-change-functions) | 602 | (when (featurep 'xemacs) |
| 603 | (make-local-hook 'before-change-functions) | ||
| 604 | (make-local-hook 'after-change-functions)) | ||
| 604 | (add-hook 'before-change-functions 'c-before-change nil t) | 605 | (add-hook 'before-change-functions 'c-before-change nil t) |
| 605 | (make-local-hook 'after-change-functions) | ||
| 606 | (add-hook 'after-change-functions 'c-after-change nil t) | 606 | (add-hook 'after-change-functions 'c-after-change nil t) |
| 607 | (set (make-local-variable 'font-lock-extend-after-change-region-function) | 607 | (set (make-local-variable 'font-lock-extend-after-change-region-function) |
| 608 | 'c-extend-after-change-region)) ; Currently (2009-05) used by all | 608 | 'c-extend-after-change-region)) ; Currently (2009-05) used by all |
| @@ -1113,8 +1113,8 @@ This does not load the font-lock package. Use after | |||
| 1113 | c-beginning-of-syntax | 1113 | c-beginning-of-syntax |
| 1114 | (font-lock-mark-block-function | 1114 | (font-lock-mark-block-function |
| 1115 | . c-mark-function))) | 1115 | . c-mark-function))) |
| 1116 | 1116 | (if (featurep 'xemacs) | |
| 1117 | (make-local-hook 'font-lock-mode-hook) | 1117 | (make-local-hook 'font-lock-mode-hook)) |
| 1118 | (add-hook 'font-lock-mode-hook 'c-after-font-lock-init nil t)) | 1118 | (add-hook 'font-lock-mode-hook 'c-after-font-lock-init nil t)) |
| 1119 | 1119 | ||
| 1120 | (defun c-extend-after-change-region (beg end old-len) | 1120 | (defun c-extend-after-change-region (beg end old-len) |
diff --git a/lisp/progmodes/cc-styles.el b/lisp/progmodes/cc-styles.el index 48120563b29..15d44f6538a 100644 --- a/lisp/progmodes/cc-styles.el +++ b/lisp/progmodes/cc-styles.el | |||
| @@ -50,7 +50,6 @@ | |||
| 50 | 50 | ||
| 51 | ;; Silence the compiler. | 51 | ;; Silence the compiler. |
| 52 | (cc-bytecomp-defvar adaptive-fill-first-line-regexp) ; Emacs | 52 | (cc-bytecomp-defvar adaptive-fill-first-line-regexp) ; Emacs |
| 53 | (cc-bytecomp-obsolete-fun make-local-hook) ; Marked obsolete in Emacs 21.1. | ||
| 54 | 53 | ||
| 55 | 54 | ||
| 56 | (defvar c-style-alist | 55 | (defvar c-style-alist |
| @@ -649,7 +648,7 @@ any reason to call this function directly." | |||
| 649 | (mapc func varsyms) | 648 | (mapc func varsyms) |
| 650 | ;; Hooks must be handled specially | 649 | ;; Hooks must be handled specially |
| 651 | (if this-buf-only-p | 650 | (if this-buf-only-p |
| 652 | (make-local-hook 'c-special-indent-hook) | 651 | (if (featurep 'xemacs) (make-local-hook 'c-special-indent-hook)) |
| 653 | (with-no-warnings (make-variable-buffer-local 'c-special-indent-hook)) | 652 | (with-no-warnings (make-variable-buffer-local 'c-special-indent-hook)) |
| 654 | (setq c-style-variables-are-local-p t)) | 653 | (setq c-style-variables-are-local-p t)) |
| 655 | )) | 654 | )) |
diff --git a/lisp/subr.el b/lisp/subr.el index 82e1988156a..2dcc37863c7 100644 --- a/lisp/subr.el +++ b/lisp/subr.el | |||
| @@ -1163,37 +1163,6 @@ to reread, so it now uses nil to mean `no event', instead of -1." | |||
| 1163 | 1163 | ||
| 1164 | ;;;; Hook manipulation functions. | 1164 | ;;;; Hook manipulation functions. |
| 1165 | 1165 | ||
| 1166 | (defun make-local-hook (hook) | ||
| 1167 | "Make the hook HOOK local to the current buffer. | ||
| 1168 | The return value is HOOK. | ||
| 1169 | |||
| 1170 | You never need to call this function now that `add-hook' does it for you | ||
| 1171 | if its LOCAL argument is non-nil. | ||
| 1172 | |||
| 1173 | When a hook is local, its local and global values | ||
| 1174 | work in concert: running the hook actually runs all the hook | ||
| 1175 | functions listed in *either* the local value *or* the global value | ||
| 1176 | of the hook variable. | ||
| 1177 | |||
| 1178 | This function works by making t a member of the buffer-local value, | ||
| 1179 | which acts as a flag to run the hook functions in the default value as | ||
| 1180 | well. This works for all normal hooks, but does not work for most | ||
| 1181 | non-normal hooks yet. We will be changing the callers of non-normal | ||
| 1182 | hooks so that they can handle localness; this has to be done one by | ||
| 1183 | one. | ||
| 1184 | |||
| 1185 | This function does nothing if HOOK is already local in the current | ||
| 1186 | buffer. | ||
| 1187 | |||
| 1188 | Do not use `make-local-variable' to make a hook variable buffer-local." | ||
| 1189 | (if (local-variable-p hook) | ||
| 1190 | nil | ||
| 1191 | (or (boundp hook) (set hook nil)) | ||
| 1192 | (make-local-variable hook) | ||
| 1193 | (set hook (list t))) | ||
| 1194 | hook) | ||
| 1195 | (make-obsolete 'make-local-hook "not necessary any more." "21.1") | ||
| 1196 | |||
| 1197 | (defun add-hook (hook function &optional append local) | 1166 | (defun add-hook (hook function &optional append local) |
| 1198 | "Add to the value of HOOK the function FUNCTION. | 1167 | "Add to the value of HOOK the function FUNCTION. |
| 1199 | FUNCTION is not added if already present. | 1168 | FUNCTION is not added if already present. |