unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "Basil L. Contovounesios" <contovob@tcd.ie>
To: Stefan Kangas <stefan@marxist.se>
Cc: 37621@debbugs.gnu.org
Subject: bug#37621: [PATCH] Remove XEmacs compat code from edt.el
Date: Sat, 05 Oct 2019 22:12:55 +0100	[thread overview]
Message-ID: <87a7aeq4ko.fsf@tcd.ie> (raw)
In-Reply-To: <CADwFkm=aPeCeP0pyk6_WUCZebOrU_wnGXZWtmP=-5ngkrk0kNQ@mail.gmail.com> (Stefan Kangas's message of "Fri, 4 Oct 2019 16:08:36 +0200")

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	other threads:[~2019-10-05 21:12 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-04 14:08 bug#37621: [PATCH] Remove XEmacs compat code from edt.el Stefan Kangas
2019-10-05 21:12 ` Basil L. Contovounesios [this message]
2019-10-07 12:58   ` Stefan Kangas
2019-10-09 18:12     ` Stefan Kangas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87a7aeq4ko.fsf@tcd.ie \
    --to=contovob@tcd.ie \
    --cc=37621@debbugs.gnu.org \
    --cc=stefan@marxist.se \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).