]> code.delx.au - gnu-emacs/commitdiff
(byte-compile-inline-expand): Look
authorGerd Moellmann <gerd@gnu.org>
Fri, 31 Mar 2000 11:25:10 +0000 (11:25 +0000)
committerGerd Moellmann <gerd@gnu.org>
Fri, 31 Mar 2000 11:25:10 +0000 (11:25 +0000)
for function definition in symbol's function value slot first
instead of first consulting byte-compile-function-environment.

Fix byte-compiler warnings format.

lisp/emacs-lisp/byte-opt.el

index 78f14ab81d2af6a488ecef63572d368d4cfb1275..ed2ce80916ea5b25810e72cac614fa61d3b3f8db 100644 (file)
                             name)
          form)
       ;; else
-      (if (and (consp fn) (eq (car fn) 'autoload))
-         (progn
-           (load (nth 2 fn))
-           (setq fn (or (cdr (assq name byte-compile-function-environment))
-                        (and (fboundp name) (symbol-function name))))))
+      (when (and (consp fn) (eq (car fn) 'autoload))
+       (load (nth 2 fn))
+       (setq fn (or (and (fboundp name) (symbol-function name))
+                    (cdr (assq name byte-compile-function-environment)))))
       (if (and (consp fn) (eq (car fn) 'autoload))
          (error "File `%s' didn't define `%s'" (nth 2 fn) name))
       (if (symbolp fn)
                                    bindings)
                     values nil))
              ((and (not optionalp) (null values))
-              (byte-compile-warn "attempt to open-code %s with too few arguments" name)
+              (byte-compile-warn "Attempt to open-code `%s' with too few arguments" name)
               (setq arglist nil values 'too-few))
              (t
               (setq bindings (cons (list (car arglist) (car values))
          (progn
            (or (eq values 'too-few)
                (byte-compile-warn
-                "attempt to open-code %s with too many arguments" name))
+                "Attempt to open-code `%s' with too many arguments" name))
            form)
        (setq body (mapcar 'byte-optimize-form body))
        (let ((newform 
             form))
          ((eq fn 'quote)
           (if (cdr (cdr form))
-              (byte-compile-warn "malformed quote form: %s"
+              (byte-compile-warn "Malformed quote form: `%s'"
                                  (prin1-to-string form)))
           ;; map (quote nil) to nil to simplify optimizer logic.
           ;; map quoted constants to nil if for-effect (just because).
                         (if (symbolp binding)
                             binding
                           (if (cdr (cdr binding))
-                              (byte-compile-warn "malformed let binding: %s"
+                              (byte-compile-warn "Malformed let binding: `%s'"
                                                  (prin1-to-string binding)))
                           (list (car binding)
                                 (byte-optimize-form (nth 1 binding) nil))))
                                (cons
                                 (byte-optimize-form (car clause) nil)
                                 (byte-optimize-body (cdr clause) for-effect))
-                             (byte-compile-warn "malformed cond form: %s"
+                             (byte-compile-warn "Malformed cond form: `%s'"
                                                 (prin1-to-string clause))
                              clause))
                         (cdr form))))
             (cons fn (mapcar 'byte-optimize-form (cdr form)))))
 
          ((eq fn 'interactive)
-          (byte-compile-warn "misplaced interactive spec: %s"
+          (byte-compile-warn "Misplaced interactive spec: `%s'"
                              (prin1-to-string form))
           nil)
          
          
          ((not (symbolp fn))
           (or (eq 'mocklisp (car-safe fn)) ; ha!
-              (byte-compile-warn "%s is a malformed function"
+              (byte-compile-warn "`%s' is a malformed function"
                                  (prin1-to-string fn)))
           form)
 
                (or byte-compile-delete-errors
                    (eq tmp 'error-free)
                    (progn
-                     (byte-compile-warn "%s called for effect"
+                     (byte-compile-warn "`%s' called for effect"
                                         (prin1-to-string form))
                      nil)))
           (byte-compile-log "  %s called for effect; deleted" fn)
 (defun byte-optimize-identity (form)
   (if (and (cdr form) (null (cdr (cdr form))))
       (nth 1 form)
-    (byte-compile-warn "identity called with %d arg%s, but requires 1"
+    (byte-compile-warn "Identity called with %d arg%s, but requires 1"
                       (length (cdr form))
                       (if (= 1 (length (cdr form))) "" "s"))
     form))
                  (nconc (list 'funcall fn) butlast
                         (mapcar '(lambda (x) (list 'quote x)) (nth 1 last))))
              (byte-compile-warn
-              "last arg to apply can't be a literal atom: %s"
+              "Last arg to apply can't be a literal atom: `%s'"
               (prin1-to-string last))
              nil))
        form)))