+2011-12-05 Christopher Genovese <genovese.cr@gmail.com> (tiny change)
+
+ * emacs-lisp/assoc.el (aput): Fix return value (bug#10146)
+
2011-12-05 Eli Zaretskii <eliz@gnu.org>
* descr-text.el (describe-char): Fix display of strong
(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.
(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))))