aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2010-06-18 10:05:43 -0400
committerStefan Monnier2010-06-18 10:05:43 -0400
commitb1a03ef6bfba4296dddc3df1e8f9d54aba3e45e3 (patch)
treecfff2516ef3bd77fa08ffb6363134240e694b5a4
parentdbd6da78650014d997dceeecaa4392fc79f6ca8b (diff)
downloademacs-b1a03ef6bfba4296dddc3df1e8f9d54aba3e45e3.tar.gz
emacs-b1a03ef6bfba4296dddc3df1e8f9d54aba3e45e3.zip
* lisp/emacs-lisp/edebug.el (edebug-read-list): Phase out old-style backquotes.
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/emacs-lisp/edebug.el34
2 files changed, 13 insertions, 26 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index fffbc555e97..730cf65c8d5 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12010-06-18 Stefan Monnier <monnier@iro.umontreal.ca>
2
3 * emacs-lisp/edebug.el (edebug-read-list):
4 Phase out old-style backquotes.
5
12010-06-17 Juri Linkov <juri@jurta.org> 62010-06-17 Juri Linkov <juri@jurta.org>
2 7
3 * help-mode.el (help-mode): Set buffer-local variable 8 * help-mode.el (help-mode): Set buffer-local variable
diff --git a/lisp/emacs-lisp/edebug.el b/lisp/emacs-lisp/edebug.el
index 8bf20b0ccef..43fb5762647 100644
--- a/lisp/emacs-lisp/edebug.el
+++ b/lisp/emacs-lisp/edebug.el
@@ -885,17 +885,12 @@ already is one.)"
885 (edebug-storing-offsets (1- (point)) 'quote) 885 (edebug-storing-offsets (1- (point)) 'quote)
886 (edebug-read-storing-offsets stream))) 886 (edebug-read-storing-offsets stream)))
887 887
888(defvar edebug-read-backquote-level 0
889 "If non-zero, we're in a new-style backquote.
890It should never be negative. This controls how we read comma constructs.")
891
892(defun edebug-read-backquote (stream) 888(defun edebug-read-backquote (stream)
893 ;; Turn `thing into (\` thing) 889 ;; Turn `thing into (\` thing)
894 (forward-char 1) 890 (forward-char 1)
895 (list 891 (list
896 (edebug-storing-offsets (1- (point)) '\`) 892 (edebug-storing-offsets (1- (point)) '\`)
897 (let ((edebug-read-backquote-level (1+ edebug-read-backquote-level))) 893 (edebug-read-storing-offsets stream)))
898 (edebug-read-storing-offsets stream))))
899 894
900(defun edebug-read-comma (stream) 895(defun edebug-read-comma (stream)
901 ;; Turn ,thing into (\, thing). Handle ,@ and ,. also. 896 ;; Turn ,thing into (\, thing). Handle ,@ and ,. also.
@@ -910,12 +905,9 @@ It should never be negative. This controls how we read comma constructs.")
910 (forward-char 1))) 905 (forward-char 1)))
911 ;; Generate the same structure of offsets we would have 906 ;; Generate the same structure of offsets we would have
912 ;; if the resulting list appeared verbatim in the input text. 907 ;; if the resulting list appeared verbatim in the input text.
913 (if (zerop edebug-read-backquote-level) 908 (list
914 (edebug-storing-offsets opoint symbol) 909 (edebug-storing-offsets opoint symbol)
915 (list 910 (edebug-read-storing-offsets stream)))))
916 (edebug-storing-offsets opoint symbol)
917 (let ((edebug-read-backquote-level (1- edebug-read-backquote-level)))
918 (edebug-read-storing-offsets stream)))))))
919 911
920(defun edebug-read-function (stream) 912(defun edebug-read-function (stream)
921 ;; Turn #'thing into (function thing) 913 ;; Turn #'thing into (function thing)
@@ -937,17 +929,7 @@ It should never be negative. This controls how we read comma constructs.")
937 (prog1 929 (prog1
938 (let ((elements)) 930 (let ((elements))
939 (while (not (memq (edebug-next-token-class) '(rparen dot))) 931 (while (not (memq (edebug-next-token-class) '(rparen dot)))
940 (if (and (eq (edebug-next-token-class) 'backquote) 932 (push (edebug-read-storing-offsets stream) elements))
941 (null elements)
942 (zerop edebug-read-backquote-level))
943 (progn
944 ;; Old style backquote.
945 (forward-char 1) ; Skip backquote.
946 ;; Call edebug-storing-offsets here so that we
947 ;; produce the same offsets we would have had
948 ;; if the backquote were an ordinary symbol.
949 (push (edebug-storing-offsets (1- (point)) '\`) elements))
950 (push (edebug-read-storing-offsets stream) elements)))
951 (setq elements (nreverse elements)) 933 (setq elements (nreverse elements))
952 (if (eq 'dot (edebug-next-token-class)) 934 (if (eq 'dot (edebug-next-token-class))
953 (let (dotted-form) 935 (let (dotted-form)
@@ -4455,7 +4437,7 @@ With prefix argument, make it a temporary breakpoint."
4455 (add-hook 'cl-load-hook 4437 (add-hook 'cl-load-hook
4456 (function (lambda () (require 'cl-specs))))) 4438 (function (lambda () (require 'cl-specs)))))
4457 4439
4458;;; edebug-cl-read and cl-read are available from liberte@cs.uiuc.edu 4440;; edebug-cl-read and cl-read are available from liberte@cs.uiuc.edu
4459(if (featurep 'cl-read) 4441(if (featurep 'cl-read)
4460 (add-hook 'edebug-setup-hook 4442 (add-hook 'edebug-setup-hook
4461 (function (lambda () (require 'edebug-cl-read)))) 4443 (function (lambda () (require 'edebug-cl-read))))
@@ -4466,8 +4448,8 @@ With prefix argument, make it a temporary breakpoint."
4466 4448
4467;;; Finalize Loading 4449;;; Finalize Loading
4468 4450
4469;;; Finally, hook edebug into the rest of Emacs. 4451;; Finally, hook edebug into the rest of Emacs.
4470;;; There are probably some other things that could go here. 4452;; There are probably some other things that could go here.
4471 4453
4472;; Install edebug read and eval functions. 4454;; Install edebug read and eval functions.
4473(edebug-install-read-eval-functions) 4455(edebug-install-read-eval-functions)