summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/byte-opt.el
diff options
context:
space:
mode:
authorKaroly Lorentey <lorentey@elte.hu>2005-11-07 14:56:19 +0000
committerKaroly Lorentey <lorentey@elte.hu>2005-11-07 14:56:19 +0000
commit79c3172f78d56cf88c927fb0ff5c3b30fd676686 (patch)
tree20932caaa9695f3bb29b543f46107319a687308d /lisp/emacs-lisp/byte-opt.el
parent9684e4c92f12f7c31f5e6fda7742960b403395f6 (diff)
parentfab0d3087eb5215a5d08379ac765af27abc28842 (diff)
downloademacs-79c3172f78d56cf88c927fb0ff5c3b30fd676686.tar.gz
emacs-79c3172f78d56cf88c927fb0ff5c3b30fd676686.tar.bz2
emacs-79c3172f78d56cf88c927fb0ff5c3b30fd676686.zip
Merged from miles@gnu.org--gnu-2005 (patch 149-151, 629-641)
Patches applied: * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-629 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-630 Merge from gnus--rel--5.10 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-631 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-632 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-633 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-634 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-635 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-636 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-637 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-638 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-639 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-640 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-641 Update from CVS * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-149 Merge from emacs--cvs-trunk--0 * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-150 Update from CVS * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-151 Update from CVS git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-437
Diffstat (limited to 'lisp/emacs-lisp/byte-opt.el')
-rw-r--r--lisp/emacs-lisp/byte-opt.el3
1 files changed, 2 insertions, 1 deletions
diff --git a/lisp/emacs-lisp/byte-opt.el b/lisp/emacs-lisp/byte-opt.el
index 7d47d809673..8711a05e2d9 100644
--- a/lisp/emacs-lisp/byte-opt.el
+++ b/lisp/emacs-lisp/byte-opt.el
@@ -1121,6 +1121,7 @@
(put 'symbol-name 'byte-optimizer 'byte-optimize-pure-func)
(put 'regexp-opt 'byte-optimizer 'byte-optimize-pure-func)
(put 'regexp-quote 'byte-optimizer 'byte-optimize-pure-func)
+(put 'string-to-syntax 'byte-optimizer 'byte-optimize-pure-func)
(defun byte-optimize-pure-func (form)
"Do constant folding for pure functions.
This assumes that the function will not have any side-effects and that
@@ -1134,7 +1135,7 @@ of FORM by signaling the error at compile-time."
(setq constant nil))
(setq args (cdr args)))
(if constant
- (eval form)
+ (list 'quote (eval form))
form)))
;; Avoid having to write forward-... with a negative arg for speed.