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 [emacs-unicod


From: Miles Bader
Subject: [Emacs-diffs] Changes to emacs/lisp/emacs-lisp/bytecomp.el [emacs-unicode-2]
Date: Thu, 04 Nov 2004 04:07:10 -0500

Index: emacs/lisp/emacs-lisp/bytecomp.el
diff -c emacs/lisp/emacs-lisp/bytecomp.el:2.135.2.6 
emacs/lisp/emacs-lisp/bytecomp.el:2.135.2.7
*** emacs/lisp/emacs-lisp/bytecomp.el:2.135.2.6 Fri Oct 22 10:13:47 2004
--- emacs/lisp/emacs-lisp/bytecomp.el   Thu Nov  4 08:55:37 2004
***************
*** 98,103 ****
--- 98,106 ----
  ;;                            `obsolete'  (obsolete variables and functions)
  ;;                            `noruntime' (calls to functions only defined
  ;;                                         within `eval-when-compile')
+ ;;                            `cl-warnings' (calls to CL functions)
+ ;;                            `interactive-only' (calls to commands that are
+ ;;                                               not good to call from Lisp)
  ;; byte-compile-compatibility Whether the compiler should
  ;;                            generate .elc files which can be loaded into
  ;;                            generic emacs 18.
***************
*** 325,331 ****
    :type 'boolean)
  
  (defconst byte-compile-warning-types
!   '(redefine callargs free-vars unresolved obsolete noruntime cl-functions)
    "The list of warning types used when `byte-compile-warnings' is t.")
  (defcustom byte-compile-warnings t
    "*List of warnings that the byte-compiler should issue (t for all).
--- 328,335 ----
    :type 'boolean)
  
  (defconst byte-compile-warning-types
!   '(redefine callargs free-vars unresolved
!            obsolete noruntime cl-functions interactive-only)
    "The list of warning types used when `byte-compile-warnings' is t.")
  (defcustom byte-compile-warnings t
    "*List of warnings that the byte-compiler should issue (t for all).
***************
*** 341,353 ****
    noruntime   functions that may not be defined at runtime (typically
                defined only under `eval-when-compile').
    cl-functions    calls to runtime functions from the CL package (as
!                 distinguished from macros and aliases)."
    :group 'bytecomp
    :type `(choice (const :tag "All" t)
                 (set :menu-tag "Some"
                      (const free-vars) (const unresolved)
                      (const callargs) (const redefine)
!                     (const obsolete) (const noruntime) (const cl-functions))))
  
  (defvar byte-compile-not-obsolete-var nil
    "If non-nil, this is a variable that shouldn't be reported as obsolete.")
--- 345,365 ----
    noruntime   functions that may not be defined at runtime (typically
                defined only under `eval-when-compile').
    cl-functions    calls to runtime functions from the CL package (as
!                 distinguished from macros and aliases).
!   interactive-only
!             commands that normally shouldn't be called from Lisp code."
    :group 'bytecomp
    :type `(choice (const :tag "All" t)
                 (set :menu-tag "Some"
                      (const free-vars) (const unresolved)
                      (const callargs) (const redefine)
!                     (const obsolete) (const noruntime)
!                     (const cl-functions) (const interactive-only))))
! 
! (defvar byte-compile-interactive-only-functions
!   '(beginning-of-buffer end-of-buffer replace-string replace-regexp
!                       insert-file)
!   "List of commands that are not meant to be called from Lisp.")
  
  (defvar byte-compile-not-obsolete-var nil
    "If non-nil, this is a variable that shouldn't be reported as obsolete.")
***************
*** 2710,2715 ****
--- 2722,2731 ----
           (byte-compile-set-symbol-position fn)
           (when (byte-compile-const-symbol-p fn)
             (byte-compile-warn "`%s' called as a function" fn))
+          (and (memq 'interactive-only byte-compile-warnings)
+               (memq (car form) byte-compile-interactive-only-functions)
+               (byte-compile-warn "`%s' used from Lisp code\n\
+ That command is designed for interactive use only" fn))
           (if (and handler
                    (or (not (byte-compile-version-cond
                              byte-compile-compatibility))




reply via email to

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