[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r106624: * lisp/emacs-lisp/assoc.el (
From: |
Stefan Monnier |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r106624: * lisp/emacs-lisp/assoc.el (aput): Fix return value |
Date: |
Mon, 05 Dec 2011 17:22:15 -0500 |
User-agent: |
Bazaar (2.3.1) |
------------------------------------------------------------
revno: 106624
fixes bug(s): http://debbugs.gnu.org/cgi/bugreport.cgi?bug=10146
author: Christopher Genovese <address@hidden>
committer: Stefan Monnier <address@hidden>
branch nick: trunk
timestamp: Mon 2011-12-05 17:22:15 -0500
message:
* lisp/emacs-lisp/assoc.el (aput): Fix return value
modified:
lisp/ChangeLog
lisp/emacs-lisp/assoc.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2011-12-05 17:46:27 +0000
+++ b/lisp/ChangeLog 2011-12-05 22:22:15 +0000
@@ -1,3 +1,7 @@
+2011-12-05 Christopher Genovese <address@hidden> (tiny change)
+
+ * emacs-lisp/assoc.el (aput): Fix return value (bug#10146)
+
2011-12-05 Eli Zaretskii <address@hidden>
* descr-text.el (describe-char): Fix display of strong
=== modified file 'lisp/emacs-lisp/assoc.el'
--- a/lisp/emacs-lisp/assoc.el 2011-02-26 21:09:03 +0000
+++ b/lisp/emacs-lisp/assoc.el 2011-12-05 22:22:15 +0000
@@ -61,10 +61,9 @@
(defun aput (alist-symbol key &optional value)
- "Inserts a key-value pair into an alist.
+ "Insert a key-value pair into an alist.
The alist is referenced by ALIST-SYMBOL. The key-value pair is made
-from KEY and optionally, VALUE. Returns the altered alist or nil if
-ALIST is nil.
+from KEY and optionally, VALUE. Returns the altered alist.
If the key-value pair referenced by KEY can be found in the alist, and
VALUE is supplied non-nil, then the value of KEY will be set to VALUE.
@@ -78,7 +77,7 @@
(setq alist (symbol-value alist-symbol))
(cond ((null alist) (set alist-symbol elem))
((anot-head-p alist key) (set alist-symbol (nconc elem alist)))
- (value (setcar alist (car elem)))
+ (value (setcar alist (car elem)) alist)
(t alist))))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r106624: * lisp/emacs-lisp/assoc.el (aput): Fix return value,
Stefan Monnier <=