summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>2007-08-27 04:00:19 +0000
committerMiles Bader <miles@gnu.org>2007-08-27 04:00:19 +0000
commit7f22a76506a3f3db2eb4bce1cfc49105bd8d0824 (patch)
tree02ffae400506ae46fcf03eacaa5210aac7fe57de /lisp/emacs-lisp
parentd53a60a6f76043ba9fb395eece2aaccc67a0d1b2 (diff)
parent619fb9ee822da1d92d8b7974b827dac6a918967f (diff)
downloademacs-7f22a76506a3f3db2eb4bce1cfc49105bd8d0824.tar.gz
emacs-7f22a76506a3f3db2eb4bce1cfc49105bd8d0824.tar.bz2
emacs-7f22a76506a3f3db2eb4bce1cfc49105bd8d0824.zip
Merge from emacs--rel--22
Patches applied: * emacs--rel--22 (patch 97-100) - Update from CVS - Merge from gnus--rel--5.10 * gnus--rel--5.10 (patch 246-247) - Update from CVS Revision: emacs@sv.gnu.org/emacs--devo--0--patch-860
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r--lisp/emacs-lisp/backquote.el9
-rw-r--r--lisp/emacs-lisp/byte-opt.el6
-rw-r--r--lisp/emacs-lisp/bytecomp.el21
-rw-r--r--lisp/emacs-lisp/edebug.el8
4 files changed, 23 insertions, 21 deletions
diff --git a/lisp/emacs-lisp/backquote.el b/lisp/emacs-lisp/backquote.el
index 6daaf001433..a2a929d9601 100644
--- a/lisp/emacs-lisp/backquote.el
+++ b/lisp/emacs-lisp/backquote.el
@@ -85,10 +85,10 @@ For example (backquote-list* 'a 'b 'c) => (a b . c)"
(defconst backquote-backquote-symbol '\`
"Symbol used to represent a backquote or nested backquote.")
-(defconst backquote-unquote-symbol ',
+(defconst backquote-unquote-symbol '\,
"Symbol used to represent an unquote inside a backquote.")
-(defconst backquote-splice-symbol ',@
+(defconst backquote-splice-symbol '\,@
"Symbol used to represent a splice inside a backquote.")
;;;###autoload
@@ -121,9 +121,8 @@ Vectors work just like lists. Nested backquotes are permitted."
(defun backquote-delay-process (s level)
"Process a (un|back|splice)quote inside a backquote.
This simply recurses through the body."
- (let ((exp (backquote-listify (list (backquote-process (nth 1 s) level)
- (cons 0 (list 'quote (car s))))
- '(0))))
+ (let ((exp (backquote-listify (list (cons 0 (list 'quote (car s))))
+ (backquote-process (cdr s) level))))
(if (eq (car-safe exp) 'quote)
(cons 0 (list 'quote s))
(cons 1 exp))))
diff --git a/lisp/emacs-lisp/byte-opt.el b/lisp/emacs-lisp/byte-opt.el
index 80a6ad595b2..fdeab460c79 100644
--- a/lisp/emacs-lisp/byte-opt.el
+++ b/lisp/emacs-lisp/byte-opt.el
@@ -1146,9 +1146,9 @@
(put 'featurep 'byte-optimizer 'byte-optimize-featurep)
(defun byte-optimize-featurep (form)
- ;; Emacs-21's byte-code doesn't run under XEmacs anyway, so we can
- ;; safely optimize away this test.
- (if (equal '((quote xemacs)) (cdr-safe form))
+ ;; Emacs-21's byte-code doesn't run under XEmacs or SXEmacs anyway, so we
+ ;; can safely optimize away this test.
+ (if (member (cdr-safe form) '((quote xemacs) (quote sxemacs)))
nil
form))
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
index 39ff0d8668e..bfc21820b5c 100644
--- a/lisp/emacs-lisp/bytecomp.el
+++ b/lisp/emacs-lisp/bytecomp.el
@@ -1010,8 +1010,7 @@ Each function's symbol gets added to `byte-compile-noruntime-functions'."
(defun byte-compile-log-file ()
(and (not (equal byte-compile-current-file byte-compile-last-logged-file))
(not noninteractive)
- (save-excursion
- (set-buffer (get-buffer-create "*Compile-Log*"))
+ (with-current-buffer (get-buffer-create "*Compile-Log*")
(goto-char (point-max))
(let* ((inhibit-read-only t)
(dir (and byte-compile-current-file
@@ -1548,8 +1547,7 @@ recompile every `.el' file that already has a `.elc' file."
nil
(save-some-buffers)
(force-mode-line-update))
- (save-current-buffer
- (set-buffer (get-buffer-create "*Compile-Log*"))
+ (with-current-buffer (get-buffer-create "*Compile-Log*")
(setq default-directory (expand-file-name directory))
;; compilation-mode copies value of default-directory.
(unless (eq major-mode 'compilation-mode)
@@ -1651,7 +1649,7 @@ The value is non-nil if there were no errors, nil if errors."
(let ((b (get-file-buffer (expand-file-name filename))))
(if (and b (buffer-modified-p b)
(y-or-n-p (format "Save buffer %s first? " (buffer-name b))))
- (save-excursion (set-buffer b) (save-buffer)))))
+ (with-current-buffer b (save-buffer)))))
;; Force logging of the file name for each file compiled.
(setq byte-compile-last-logged-file nil)
@@ -1661,9 +1659,8 @@ The value is non-nil if there were no errors, nil if errors."
byte-compile-dest-file)
(setq target-file (byte-compile-dest-file filename))
(setq byte-compile-dest-file target-file)
- (save-excursion
- (setq input-buffer (get-buffer-create " *Compiler Input*"))
- (set-buffer input-buffer)
+ (with-current-buffer
+ (setq input-buffer (get-buffer-create " *Compiler Input*"))
(erase-buffer)
(setq buffer-file-coding-system nil)
;; Always compile an Emacs Lisp file as multibyte
@@ -1864,7 +1861,13 @@ With argument, insert value in current buffer after the form."
(not (eobp)))
(setq byte-compile-read-position (point)
byte-compile-last-position byte-compile-read-position)
- (let ((form (read inbuffer)))
+ (let* ((old-style-backquotes nil)
+ (form (read inbuffer)))
+ ;; Warn about the use of old-style backquotes.
+ (when old-style-backquotes
+ (byte-compile-warn "!! The file uses old-style backquotes !!
+This functionality has been obsolete for more than 10 years already
+and will be removed soon. See (elisp)Backquote in the manual."))
(byte-compile-file-form form)))
;; Compile pending forms at end of file.
(byte-compile-flush-pending)
diff --git a/lisp/emacs-lisp/edebug.el b/lisp/emacs-lisp/edebug.el
index 5a526126c25..964688894af 100644
--- a/lisp/emacs-lisp/edebug.el
+++ b/lisp/emacs-lisp/edebug.el
@@ -1507,7 +1507,7 @@ expressions; a `progn' form will be returned enclosing these forms."
head (edebug-move-cursor cursor))))))
((consp head)
- (if (eq (car head) ',)
+ (if (eq (car head) '\,)
;; The head of a form should normally be a symbol or a lambda
;; expression but it can also be an unquote form to be filled
;; before evaluation. We evaluate the arguments anyway, on the
@@ -1664,7 +1664,7 @@ expressions; a `progn' form will be returned enclosing these forms."
((fboundp symbol) ; is it a predicate?
(let ((sexp (edebug-top-element-required cursor "Expected" symbol)))
;; Special case for edebug-`.
- (if (and (listp sexp) (eq (car sexp) ',))
+ (if (and (listp sexp) (eq (car sexp) '\,))
(edebug-match cursor '(("," def-form)))
(if (not (funcall symbol sexp))
(edebug-no-match cursor symbol "failed"))
@@ -2102,8 +2102,8 @@ expressions; a `progn' form will be returned enclosing these forms."
(def-edebug-spec edebug-\` (def-form))
;; Assume immediate quote in unquotes mean backquote at next higher level.
-(def-edebug-spec , (&or ("quote" edebug-\`) def-form))
-(def-edebug-spec ,@ (&define ;; so (,@ form) is never wrapped.
+(def-edebug-spec \, (&or ("quote" edebug-\`) def-form))
+(def-edebug-spec \,@ (&define ;; so (,@ form) is never wrapped.
&or ("quote" edebug-\`) def-form))
;; New byte compiler.