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

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

[elpa] externals/undo-tree f956d55 074/195: Added autoload cookies, and


From: Stefan Monnier
Subject: [elpa] externals/undo-tree f956d55 074/195: Added autoload cookies, and other tweaks to prepare for ELPA packaging.
Date: Sat, 28 Nov 2020 13:41:25 -0500 (EST)

branch: externals/undo-tree
commit f956d5568fa1cdab969a08b44a2e8770809d528e
Author: Toby S. Cubitt <toby-undo-tree@dr-qubit.org>
Commit: Toby S. Cubitt <toby-undo-tree@dr-qubit.org>

    Added autoload cookies, and other tweaks to prepare for ELPA packaging.
---
 undo-tree.el | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/undo-tree.el b/undo-tree.el
index d1a839d..869e567 100644
--- a/undo-tree.el
+++ b/undo-tree.el
@@ -1,4 +1,3 @@
-
 ;;; undo-tree.el --- Treat undo history as a tree
 
 
@@ -6,7 +5,7 @@
 
 ;; Author: Toby Cubitt <toby-undo-tree@dr-qubit.org>
 ;; Version: 0.3.1
-;; Keywords: undo, redo, history, tree
+;; Keywords: convenience, files, undo, redo, history, tree
 ;; URL: http://www.dr-qubit.org/emacs.php
 ;; Git Repository: http://www.dr-qubit.org/git/undo-tree.git
 
@@ -2228,6 +2227,7 @@ of either NODE itself or some node above it in the tree."
 ;;; =====================================================================
 ;;;                        Undo-tree commands
 
+;;;###autoload
 (define-minor-mode undo-tree-mode
   "Toggle undo-tree mode.
 With no argument, this command toggles the mode.
@@ -2256,7 +2256,7 @@ Within the undo-tree visualizer, the following keys are 
available:
     (setq buffer-undo-tree nil)))
 
 
-(defun turn-on-undo-tree-mode ()
+(defun turn-on-undo-tree-mode (&optional print-message)
   "Enable `undo-tree-mode' in the current buffer, when appropriate.
 Some major modes implement their own undo system, which should
 not normally be overridden by `undo-tree-mode'. This command does
@@ -2271,11 +2271,11 @@ keybindings (C-/ and C-_) have been overridden 
somewhere other
 than in the global map. In addition, `undo-tree-mode' will not be
 enabled if the buffer's `major-mode' appears in
 `undo-tree-incompatible-major-modes'."
-  (interactive)
+  (interactive "p")
   (if (or (key-binding [remap undo])
          (undo-tree-overridden-undo-bindings-p)
          (memq major-mode undo-tree-incompatible-major-modes))
-      (when (interactive-p)
+      (when print-message
        (message "Buffer does not support undo-tree-mode;\
  undo-tree-mode NOT enabled"))
     (undo-tree-mode 1)))
@@ -2300,6 +2300,7 @@ key bindings do not count.)"
       (global-set-key [?\C-_] binding2))))
 
 
+;;;###autoload
 (define-globalized-minor-mode global-undo-tree-mode
   undo-tree-mode turn-on-undo-tree-mode)
 



reply via email to

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