unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* insert string at point with emacs-version
@ 2022-02-01 18:23 goncholden
  2022-02-01 18:26 ` [External] : " Drew Adams
  0 siblings, 1 reply; 11+ messages in thread
From: goncholden @ 2022-02-01 18:23 UTC (permalink / raw)
  To: Drew Adams; +Cc: 'Help-Gnu-Emacs (help-gnu-emacs@gnu.org)'

‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐

On Tuesday, February 1st, 2022 at 5:54 PM, Drew Adams <drew.adams@oracle.com> wrote:

> How can I have a condition that checks whether the version
>
> is 28.0 or later

(> emacs-major-version 27)

My difficulty is about calling

(alist-get (frame--current-backround-mode nil) colors)

when (> emacs-version 28.0)

and do some other thing otherwise.




^ permalink raw reply	[flat|nested] 11+ messages in thread
* insert string at point with emacs-version
@ 2022-02-01 18:57 goncholden
  0 siblings, 0 replies; 11+ messages in thread
From: goncholden @ 2022-02-01 18:57 UTC (permalink / raw)
  To: Drew Adams; +Cc: 'Help-Gnu-Emacs (help-gnu-emacs@gnu.org)'

‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐

On Tuesday, February 1st, 2022 at 6:26 PM, Drew Adams <drew.adams@oracle.com> wrote:

> Ask Emacs:
>
> `C-h f if'` C-h f cond'
>
> `C-h i', choose Elisp manual,` g Conditionals'
>
> > My difficulty is about calling
> >
> > (alist-get (frame--current-backround-mode nil) colors)
> >
> > when (> emacs-version 28.0)
> >
> > and do some other thing otherwise.


Would the use of cond in the case below make sense?

  (let* ( (colors annotation-chroma)
          (levels
	   (cond (>= emacs-version 28.0)
		 (alist-get (frame--current-backround-mode nil) colors)) ))






^ permalink raw reply	[flat|nested] 11+ messages in thread
* insert string at point with emacs-version
@ 2022-02-01 14:24 goncholden via Users list for the GNU Emacs text editor
  2022-02-01 15:51 ` Jean-Christophe Helary
                   ` (4 more replies)
  0 siblings, 5 replies; 11+ messages in thread
From: goncholden via Users list for the GNU Emacs text editor @ 2022-02-01 14:24 UTC (permalink / raw)
  To: goncholden via Users list for the GNU Emacs text editor

I am looking up documentation for emacs-version. But cannot understand the meaning of

If optional argument HERE is non-nil, insert string at point.

--------
Doc:

(emacs-version &optional HERE)

Probably introduced at or before Emacs version 19.20.

Return string describing the version of Emacs that is running.
If optional argument HERE is non-nil, insert string at point.

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

end of thread, other threads:[~2022-02-01 23:15 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-02-01 18:23 insert string at point with emacs-version goncholden
2022-02-01 18:26 ` [External] : " Drew Adams
  -- strict thread matches above, loose matches on Subject: below --
2022-02-01 18:57 goncholden
2022-02-01 14:24 goncholden via Users list for the GNU Emacs text editor
2022-02-01 15:51 ` Jean-Christophe Helary
2022-02-01 15:53 ` Robert Pluim
2022-02-01 16:08 ` H. Dieter Wilhelm
2022-02-01 16:33 ` inasprecali
2022-02-01 17:44   ` goncholden
2022-02-01 17:21 ` tomas
2022-02-01 23:15   ` Emanuel Berg via Users list for the GNU Emacs text editor

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