diff options
| author | Stefan Monnier | 2007-08-24 14:39:25 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2007-08-24 14:39:25 +0000 |
| commit | 9d693d807fbd77761cf1c35de1bcbcfc91d690e4 (patch) | |
| tree | 96b91753f6e548e0b854959fd5913dfadc14aae2 | |
| parent | ee163e6dbc0b62323e9754c89f1cc4ea42d80b35 (diff) | |
| download | emacs-9d693d807fbd77761cf1c35de1bcbcfc91d690e4.tar.gz emacs-9d693d807fbd77761cf1c35de1bcbcfc91d690e4.zip | |
(byte-optimize-if): Don't presume `clause' is a list.
| -rw-r--r-- | lisp/ChangeLog | 9 | ||||
| -rw-r--r-- | lisp/emacs-lisp/byte-opt.el | 4 |
2 files changed, 10 insertions, 3 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a97ee9a2621..4601d4a6d76 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2007-08-24 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * emacs-lisp/byte-opt.el (byte-optimize-if): Don't presume `clause' is | ||
| 4 | a list. | ||
| 5 | |||
| 1 | 2007-08-24 Thien-Thi Nguyen <ttn@gnuvola.org> | 6 | 2007-08-24 Thien-Thi Nguyen <ttn@gnuvola.org> |
| 2 | 7 | ||
| 3 | * progmodes/hideshow.el (hs-match-data): Delete alias. | 8 | * progmodes/hideshow.el (hs-match-data): Delete alias. |
| @@ -39,8 +44,8 @@ | |||
| 39 | 44 | ||
| 40 | 2007-08-23 Masatake YAMATO <jet@gyve.org> | 45 | 2007-08-23 Masatake YAMATO <jet@gyve.org> |
| 41 | 46 | ||
| 42 | * progmodes/cc-fonts.el (gtkdoc-font-lock-doc-comments): Highlight | 47 | * progmodes/cc-fonts.el (gtkdoc-font-lock-doc-comments): |
| 43 | name of parameters in document body. | 48 | Highlight name of parameters in document body. |
| 44 | 49 | ||
| 45 | 2007-08-23 Stefan Monnier <monnier@iro.umontreal.ca> | 50 | 2007-08-23 Stefan Monnier <monnier@iro.umontreal.ca> |
| 46 | 51 | ||
diff --git a/lisp/emacs-lisp/byte-opt.el b/lisp/emacs-lisp/byte-opt.el index b4eaf4ff5eb..80a6ad595b2 100644 --- a/lisp/emacs-lisp/byte-opt.el +++ b/lisp/emacs-lisp/byte-opt.el | |||
| @@ -1020,7 +1020,9 @@ | |||
| 1020 | ;; (if <test> nil <else...>) ==> (if (not <test>) (progn <else...>)) | 1020 | ;; (if <test> nil <else...>) ==> (if (not <test>) (progn <else...>)) |
| 1021 | ;; (if <test> <then> nil) ==> (if <test> <then>) | 1021 | ;; (if <test> <then> nil) ==> (if <test> <then>) |
| 1022 | (let ((clause (nth 1 form))) | 1022 | (let ((clause (nth 1 form))) |
| 1023 | (cond ((eq (car clause) 'progn) | 1023 | (cond ((and (eq (car-safe clause) 'progn) |
| 1024 | ;; `clause' is a proper list. | ||
| 1025 | (null (cdr (last clause)))) | ||
| 1024 | (if (null (cddr clause)) | 1026 | (if (null (cddr clause)) |
| 1025 | ;; A trivial `progn'. | 1027 | ;; A trivial `progn'. |
| 1026 | (byte-optimize-if `(if ,(cadr clause) ,@(nthcdr 2 form))) | 1028 | (byte-optimize-if `(if ,(cadr clause) ,@(nthcdr 2 form))) |