Mercurial > emacs
comparison lisp/subr.el @ 28947:d32d8029558c
(remove-hook): `setq' hook-value, not `set'.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Tue, 16 May 2000 21:36:57 +0000 |
parents | 2a91228f7aa3 |
children | a11f776c0efc |
comparison
equal
deleted
inserted
replaced
28946:f100c3d709e4 | 28947:d32d8029558c |
---|---|
733 (unless (and (consp (symbol-value hook)) (memq t (symbol-value hook))) | 733 (unless (and (consp (symbol-value hook)) (memq t (symbol-value hook))) |
734 (setq local t))) | 734 (setq local t))) |
735 (let ((hook-value (if local (symbol-value hook) (default-value hook)))) | 735 (let ((hook-value (if local (symbol-value hook) (default-value hook)))) |
736 ;; If the hook value is a single function, turn it into a list. | 736 ;; If the hook value is a single function, turn it into a list. |
737 (when (or (not (listp hook-value)) (eq (car hook-value) 'lambda)) | 737 (when (or (not (listp hook-value)) (eq (car hook-value) 'lambda)) |
738 (set hook-value (list hook-value))) | 738 (setq hook-value (list hook-value))) |
739 ;; Do the actual removal if necessary | 739 ;; Do the actual removal if necessary |
740 (setq hook-value (delete function (copy-sequence hook-value))) | 740 (setq hook-value (delete function (copy-sequence hook-value))) |
741 ;; If the function is on the global hook, we need to shadow it locally | 741 ;; If the function is on the global hook, we need to shadow it locally |
742 ;;(when (and local (member function (default-value hook)) | 742 ;;(when (and local (member function (default-value hook)) |
743 ;; (not (member (cons 'not function) hook-value))) | 743 ;; (not (member (cons 'not function) hook-value))) |