[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master d6f5c06 04/40: Applied patch by Nathaniel Flath:
From: |
Alexey Veretennikov |
Subject: |
[elpa] master d6f5c06 04/40: Applied patch by Nathaniel Flath: |
Date: |
Fri, 29 Jan 2016 23:29:27 +0000 |
branch: master
commit d6f5c063259501ac4fefb5d7b205a0a043779f4e
Author: Alexey Veretennikov <address@hidden>
Commit: Alexey Veretennikov <address@hidden>
Applied patch by Nathaniel Flath:
"This patch changes
the prompt so that the default value is not in the edit
area, but in the prompt. This makes it easier to change if
the default value is not what you wanted."
---
loccur.el | 17 ++++++++++++-----
1 files changed, 12 insertions(+), 5 deletions(-)
diff --git a/loccur.el b/loccur.el
index 3228966..d45cc8f 100644
--- a/loccur.el
+++ b/loccur.el
@@ -4,7 +4,7 @@
;;
;; Author: Alexey Veretennikov <alexey dot veretennikov at gmail dot com>
;; Created: 2009-09-08
-;; Version: 1.1.0
+;; Version: 1.1.1
;; Keywords: matching
;; URL: http://loccur.sourceforge.net/
;; Compatibility: GNU Emacs 22.x, GNU Emacs 23.x
@@ -44,6 +44,11 @@
;;
;;; Change Log:
;;
+;; 2010-03-07 (1.1.1)
+;; + Default value is taken from prompt instead of an edit area
+;; (thanks to Nathaniel Flath)
+;;
+;;
;; 2009-10-05 (1.1.0)
;; + Added highlighting of the matched strings
;; + Now inserts selected region to the prompt
@@ -118,13 +123,15 @@ containing the regular expression REGEX. A second call of
the function
unhides lines again"
(interactive
(if loccur-mode
- (list nil)
- (loccur-prompt)))
+ (list nil)
+ (list (read-string (concat "Regexp<" (loccur-prompt)
+ ">: ") "" 'loccur-history ))))
+ (if (string-equal "" regex) (setq regex (loccur-prompt)))
(loccur-mode regex))
(defun loccur-prompt ()
- "Prompts for a regexp to search
+ "Returns the default value of the prompt.
Default value for prompt is a current word or active region(selection),
if its size is 1 line"
@@ -139,7 +146,7 @@ if its size is 1 line"
(line-number-at-pos pos2))
(buffer-substring-no-properties pos1 pos2)))
(current-word))))
- (list (read-string "Regexp: " prompt 'loccur-history ))))
+ prompt))
(defun loccur-1 (regex)
- [elpa] master updated (ada08b0 -> 8f6fe36), Alexey Veretennikov, 2016/01/29
- [elpa] master b84471a 01/40: Initial revision, v1.0, Alexey Veretennikov, 2016/01/29
- [elpa] master 915846a 03/40: Removed implemented TODO note from comments, Alexey Veretennikov, 2016/01/29
- [elpa] master 1a1fb1a 02/40: + Added highlighting of the matched strings, Alexey Veretennikov, 2016/01/29
- [elpa] master d6f5c06 04/40: Applied patch by Nathaniel Flath:,
Alexey Veretennikov <=
- [elpa] master f73cf0e 05/40: Added README file, Alexey Veretennikov, 2016/01/29
- [elpa] master 8ee09a7 06/40: Updated markdown syntax, Alexey Veretennikov, 2016/01/29
- [elpa] master 6e0c960 08/40: Changed URL, Alexey Veretennikov, 2016/01/29
- [elpa] master aa1e119 07/40: Removed cl dependency, Alexey Veretennikov, 2016/01/29
- [elpa] master 5859be9 09/40: Recenter on exit from loccur-mode, Alexey Veretennikov, 2016/01/29
- [elpa] master a1e135a 12/40: Added loccur-no-highlight function., Alexey Veretennikov, 2016/01/29
- [elpa] master 440c96e 10/40: Added possibility of desactivating regex highlighting., Alexey Veretennikov, 2016/01/29
- [elpa] master 2bc08c6 14/40: Updated change log in the loccur.el file., Alexey Veretennikov, 2016/01/29
- [elpa] master 9b5d16c 13/40: Added detailed info on the README file., Alexey Veretennikov, 2016/01/29
- [elpa] master e9d4714 15/40: Fixed displaying problems on github caused by the README file., Alexey Veretennikov, 2016/01/29