emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/crux 4f5c8fe 059/112: [Fix #46] Address two issues with cr


From: ELPA Syncer
Subject: [nongnu] elpa/crux 4f5c8fe 059/112: [Fix #46] Address two issues with crux-move-beginning-line (#48)
Date: Wed, 11 Aug 2021 09:57:53 -0400 (EDT)

branch: elpa/crux
commit 4f5c8fefd5a6aa52e128c4a0401cc86410d6ac8f
Author: KarlFish <KarlFish@users.noreply.github.com>
Commit: Bozhidar Batsov <bozhidar.batsov@gmail.com>

    [Fix #46] Address two issues with crux-move-beginning-line (#48)
    
    See https://github.com/bbatsov/crux/issues/46 for more context
    
    (line-end-position) stops the search from passing through all the
    empty lines.
    
    t suppresses the message on search fail, but doesn't move to the line
    end. A non nil, non t arg would also suppress the message, but move
    to (line-end-position).
---
 crux.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/crux.el b/crux.el
index f5af70c..a63aa77 100644
--- a/crux.el
+++ b/crux.el
@@ -231,7 +231,7 @@ Used by crux functions like crux-move-beginning-of-line to 
skip over whitespace"
   (let ((line-start-regex (cond ((eq major-mode 'term-mode) 
crux-line-start-regex-term-mode)
                                 ((eq major-mode 'eshell-mode) 
crux-line-start-regex-eshell-mode)
                                 (t crux-line-start-regex))))
-    (search-forward-regexp line-start-regex)))
+    (search-forward-regexp line-start-regex (line-end-position) t)))
 
 
 (defun crux-move-beginning-of-line (arg)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]