GNU bug report logs -
#16891
24.3; [PATCH] align-regexp now has a separate history for its interactive argument
Previous Next
Reported by: Dima Kogan <dima <at> secretsauce.net>
Date: Thu, 27 Feb 2014 10:55:02 UTC
Severity: wishlist
Tags: fixed, patch
Found in version 24.3
Fixed in version 26.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Lars Ingebrigtsen <larsi <at> gnus.org> writes:
> Could you resubmit this patch with an etc/NEWS entry, and a possible
> documentation change? I'm not sure whether we usually mention separate
> histories for commands or not, though...
Patch attached. I'm assuming this is going to master (NEWS entry in
25.2) and that no documentation change is necessary. This seems too
small to document
[0001-align-regexp-now-has-a-separate-history-for-its-inte.patch (text/x-diff, inline)]
From c973972cbac84e0c9e228376a547df3eddb001f3 Mon Sep 17 00:00:00 2001
From: Dima Kogan <dima <at> secretsauce.net>
Date: Thu, 27 Feb 2014 02:45:43 -0800
Subject: [PATCH] `align-regexp' now has a separate history for its interactive
argument
lisp/align.el (align-regexp-history): New variable (bug#16891)
---
etc/NEWS | 5 +++++
lisp/align.el | 5 ++++-
2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/etc/NEWS b/etc/NEWS
index ec68cce..aec34c3 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -31,6 +31,11 @@ otherwise leave it unmarked.
* Changes in Emacs 25.2
+---
+** `align-regexp' has a separate history for its interactive argument
+`align-regexp' no longer shares its history with all other
+history-less functions that use `read-string'
+
+++
** The networking code has been reworked so that it's more
asynchronous than it was (when specifying :nowait t in
diff --git a/lisp/align.el b/lisp/align.el
index 7e439f3..c3389dc 100644
--- a/lisp/align.el
+++ b/lisp/align.el
@@ -802,6 +802,9 @@ align-mode-exclude-rules-list
(defvar align-highlight-overlays nil
"The current overlays highlighting the text matched by a rule.")
+(defvar align-regexp-history nil
+ "Input history for the full user-entered regex in `align-regexp'")
+
;; Sample extension rule set, for vhdl-mode. This should properly be
;; in vhdl-mode.el itself.
@@ -946,7 +949,7 @@ align-regexp
(list (region-beginning) (region-end))
(if current-prefix-arg
(list (read-string "Complex align using regexp: "
- "\\(\\s-*\\)")
+ "\\(\\s-*\\)" 'align-regexp-history)
(string-to-number
(read-string
"Parenthesis group to modify (justify if negative): " "1"))
--
2.1.4
This bug report was last modified 8 years and 172 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.