emacs-devel
[Top][All Lists]
Advanced

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

Re: [Emacs-diffs] master 2291d9a: Fix python.el for Emacs 24, bump ELPA


From: Stefan Monnier
Subject: Re: [Emacs-diffs] master 2291d9a: Fix python.el for Emacs 24, bump ELPA version to 0.26.1 (Bug#30633)
Date: Tue, 27 Feb 2018 21:03:03 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

>     Since python.el is distributed via GNU ELPA, it should be functional
>     in earlier Emacs versions.  Also fix some compile warnings.

Thanks.

I have a few questions, tho:

> +  (unless (fboundp 'file-local-name)

Regarding this function, [ I understand you didn't write this code, so
the question is not necessarily for you ] I see it's used as follows:

         (file-name (expand-file-name (file-local-name file-name)))
         (temp-file-name (when temp-file-name
                           (expand-file-name
                            (file-local-name temp-file-name)))))

I don't understand how/why it makes sense to apply expand-file-name on
its return value.  Shouldn't this be

         (file-name (file-local-name (expand-file-name file-name)))
         (temp-file-name (when temp-file-name
                           (file-local-name
                            (expand-file-name temp-file-name)))))

?

> +                                  "
> +Overlapping strings detected (start=%d, last-end=%d)")

You can put a \ at the end of the first line to avoid inserting
a newline in the string's content.

> -  (set (make-local-variable 'prettify-symbols-alist)
> -       python--prettify-symbols-alist)
> +  (when (and (boundp 'prettify-symbols-alist)
> +             (boundp 'python--prettify-symbols-alist))
> +    (set (make-local-variable 'prettify-symbols-alist)
> +         python--prettify-symbols-alist))

Setting prettify-symbols-alist when it's not defined should be harmless.
So I'm curious what was the motivation behind the (boundp
'prettify-symbols-alist) test?
Could we replace it with a (defvar prettify-symbols-alist)?

[ As for python--prettify-symbols-alist, it's defined above, so it will
  always be 'boundp'.  ]


        Stefan



reply via email to

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