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

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

[nongnu] elpa/iedit 31986b640a 289/301: Take iedit-goto-first-occurrence


From: ELPA Syncer
Subject: [nongnu] elpa/iedit 31986b640a 289/301: Take iedit-goto-first-occurrence back
Date: Mon, 10 Jan 2022 22:59:11 -0500 (EST)

branch: elpa/iedit
commit 31986b640a095a7dd071a86f6649cb3f09cd0e6e
Author: Victor <victorhge@gmail.com>
Commit: Victor <victorhge@gmail.com>

    Take iedit-goto-first-occurrence back
    
    Which is deleted incidentally in the previous commit.
---
 iedit-lib.el | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/iedit-lib.el b/iedit-lib.el
index 3612eec177..7961371acd 100644
--- a/iedit-lib.el
+++ b/iedit-lib.el
@@ -1,7 +1,7 @@
 ;;; iedit-lib.el --- APIs for editing multiple regions in the same way
 ;;; simultaneously.
 
-;; Copyright (C) 2010 - 2019, 2020 Victor Ren
+;; Copyright (C) 2010 - 2019, 2020, 2021 Victor Ren
 
 ;; Time-stamp: <2021-01-14 23:56:53 Victor Ren>
 ;; Author: Victor Ren <victorhge@gmail.com>
@@ -717,6 +717,14 @@ from first to last occurrence will cost one repetition."
     (next-single-char-property-change
      (point-min) 'iedit-occurrence-overlay-name)))
 
+(defun iedit-goto-first-occurrence ()
+  "Move to the first occurrence."
+  (interactive)
+  (goto-char (iedit-first-occurrence))
+  (setq iedit-forward-success t)
+  (setq iedit-occurrence-index 1)
+  (message "Located the first occurrence."))
+
 (defun iedit-goto-last-occurrence ()
   "Move to the last occurrence."
   (interactive)



reply via email to

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