[Top][All Lists]

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

Re: Emacs as a translator's tool

From: Emanuel Berg
Subject: Re: Emacs as a translator's tool
Date: Fri, 19 Jun 2020 15:51:09 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)

> The byte compiler is in Elisp so maybe there is
> a comment in the code or something where they
> motivate why they give that warning or provide
> pointer to further reading...

OK, no, the source [1] has this part:

    (defun byte-compile-save-excursion (form)
      (if (and (eq 'set-buffer (car-safe (car-safe (cdr form))))
               (byte-compile-warning-enabled-p 'suspicious))
           "Use `with-current-buffer' rather than save-excursion+set-buffer"))
      (byte-compile-out 'byte-save-excursion 0)
      (byte-compile-body-do-effect (cdr form))
      (byte-compile-out 'byte-unbind 1))

Well, hell, worth a shot...

BTW, bytecomp.el itself relies heavily on
`with-current-buffer' so in a way it makes sense it
suggests it :)

[1] /usr/share/emacs/26.1/lisp/emacs-lisp/bytecomp.el

underground experts united

reply via email to

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