[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/iedit dfed75064e 285/301: Save and restore `line-move-igno
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/iedit dfed75064e 285/301: Save and restore `line-move-ignore-invisible' |
Date: |
Mon, 10 Jan 2022 22:59:10 -0500 (EST) |
branch: elpa/iedit
commit dfed75064e90963c91fdb212c0c9c27257d697c6
Author: Victor Ren <victorhge@gmail.com>
Commit: Victor <victorhge@gmail.com>
Save and restore `line-move-ignore-invisible'
---
iedit-lib.el | 20 ++++++++++++++------
1 file changed, 14 insertions(+), 6 deletions(-)
diff --git a/iedit-lib.el b/iedit-lib.el
old mode 100755
new mode 100644
index f89f6e47f4..f343e5e90b
--- a/iedit-lib.el
+++ b/iedit-lib.el
@@ -200,12 +200,15 @@ occurrence.")
It replaces `inhibit-modification-hooks' which prevents calling
`after-change-functions'.")
+(defvar iedit-line-move-ignore-invisible-value nil
+ "Used to save and restore the value of `line-move-ignore-invisible'.")
+
(make-variable-buffer-local 'iedit-updating)
(make-variable-buffer-local 'iedit-after-change-list)
(make-variable-buffer-local 'iedit-occurrences-overlays)
(make-variable-buffer-local 'iedit-read-only-occurrences-overlays)
(make-variable-buffer-local 'iedit-hiding)
-(make-local-variable 'iedit-case-sensitive)
+(make-variable-buffer-local 'iedit-case-sensitive)
(make-variable-buffer-local 'iedit-forward-success)
(make-variable-buffer-local 'iedit-before-modification-string)
(make-variable-buffer-local 'iedit-before-buffering-string)
@@ -221,6 +224,7 @@ It replaces `inhibit-modification-hooks' which prevents
calling
(make-variable-buffer-local 'iedit-lib-quit-func)
(make-variable-buffer-local 'iedit-lib-skip-invisible-count)
(make-variable-buffer-local 'iedit-lib-skip-filtered-count)
+(make-variable-buffer-local 'iedit-line-move-ignore-invisible-value)
(defconst iedit-occurrence-overlay-name 'iedit-occurrence-overlay-name)
(defconst iedit-invisible-overlay-name 'iedit-invisible-overlay-name)
@@ -752,7 +756,7 @@ value of `iedit-occurrence-context-lines' is used for this
time."
(defun iedit-show-all()
"Show hidden lines."
- (setq line-move-ignore-invisible nil)
+ (setq-local line-move-ignore-invisible
iedit-line-move-ignore-invisible-value)
(remove-from-invisibility-spec '(iedit-invisible-overlay-name . t))
(remove-overlays nil nil iedit-invisible-overlay-name t))
@@ -779,7 +783,9 @@ value of `iedit-occurrence-context-lines' is used for this
time."
(if (< prev-occurrence-end (point-max))
(push (list prev-occurrence-end (point-max)) hidden-regions))
(when hidden-regions
- (set (make-local-variable 'line-move-ignore-invisible) t)
+ (setq iedit-line-move-ignore-invisible-value
+ (buffer-local-value 'line-move-ignore-invisible
(current-buffer)))
+ (setq-local line-move-ignore-invisible t)
(add-to-invisibility-spec '(iedit-invisible-overlay-name . t))
(dolist (region hidden-regions)
(iedit-make-invisible-overlay (car region) (cadr region)))))
@@ -806,8 +812,9 @@ value of `iedit-occurrence-context-lines' is used for this
time."
(push (list beginning end) hidden-regions)
(setq beginning (line-beginning-position)))))
(when hidden-regions
- (set (make-local-variable 'line-move-ignore-invisible) t)
- (add-to-invisibility-spec '(iedit-invisible-overlay-name . t))
+ (setq iedit-line-move-ignore-invisible-value
+ (buffer-local-value 'line-move-ignore-invisible
(current-buffer)))
+ (setq-local line-move-ignore-invisible t)
(dolist (region hidden-regions)
(iedit-make-invisible-overlay (car region) (cadr region))))
;; Value returned is for ert
@@ -1147,7 +1154,8 @@ Return nil if occurrence string is empty string."
(iedit-stop-buffering))
;; Close overlays opened by `isearch-range-invisible'
(isearch-clean-overlays)
- (iedit-show-all)
+ (when iedit-hiding
+ (iedit-show-all))
(if (null beg)
(remove-overlays nil nil iedit-occurrence-overlay-name t)
(if inclusive
- [nongnu] elpa/iedit e575cbf569 256/301: Allow adding a incremented number in each occurence, (continued)
- [nongnu] elpa/iedit e575cbf569 256/301: Allow adding a incremented number in each occurence, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit 796ee5298d 237/301: fix the key conflict with yas-minor-mode, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit e1decb37e5 245/301: Fix verion numbers, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit f09b675c67 249/301: Add an option 'iedit-auto-narrow', ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit 44601e01fa 269/301: fix an issue with electric pair, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit 3f9eed229e 232/301: Allow custom mode-line, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit 9c08a48c88 281/301: Remove the workaround for slow c-before-change, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit 01767ddca3 258/301: Fix a failed testcase in batch mode, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit 7e507b370b 255/301: Set the FIXEDCASE argument of replace-match in iedit-replace-occurrences to T to allow preserving case., ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit 745ea6f812 239/301: Rename iedit-toggle-unmatched-lines-visible to iedit-show/hide-unmatched-lines, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit dfed75064e 285/301: Save and restore `line-move-ignore-invisible',
ELPA Syncer <=
- [nongnu] elpa/iedit c448864424 216/301: Remove iedit-unmatched-lines-invisible-default, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit 5fdf89edc9 238/301: Fix switch to mc mode problem, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit de54411d0e 220/301: Detect markup tag only if region inactive, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit ac51555341 282/301: New feature: ignore hidden occurrences, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit 31986b640a 289/301: Take iedit-goto-first-occurrence back, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit 5e7253c36e 274/301: Update documents and comments, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit d4a878d52e 280/301: Minor docstring typo fix: covert -> convert., ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit 4765fa7a4d 271/301: Fix a conjoined overlay issue, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit 68233e302d 300/301: Fix some byte-compiler warnings in Emacs 28, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit 7d18e5d775 039/301: Add a help command C-? for occurrences, ELPA Syncer, 2022/01/10