diff options
author | Stefan Kangas <stefankangas@gmail.com> | 2019-10-20 22:36:25 +0200 |
---|---|---|
committer | Stefan Kangas <stefankangas@gmail.com> | 2019-10-20 22:52:02 +0200 |
commit | eaf85a463f3187692ccd49506e84c691c793ab46 (patch) | |
tree | dbb6b5ffe6c3cd179ae3141bc887a88dd791cb4b | |
parent | deb7e01fabab3fc6a215a5cfa17b8a2e4f9984d7 (diff) | |
download | emacs-eaf85a463f3187692ccd49506e84c691c793ab46.tar.gz |
Remove last XEmacs compat code from tree-widget.el
* lisp/tree-widget.el (tree-widget-image-properties-xemacs)
(tree-widget-set-theme, tree-widget--cursors)
(tree-widget-image-properties, tree-widget-button-keymap)
(tree-widget-icon, tree-widget-value-create): Remove XEmacs compat
code.
-rw-r--r-- | lisp/tree-widget.el | 36 |
1 files changed, 8 insertions, 28 deletions
diff --git a/lisp/tree-widget.el b/lisp/tree-widget.el index 660b4b7683c..b2496c461ee 100644 --- a/lisp/tree-widget.el +++ b/lisp/tree-widget.el @@ -190,11 +190,6 @@ icon widgets used to draw the tree. By default these images are used: "Default properties of Emacs images." :type 'plist) -(defcustom tree-widget-image-properties-xemacs - nil - "Default properties of XEmacs images." - :type 'plist) - (defcustom tree-widget-space-width 0.5 "Amount of space between an icon image and a node widget. Must be a valid space :width display property. @@ -262,10 +257,7 @@ Typically it should contain something like this: (tree-widget-set-parent-theme \"my-parent-theme\") (tree-widget-set-image-properties - (if (featurep \\='xemacs) - \\='(:ascent center) - \\='(:ascent center :mask (heuristic t)) - ))" + \\='(:ascent center :mask (heuristic t)))" (or name (setq name (or tree-widget-theme "default"))) (unless (string-equal name (tree-widget-theme-name)) (set (make-local-variable 'tree-widget--theme) @@ -326,8 +318,7 @@ has been found accessible." (defconst tree-widget--cursors ;; Pointer shapes when the mouse pointer is over inactive - ;; tree-widget images. This feature works since Emacs 22, and - ;; ignored on older versions, and XEmacs. + ;; tree-widget images. '( ("guide" . arrow) ("no-guide" . arrow) @@ -345,9 +336,8 @@ theme." (defsubst tree-widget-image-properties (name) "Return the properties of image NAME in current theme. -Default global properties are provided for respectively Emacs and -XEmacs in the variables `tree-widget-image-properties-emacs', and -`tree-widget-image-properties-xemacs'." +Default global properties are provided in the variable +`tree-widget-image-properties-emacs'." ;; Add the pointer shape (cons :pointer (cons (or (cdr (assoc name tree-widget--cursors)) 'hand) @@ -406,14 +396,8 @@ EVENT is the mouse event received." (defvar tree-widget-button-keymap (let ((km (make-sparse-keymap))) - (if (boundp 'widget-button-keymap) - ;; XEmacs - (progn - (set-keymap-parent km widget-button-keymap) - (define-key km [button1] 'tree-widget-button-click)) - ;; Emacs - (set-keymap-parent km widget-keymap) - (define-key km [down-mouse-1] 'tree-widget-button-click)) + (set-keymap-parent km widget-keymap) + (define-key km [down-mouse-1] 'tree-widget-button-click) km) "Keymap used inside node buttons. Handle mouse button 1 click on buttons.") @@ -421,8 +405,7 @@ Handle mouse button 1 click on buttons.") (define-widget 'tree-widget-icon 'push-button "Basic widget other tree-widget icons are derived from." :format "%[%t%]" - :button-keymap tree-widget-button-keymap ; XEmacs - :keymap tree-widget-button-keymap ; Emacs + :keymap tree-widget-button-keymap :create 'tree-widget-icon-create :action 'tree-widget-icon-action :help-echo 'tree-widget-icon-help-echo @@ -616,8 +599,6 @@ This hook should be local in the buffer setup to display widgets.") (widget-get tree :dynargs))) tree)) -(defvar widget-glyph-enable) ; XEmacs - (defun tree-widget-value-create (tree) "Create the TREE tree-widget." (let* ((node (tree-widget-node tree)) @@ -626,8 +607,7 @@ This hook should be local in the buffer setup to display widgets.") ;; Setup widget's image support. Looking up for images, and ;; setting widgets' :tag-glyph is done here, to allow us to ;; dynamically change the image theme. - (widget-image-enable (tree-widget-use-image-p)) ; Emacs - (widget-glyph-enable widget-image-enable) ; XEmacs + (widget-image-enable (tree-widget-use-image-p)) children buttons) (and indent (not (widget-get tree :parent)) (insert-char ?\ indent)) |