diff options
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r-- | lisp/emacs-lisp/authors.el | 2 | ||||
-rw-r--r-- | lisp/emacs-lisp/bytecomp.el | 6 | ||||
-rw-r--r-- | lisp/emacs-lisp/edebug.el | 11 | ||||
-rw-r--r-- | lisp/emacs-lisp/lisp-mode.el | 59 | ||||
-rw-r--r-- | lisp/emacs-lisp/re-builder.el | 11 |
5 files changed, 59 insertions, 30 deletions
diff --git a/lisp/emacs-lisp/authors.el b/lisp/emacs-lisp/authors.el index 5f70773444d..d93d80e0c8e 100644 --- a/lisp/emacs-lisp/authors.el +++ b/lisp/emacs-lisp/authors.el @@ -70,6 +70,7 @@ files.") ("Francesco Potort,Al(B" "Francesco Potorti" "Francesco Potorti`") ("Frederic Pierresteguy" "Fred Pierresteguy") ("Geoff Voelker" "voelker") + ("Gerd M,Av(Bllmann" "Gerd Moellmann") ("Hallvard B. Furuseth" "Hallvard B Furuseth") ("Hrvoje Nik,B9(Bi,Bf(B" "Hrvoje Niksic") (nil "(afs@hplb.hpl.hp.com)") @@ -102,6 +103,7 @@ files.") ("Kyle Jones" "Kyle E. Jones") ("Marcus G. Daniels" "Marcus Daniels") ("Mark D. Baushke" "Mark D Baushke") + ("Agust,Am(Bn Mart,Am(Bn" "Agustin Martin") ("Martin Lorentzon" "Martin Lorentzson") ("Matt Swift" "Matthew Swift") ("Michael R. Mauger" "Michael Mauger") diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index 1d7cbfc422c..f74e48c4635 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el @@ -972,8 +972,10 @@ Each function's symbol gets added to `byte-compile-noruntime-functions'." (pos (if (and byte-compile-current-file (integerp byte-compile-read-position)) (with-current-buffer byte-compile-current-buffer - (format "%d:%d:" (count-lines (point-min) - byte-compile-last-position) + (format "%d:%d:" + (save-excursion + (goto-char byte-compile-last-position) + (1+ (count-lines (point-min) (point-at-bol)))) (save-excursion (goto-char byte-compile-last-position) (1+ (current-column))))) diff --git a/lisp/emacs-lisp/edebug.el b/lisp/emacs-lisp/edebug.el index 5af676a5e86..2777ea775e9 100644 --- a/lisp/emacs-lisp/edebug.el +++ b/lisp/emacs-lisp/edebug.el @@ -2939,6 +2939,7 @@ MSG is printed after `::::} '." (edebug-overlay-arrow)) (setq buffer-read-only edebug-buffer-read-only) (use-local-map edebug-outside-map) + (remove-hook 'kill-buffer-hook 'edebug-kill-buffer t) ) ;; gotta have a buffer to let its buffer local variables be set (get-buffer-create " bogus edebug buffer")) @@ -3942,8 +3943,18 @@ edebug-on-signal edebug-unwrap-results edebug-global-break-condition " + ;; If the user kills the buffer in which edebug is currently active, + ;; exit to top level, because the edebug command loop can't usefully + ;; continue running in such a case. + (add-hook 'kill-buffer-hook 'edebug-kill-buffer nil t) (use-local-map edebug-mode-map)) +(defun edebug-kill-buffer () + "Used on `kill-buffer-hook' when Edebug is operating in a buffer of Lisp code." + (let (kill-buffer-hook) + (kill-buffer (current-buffer))) + (top-level)) + ;;; edebug eval list mode ;; A list of expressions and their evaluations is displayed in *edebug*. diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el index 5576a4882b0..09cb8436c89 100644 --- a/lisp/emacs-lisp/lisp-mode.el +++ b/lisp/emacs-lisp/lisp-mode.el @@ -909,34 +909,47 @@ is the buffer position of the start of the containing expression." (cond ((elt state 3) ;; Inside a string, don't change indentation. nil) - ((save-excursion - ;; test whether current line begins with a constant - (goto-char indent-point) - (skip-chars-forward " \t") - (looking-at ":")) - (let ((desired-indent - (save-excursion - (goto-char (1+ containing-sexp)) - (parse-partial-sexp (point) calculate-lisp-indent-last-sexp 0 t) - (point))) - (parse-sexp-ignore-comments t)) - ;; Align a constant symbol under the last constant symbol - (goto-char calculate-lisp-indent-last-sexp) - (while (> (point) desired-indent) - (if (looking-at ":") - (setq desired-indent (point)) - (backward-sexp 1)))) - (current-column)) ((and (integerp lisp-indent-offset) containing-sexp) ;; Indent by constant offset (goto-char containing-sexp) (+ (current-column) lisp-indent-offset)) + ;; in this case calculate-lisp-indent-last-sexp is not nil + (calculate-lisp-indent-last-sexp + (or + ;; try to align the parameters of a known function + (and lisp-indent-function + (not retry) + (funcall lisp-indent-function indent-point state)) + ;; If the function has no special alignment + ;; or it does not apply to this argument, + ;; try to align a constant-symbol under the last + ;; preceding constant symbol, if there is such one of + ;; the last 2 preceding symbols, in the previous + ;; uncommented line. + (and (save-excursion + (goto-char indent-point) + (skip-chars-forward " \t") + (looking-at ":")) + (> calculate-lisp-indent-last-sexp + (save-excursion + (goto-char (1+ containing-sexp)) + (parse-partial-sexp (point) calculate-lisp-indent-last-sexp 0 t) + (point))) + (let ((parse-sexp-ignore-comments t) + indent) + (goto-char calculate-lisp-indent-last-sexp) + (or (and (looking-at ":") + (setq indent (current-column))) + (and (< (save-excursion (beginning-of-line) (point)) + (prog2 (backward-sexp) (point))) + (looking-at ":") + (setq indent (current-column)))) + indent)) + ;; another symbols or constants not preceded by a constant + ;; as defined above. + normal-indent)) + ;; in this case calculate-lisp-indent-last-sexp is nil (desired-indent) - ((and (boundp 'lisp-indent-function) - lisp-indent-function - (not retry)) - (or (funcall lisp-indent-function indent-point state) - normal-indent)) (t normal-indent)))))) diff --git a/lisp/emacs-lisp/re-builder.el b/lisp/emacs-lisp/re-builder.el index 08897bec72c..2d3b4832cda 100644 --- a/lisp/emacs-lisp/re-builder.el +++ b/lisp/emacs-lisp/re-builder.el @@ -130,14 +130,13 @@ (defcustom reb-re-syntax 'read "*Syntax for the REs in the RE Builder. -Can either be `read', `string', `sregex' or `lisp-re'." +Can either be `read', `string', `sregex', `lisp-re', `rx'." :group 're-builder :type '(choice (const :tag "Read syntax" read) (const :tag "String syntax" string) (const :tag "`sregex' syntax" sregex) (const :tag "`lisp-re' syntax" lisp-re) - (const :tag "`rx' syntax" rx) - (value: string))) + (const :tag "`rx' syntax" rx))) (defcustom reb-auto-match-limit 200 "*Positive integer limiting the matches for RE Builder auto updates. @@ -640,11 +639,13 @@ If SUBEXP is non-nil mark only the corresponding sub-expressions." (set-buffer reb-target-buffer) (reb-delete-overlays) (goto-char (point-min)) - (while (and (re-search-forward re (point-max) t) + (while (and (not (eobp)) + (re-search-forward re (point-max) t) (or (not reb-auto-match-limit) (< matches reb-auto-match-limit))) (if (= 0 (length (match-string 0))) - (error "Empty regular expression!")) + (unless (eobp) + (forward-char 1))) (let ((i 0) suffix max-suffix) (setq matches (1+ matches)) |