;;; bytecomp.el --- compilation of Lisp code into byte code -*- lexical-binding: t -*-
-;; Copyright (C) 1985-1987, 1992, 1994, 1998, 2000-2013
-;; Free Software Foundation, Inc.
+;; Copyright (C) 1985-1987, 1992, 1994, 1998, 2000-2014 Free Software
+;; Foundation, Inc.
;; Author: Jamie Zawinski <jwz@lucid.com>
;; Hallvard Furuseth <hbf@ulrik.uio.no>
(defvar byte-compile-interactive-only-functions nil
"List of commands that are not meant to be called from Lisp.")
(make-obsolete-variable 'byte-compile-interactive-only-functions
- "use the `interactive-only' symbol property instead"
+ "use the `interactive-only' symbol property instead."
"24.4")
(defvar byte-compile-not-obsolete-vars nil
(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.
;; (interactive "fByte compile file: \nP")
(interactive
(let ((file buffer-file-name)
- (file-name nil)
(file-dir nil))
(and file
(derived-mode-p 'emacs-lisp-mode)
- (setq file-name (file-name-nondirectory file)
- file-dir (file-name-directory file)))
+ (setq file-dir (file-name-directory file)))
(list (read-file-name (if current-prefix-arg
"Byte compile and load file: "
"Byte compile file: ")
- file-dir file-name nil)
+ file-dir buffer-file-name nil)
current-prefix-arg)))
;; Expand now so we get the current buffer's defaults
(setq filename (expand-file-name filename))
(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")
(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
(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