[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/goto-chg 4eee444 23/27: goto-last-change: don't check buff
From: |
Philip Kaludercic |
Subject: |
[nongnu] elpa/goto-chg 4eee444 23/27: goto-last-change: don't check buffer-undo-tree when not using undo-tree |
Date: |
Sun, 1 Aug 2021 18:33:01 -0400 (EDT) |
branch: elpa/goto-chg
commit 4eee44444cd39cfa9b6cb8053f863581f98d46e3
Author: Brian Leung <leungbk@mailfence.com>
Commit: Brian Leung <leungbk@mailfence.com>
goto-last-change: don't check buffer-undo-tree when not using undo-tree
People who don't have undo-tree loaded will receive a void-variable
error if they call `goto-last-change' in a file that hasn't been
changed.
---
goto-chg.el | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/goto-chg.el b/goto-chg.el
index 31cf016..4aa6003 100644
--- a/goto-chg.el
+++ b/goto-chg.el
@@ -97,6 +97,8 @@
;;; Code:
+(require 'undo-tree nil t)
+
(defvar glc-default-span 8 "*goto-last-change don't visit the same point
twice. glc-default-span tells how far around a visited point not to visit
again.")
(defvar glc-current-span 8 "Internal for goto-last-change.\nA copy of
glc-default-span or the ARG passed to goto-last-change.")
(defvar glc-probe-depth 0 "Internal for goto-last-change.\nIt is non-zero
between successive goto-last-change.")
@@ -268,7 +270,9 @@ discarded. See variable `undo-limit'."
glc-current-span glc-default-span)
(if (< (prefix-numeric-value arg) 0)
(error "Negative arg: Cannot reverse as the first operation"))))
- (cond ((and (null buffer-undo-list) (null buffer-undo-tree))
+ (cond ((and (null buffer-undo-list)
+ (or (not (boundp 'buffer-undo-tree))
+ (null buffer-undo-tree)))
(error "Buffer has not been changed"))
((eq buffer-undo-list t)
(error "No change info (undo is disabled)")))
- [nongnu] elpa/goto-chg 1829a13 19/27: Replace undo-tree hacks by making it a dependency, (continued)
- [nongnu] elpa/goto-chg 1829a13 19/27: Replace undo-tree hacks by making it a dependency, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/goto-chg 85fca9f 21/27: Terrible hack to deal with `combine-change-calls`, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/goto-chg 304e46a 26/27: Pacify package-lint, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/goto-chg 3ce1389 27/27: Declare minimum dependency on Emacs 24.1, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/goto-chg 19c9270 08/27: Fix byte-compiler warnings again, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/goto-chg 6cb2449 07/27: Bump version, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/goto-chg e5b38e4 09/27: Bump version, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/goto-chg e6e4298 15/27: Merge pull request #4 from Zenoe/master, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/goto-chg 6898df7 18/27: Fix contact address, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/goto-chg 5a20000 20/27: Fix maintainer email, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/goto-chg 4eee444 23/27: goto-last-change: don't check buffer-undo-tree when not using undo-tree,
Philip Kaludercic <=
- [nongnu] elpa/goto-chg 9c16962 24/27: Don't byte-compile undo-tree-node-p invocation, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/goto-chg 2af6121 25/27: Merge pull request #10 from leungbk/boundp-buffer-undo-tree, Philip Kaludercic, 2021/08/01