summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/bytecomp.el
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>2006-11-28 02:22:17 +0000
committerRichard M. Stallman <rms@gnu.org>2006-11-28 02:22:17 +0000
commit23759d7d3d87441e39d663046f11fa9baee8aecf (patch)
treec282bcb5fcc96f001f032360f62d086ef929b825 /lisp/emacs-lisp/bytecomp.el
parent5be3c3daf30c01bda5844ba96866a42a090aba5d (diff)
downloademacs-23759d7d3d87441e39d663046f11fa9baee8aecf.tar.gz
(byte-compile-get-constant):
Replace incorrect use of assoc-default with a loop.
Diffstat (limited to 'lisp/emacs-lisp/bytecomp.el')
-rw-r--r--lisp/emacs-lisp/bytecomp.el8
1 files changed, 6 insertions, 2 deletions
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
index 02a88c13973..0fa2da23721 100644
--- a/lisp/emacs-lisp/bytecomp.el
+++ b/lisp/emacs-lisp/bytecomp.el
@@ -2864,8 +2864,12 @@ That command is designed for interactive use only" fn))
(defmacro byte-compile-get-constant (const)
`(or (if (stringp ,const)
- (assoc-default ,const byte-compile-constants
- 'equal-including-properties nil)
+ ;; In a string constant, treat properties as significant.
+ (let (result)
+ (dolist (elt byte-compile-constants)
+ (if (equal-including-properties (car elt) ,const)
+ (setq result elt)))
+ result)
(assq ,const byte-compile-constants))
(car (setq byte-compile-constants
(cons (list ,const) byte-compile-constants)))))