aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Nicolaescu2009-11-11 06:16:16 +0000
committerDan Nicolaescu2009-11-11 06:16:16 +0000
commitff917d632134b76be4c764dd6cf3ac1984b371a4 (patch)
tree85777539d47bd79a282aa4974342de43426fa9ce
parentaf89cf775938a950664dcfba4241f497014edf7e (diff)
downloademacs-ff917d632134b76be4c764dd6cf3ac1984b371a4.tar.gz
emacs-ff917d632134b76be4c764dd6cf3ac1984b371a4.zip
* subr.el (add-hook): Purecopy strings.
(eval-after-load): Purecopy load-history-regexp and the form.
-rw-r--r--lisp/ChangeLog3
-rw-r--r--lisp/subr.el6
2 files changed, 7 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 1f0ddc1217a..3b58fe1125f 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,8 @@
12009-11-11 Dan Nicolaescu <dann@ics.uci.edu> 12009-11-11 Dan Nicolaescu <dann@ics.uci.edu>
2 2
3 * subr.el (add-hook): Purecopy strings.
4 (eval-after-load): Purecopy load-history-regexp and the form.
5
3 * custom.el (custom-declare-group): Purecopy load-file-name. 6 * custom.el (custom-declare-group): Purecopy load-file-name.
4 7
5 * subr.el (menu-bar-separator): New defconst. 8 * subr.el (menu-bar-separator): New defconst.
diff --git a/lisp/subr.el b/lisp/subr.el
index bb3b37ebbf0..fb832608cd4 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -1218,6 +1218,8 @@ function, it is changed to a list of functions."
1218 (setq hook-value (list hook-value))) 1218 (setq hook-value (list hook-value)))
1219 ;; Do the actual addition if necessary 1219 ;; Do the actual addition if necessary
1220 (unless (member function hook-value) 1220 (unless (member function hook-value)
1221 (when (stringp function)
1222 (setq function (purecopy function)))
1221 (setq hook-value 1223 (setq hook-value
1222 (if append 1224 (if append
1223 (append hook-value (list function)) 1225 (append hook-value (list function))
@@ -1660,14 +1662,14 @@ This function makes or adds to an entry on `after-load-alist'."
1660 ;; Add this FORM into after-load-alist (regardless of whether we'll be 1662 ;; Add this FORM into after-load-alist (regardless of whether we'll be
1661 ;; evaluating it now). 1663 ;; evaluating it now).
1662 (let* ((regexp-or-feature 1664 (let* ((regexp-or-feature
1663 (if (stringp file) (load-history-regexp file) file)) 1665 (if (stringp file) (setq file (purecopy (load-history-regexp file))) file))
1664 (elt (assoc regexp-or-feature after-load-alist))) 1666 (elt (assoc regexp-or-feature after-load-alist)))
1665 (unless elt 1667 (unless elt
1666 (setq elt (list regexp-or-feature)) 1668 (setq elt (list regexp-or-feature))
1667 (push elt after-load-alist)) 1669 (push elt after-load-alist))
1668 ;; Add FORM to the element unless it's already there. 1670 ;; Add FORM to the element unless it's already there.
1669 (unless (member form (cdr elt)) 1671 (unless (member form (cdr elt))
1670 (nconc elt (list form))) 1672 (nconc elt (purecopy (list form))))
1671 1673
1672 ;; Is there an already loaded file whose name (or `provide' name) 1674 ;; Is there an already loaded file whose name (or `provide' name)
1673 ;; matches FILE? 1675 ;; matches FILE?