emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] emacs/lisp ChangeLog subr.el


From: Dan Nicolaescu
Subject: [Emacs-diffs] emacs/lisp ChangeLog subr.el
Date: Wed, 11 Nov 2009 06:16:20 +0000

CVSROOT:        /cvsroot/emacs
Module name:    emacs
Changes by:     Dan Nicolaescu <dann>   09/11/11 06:16:19

Modified files:
        lisp           : ChangeLog subr.el 

Log message:
        * subr.el (add-hook): Purecopy strings.
        (eval-after-load): Purecopy load-history-regexp and the form.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/ChangeLog?cvsroot=emacs&r1=1.16596&r2=1.16597
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/subr.el?cvsroot=emacs&r1=1.664&r2=1.665

Patches:
Index: ChangeLog
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/ChangeLog,v
retrieving revision 1.16596
retrieving revision 1.16597
diff -u -b -r1.16596 -r1.16597
--- ChangeLog   11 Nov 2009 06:12:21 -0000      1.16596
+++ ChangeLog   11 Nov 2009 06:16:16 -0000      1.16597
@@ -1,5 +1,8 @@
 2009-11-11  Dan Nicolaescu  <address@hidden>
 
+       * subr.el (add-hook): Purecopy strings.
+       (eval-after-load): Purecopy load-history-regexp and the form.
+
        * custom.el (custom-declare-group): Purecopy load-file-name.
 
        * subr.el (menu-bar-separator): New defconst.

Index: subr.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/subr.el,v
retrieving revision 1.664
retrieving revision 1.665
diff -u -b -r1.664 -r1.665
--- subr.el     11 Nov 2009 05:57:54 -0000      1.664
+++ subr.el     11 Nov 2009 06:16:19 -0000      1.665
@@ -1218,6 +1218,8 @@
       (setq hook-value (list hook-value)))
     ;; Do the actual addition if necessary
     (unless (member function hook-value)
+      (when (stringp function)
+       (setq function (purecopy function)))
       (setq hook-value
            (if append
                (append hook-value (list function))
@@ -1660,14 +1662,14 @@
   ;; Add this FORM into after-load-alist (regardless of whether we'll be
   ;; evaluating it now).
   (let* ((regexp-or-feature
-         (if (stringp file) (load-history-regexp file) file))
+         (if (stringp file) (setq file (purecopy (load-history-regexp file))) 
file))
         (elt (assoc regexp-or-feature after-load-alist)))
     (unless elt
       (setq elt (list regexp-or-feature))
       (push elt after-load-alist))
     ;; Add FORM to the element unless it's already there.
     (unless (member form (cdr elt))
-      (nconc elt (list form)))
+      (nconc elt (purecopy (list form))))
 
     ;; Is there an already loaded file whose name (or `provide' name)
     ;; matches FILE?




reply via email to

[Prev in Thread] Current Thread [Next in Thread]