emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/emacs-lisp/bytecomp.el [lexbind]


From: Miles Bader
Subject: [Emacs-diffs] Changes to emacs/lisp/emacs-lisp/bytecomp.el [lexbind]
Date: Mon, 25 Oct 2004 00:47:58 -0400

Index: emacs/lisp/emacs-lisp/bytecomp.el
diff -c emacs/lisp/emacs-lisp/bytecomp.el:2.98.2.25 
emacs/lisp/emacs-lisp/bytecomp.el:2.98.2.26
*** emacs/lisp/emacs-lisp/bytecomp.el:2.98.2.25 Thu Sep 16 00:12:21 2004
--- emacs/lisp/emacs-lisp/bytecomp.el   Mon Oct 25 04:22:29 2004
***************
*** 872,878 ****
            (let ((xs (pop hist-new))
                  old-autoloads)
              ;; Make sure the file was not already loaded before.
!             (unless (assoc (car xs) hist-orig)
                (dolist (s xs)
                  (cond
                   ((symbolp s)
--- 872,879 ----
            (let ((xs (pop hist-new))
                  old-autoloads)
              ;; Make sure the file was not already loaded before.
!             (unless (or (assoc (car xs) hist-orig)
!                         (equal (car xs) "cl"))
                (dolist (s xs)
                  (cond
                   ((symbolp s)
***************
*** 889,895 ****
                (when (and (symbolp s) (not (memq s old-autoloads)))
                  (push s byte-compile-noruntime-functions))
                (when (and (consp s) (eq t (car s)))
!                 (push (cdr s) old-autoloads))))))))))
  
  (defun byte-compile-eval-before-compile (form)
    "Evaluate FORM for `eval-and-compile'."
--- 890,907 ----
                (when (and (symbolp s) (not (memq s old-autoloads)))
                  (push s byte-compile-noruntime-functions))
                (when (and (consp s) (eq t (car s)))
!                 (push (cdr s) old-autoloads)))))))
!       (when (memq 'cl-functions byte-compile-warnings)
!       (let ((hist-new load-history)
!             (hist-nil-new current-load-list))
!         ;; Go through load-history, look for newly loaded files
!         ;; and mark all the functions defined therein.
!         (while (and hist-new (not (eq hist-new hist-orig)))
!           (let ((xs (pop hist-new))
!                 old-autoloads)
!             ;; Make sure the file was not already loaded before.
!             (when (and (equal (car xs) "cl") (not (assoc (car xs) hist-orig)))
!               (byte-compile-find-cl-functions)))))))))
  
  (defun byte-compile-eval-before-compile (form)
    "Evaluate FORM for `eval-and-compile'."
***************
*** 928,939 ****
  ;; Log something that isn't a warning.
  (defun byte-compile-log-1 (string)
    (with-current-buffer "*Compile-Log*"
!     (goto-char (point-max))
!     (byte-compile-warning-prefix nil nil)
!     (cond (noninteractive
!          (message " %s" string))
!         (t
!          (insert (format "%s\n" string))))))
  
  (defvar byte-compile-read-position nil
    "Character position we began the last `read' from.")
--- 940,952 ----
  ;; Log something that isn't a warning.
  (defun byte-compile-log-1 (string)
    (with-current-buffer "*Compile-Log*"
!     (let ((inhibit-read-only t))
!       (goto-char (point-max))
!       (byte-compile-warning-prefix nil nil)
!       (cond (noninteractive
!            (message " %s" string))
!           (t
!            (insert (format "%s\n" string)))))))
  
  (defvar byte-compile-read-position nil
    "Character position we began the last `read' from.")
***************
*** 984,990 ****
  ;; This is used as warning-prefix for the compiler.
  ;; It is always called with the warnings buffer current.
  (defun byte-compile-warning-prefix (level entry)
!   (let* ((dir default-directory)
         (file (cond ((stringp byte-compile-current-file)
                      (format "%s:" (file-relative-name 
byte-compile-current-file dir)))
                     ((bufferp byte-compile-current-file)
--- 997,1004 ----
  ;; This is used as warning-prefix for the compiler.
  ;; It is always called with the warnings buffer current.
  (defun byte-compile-warning-prefix (level entry)
!   (let* ((inhibit-read-only t)
!        (dir default-directory)
         (file (cond ((stringp byte-compile-current-file)
                      (format "%s:" (file-relative-name 
byte-compile-current-file dir)))
                     ((bufferp byte-compile-current-file)
***************
*** 1030,1036 ****
         (save-excursion
         (set-buffer (get-buffer-create "*Compile-Log*"))
         (goto-char (point-max))
!        (let* ((dir (and byte-compile-current-file
                          (file-name-directory byte-compile-current-file)))
                (was-same (equal default-directory dir))
                pt)
--- 1044,1051 ----
         (save-excursion
         (set-buffer (get-buffer-create "*Compile-Log*"))
         (goto-char (point-max))
!        (let* ((inhibit-read-only t)
!               (dir (and byte-compile-current-file
                          (file-name-directory byte-compile-current-file)))
                (was-same (equal default-directory dir))
                pt)
***************
*** 1064,1070 ****
  (defun byte-compile-log-warning (string &optional fill level)
    (let ((warning-prefix-function 'byte-compile-warning-prefix)
        (warning-type-format "")
!       (warning-fill-prefix (if fill "    ")))
      (display-warning 'bytecomp string level "*Compile-Log*")))
  
  (defun byte-compile-warn (format &rest args)
--- 1079,1086 ----
  (defun byte-compile-log-warning (string &optional fill level)
    (let ((warning-prefix-function 'byte-compile-warning-prefix)
        (warning-type-format "")
!       (warning-fill-prefix (if fill "    "))
!       (inhibit-read-only t))
      (display-warning 'bytecomp string level "*Compile-Log*")))
  
  (defun byte-compile-warn (format &rest args)
***************
*** 2217,2233 ****
        (setq tail (cdr tail))))
    form)
  
! (put 'require 'byte-hunk-handler 'byte-compile-file-form-eval-boundary)
! (defun byte-compile-file-form-eval-boundary (form)
!   (let ((old-load-list current-load-list))
!     (eval form)
!     ;; (require 'cl) turns off warnings for cl functions.
!     (let ((tem current-load-list))
!       (while (not (eq tem old-load-list))
!       (when (equal (car tem) '(require . cl))
!         (setq byte-compile-warnings
!               (remq 'cl-functions byte-compile-warnings)))
!       (setq tem (cdr tem)))))
    (byte-compile-keep-pending form 'byte-compile-normal-call))
  
  (put 'progn 'byte-hunk-handler 'byte-compile-file-form-progn)
--- 2233,2247 ----
        (setq tail (cdr tail))))
    form)
  
! (put 'require 'byte-hunk-handler 'byte-compile-file-form-require)
! (defun byte-compile-file-form-require (form)
!   (let ((old-load-list current-load-list)
!       (args (mapcar 'eval (cdr form))))
!     (apply 'require args)
!     ;; Detech (require 'cl) in a way that works even if cl is already loaded.
!     (if (member (car args) '("cl" cl))
!       (setq byte-compile-warnings
!             (remq 'cl-functions byte-compile-warnings))))
    (byte-compile-keep-pending form 'byte-compile-normal-call))
  
  (put 'progn 'byte-hunk-handler 'byte-compile-file-form-progn)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]