aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2009-11-14 04:23:18 +0000
committerGlenn Morris2009-11-14 04:23:18 +0000
commit0028351d981a6bc1b955add8a786dea5a8df3510 (patch)
treeadfb0513948bd89fce1a64a85c9cd30bb1491a23
parentf6714ede06b56c845cf107200056b8129a9ce233 (diff)
downloademacs-0028351d981a6bc1b955add8a786dea5a8df3510.tar.gz
emacs-0028351d981a6bc1b955add8a786dea5a8df3510.zip
(byte-compile-single-version): Remove, unused.
(baud-rate, byte-code-function-p) (byte-compile-generate-emacs19-bytecodes, byte-compile-overwrite-file) (byte-compiler-valid-options, byte-compiler-options-handler) (byte-compile-and-load-file, byte-compile-buffer): Remove commented-out code.
-rw-r--r--lisp/ChangeLog2
-rw-r--r--lisp/emacs-lisp/bytecomp.el131
2 files changed, 4 insertions, 129 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 842bf9fbc68..471e9a4fd12 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,7 @@
12009-11-14 Glenn Morris <rgm@gnu.org> 12009-11-14 Glenn Morris <rgm@gnu.org>
2 2
3 * emacs-lisp/bytecomp.el (byte-compile-single-version): Remove, unused.
4
3 * simple.el (x-selection-owner-p): Declare. 5 * simple.el (x-selection-owner-p): Declare.
4 (read-mail-command): Use custom radio type rather than choice. 6 (read-mail-command): Use custom radio type rather than choice.
5 (completion-no-auto-exit): Doc fix. 7 (completion-no-auto-exit): Doc fix.
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
index 606d1b9e84a..60a85a7c80f 100644
--- a/lisp/emacs-lisp/bytecomp.el
+++ b/lisp/emacs-lisp/bytecomp.el
@@ -122,37 +122,6 @@
122 ;; This really ought to be loaded already! 122 ;; This really ought to be loaded already!
123 (load "byte-run")) 123 (load "byte-run"))
124 124
125;; The feature of compiling in a specific target Emacs version
126;; has been turned off because compile time options are a bad idea.
127(defmacro byte-compile-single-version () nil)
128
129;; The crud you see scattered through this file of the form
130;; (or (and (boundp 'epoch::version) epoch::version)
131;; (string-lessp emacs-version "19"))
132;; is because the Epoch folks couldn't be bothered to follow the
133;; normal emacs version numbering convention.
134
135;; (if (byte-compile-version-cond
136;; (or (and (boundp 'epoch::version) epoch::version)
137;; (string-lessp emacs-version "19")))
138;; (progn
139;; ;; emacs-18 compatibility.
140;; (defvar baud-rate (baud-rate)) ;Define baud-rate if it's undefined
141;;
142;; (if (byte-compile-single-version)
143;; (defmacro byte-code-function-p (x) "Emacs 18 doesn't have these." nil)
144;; (defun byte-code-function-p (x) "Emacs 18 doesn't have these." nil))
145;;
146;; (or (and (fboundp 'member)
147;; ;; avoid using someone else's possibly bogus definition of this.
148;; (subrp (symbol-function 'member)))
149;; (defun member (elt list)
150;; "like memq, but uses equal instead of eq. In v19, this is a subr."
151;; (while (and list (not (equal elt (car list))))
152;; (setq list (cdr list)))
153;; list))))
154
155
156(defgroup bytecomp nil 125(defgroup bytecomp nil
157 "Emacs Lisp byte-compiler." 126 "Emacs Lisp byte-compiler."
158 :group 'lisp) 127 :group 'lisp)
@@ -221,13 +190,6 @@ adds `c' to it; otherwise adds `.elc'."
221 :group 'bytecomp 190 :group 'bytecomp
222 :type 'boolean) 191 :type 'boolean)
223 192
224;; (defvar byte-compile-generate-emacs19-bytecodes
225;; (not (or (and (boundp 'epoch::version) epoch::version)
226;; (string-lessp emacs-version "19")))
227;; "*If this is true, then the byte-compiler will generate bytecode which
228;; makes use of byte-ops which are present only in Emacs 19. Code generated
229;; this way can never be run in Emacs 18, and may even cause it to crash.")
230
231(defcustom byte-optimize t 193(defcustom byte-optimize t
232 "Enable optimization in the byte compiler. 194 "Enable optimization in the byte compiler.
233Possible values are: 195Possible values are:
@@ -439,15 +401,6 @@ specify different fields to sort on."
439 (const calls+callers) (const nil))) 401 (const calls+callers) (const nil)))
440 402
441(defvar byte-compile-debug nil) 403(defvar byte-compile-debug nil)
442
443;; (defvar byte-compile-overwrite-file t
444;; "If nil, old .elc files are deleted before the new is saved, and .elc
445;; files will have the same modes as the corresponding .el file. Otherwise,
446;; existing .elc files will simply be overwritten, and the existing modes
447;; will not be changed. If this variable is nil, then an .elc file which
448;; is a symbolic link will be turned into a normal file, instead of the file
449;; which the link points to being overwritten.")
450
451(defvar byte-compile-constants nil 404(defvar byte-compile-constants nil
452 "List of all constants encountered during compilation of this form.") 405 "List of all constants encountered during compilation of this form.")
453(defvar byte-compile-variables nil 406(defvar byte-compile-variables nil
@@ -1123,64 +1076,6 @@ Each function's symbol gets added to `byte-compile-noruntime-functions'."
1123 (funcall (or (cadr (get (car form) 'byte-obsolete-info)) ; handler 1076 (funcall (or (cadr (get (car form) 'byte-obsolete-info)) ; handler
1124 'byte-compile-normal-call) form)) 1077 'byte-compile-normal-call) form))
1125 1078
1126;; Compiler options
1127
1128;; (defvar byte-compiler-valid-options
1129;; '((optimize byte-optimize (t nil source byte) val)
1130;; (file-format byte-compile-compatibility (emacs18 emacs19)
1131;; (eq val 'emacs18))
1132;; ;; (new-bytecodes byte-compile-generate-emacs19-bytecodes (t nil) val)
1133;; (delete-errors byte-compile-delete-errors (t nil) val)
1134;; (verbose byte-compile-verbose (t nil) val)
1135;; (warnings byte-compile-warnings ((callargs redefine free-vars unresolved))
1136;; val)))
1137
1138;; Inhibit v18/v19 selectors if the version is hardcoded.
1139;; #### This should print a warning if the user tries to change something
1140;; than can't be changed because the running compiler doesn't support it.
1141;; (cond
1142;; ((byte-compile-single-version)
1143;; (setcar (cdr (cdr (assq 'new-bytecodes byte-compiler-valid-options)))
1144;; (list (byte-compile-version-cond
1145;; byte-compile-generate-emacs19-bytecodes)))
1146;; (setcar (cdr (cdr (assq 'file-format byte-compiler-valid-options)))
1147;; (if (byte-compile-version-cond byte-compile-compatibility)
1148;; '(emacs18) '(emacs19)))))
1149
1150;; (defun byte-compiler-options-handler (&rest args)
1151;; (let (key val desc choices)
1152;; (while args
1153;; (if (or (atom (car args)) (nthcdr 2 (car args)) (null (cdr (car args))))
1154;; (error "Malformed byte-compiler option `%s'" (car args)))
1155;; (setq key (car (car args))
1156;; val (car (cdr (car args)))
1157;; desc (assq key byte-compiler-valid-options))
1158;; (or desc
1159;; (error "Unknown byte-compiler option `%s'" key))
1160;; (setq choices (nth 2 desc))
1161;; (if (consp (car choices))
1162;; (let (this
1163;; (handler 'cons)
1164;; (ret (and (memq (car val) '(+ -))
1165;; (copy-sequence (if (eq t (symbol-value (nth 1 desc)))
1166;; choices
1167;; (symbol-value (nth 1 desc)))))))
1168;; (setq choices (car choices))
1169;; (while val
1170;; (setq this (car val))
1171;; (cond ((memq this choices)
1172;; (setq ret (funcall handler this ret)))
1173;; ((eq this '+) (setq handler 'cons))
1174;; ((eq this '-) (setq handler 'delq))
1175;; ((error "`%s' only accepts %s" key choices)))
1176;; (setq val (cdr val)))
1177;; (set (nth 1 desc) ret))
1178;; (or (memq val choices)
1179;; (error "`%s' must be one of `%s'" key choices))
1180;; (set (nth 1 desc) (eval (nth 3 desc))))
1181;; (setq args (cdr args)))
1182;; nil))
1183
1184;;; sanity-checking arglists 1079;;; sanity-checking arglists
1185 1080
1186(defun byte-compile-fdefinition (name macro-p) 1081(defun byte-compile-fdefinition (name macro-p)
@@ -1829,28 +1724,6 @@ The value is non-nil if there were no errors, nil if errors."
1829 (load target-file)) 1724 (load target-file))
1830 t)))) 1725 t))))
1831 1726
1832;;(defun byte-compile-and-load-file (&optional filename)
1833;; "Compile a file of Lisp code named FILENAME into a file of byte code,
1834;;and then load it. The output file's name is made by appending \"c\" to
1835;;the end of FILENAME."
1836;; (interactive)
1837;; (if filename ; I don't get it, (interactive-p) doesn't always work
1838;; (byte-compile-file filename t)
1839;; (let ((current-prefix-arg '(4)))
1840;; (call-interactively 'byte-compile-file))))
1841
1842;;(defun byte-compile-buffer (&optional buffer)
1843;; "Byte-compile and evaluate contents of BUFFER (default: the current buffer)."
1844;; (interactive "bByte compile buffer: ")
1845;; (setq buffer (if buffer (get-buffer buffer) (current-buffer)))
1846;; (message "Compiling %s..." (buffer-name buffer))
1847;; (let* ((filename (or (buffer-file-name buffer)
1848;; (concat "#<buffer " (buffer-name buffer) ">")))
1849;; (byte-compile-current-file buffer))
1850;; (byte-compile-from-buffer buffer nil))
1851;; (message "Compiling %s...done" (buffer-name buffer))
1852;; t)
1853
1854;;; compiling a single function 1727;;; compiling a single function
1855;;;###autoload 1728;;;###autoload
1856(defun compile-defun (&optional arg) 1729(defun compile-defun (&optional arg)
@@ -3930,8 +3803,8 @@ that suppresses all warnings during execution of BODY."
3930 `(push ',var current-load-list)) 3803 `(push ',var current-load-list))
3931 (when (> (length form) 3) 3804 (when (> (length form) 3)
3932 (when (and string (not (stringp string))) 3805 (when (and string (not (stringp string)))
3933 (byte-compile-warn "third arg to `%s %s' is not a string: %s" 3806 (byte-compile-warn "third arg to `%s %s' is not a string: %s"
3934 fun var string)) 3807 fun var string))
3935 `(put ',var 'variable-documentation ,string)) 3808 `(put ',var 'variable-documentation ,string))
3936 (if (cddr form) ; `value' provided 3809 (if (cddr form) ; `value' provided
3937 (let ((byte-compile-not-obsolete-vars (list var))) 3810 (let ((byte-compile-not-obsolete-vars (list var)))