[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/logview 1d1524f491 221/259: Add checks for Emacs 29 forgot
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/logview 1d1524f491 221/259: Add checks for Emacs 29 forgotten in commit 75c4945 before using new macros. |
Date: |
Fri, 31 Jan 2025 07:02:16 -0500 (EST) |
branch: elpa/logview
commit 1d1524f4912549bcfc8ba9a56765ba6e62bd8c6b
Author: Paul Pogonyshev <pogonyshev@gmail.com>
Commit: Paul Pogonyshev <pogonyshev@gmail.com>
Add checks for Emacs 29 forgotten in commit 75c4945 before using new macros.
---
logview.el | 28 ++++++++++++++++------------
test/logview.el | 11 ++++++++++-
2 files changed, 26 insertions(+), 13 deletions(-)
diff --git a/logview.el b/logview.el
index 610adb5b59..16a5df32eb 100644
--- a/logview.el
+++ b/logview.el
@@ -920,18 +920,22 @@ Original point restrictions, if any, will not be possible
to find
inside BODY. In most cases (also if not sure) you should use
macro `logview--std-temporarily-widening' instead."
(declare (indent 0) (debug t))
- `(save-restriction
- ;; {LOCKED-NARROWING}
- ;; "Hurr-durr, mah security, you cannot unlock without knowing the tag."
Try all
- ;; tags I could find in Emacs source code. Normally this should be
enough, but there
- ;; is obviously no guarantee as macro `with-restriction' is part of
public Elisp
- ;; interface now.
- (without-restriction
- :label 'long-line-optimizations-in-fontification-functions
- (without-restriction
- :label 'long-line-optimizations-in-command-hooks
- (logview--do-widen)
- ,@body))))
+ (if (boundp 'without-restriction)
+ `(save-restriction
+ ;; {LOCKED-NARROWING}
+ ;; "Hurr-durr, mah security, you cannot unlock without knowing the
tag." Try all
+ ;; tags I could find in Emacs source code. Normally this should be
enough, but
+ ;; there is obviously no guarantee as macro `with-restriction' is
part of public
+ ;; Elisp interface now.
+ (without-restriction
+ :label 'long-line-optimizations-in-fontification-functions
+ (without-restriction
+ :label 'long-line-optimizations-in-command-hooks
+ (logview--do-widen)
+ ,@body)))
+ `(save-restriction
+ (logview--do-widen)
+ ,@body)))
(defun logview--do-widen ()
(widen)
diff --git a/test/logview.el b/test/logview.el
index 93895d629d..5e2e5d2155 100644
--- a/test/logview.el
+++ b/test/logview.el
@@ -27,6 +27,15 @@
(defvar inhibit-message)
+(defmacro logview--test-with-restriction (start end locking-label &rest body)
+ (if (boundp 'with-restriction)
+ `(with-restriction ,start ,end
+ :label ,locking-label
+ ,@body)
+ `(progn (narrow-to-region ,start ,end)
+ ,@body)))
+
+
(ert-deftest logview--temporarily-widening ()
(with-temp-buffer
(insert "foo bar baz")
@@ -39,7 +48,7 @@
;; Testing without emulation, with real Emacs-imposed locking seems
unfeasible, since
;; relevant font-locking code is not activated in batch mode.
(dolist (tag '(long-line-optimizations-in-fontification-functions
long-line-optimizations-in-command-hooks))
- (with-restriction 5 8
+ (logview--test-with-restriction 5 8
:label tag
(should (string= (buffer-string) "bar"))
(logview--temporarily-widening
- [nongnu] elpa/logview 1ec5131eed 085/259: Brag about current Travis CI status in README.md., (continued)
- [nongnu] elpa/logview 1ec5131eed 085/259: Brag about current Travis CI status in README.md., ELPA Syncer, 2025/01/31
- [nongnu] elpa/logview 5c88e7be0a 110/259: Make `logview--all-timestamp-formats' cache its results externally using `extmap'; important now that `datetime' switched to Java 9 and knows many more locales., ELPA Syncer, 2025/01/31
- [nongnu] elpa/logview a715f41651 153/259: Make usage of font lock mode support some more standard functionality, for the sake of possible derived modes (issue #43)., ELPA Syncer, 2025/01/31
- [nongnu] elpa/logview b37079f93c 159/259: Don't jump to section start when narrowing; instead, print section header in the echo area (also when using command `SPC')., ELPA Syncer, 2025/01/31
- [nongnu] elpa/logview 9bf89f7e62 178/259: Post-release version bump, ELPA Syncer, 2025/01/31
- [nongnu] elpa/logview e6d5a0a686 171/259: Improve Emacs responsiveness in cases where filters filter out almost everything., ELPA Syncer, 2025/01/31
- [nongnu] elpa/logview e5fe5d611c 184/259: Silence a byte-compilation warning in Emacs 30., ELPA Syncer, 2025/01/31
- [nongnu] elpa/logview 23c4e73831 196/259: Also test on Emacs 29.1., ELPA Syncer, 2025/01/31
- [nongnu] elpa/logview 12a33e026b 220/259: Also test on Emacs 29.2 and 29.3., ELPA Syncer, 2025/01/31
- [nongnu] elpa/logview cc870eef58 200/259: da71d44 * Update copyright years., ELPA Syncer, 2025/01/31
- [nongnu] elpa/logview 1d1524f491 221/259: Add checks for Emacs 29 forgotten in commit 75c4945 before using new macros.,
ELPA Syncer <=
- [nongnu] elpa/logview d0c8d5e70f 041/259: Add support for timestamps with microseconds, ELPA Syncer, 2025/01/31
- [nongnu] elpa/logview 134b41557a 077/259: Bump version because of an important bugfix., ELPA Syncer, 2025/01/31
- [nongnu] elpa/logview f2b84b96b3 065/259: Add pseudo-filter to always show entries of certain levels (e.g. errors and warnings), regardless of any text filters., ELPA Syncer, 2025/01/31
- [nongnu] elpa/logview 181eec1aa6 004/259: Expand list of standard submodes and timestamps so that some files in '/var/log' are picked up automatically., ELPA Syncer, 2025/01/31
- [nongnu] elpa/logview aa996ca1df 074/259: Allow to specify message field in format string: important to avoid the implicit trailing whitespace where necessary; fixes #16., ELPA Syncer, 2025/01/31
- [nongnu] elpa/logview 46d028b9ea 089/259: Fix for commit 30759b1: don't use `advice-add' when not defined (on older 24.x versions)., ELPA Syncer, 2025/01/31
- [nongnu] elpa/logview 01aa1ad1a6 124/259: Added submode for Monolog, a PHP logging framework. Closes #35., ELPA Syncer, 2025/01/31
- [nongnu] elpa/logview 72566479cb 121/259: Explicitly specify desired distro in `.travis.yml'., ELPA Syncer, 2025/01/31
- [nongnu] elpa/logview 638dbd4833 131/259: Bump version because of a new feature., ELPA Syncer, 2025/01/31
- [nongnu] elpa/logview c67298a215 133/259: Bump version because of a fixed regression., ELPA Syncer, 2025/01/31