underscore syntax

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

underscore syntax

Jeff Bauer
Did the behavior python-mode change with respect to the
syntax of vars_with_underscores?  Keying M-f or M-b
now stops the cursor at the underscores rather than
grabbing the entire variable.  Prior, in GNU Emacs 21.4,
the behavior worked as I expected.

--
Jeff Bauer
_______________________________________________
Python-mode mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/python-mode
Reply | Threaded
Open this post in threaded view
|

Re: underscore syntax

Barry Warsaw
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Nov 28, 2008, at 9:51 PM, Jeff Bauer wrote:

> Did the behavior python-mode change with respect to the
> syntax of vars_with_underscores?  Keying M-f or M-b
> now stops the cursor at the underscores rather than
> grabbing the entire variable.  Prior, in GNU Emacs 21.4,
> the behavior worked as I expected.

AFAIK, python-mode.el has stopped at underscores since the beginning  
of time.  It's possible that you were using python.el before, which  
maybe had a different behavior.

- -Barry

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Darwin)

iQCVAwUBSTFdeHEjvBPtnXfVAQLO8wQAtiMAkw/q4XHRICCeX/IZUvScrXA56LTB
cAGqySSxTlaL/g11Vz3hqrGFDAs7mZEOv7QvE5ABnSs7RRt+DP3SMzwqQFt75Mht
LxBmh77CG9DR0qfvhh9eh5vSH3YdSYAJTHI/LRM25qT4YygGJj5p30xCtt8ATzTN
++EKezfJrts=
=Q9pA
-----END PGP SIGNATURE-----
_______________________________________________
Python-mode mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/python-mode
Reply | Threaded
Open this post in threaded view
|

Re: underscore syntax

Diez B. Roggisch
In reply to this post by Jeff Bauer
Jeff Bauer schrieb:
> Did the behavior python-mode change with respect to the
> syntax of vars_with_underscores?  Keying M-f or M-b
> now stops the cursor at the underscores rather than
> grabbing the entire variable.  Prior, in GNU Emacs 21.4,
> the behavior worked as I expected.

I don't think that's a python-mode issue - rather emacs behaves
differently. Dunno how to change that though.

My emacs doesn't stop at underscores. Regardless of python-mode-age.

Diez
_______________________________________________
Python-mode mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/python-mode
Reply | Threaded
Open this post in threaded view
|

Re: underscore syntax

Jeff Bauer
Diez B. Roggisch wrote:

> Jeff Bauer schrieb:
>> Did the behavior python-mode change with respect to the
>> syntax of vars_with_underscores?  Keying M-f or M-b
>> now stops the cursor at the underscores rather than
>> grabbing the entire variable.  Prior, in GNU Emacs 21.4,
>> the behavior worked as I expected.
>
> I don't think that's a python-mode issue - rather emacs behaves
> differently. Dunno how to change that though.
>
> My emacs doesn't stop at underscores. Regardless of python-mode-age.

I was running the standard python-mode that ships with Ubuntu 8.10
when I noticed it stopped at underscores.  Downloading the recently
announced python-mode.el 5.0.0 from LaunchPad (Thanks, Barry!) fixed
this behavior, though I'm sure it had more to do with switching
away from whatever python-mode is being shipped in the current
Ubuntu.

All is now sweetness and light.

-Jeff
_______________________________________________
Python-mode mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/python-mode
Reply | Threaded
Open this post in threaded view
|

Re: underscore syntax

Barry Warsaw
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Nov 29, 2008, at 12:51 PM, Jeff Bauer wrote:

> Diez B. Roggisch wrote:
>> Jeff Bauer schrieb:
>>> Did the behavior python-mode change with respect to the
>>> syntax of vars_with_underscores?  Keying M-f or M-b
>>> now stops the cursor at the underscores rather than
>>> grabbing the entire variable.  Prior, in GNU Emacs 21.4,
>>> the behavior worked as I expected.
>> I don't think that's a python-mode issue - rather emacs behaves  
>> differently. Dunno how to change that though.
>> My emacs doesn't stop at underscores. Regardless of python-mode-age.
>
> I was running the standard python-mode that ships with Ubuntu 8.10
> when I noticed it stopped at underscores.

I bet that's python.el (i.e. the one that comes with FSF Emacs).

> Downloading the recently
> announced python-mode.el 5.0.0 from LaunchPad (Thanks, Barry!) fixed
> this behavior, though I'm sure it had more to do with switching
> away from whatever python-mode is being shipped in the current
> Ubuntu.
>
> All is now sweetness and light.

Great.  I realize that I bind M-f and M-b to py-(forward|backward)-
into-nomenclature which does stop at underscores.  I've been using  
that for a bazillion years so I'm used to (and like) that behavior.

- -Barry

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Darwin)

iQCVAwUBSTGMHXEjvBPtnXfVAQIvUwQAnO6p2akzlSQujktwkE2zFuw57nLa3SVd
BWSzSTAHAZcA2UvySIOUGbO4s7SbLFOGitFdER5S2Le+o3j5JH03MngqYHINMnfF
uj3iz4fXolrbFRFuL0Zf9yKpe5ezKgIXONMxWo0iISJiSR3p+2emkquURVEOTGf/
6l8+J4vsnLk=
=A53Z
-----END PGP SIGNATURE-----
_______________________________________________
Python-mode mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/python-mode
Reply | Threaded
Open this post in threaded view
|

Re: underscore syntax

Skip Montanaro-3
In reply to this post by Diez B. Roggisch

    Diez> I don't think that's a python-mode issue - rather emacs behaves
    Diez> differently. Dunno how to change that though.

    Diez> My emacs doesn't stop at underscores. Regardless of
    Diez> python-mode-age.

>From a comment in python-mode.el:

  ;; For historical reasons, underscore is word class instead of
  ;; symbol class.  GNU conventions say it should be symbol class, but
  ;; there's a natural conflict between what major mode authors want
  ;; and what users expect from `forward-word' and `backward-word'.
  ;; Guido and I have hashed this out and have decided to keep
  ;; underscore in word class.  If you're tempted to change it, try
  ;; binding M-f and M-b to py-forward-into-nomenclature and
  ;; py-backward-into-nomenclature instead.  This doesn't help in all
  ;; situations where you'd want the different behavior
  ;; (e.g. backward-kill-word).

I don't know if the "I" referenced here is Barry or Tim.

Skip
_______________________________________________
Python-mode mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/python-mode
Reply | Threaded
Open this post in threaded view
|

Re: underscore syntax

Barry Warsaw
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Nov 29, 2008, at 2:10 PM, [hidden email] wrote:

>> From a comment in python-mode.el:
>
>  ;; For historical reasons, underscore is word class instead of
>  ;; symbol class.  GNU conventions say it should be symbol class, but
>  ;; there's a natural conflict between what major mode authors want
>  ;; and what users expect from `forward-word' and `backward-word'.
>  ;; Guido and I have hashed this out and have decided to keep
>  ;; underscore in word class.  If you're tempted to change it, try
>  ;; binding M-f and M-b to py-forward-into-nomenclature and
>  ;; py-backward-into-nomenclature instead.  This doesn't help in all
>  ;; situations where you'd want the different behavior
>  ;; (e.g. backward-kill-word).
>
> I don't know if the "I" referenced here is Barry or Tim.

Ah yes, that was me.
- -B

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Darwin)

iQCVAwUBSTGUz3EjvBPtnXfVAQKnewQAgTU8BiS1KyFXO6s17TvIZN0WG8brNsfd
mANyLg/Bq8B+HxsFRmIxL1bTNTze5NCiPgmDCkzOn9CCdQMJTimMZrmcS3D9twG1
lnZu+u+h9Y/NkbtVzJHF/hvQsAd74DZoYNSKdtEJIcOm+y9699nPOG5HbD9PKvaD
j9P5tivnCkY=
=HuoU
-----END PGP SIGNATURE-----
_______________________________________________
Python-mode mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/python-mode