GNU bug report logs - #18244
24.3.92; Error with semantic-mode when python buffers are present.

Previous Next

Package: emacs;

Reported by: Thierry Volpiatto <thierry.volpiatto <at> gmail.com>

Date: Mon, 11 Aug 2014 06:45:02 UTC

Severity: minor

Fixed in version 24.3.92

Done: fgallina <at> gnu.org (Fabián Ezequiel Gallina)

Bug is archived. No further changes may be made.

Full log


Message #23 received at 18244 <at> debbugs.gnu.org (full text, mbox):

From: Thierry Volpiatto <thierry.volpiatto <at> gmail.com>
To: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
Cc: Glenn Morris <rgm <at> gnu.org>,
 Fabián E. Gallina <fabian <at> anue.biz>, 18244 <at> debbugs.gnu.org
Subject: Re: bug#18244: 24.3.92;
 Error with semantic-mode when python buffers are present.
Date: Mon, 18 Aug 2014 18:24:34 +0200
Stefan Monnier <monnier <at> IRO.UMontreal.CA> writes:

> Thierry said:
>> Also the (annoying) warning message about setting local vars while
>> let-bound can be easily avoided:
>
> I know the kind of message you're talking about, but I don't know when
> it occurs.  Do you have a recipe?

It occur in the following code at beginning of `inferior-python-mode'

>
>
>> ,----[ python.el, inferior-python-mode ]
>> |   (let ((interpreter python-shell-interpreter)
>> |         (args python-shell-interpreter-args))
>> |     (when python-shell--parent-buffer
>> |       (python-util-clone-local-variables python-shell--parent-buffer))
>> |     ;; Users can override default values for these vars when calling
>> |     ;; `run-python'.  This ensures new values let-bound in
>> |     ;; `python-shell-make-comint' are locally set.
>> |     (set (make-local-variable 'python-shell-interpreter) interpreter)
>> |     (set (make-local-variable 'python-shell-interpreter-args) args))
>> |     [...]
>> `----
>
> Not sure if someone installed your code already or what, but the above
> looks identical to the current code.  Am I missing something?

Yes :-) it is not my code but the current code where the change have to
occur.

IMO what you need is:

Remove the let-binding completely and use only:

(set (make-local-variable 'python-shell-interpreter) python-shell-interpreter)
(set (make-local-variable 'python-shell-interpreter-args) python-shell-interpreter-args)

But maybe I am wrong, I am not familiar with python.el.

@@ -2369,9 +2369,7 @@ variable.
-  (let ((interpreter python-shell-interpreter)
-        (args python-shell-interpreter-args))
-    (when python-shell--parent-buffer
-      (python-util-clone-local-variables python-shell--parent-buffer))
-    ;; Users can override default values for these vars when calling
-    ;; `run-python'.  This ensures new values let-bound in
-    ;; `python-shell-make-comint' are locally set.
-    (set (make-local-variable 'python-shell-interpreter) interpreter)
-    (set (make-local-variable 'python-shell-interpreter-args) args))
+  (set (make-local-variable 'python-shell-interpreter) python-shell-interpreter)
+  (set (make-local-variable 'python-shell-interpreter-args) python-shell-interpreter-args)
+  (when python-shell--parent-buffer
+    (python-util-clone-local-variables python-shell--parent-buffer))
+  ;; Users can override default values for these vars when calling
+  ;; `run-python'.  This ensures new values let-bound in
+  ;; `python-shell-make-comint' are locally set.

-- 
Thierry
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997 




This bug report was last modified 10 years and 12 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.