]> code.delx.au - gnu-emacs/blobdiff - lisp/emacs-lisp/bytecomp.el
Merge: user-interface timestamps and other int overflow patches.
[gnu-emacs] / lisp / emacs-lisp / bytecomp.el
index 7c358a3830eff34b723fd2181084140ece36dea4..e7f2115a8482857a266290992d1f2f221c0c3e62 100644 (file)
@@ -580,7 +580,7 @@ Each element is (INDEX . VALUE)")
 (byte-defop 114  0 byte-save-current-buffer
   "To make a binding to record the current buffer")
 (byte-defop 115  0 byte-set-mark-OBSOLETE)
-;; (byte-defop 116  1 byte-interactive-p) ;Let's not use it any more.
+(byte-defop 116  1 byte-interactive-p-OBSOLETE)
 
 ;; These ops are new to v19
 (byte-defop 117  0 byte-forward-char)
@@ -616,8 +616,8 @@ otherwise pop it")
 
 (byte-defop 138  0 byte-save-excursion
   "to make a binding to record the buffer, point and mark")
-;; (byte-defop 139  0 byte-save-window-excursion ; Obsolete: It's a macro now.
-;;   "to make a binding to record entire window configuration")
+(byte-defop 139  0 byte-save-window-excursion-OBSOLETE
+  "to make a binding to record entire window configuration")
 (byte-defop 140  0 byte-save-restriction
   "to make a binding to record the current buffer clipping restrictions")
 (byte-defop 141 -1 byte-catch
@@ -629,9 +629,8 @@ otherwise pop it")
 ;; an expression for the body, and a list of clauses.
 (byte-defop 143 -2 byte-condition-case)
 
-;; Obsolete: `with-output-to-temp-buffer' is a macro now.
-;; (byte-defop 144  0 byte-temp-output-buffer-setup)
-;; (byte-defop 145 -1 byte-temp-output-buffer-show)
+(byte-defop 144  0 byte-temp-output-buffer-setup-OBSOLETE)
+(byte-defop 145 -1 byte-temp-output-buffer-show-OBSOLETE)
 
 ;; these ops are new to v19
 
@@ -1315,7 +1314,14 @@ extra args."
 ;; number of arguments.
 (defun byte-compile-arglist-warn (form macrop)
   (let* ((name (nth 1 form))
-         (old (byte-compile-fdefinition name macrop)))
+         (old (byte-compile-fdefinition name macrop))
+         (initial (and macrop
+                       (cdr (assq name
+                                  byte-compile-initial-macro-environment)))))
+    ;; Assumes an element of b-c-i-macro-env that is a symbol points
+    ;; to a defined function.  (Bug#8646)
+    (and initial (symbolp initial)
+         (setq old (byte-compile-fdefinition initial nil)))
     (if (and old (not (eq old t)))
        (progn
          (and (eq 'macro (car-safe old))
@@ -2415,7 +2421,11 @@ by side-effects."
 
     (let* ((code (byte-compile-lambda (nthcdr 2 form) t)))
       (if this-one
-         (setcdr this-one code)
+         ;; A definition in b-c-initial-m-e should always take precedence
+         ;; during compilation, so don't let it be redefined.  (Bug#8647)
+         (or (and macrop
+                  (assq name byte-compile-initial-macro-environment))
+             (setcdr this-one code))
        (set this-kind
             (cons (cons name code)
                   (symbol-value this-kind))))
@@ -4174,6 +4184,7 @@ binding slots have been popped."
 
 ;; Compile normally, but deal with warnings for the function being defined.
 (put 'defalias 'byte-hunk-handler 'byte-compile-file-form-defalias)
+;; Used for eieio--defalias as well.
 (defun byte-compile-file-form-defalias (form)
   (if (and (consp (cdr form)) (consp (nth 1 form))
           (eq (car (nth 1 form)) 'quote)