APPROVE COMMIT
NOTE: This patch has been committed.
# HG changeset patch
# User Aidan Kehoe <kehoea(a)parhasard.net>
# Date 1325253307 0
# Node ID 5e256f495401fa242ea0e8d330807ecaae2b709f
# Parent f5315ccbf00577d58d6613eb030e6f8f11cf7ad5
Don't error with a non-list plist, #'copy-symbol
lisp/ChangeLog addition:
2011-12-30 Aidan Kehoe <kehoea(a)parhasard.net>
* subr.el (copy-symbol): Don't error with a non-list plist, as
happens with symbols in abbrev tables.
diff -r f5315ccbf005 -r 5e256f495401 lisp/ChangeLog
--- a/lisp/ChangeLog Fri Dec 30 12:43:52 2011 +0000
+++ b/lisp/ChangeLog Fri Dec 30 13:55:07 2011 +0000
@@ -1,3 +1,8 @@
+2011-12-30 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * subr.el (copy-symbol): Don't error with a non-list plist, as
+ happens with symbols in abbrev tables.
+
2011-12-27 Didier Verna <didier(a)xemacs.org>
* cl-macs.el (face-foreback): New defsetf.
diff -r f5315ccbf005 -r 5e256f495401 lisp/subr.el
--- a/lisp/subr.el Fri Dec 30 12:43:52 2011 +0000
+++ b/lisp/subr.el Fri Dec 30 13:55:07 2011 +0000
@@ -466,7 +466,7 @@
"Return a new uninterned symbol with the same name as SYMBOL.
If COPY-PROPERTIES is non-nil, the new symbol will have a copy of
SYMBOL's value, function, and property lists."
- (let ((new (make-symbol (symbol-name symbol))))
+ (let ((new (make-symbol (symbol-name symbol))) plist)
(when copy-properties
;; This will not copy SYMBOL's chain of forwarding objects, but
;; I think that's OK. Callers should not expect such magic to
@@ -475,7 +475,9 @@
(set new (symbol-value symbol)))
(and (fboundp symbol)
(fset new (symbol-function symbol)))
- (setplist new (copy-list (symbol-plist symbol))))
+ (setq plist (symbol-plist symbol)
+ plist (if (consp plist) (copy-list plist) plist))
+ (setplist new plist))
new))
(defun set-symbol-value-in-buffer (sym val buffer)
--
‘Iodine deficiency was endemic in parts of the UK until, through what has been
described as “an unplanned and accidental public health triumph”, iodine was
added to cattle feed to improve milk production in the 1930s.’
(EN Pearce, Lancet, June 2011)
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-patches