# HG changeset patch # User Chong Yidong # Date 1175883743 0 # Node ID 25ef211c0cc1ccc7a6508c285874c17582f08eda # Parent f1b843dae8aba0fef05f3769f1a76afded68ad46 * emacs-lisp/byte-opt.el (byte-optimize-pure-func): Remove function (originally checked in as byte-optimize-concat on 1997-11-02). diff -r f1b843dae8ab -r 25ef211c0cc1 lisp/ChangeLog --- a/lisp/ChangeLog Fri Apr 06 18:04:26 2007 +0000 +++ b/lisp/ChangeLog Fri Apr 06 18:22:23 2007 +0000 @@ -1,5 +1,9 @@ 2007-04-06 Chong Yidong + * emacs-lisp/byte-opt.el (byte-optimize-pure-func): Remove + function (originally checked in as byte-optimize-concat on + 1997-11-02). + * mail/sendmail.el (mail-text, mail-mode): Revert extant pieces of 1995-05-19 doc changes. diff -r f1b843dae8ab -r 25ef211c0cc1 lisp/emacs-lisp/byte-opt.el --- a/lisp/emacs-lisp/byte-opt.el Fri Apr 06 18:04:26 2007 +0000 +++ b/lisp/emacs-lisp/byte-opt.el Fri Apr 06 18:22:23 2007 +0000 @@ -1118,27 +1118,6 @@ (byte-optimize-predicate form)) form)) -(put 'concat 'byte-optimizer 'byte-optimize-pure-func) -(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 -its return value depends solely on its arguments. -If the function can signal an error, this might change the semantics -of FORM by signaling the error at compile-time." - (let ((args (cdr form)) - (constant t)) - (while (and args constant) - (or (byte-compile-constp (car args)) - (setq constant nil)) - (setq args (cdr args))) - (if constant - (list 'quote (eval form)) - form))) - ;; Avoid having to write forward-... with a negative arg for speed. ;; Fixme: don't be limited to constant args. (put 'backward-char 'byte-optimizer 'byte-optimize-backward-char)