aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDima Kogan2016-02-28 15:15:18 +1030
committerLars Ingebrigtsen2016-02-28 15:15:18 +1030
commitf4b057c67f74e0a7a2c4ff03c19c8236989465d0 (patch)
tree167a41e32fc1dde6d958cc8e1d069cb3066e389e
parente00974a7d1981d716d38ecf45b689dd30a381c65 (diff)
downloademacs-f4b057c67f74e0a7a2c4ff03c19c8236989465d0.tar.gz
emacs-f4b057c67f74e0a7a2c4ff03c19c8236989465d0.zip
Use a separate history variable for align-regexp
* lisp/align.el (align-regexp-history): New variable (bug#16891). (align-regexp): Use it.
-rw-r--r--etc/NEWS5
-rw-r--r--lisp/align.el5
2 files changed, 9 insertions, 1 deletions
diff --git a/etc/NEWS b/etc/NEWS
index c12f4d19cf1..2cb46a185e1 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -31,6 +31,11 @@ otherwise leave it unmarked.
31 31
32* Changes in Emacs 25.2 32* Changes in Emacs 25.2
33 33
34---
35** `align-regexp' has a separate history for its interactive argument
36`align-regexp' no longer shares its history with all other
37history-less functions that use `read-string'
38
34+++ 39+++
35** The networking code has been reworked so that it's more 40** The networking code has been reworked so that it's more
36asynchronous than it was (when specifying :nowait t in 41asynchronous than it was (when specifying :nowait t in
diff --git a/lisp/align.el b/lisp/align.el
index 7e439f3e073..c3389dc9860 100644
--- a/lisp/align.el
+++ b/lisp/align.el
@@ -802,6 +802,9 @@ See the variable `align-exclude-rules-list' for more details.")
802(defvar align-highlight-overlays nil 802(defvar align-highlight-overlays nil
803 "The current overlays highlighting the text matched by a rule.") 803 "The current overlays highlighting the text matched by a rule.")
804 804
805(defvar align-regexp-history nil
806 "Input history for the full user-entered regex in `align-regexp'")
807
805;; Sample extension rule set, for vhdl-mode. This should properly be 808;; Sample extension rule set, for vhdl-mode. This should properly be
806;; in vhdl-mode.el itself. 809;; in vhdl-mode.el itself.
807 810
@@ -946,7 +949,7 @@ construct a rule to pass to `align-region', which does the real work."
946 (list (region-beginning) (region-end)) 949 (list (region-beginning) (region-end))
947 (if current-prefix-arg 950 (if current-prefix-arg
948 (list (read-string "Complex align using regexp: " 951 (list (read-string "Complex align using regexp: "
949 "\\(\\s-*\\)") 952 "\\(\\s-*\\)" 'align-regexp-history)
950 (string-to-number 953 (string-to-number
951 (read-string 954 (read-string
952 "Parenthesis group to modify (justify if negative): " "1")) 955 "Parenthesis group to modify (justify if negative): " "1"))