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

From: "Basil L. Contovounesios" <[email-masked]>
Date: Sat, 05 Oct 2019 22:12:55 +0100

Stefan Kangas <[email-masked]> 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