X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=lisp%2Fbytecomp.el;h=c1cc824c7d2ed76f6cb71275cdc6531f3386a1cc;hb=de1ec4b272dfa3f9ef2c9ae28a9ba67170d24da5;hp=2fd75bea1f36d65ea1b56187ec563bcd965fa7ad;hpb=82f6d62ee211b1d36e8f45fed3ee3edde82b6916;p=chise%2Fxemacs-chise.git.1 diff --git a/lisp/bytecomp.el b/lisp/bytecomp.el index 2fd75be..c1cc824 100644 --- a/lisp/bytecomp.el +++ b/lisp/bytecomp.el @@ -2391,7 +2391,10 @@ If FORM is a lambda or a macro, byte-compile it as a function." (body (cdr (cdr fun))) (doc (if (stringp (car body)) (prog1 (car body) - (setq body (cdr body))))) + ;; Discard the doc string + ;; only if it is not the only element of the body. + (if (cdr body) + (setq body (cdr body)))))) (int (assq 'interactive body))) (dolist (arg arglist) (cond ((not (symbolp arg)) @@ -3142,7 +3145,9 @@ If FORM is a lambda or a macro, byte-compile it as a function." (defun byte-compile-arithcompare (form) (case (length (cdr form)) (0 (byte-compile-subr-wrong-args form "1 or more")) - (1 (byte-compile-constant t)) + (1 (if byte-compile-delete-errors + (byte-compile-constant t) + (byte-compile-normal-call form))) (2 (byte-compile-two-args form)) (t (byte-compile-normal-call form))))