(byte-compile-trueconstp, byte-compile-nilconstp): No recursion in defsubst.
This commit is contained in:
parent
68a2af7af0
commit
20ce031c40
2 changed files with 13 additions and 2 deletions
|
@ -1,5 +1,8 @@
|
|||
2008-03-03 Stefan Monnier <monnier@iro.umontreal.ca>
|
||||
|
||||
* emacs-lisp/byte-opt.el (byte-compile-trueconstp)
|
||||
(byte-compile-nilconstp): Can't use recursion in a defsubst.
|
||||
|
||||
* textmodes/tex-mode.el (latex-mode): Remove % from paragraph-separate
|
||||
so that M-q can fill comments.
|
||||
(tex-executable-exists-p, tex-compile): Extend with special syntax for
|
||||
|
|
|
@ -632,20 +632,28 @@
|
|||
|
||||
(defsubst byte-compile-trueconstp (form)
|
||||
"Return non-nil if FORM always evaluates to a non-nil value."
|
||||
(while (eq (car-safe form) 'progn)
|
||||
(setq form (car (last (cdr form)))))
|
||||
(cond ((consp form)
|
||||
(case (car form)
|
||||
(quote (cadr form))
|
||||
(progn (byte-compile-trueconstp (car (last (cdr form)))))))
|
||||
;; Can't use recursion in a defsubst.
|
||||
;; (progn (byte-compile-trueconstp (car (last (cdr form)))))
|
||||
))
|
||||
((not (symbolp form)))
|
||||
((eq form t))
|
||||
((keywordp form))))
|
||||
|
||||
(defsubst byte-compile-nilconstp (form)
|
||||
"Return non-nil if FORM always evaluates to a nil value."
|
||||
(while (eq (car-safe form) 'progn)
|
||||
(setq form (car (last (cdr form)))))
|
||||
(cond ((consp form)
|
||||
(case (car form)
|
||||
(quote (null (cadr form)))
|
||||
(progn (byte-compile-nilconstp (car (last (cdr form)))))))
|
||||
;; Can't use recursion in a defsubst.
|
||||
;; (progn (byte-compile-nilconstp (car (last (cdr form)))))
|
||||
))
|
||||
((not (symbolp form)) nil)
|
||||
((null form))))
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue