branch: externals/auto-overlays
commit 00fb1556aeaf12026d02355d1c1c401ce3ea3ce4
Author: Stefan Monnier <[email protected]>
Commit: Stefan Monnier <[email protected]>
* auto-overlay: Mark or remove unused vars
* auto-overlay-self.el (auto-o-perform-self-cascades):
Mark `beg` argument as unused.
* auto-overlays.el (auto-o-insert-regexp): Properly use
the `pos` argument.
(auto-overlay-unload-definition, auto-overlay-unload-regexp)
(auto-overlay-start, auto-overlay-stop, auto-overlay-save-overlays):
Use save-current-buffer rather than save-excursion.
(auto-o-schedule-update, auto-o-schedule-suicide, auto-overlay-update):
Mark unused arguments.
(auto-overlay-update): Remove unused vars `regexp-entry` and `class`.
---
auto-overlay-self.el | 4 ++--
auto-overlays.el | 15 +++++++--------
2 files changed, 9 insertions(+), 10 deletions(-)
diff --git a/auto-overlay-self.el b/auto-overlay-self.el
index c2201a3..5e72566 100644
--- a/auto-overlay-self.el
+++ b/auto-overlay-self.el
@@ -1,7 +1,7 @@
;;; auto-overlay-self.el --- self-delimited automatic overlays -*-
lexical-binding: t; -*-
-;; Copyright (C) 2005-2015 Free Software Foundation, Inc
+;; Copyright (C) 2005-2017 Free Software Foundation, Inc
;; Author: Toby Cubitt <[email protected]>
;; Maintainer: Toby Cubitt <[email protected]>
@@ -191,7 +191,7 @@
-(defun auto-o-perform-self-cascades (beg end)
+(defun auto-o-perform-self-cascades (_beg end)
;; Perform any necessary self-overlay cascading before the text in the
;; buffer is modified. Called from `before-change-functions'.
diff --git a/auto-overlays.el b/auto-overlays.el
index bfc5e79..69604c7 100644
--- a/auto-overlays.el
+++ b/auto-overlays.el
@@ -1,7 +1,6 @@
;;; auto-overlays.el --- Automatic regexp-delimited overlays -*-
lexical-binding: t; -*-
-
-;; Copyright (C) 2005-2015 Free Software Foundation, Inc
+;; Copyright (C) 2005-2017 Free Software Foundation, Inc
;; Version: 0.10.9
;; Author: Toby Cubitt <[email protected]>
@@ -983,7 +982,7 @@ uniquely identify REGEXP (see
`auto-overlay-unload-regexp')."
"Unload auto-overlay definition DEFINITION-ID in set SET-ID
from the current buffer. Returns the deleted definition."
- (save-excursion
+ (save-current-buffer
;; call suicide function for corresponding overlays in all buffers in
;; which the set is enabled
(dolist (buff (auto-o-get-buffer-list set-id))
@@ -1026,7 +1025,7 @@ from the current buffer. Returns the deleted definition."
definition DEFINITION-ID in set SET-ID of the current buffer.
Returns the deleted regexp."
- (save-excursion
+ (save-current-buffer
;; call suicide function for corresponding overlays in all buffers in
;; which the set is enabled
(dolist (buff (auto-o-get-buffer-list set-id))
@@ -1101,7 +1100,7 @@ argument NO-REGEXP-CHECK is non-nil, the file of saved
overlays
will be used, but no check will be made to ensure regexp
definitions are the same as when the overlays were saved."
- (save-excursion
+ (save-current-buffer
(when buffer (set-buffer buffer))
;; run initialisation hooks
(run-hooks 'auto-overlay-load-hook)
@@ -1147,7 +1146,7 @@ If LEAVE-OVERLAYS is non-nil, don't bother deleting the
overlays
from the buffer \(this is generally a bad idea, unless the buffer
is about to be killed in which case it speeds things up a bit\)."
- (save-excursion
+ (save-current-buffer
(when buffer (set-buffer buffer))
;; disable overlay set
(auto-o-disable-set set-id)
@@ -1198,7 +1197,7 @@ filename, an error occurs.
The overlays can be loaded again later using
`auto-overlay-load-overlays'."
- (save-excursion
+ (save-current-buffer
(when buffer (set-buffer buffer))
;; construct filename
@@ -1274,7 +1273,7 @@ definitions will be skipped; the saved overlays will be
loaded
even if different regexp definitions were active when the
overlays were saved."
- (save-excursion
+ (save-current-buffer
(when buffer (set-buffer buffer))
;; construct filename