diff options
| author | Christopher Genovese | 2011-12-05 17:22:15 -0500 |
|---|---|---|
| committer | Stefan Monnier | 2011-12-05 17:22:15 -0500 |
| commit | e65adfac3bc8c7dcc78464707c66d6aea958f684 (patch) | |
| tree | 80646e6775ea00838b1b8355ebbf16c5ffd969d5 | |
| parent | 71cc0b7439279dacaa9fa8a6dd97fb073c46551b (diff) | |
| download | emacs-e65adfac3bc8c7dcc78464707c66d6aea958f684.tar.gz emacs-e65adfac3bc8c7dcc78464707c66d6aea958f684.zip | |
* lisp/emacs-lisp/assoc.el (aput): Fix return value
Fixes: debbugs:10146
| -rw-r--r-- | lisp/ChangeLog | 4 | ||||
| -rw-r--r-- | lisp/emacs-lisp/assoc.el | 7 |
2 files changed, 7 insertions, 4 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 8cb089d523e..2bc6b658823 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2011-12-05 Christopher Genovese <genovese.cr@gmail.com> (tiny change) | ||
| 2 | |||
| 3 | * emacs-lisp/assoc.el (aput): Fix return value (bug#10146) | ||
| 4 | |||
| 1 | 2011-12-05 Eli Zaretskii <eliz@gnu.org> | 5 | 2011-12-05 Eli Zaretskii <eliz@gnu.org> |
| 2 | 6 | ||
| 3 | * descr-text.el (describe-char): Fix display of strong | 7 | * descr-text.el (describe-char): Fix display of strong |
diff --git a/lisp/emacs-lisp/assoc.el b/lisp/emacs-lisp/assoc.el index 31be851f2dd..e650995d3fe 100644 --- a/lisp/emacs-lisp/assoc.el +++ b/lisp/emacs-lisp/assoc.el | |||
| @@ -61,10 +61,9 @@ pair is not at the head of alist. ALIST is not altered." | |||
| 61 | 61 | ||
| 62 | 62 | ||
| 63 | (defun aput (alist-symbol key &optional value) | 63 | (defun aput (alist-symbol key &optional value) |
| 64 | "Inserts a key-value pair into an alist. | 64 | "Insert a key-value pair into an alist. |
| 65 | The alist is referenced by ALIST-SYMBOL. The key-value pair is made | 65 | The alist is referenced by ALIST-SYMBOL. The key-value pair is made |
| 66 | from KEY and optionally, VALUE. Returns the altered alist or nil if | 66 | from KEY and optionally, VALUE. Returns the altered alist. |
| 67 | ALIST is nil. | ||
| 68 | 67 | ||
| 69 | If the key-value pair referenced by KEY can be found in the alist, and | 68 | If the key-value pair referenced by KEY can be found in the alist, and |
| 70 | VALUE is supplied non-nil, then the value of KEY will be set to VALUE. | 69 | VALUE is supplied non-nil, then the value of KEY will be set to VALUE. |
| @@ -78,7 +77,7 @@ of the alist (with value nil if VALUE is nil or not supplied)." | |||
| 78 | (setq alist (symbol-value alist-symbol)) | 77 | (setq alist (symbol-value alist-symbol)) |
| 79 | (cond ((null alist) (set alist-symbol elem)) | 78 | (cond ((null alist) (set alist-symbol elem)) |
| 80 | ((anot-head-p alist key) (set alist-symbol (nconc elem alist))) | 79 | ((anot-head-p alist key) (set alist-symbol (nconc elem alist))) |
| 81 | (value (setcar alist (car elem))) | 80 | (value (setcar alist (car elem)) alist) |
| 82 | (t alist)))) | 81 | (t alist)))) |
| 83 | 82 | ||
| 84 | 83 | ||