bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#37621: [PATCH] Remove XEmacs compat code from edt.el


From: Basil L. Contovounesios
Subject: bug#37621: [PATCH] Remove XEmacs compat code from edt.el
Date: Sat, 05 Oct 2019 22:12:55 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Stefan Kangas <stefan@marxist.se> writes:

> @@ -310,23 +305,13 @@ edt-term
>  ;;;
>  ;;;     o edt-emulation-on      o edt-load-keys
>  ;;;
> -(defconst edt-emacs-variant (if (featurep 'emacs) "gnu" "xemacs")
> -  "Indicates Emacs variant:  GNU Emacs or XEmacs (aka Lucid Emacs).")
> -
> -(defconst edt-window-system (if (featurep 'emacs) window-system 
> (console-type))
> -  "Indicates window system (in GNU Emacs) or console type (in XEmacs).")

Hopefully no-one will complain about these constants disappearing
without first being made obsolete (I won't). ;)

> @@ -2037,27 +1974,16 @@ edt-emulation-on
>           (setq edt-term term))))
>      (edt-load-keys nil))
>    ;; Make highlighting of selected text work properly for EDT commands.
> -  (if (featurep 'emacs)
> -      (progn
> -     (setq edt-orig-transient-mark-mode
> -              (default-value 'transient-mark-mode))
> -     (add-hook 'activate-mark-hook
> -               (function
> -                (lambda ()
> -                  (edt-select-mode t))))
> -     (add-hook 'deactivate-mark-hook
> -               (function
> -                (lambda ()
> -                  (edt-select-mode nil)))))
> -    (progn
> -      (add-hook 'zmacs-activate-region-hook
> -             (function
> -              (lambda ()
> -                (edt-select-mode t))))
> -      (add-hook 'zmacs-deactivate-region-hook
> -             (function
> -              (lambda ()
> -                (edt-select-mode nil))))))
> +  (setq edt-orig-transient-mark-mode
> +        (default-value 'transient-mark-mode))
> +  (add-hook 'activate-mark-hook
> +         (function
> +          (lambda ()
> +            (edt-select-mode t))))
> +  (add-hook 'deactivate-mark-hook
> +         (function
> +          (lambda ()
> +            (edt-select-mode nil))))

The calls to (function ...) can be removed, as they are redundant around
evaluated lambdas.

Otherwise looks fine to me, FWIW.

Thanks,

-- 
Basil





reply via email to

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