summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2014-01-06 18:34:05 -0500
committerStefan Monnier <monnier@iro.umontreal.ca>2014-01-06 18:34:05 -0500
commit6bdd920482e75a47062ebec76c022baa4259530d (patch)
treeaaa13a3161dde6f8bdee5ad5a2b02ea2fd97562a /lisp/emacs-lisp
parentdaccca97f0231b54628c6ef8e58621277c678aa3 (diff)
* lisp/abbrev.el (define-abbrev): Beware new meaning of fboundp.
* 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.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r--lisp/emacs-lisp/byte-opt.el4
-rw-r--r--lisp/emacs-lisp/bytecomp.el13
-rw-r--r--lisp/emacs-lisp/eldoc.el3
-rw-r--r--lisp/emacs-lisp/elint.el4
4 files changed, 10 insertions, 14 deletions
diff --git a/lisp/emacs-lisp/byte-opt.el b/lisp/emacs-lisp/byte-opt.el
index f6ba8af917..60203da9da 100644
--- a/lisp/emacs-lisp/byte-opt.el
+++ b/lisp/emacs-lisp/byte-opt.el
@@ -248,10 +248,10 @@
(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
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
index 1f2a69ccf5..1e21a22214 100644
--- a/lisp/emacs-lisp/bytecomp.el
+++ b/lisp/emacs-lisp/bytecomp.el
@@ -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
diff --git a/lisp/emacs-lisp/eldoc.el b/lisp/emacs-lisp/eldoc.el
index 759bd0b642..8bd9ebc1e6 100644
--- a/lisp/emacs-lisp/eldoc.el
+++ b/lisp/emacs-lisp/eldoc.el
@@ -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))
diff --git a/lisp/emacs-lisp/elint.el b/lisp/emacs-lisp/elint.el
index 63c19e6e6d..77da42450e 100644
--- a/lisp/emacs-lisp/elint.el
+++ b/lisp/emacs-lisp/elint.el
@@ -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)