Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
e4da9c1c
Commit
e4da9c1c
authored
May 21, 2000
by
Stefan Monnier
Browse files
(remove-hook): Don't turn the hook's value into a list.
parent
ac266581
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
5 deletions
+8
-5
lisp/ChangeLog
lisp/ChangeLog
+4
-0
lisp/subr.el
lisp/subr.el
+4
-5
No files found.
lisp/ChangeLog
View file @
e4da9c1c
2000-05-21 Stefan Monnier <monnier@cs.yale.edu>
* subr.el (remove-hook): Don't turn the hook's value into a list.
2000-05-21 Dave Love <fx@gnu.org>
* edmacro.el (edmacro-parse-keys): Return vector if any elements
...
...
lisp/subr.el
View file @
e4da9c1c
...
...
@@ -733,11 +733,10 @@ To make a hook variable buffer-local, always use
(
unless
(
and
(
consp
(
symbol-value
hook
))
(
memq
t
(
symbol-value
hook
)))
(
setq
local
t
)))
(
let
((
hook-value
(
if
local
(
symbol-value
hook
)
(
default-value
hook
))))
;; If the hook value is a single function, turn it into a list.
(
when
(
or
(
not
(
listp
hook-value
))
(
eq
(
car
hook-value
)
'lambda
))
(
setq
hook-value
(
list
hook-value
)))
;; Do the actual removal if necessary
(
setq
hook-value
(
delete
function
(
copy-sequence
hook-value
)))
;; Remove the function, for both the list and the non-list cases.
(
if
(
or
(
not
(
listp
hook-value
))
(
eq
(
car
hook-value
)
'lambda
))
(
if
(
equal
hook-value
function
)
(
setq
hook-value
nil
))
(
setq
hook-value
(
delete
function
(
copy-sequence
hook-value
))))
;; If the function is on the global hook, we need to shadow it locally
;;(when (and local (member function (default-value hook))
;; (not (member (cons 'not function) hook-value)))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment