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

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

[elpa] externals/undo-tree 948386b 035/195: Modified undo-tree-visualize


From: Stefan Monnier
Subject: [elpa] externals/undo-tree 948386b 035/195: Modified undo-tree-visualizer-active-branch-face
Date: Sat, 28 Nov 2020 13:41:15 -0500 (EST)

branch: externals/undo-tree
commit 948386b592a9842fdf93f860e200649a3c29a9f6
Author: tsc25 <tsc25@cantab.net>
Commit: tsc25 <tsc25@cantab.net>

    Modified undo-tree-visualizer-active-branch-face
    to ensure the active branch is visible against light backgrounds as well as
    dark.
    
    Added comment about Emacs version compatibility to installation 
instructions.
---
 undo-tree.el | 17 ++++++++++++++---
 1 file changed, 14 insertions(+), 3 deletions(-)

diff --git a/undo-tree.el b/undo-tree.el
index 836b095..25f0eb5 100644
--- a/undo-tree.el
+++ b/undo-tree.el
@@ -9,7 +9,6 @@
 ;; Keywords: undo, redo, history, tree
 ;; URL: http://www.dr-qubit.org/emacs.php
 
-
 ;; This file is NOT part of Emacs.
 ;;
 ;; GNU Emacs is free software: you can redistribute it and/or modify it under
@@ -53,12 +52,16 @@
 ;; Installation
 ;; ============
 ;;
+;; This package has only been tested with Emacs versions 22, 23 and CVS. It
+;; will not work without modifications in earlier versions of Emacs.
+;;
 ;; To install `undo-tree-mode', make sure this file is saved in a directory in
 ;; your `load-path', and add the line:
 ;;
 ;;   (require 'undo-tree)
 ;;
-;; to your .emacs file.
+;; to your .emacs file. Byte-compiling undo-tree.el is recommended (e.g. using
+;; "M-x byte-compile-file" from within emacs).
 ;;
 ;; If you want to replace the standard Emacs' undo system with the
 ;; `undo-tree-mode' system in all buffers, you can enable it globally by
@@ -481,6 +484,11 @@
 
 (eval-when-compile (require 'cl))
 
+;; `characterp' isn't defined in Emacs versions <= 22
+(eval-and-compile
+  (unless (fboundp 'characterp)
+    (defmacro characterp (arg) `(char-valid-p ,arg))))
+
 
 ;;; =====================================================================
 ;;;              Global variables and customization options
@@ -518,7 +526,10 @@ in visualizer."
   :group 'undo-tree)
 
 (defface undo-tree-visualizer-active-branch-face
-  '((((class color)) :foreground "white" :weight bold))
+  '((((class color) (background dark))
+     (:foreground "white" :weight bold))
+    (((class color) (background light))
+     (:foreground "black" :weight bold)))
   "*Face used to highlight active undo-tree branch
 in visualizer."
   :group 'undo-tree)



reply via email to

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