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

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

[nongnu] elpa/goto-chg 2af6121 25/27: Merge pull request #10 from leungb


From: Philip Kaludercic
Subject: [nongnu] elpa/goto-chg 2af6121 25/27: Merge pull request #10 from leungbk/boundp-buffer-undo-tree
Date: Sun, 1 Aug 2021 18:33:02 -0400 (EDT)

branch: elpa/goto-chg
commit 2af612153bc9f5bed135d25abe62f46ddaa9027f
Merge: 5c057c8 9c16962
Author: Vasilij Schneidermann <mail@vasilij.de>
Commit: GitHub <noreply@github.com>

    Merge pull request #10 from leungbk/boundp-buffer-undo-tree
    
    goto-last-change: don't check buffer-undo-tree when not using undo-tree
---
 goto-chg.el | 17 ++++++++++-------
 1 file changed, 10 insertions(+), 7 deletions(-)

diff --git a/goto-chg.el b/goto-chg.el
index 31cf016..ad35962 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.")
@@ -229,11 +231,10 @@ Return nil if E represents no real change.
 that is, it was previously saved or unchanged. Nil otherwise."
   (and (listp e) (eq (car e) t)))
 
-(declare-function undo-tree-current "undo-tree")
-(declare-function undo-tree-node-p "undo-tree")
-(declare-function undo-tree-node-previous "undo-tree")
-(declare-function undo-tree-node-undo "undo-tree")
-(declare-function undo-list-transfer-to-tree "undo-tree")
+(declare-function undo-tree-current "ext:undo-tree")
+(declare-function undo-tree-node-previous "ext:undo-tree")
+(declare-function undo-tree-node-undo "ext:undo-tree")
+(declare-function undo-list-transfer-to-tree "ext:undo-tree")
 (defvar buffer-undo-tree)
 
 ;;;###autoload
@@ -268,7 +269,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)")))
@@ -331,7 +334,7 @@ discarded. See variable `undo-limit'."
             (when (not glc-seen-canary)
               (setq l (cdr l)))))
         (when glc-seen-canary
-          (while (and (< n new-probe-depth) (undo-tree-node-p l))
+          (while (and (< n new-probe-depth) (eval '(undo-tree-node-p l)))
             (cond ((null l)
                    ;(setq this-command t)      ; Disrupt repeat sequence
                    (error "No further change info"))



reply via email to

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