/[emacs]/emacs/lisp/emacs-lisp/bytecomp.el
ViewVC logotype

Diff of /emacs/lisp/emacs-lisp/bytecomp.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2.135 by monnier, Fri Jul 4 23:47:48 2003 UTC revision 2.136 by rms, Wed Aug 6 01:08:21 2003 UTC
# Line 351  Elements of the list may be be: Line 351  Elements of the list may be be:
351                        (const callargs) (const redefine)                        (const callargs) (const redefine)
352                        (const obsolete) (const noruntime) (const cl-functions))))                        (const obsolete) (const noruntime) (const cl-functions))))
353    
354    (defvar byte-compile-not-obsolete-var nil
355      "If non-nil, this is a variable that shouldn't be reported as obsolete.")
356    
357  (defcustom byte-compile-generate-call-tree nil  (defcustom byte-compile-generate-call-tree nil
358    "*Non-nil means collect call-graph information when compiling.    "*Non-nil means collect call-graph information when compiling.
359  This records functions were called and from where.  This records functions were called and from where.
# Line 982  Each function's symbol gets marked with Line 985  Each function's symbol gets marked with
985  ;; Also log the current function and file if not already done.  ;; Also log the current function and file if not already done.
986  (defun byte-compile-log-warning (string &optional fill level)  (defun byte-compile-log-warning (string &optional fill level)
987    (let ((warning-prefix-function 'byte-compile-warning-prefix)    (let ((warning-prefix-function 'byte-compile-warning-prefix)
988          (warning-group-format "")          (warning-type-format "")
989          (warning-fill-prefix (if fill "    ")))          (warning-fill-prefix (if fill "    ")))
990      (display-warning 'bytecomp string level "*Compile-Log*")))      (display-warning 'bytecomp string level "*Compile-Log*")))
991    
# Line 2705  If FORM is a lambda or a macro, byte-com Line 2708  If FORM is a lambda or a macro, byte-com
2708         (if (symbolp var) "constant" "nonvariable")         (if (symbolp var) "constant" "nonvariable")
2709         (prin1-to-string var))         (prin1-to-string var))
2710      (if (and (get var 'byte-obsolete-variable)      (if (and (get var 'byte-obsolete-variable)
2711               (memq 'obsolete byte-compile-warnings))               (memq 'obsolete byte-compile-warnings)
2712                 (not (eq var byte-compile-not-obsolete-var)))
2713          (let* ((ob (get var 'byte-obsolete-variable))          (let* ((ob (get var 'byte-obsolete-variable))
2714                 (when (cdr ob)))                 (when (cdr ob)))
2715            (byte-compile-warn "%s is an obsolete variable%s; %s" var            (byte-compile-warn "%s is an obsolete variable%s; %s" var
# Line 3608  If FORM is a lambda or a macro, byte-com Line 3612  If FORM is a lambda or a macro, byte-com
3612                               fun var string))                               fun var string))
3613          `(put ',var 'variable-documentation ,string))          `(put ',var 'variable-documentation ,string))
3614        (if (cddr form)           ; `value' provided        (if (cddr form)           ; `value' provided
3615            (if (eq fun 'defconst)            (let ((byte-compile-not-obsolete-var var))
3616                ;; `defconst' sets `var' unconditionally.              (if (eq fun 'defconst)
3617                (let ((tmp (make-symbol "defconst-tmp-var")))                  ;; `defconst' sets `var' unconditionally.
3618                  `(funcall '(lambda (,tmp) (defconst ,var ,tmp))                  (let ((tmp (make-symbol "defconst-tmp-var")))
3619                            ,value))                    `(funcall '(lambda (,tmp) (defconst ,var ,tmp))
3620              ;; `defvar' sets `var' only when unbound.                              ,value))
3621              `(if (not (default-boundp ',var)) (setq-default ,var ,value)))                ;; `defvar' sets `var' only when unbound.
3622                  `(if (not (default-boundp ',var)) (setq-default ,var ,value))))
3623          (when (eq fun 'defconst)          (when (eq fun 'defconst)
3624            ;; This will signal an appropriate error at runtime.            ;; This will signal an appropriate error at runtime.
3625            `(eval ',form)))            `(eval ',form)))

Legend:
Removed from v.2.135  
changed lines
  Added in v.2.136

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26