]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/abbrev.el (define-abbrev): Beware new meaning of fboundp.
authorStefan Monnier <monnier@iro.umontreal.ca>
Mon, 6 Jan 2014 23:34:05 +0000 (18:34 -0500)
committerStefan Monnier <monnier@iro.umontreal.ca>
Mon, 6 Jan 2014 23:34:05 +0000 (18:34 -0500)
* lisp/emacs-lisp/elint.el (elint-find-builtins):
* lisp/emacs-lisp/eldoc.el (eldoc-symbol-function):
* lisp/emacs-lisp/bytecomp.el (byte-compile-callargs-warn)
(byte-compile-file-form-defmumble, byte-compile, byte-compile-form):
* lisp/emacs-lisp/byte-opt.el (byte-compile-inline-expand):
* lisp/apropos.el (apropos-safe-documentation):
* lisp/subr.el (symbol-file): Remove redundant fboundp.
* lisp/progmodes/idlw-shell.el (idlwave-shell-comint-filter): Use defalias.

lisp/ChangeLog
lisp/abbrev.el
lisp/apropos.el
lisp/emacs-lisp/byte-opt.el
lisp/emacs-lisp/bytecomp.el
lisp/emacs-lisp/eldoc.el
lisp/emacs-lisp/elint.el
lisp/progmodes/idlw-shell.el
lisp/subr.el

index ed858741160816117b5f26fa5c75b06714471d6e..8b6462b2d6b0547af76f54840d13ccf90544af99 100644 (file)
@@ -1,3 +1,15 @@
+2014-01-06  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * abbrev.el (define-abbrev): Beware new meaning of fboundp.
+       * emacs-lisp/elint.el (elint-find-builtins):
+       * emacs-lisp/eldoc.el (eldoc-symbol-function):
+       * emacs-lisp/bytecomp.el (byte-compile-callargs-warn)
+       (byte-compile-file-form-defmumble, byte-compile, byte-compile-form):
+       * emacs-lisp/byte-opt.el (byte-compile-inline-expand):
+       * apropos.el (apropos-safe-documentation):
+       * subr.el (symbol-file): Remove redundant fboundp.
+       * progmodes/idlw-shell.el (idlwave-shell-comint-filter): Use defalias.
+
 2014-01-06  Bastien Guerry  <bzg@gnu.org>
 
        * hl-line.el (global-hl-line-overlay): Make a local variable.
index 0fd4dc6fd389ad751d4b2af8ee637a5eee5cf608..8c59d2919ab29d02de8605967534adb75080930d 100644 (file)
@@ -588,7 +588,7 @@ An obsolete but still supported calling form is:
                  (boundp sym) (symbol-value sym)
                  (not (abbrev-get sym :system)))
       (unless (or system-flag
-                  (and (boundp sym) (fboundp sym)
+                  (and (boundp sym)
                        ;; load-file-name
                        (equal (symbol-value sym) expansion)
                        (equal (symbol-function sym) hook)))
index 1d09ded0820b4b49f19d6d89472ea23ca8242dd6..f24871d5d20300bcc8492cff92c8191e21b2c4ea 100644 (file)
@@ -1006,8 +1006,7 @@ Returns list of symbols and documentation found."
   "Like `documentation', except it avoids calling `get_doc_string'.
 Will return nil instead."
   (while (and function (symbolp function))
-    (setq function (if (fboundp function)
-                      (symbol-function function))))
+    (setq function (symbol-function function)))
   (if (eq (car-safe function) 'macro)
       (setq function (cdr function)))
   (setq function (if (byte-code-function-p function)
index f6ba8af917780eb08ad85bc2abe21dd930c85c4f..60203da9da6fa5c203a8f0b3d630df620f0f1ee4 100644 (file)
 (defun byte-compile-inline-expand (form)
   (let* ((name (car form))
          (localfn (cdr (assq name byte-compile-function-environment)))
-        (fn (or localfn (and (fboundp name) (symbol-function name)))))
+        (fn (or localfn (symbol-function name))))
     (when (autoloadp fn)
       (autoload-do-load fn)
-      (setq fn (or (and (fboundp name) (symbol-function name))
+      (setq fn (or (symbol-function name)
                    (cdr (assq name byte-compile-function-environment)))))
     (pcase fn
       (`nil
index 1f2a69ccf59878832179c7597f02cce63de22364..1e21a222149c6e60d3914e56cc431772efa8a1d9 100644 (file)
@@ -1265,8 +1265,7 @@ Each function's symbol gets added to `byte-compile-noruntime-functions'."
                       (if (byte-code-function-p def)
                           (aref def 0)
                         '(&rest def)))))
-               (if (and (fboundp (car form))
-                        (subrp (symbol-function (car form))))
+               (if (subrp (symbol-function (car form)))
                    (subr-arity (symbol-function (car form))))))
         (ncall (length (cdr form))))
     ;; Check many or unevalled from subr-arity.
@@ -2396,9 +2395,8 @@ not to take responsibility for the actual compilation of the code."
              (byte-compile-warn "%s `%s' defined multiple times in this file"
                                 (if macro "macro" "function")
                                 name)))
-          ((and (fboundp name)
-                (eq (car-safe (symbol-function name))
-                    (if macro 'lambda 'macro)))
+          ((eq (car-safe (symbol-function name))
+               (if macro 'lambda 'macro))
            (when (byte-compile-warning-enabled-p 'redefine)
              (byte-compile-warn "%s `%s' being redefined as a %s"
                                 (if macro "function" "macro")
@@ -2532,7 +2530,7 @@ If FORM is a lambda or a macro, byte-compile it as a function."
    (byte-compile-close-variables
     (let* ((lexical-binding lexical-binding)
            (fun (if (symbolp form)
-                   (and (fboundp form) (symbol-function form))
+                   (symbol-function form)
                  form))
           (macro (eq (car-safe fun) 'macro)))
       (if macro
@@ -2946,8 +2944,7 @@ for symbols generated by the byte compiler itself."
                                    (format "; use `%s' instead."
                                            interactive-only))
                                   (t "."))))
-        (if (and (fboundp (car form))
-                 (eq (car-safe (symbol-function (car form))) 'macro))
+        (if (eq (car-safe (symbol-function (car form))) 'macro)
             (byte-compile-log-warning
              (format "Forgot to expand macro %s" (car form)) nil :error))
         (if (and handler
index 759bd0b642d9aea15fe8bf1ba980324828508777..8bd9ebc1e631626e8dc49eb95270f5fd333e2ccb 100644 (file)
@@ -512,8 +512,7 @@ In the absence of INDEX, just call `eldoc-docstring-format-sym-doc'."
 
 ;; Do indirect function resolution if possible.
 (defun eldoc-symbol-function (fsym)
-  (let ((defn (and (fboundp fsym)
-                   (symbol-function fsym))))
+  (let ((defn (symbol-function fsym)))
     (and (symbolp defn)
          (condition-case _
              (setq defn (indirect-function fsym))
index 63c19e6e6dae726919b322757c75d16d8ac20e8d..77da42450e93d57b577f20cffdd6262fe4657f2b 100644 (file)
@@ -1145,8 +1145,8 @@ Marks the function with their arguments, and returns a list of variables."
 (defun elint-find-builtins ()
   "Return a list of all built-in functions."
   (let (subrs)
-    (mapatoms (lambda (s) (and (fboundp s) (subrp (symbol-function s))
-                              (setq subrs (cons s subrs)))))
+    (mapatoms (lambda (s) (and (subrp (symbol-function s))
+                          (push s subrs))))
     subrs))
 
 (defun elint-find-builtin-args (&optional list)
index 0be81c3904f55d33ae607bdc334eea08f3020e41..e7bf3792e5f2d3bb263aa6bb2647172ffe0fe308 100644 (file)
@@ -1446,10 +1446,10 @@ Otherwise just move the line.  Move down unless UP is non-nil."
 
 ;; Newer versions of comint.el changed the name of comint-filter to
 ;; comint-output-filter.
-(defun idlwave-shell-comint-filter (process string) nil)
-(if (fboundp 'comint-output-filter)
-    (fset 'idlwave-shell-comint-filter (symbol-function 'comint-output-filter))
-  (fset 'idlwave-shell-comint-filter (symbol-function 'comint-filter)))
+(defalias 'idlwave-shell-comint-filter
+  (if (fboundp 'comint-output-filter)
+      #'comint-output-filter
+    #'comint-filter))
 
 (defun idlwave-shell-is-running ()
   "Return t if the shell process is running."
index 5d945047da6868ca4ffdeeb66fb9eec393a7cbf4..4046555653155c622404b8f6b14d34474e4d19ab 100644 (file)
@@ -1810,7 +1810,7 @@ If TYPE is nil, then any kind of definition is acceptable.  If
 TYPE is `defun', `defvar', or `defface', that specifies function
 definition, variable definition, or face definition only."
   (if (and (or (null type) (eq type 'defun))
-          (symbolp symbol) (fboundp symbol)
+          (symbolp symbol)
           (autoloadp (symbol-function symbol)))
       (nth 1 (symbol-function symbol))
     (let ((files load-history)