unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Re: [nongnu] elpa/coffee-mode 1f602d2ab2 2/4: Fix test for newer emacs
       [not found] ` <20230908110008.A4377C051D0@vcs2.savannah.gnu.org>
@ 2023-09-08 15:26   ` Stefan Monnier
  2023-09-09 15:10     ` chad
  0 siblings, 1 reply; 4+ messages in thread
From: Stefan Monnier @ 2023-09-08 15:26 UTC (permalink / raw)
  To: emacs-devel; +Cc: Shohei YOSHIDA

> +    (if (version<= "28" emacs-version)
> +        (should (face-at-cursor-p 'font-lock-comment-delimiter-face))
> +      (should (face-at-cursor-p 'font-lock-comment-face)))

AKA

    (should (face-at-cursor-p
             (if (< emacs-major-version 28)
               'font-lock-comment-face 'font-lock-comment-delimiter-face)))


-- Stefan




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [nongnu] elpa/coffee-mode 1f602d2ab2 2/4: Fix test for newer emacs
  2023-09-08 15:26   ` [nongnu] elpa/coffee-mode 1f602d2ab2 2/4: Fix test for newer emacs Stefan Monnier
@ 2023-09-09 15:10     ` chad
  2023-09-09 15:28       ` Eli Zaretskii
  2023-09-10  0:07       ` [External] : " Drew Adams
  0 siblings, 2 replies; 4+ messages in thread
From: chad @ 2023-09-09 15:10 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel, Shohei YOSHIDA

[-- Attachment #1: Type: text/plain, Size: 350 bytes --]

On Fri, Sep 8, 2023 at 1:23 PM Stefan Monnier <monnier@iro.umontreal.ca>
wrote:

> [...]
>     (should (face-at-cursor-p
>              (if (< emacs-major-version 28) [...]
>

Is there a reason to prefer < on emacs-major-version versus version< (et
al) or vice versa? Maybe which versions support the latter?

Thanks in advance,
~Chad

[-- Attachment #2: Type: text/html, Size: 742 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [nongnu] elpa/coffee-mode 1f602d2ab2 2/4: Fix test for newer emacs
  2023-09-09 15:10     ` chad
@ 2023-09-09 15:28       ` Eli Zaretskii
  2023-09-10  0:07       ` [External] : " Drew Adams
  1 sibling, 0 replies; 4+ messages in thread
From: Eli Zaretskii @ 2023-09-09 15:28 UTC (permalink / raw)
  To: chad; +Cc: monnier, emacs-devel, syohex

> From: chad <yandros@gmail.com>
> Date: Sat, 9 Sep 2023 11:10:49 -0400
> Cc: emacs-devel@gnu.org, Shohei YOSHIDA <syohex@gmail.com>
> 
> On Fri, Sep 8, 2023 at 1:23 PM Stefan Monnier <monnier@iro.umontreal.ca> wrote:
> 
>  [...]
>      (should (face-at-cursor-p
>               (if (< emacs-major-version 28) [...]
> 
> Is there a reason to prefer < on emacs-major-version versus version< (et al) or vice versa? Maybe
> which versions support the latter?

If the test for emacs-major-version works (i.e., the minor version is
not important), then it's faster.



^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: [External] : Re: [nongnu] elpa/coffee-mode 1f602d2ab2 2/4: Fix test for newer emacs
  2023-09-09 15:10     ` chad
  2023-09-09 15:28       ` Eli Zaretskii
@ 2023-09-10  0:07       ` Drew Adams
  1 sibling, 0 replies; 4+ messages in thread
From: Drew Adams @ 2023-09-10  0:07 UTC (permalink / raw)
  To: chad, Stefan Monnier; +Cc: emacs-devel@gnu.org, Shohei YOSHIDA

>> (should (face-at-cursor-p
> >  (if (< emacs-major-version 28) [...]
>
> Is there a reason to prefer < on emacs-major-version
> versus version< (et al) or vice versa? Maybe which
> versions support the latter?

That's why I use it in libraries that
can also be used with older Emacs
versions that don't have `version<' etc.

But that doesn't apply to use in Emacs
itself or to libraries that support only
releases that have `version<' etc.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-09-10  0:07 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <169417080798.2243.17560010992251560045@vcs2.savannah.gnu.org>
     [not found] ` <20230908110008.A4377C051D0@vcs2.savannah.gnu.org>
2023-09-08 15:26   ` [nongnu] elpa/coffee-mode 1f602d2ab2 2/4: Fix test for newer emacs Stefan Monnier
2023-09-09 15:10     ` chad
2023-09-09 15:28       ` Eli Zaretskii
2023-09-10  0:07       ` [External] : " Drew Adams

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).