simple comment/string-tweak branch

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

simple comment/string-tweak branch

Tom Roche

Preparatory to an upcoming post on using/improving python-mode, I
looked @ the code and noticed 2 apparently-easy fixes, so I pushed a
branch to

https://code.launchpad.net/~tom-roche/python-mode/improve-INSTALLATION-comment-and-custom-strings

All changes are to python-mode.el:

`diff -u`

> @@ -54,15 +54,22 @@
>
>  ;; To install, just drop this file into a directory on your load-path and
>  ;; byte-compile it.  To set up Emacs to automatically edit files ending in
> -;; ".py" using python-mode add the following to your ~/.emacs file (GNU
> -;; Emacs) or ~/.xemacs/init.el file (XEmacs):
> +;; ".py" using python-mode, add to your emacs init file
> +;;
> +;; GNU Emacs: ~/.emacs, ~/.emacs.el, or ~/.emacs.d/init.el
> +;;
> +;; XEmacs: ~/.xemacs/init.el
> +;;
> +;; the following code:
> +;;
>  ;;    (setq auto-mode-alist (cons '("\\.py$" . python-mode) auto-mode-alist))
>  ;;    (setq interpreter-mode-alist (cons '("python" . python-mode)
>  ;;                                       interpreter-mode-alist))
>  ;;    (autoload 'python-mode "python-mode" "Python editing mode." t)
>  ;;
>  ;; In XEmacs syntax highlighting should be enabled automatically.  In GNU
> -;; Emacs you may have to add these lines to your ~/.emacs file:
> +;; Emacs you may have to add these lines to your init file:
> +;;
>  ;;    (global-font-lock-mode t)
>  ;;    (setq font-lock-maximum-decoration t)
>
> @@ -381,12 +388,12 @@
>      "for"      "if"     "while"   "finally" "try"
>      "with"
>      )
> -  "*Keywords that can be hiden by hide-show"
> +  "*Keywords that can be hidden by hide-show"
>    :type '(repeat string)
>    :group 'python)
>
>  (defcustom py-hide-show-hide-docstrings t
> -  "*Controls if doc strings can be hiden by hide-show"
> +  "*Controls if doc strings can be hidden by hide-show"
>    :type 'boolean
>    :group 'python)

Perhaps this will be useful. As I know little about your procedures, had
never used bzr at all until yesterday, and had never done a bzr commit
until 10 min ago, please let me know if anything needs done better/
correctly.

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

Re: simple comment/string-tweak branch

Deniz Dogan-3
2010/3/16 Tom Roche <[hidden email]>:

>
> Preparatory to an upcoming post on using/improving python-mode, I
> looked @ the code and noticed 2 apparently-easy fixes, so I pushed a
> branch to
>
> https://code.launchpad.net/~tom-roche/python-mode/improve-INSTALLATION-comment-and-custom-strings
>
> All changes are to python-mode.el:
>
> `diff -u`
>> @@ -54,15 +54,22 @@
>>
>>  ;; To install, just drop this file into a directory on your load-path and
>>  ;; byte-compile it.  To set up Emacs to automatically edit files ending in
>> -;; ".py" using python-mode add the following to your ~/.emacs file (GNU
>> -;; Emacs) or ~/.xemacs/init.el file (XEmacs):
>> +;; ".py" using python-mode, add to your emacs init file
>> +;;
>> +;; GNU Emacs: ~/.emacs, ~/.emacs.el, or ~/.emacs.d/init.el
>> +;;
>> +;; XEmacs: ~/.xemacs/init.el
>> +;;
>> +;; the following code:
>> +;;
>>  ;;    (setq auto-mode-alist (cons '("\\.py$" . python-mode) auto-mode-alist))
>>  ;;    (setq interpreter-mode-alist (cons '("python" . python-mode)
>>  ;;                                       interpreter-mode-alist))
>>  ;;    (autoload 'python-mode "python-mode" "Python editing mode." t)
>>  ;;
>>  ;; In XEmacs syntax highlighting should be enabled automatically.  In GNU
>> -;; Emacs you may have to add these lines to your ~/.emacs file:
>> +;; Emacs you may have to add these lines to your init file:
>> +;;
>>  ;;    (global-font-lock-mode t)
>>  ;;    (setq font-lock-maximum-decoration t)
>>
>> @@ -381,12 +388,12 @@
>>      "for"      "if"     "while"   "finally" "try"
>>      "with"
>>      )
>> -  "*Keywords that can be hiden by hide-show"
>> +  "*Keywords that can be hidden by hide-show"
>>    :type '(repeat string)
>>    :group 'python)
>>
>>  (defcustom py-hide-show-hide-docstrings t
>> -  "*Controls if doc strings can be hiden by hide-show"
>> +  "*Controls if doc strings can be hidden by hide-show"
>>    :type 'boolean
>>    :group 'python)
>
> Perhaps this will be useful. As I know little about your procedures, had
> never used bzr at all until yesterday, and had never done a bzr commit
> until 10 min ago, please let me know if anything needs done better/
> correctly.
>
> HTH, Tom Roche <[hidden email]>
> _______________________________________________
> Python-mode mailing list
> [hidden email]
> http://mail.python.org/mailman/listinfo/python-mode
>

While we are already updating documentation, could someone change the
instructions to use `add-to-list' instead of using `setq' in
combination with `cons'? I'm not sure when `add-to-list' was added to
Emacs/XEmacs, but I'm pretty sure it's "ancient enough" by now.
Someone should also change the $ in the first regex to \\'.

Not a diff, as I don't have a diff program installed, but:

;; To install, just drop this file into a directory on your load-path and
;; byte-compile it.  To set up Emacs to automatically edit files ending in
;; ".py" using python-mode add the following to your ~/.emacs file (GNU
;; Emacs) or ~/.xemacs/init.el file (XEmacs):
;;
;;    (add-to-list 'auto-mode-alist '("\\.py\\'" . python-mode))
;;    (add-to-list 'interpreter-mode-alist '("python" . python-mode))
;;    (autoload 'python-mode "python-mode" "Python editing mode." t)
;;
;; In XEmacs syntax highlighting should be enabled automatically.  In GNU
;; Emacs you may have to add these lines to your ~/.emacs file:
;;
;;    (global-font-lock-mode t)
;;    (setq font-lock-maximum-decoration t)

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

Re: simple comment/string-tweak branch

Barry Warsaw
In reply to this post by Tom Roche
On Mar 16, 2010, at 04:22 PM, Tom Roche wrote:

>Perhaps this will be useful. As I know little about your procedures, had
>never used bzr at all until yesterday, and had never done a bzr commit
>until 10 min ago, please let me know if anything needs done better/
>correctly.

I think you did it just about perfectly.  I've reviewed and accepted the merge
proposal.  Maybe Andreas would like to merge and push it?

-Barry

_______________________________________________
Python-mode mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/python-mode

signature.asc (853 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: simple comment/string-tweak branch

Barry Warsaw
In reply to this post by Deniz Dogan-3
On Mar 18, 2010, at 04:19 PM, Deniz Dogan wrote:

>While we are already updating documentation, could someone change the
>instructions to use `add-to-list' instead of using `setq' in
>combination with `cons'? I'm not sure when `add-to-list' was added to
>Emacs/XEmacs, but I'm pretty sure it's "ancient enough" by now.
>Someone should also change the $ in the first regex to \\'.

+1 if these work with current versions of Emacs and XEmacs.  I no longer have
the latter to test with.

-Barry

_______________________________________________
Python-mode mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/python-mode

signature.asc (853 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: simple comment/string-tweak branch

Andreas Röhler-2
In reply to this post by Barry Warsaw
Barry Warsaw wrote:

> On Mar 16, 2010, at 04:22 PM, Tom Roche wrote:
>
>> Perhaps this will be useful. As I know little about your procedures, had
>> never used bzr at all until yesterday, and had never done a bzr commit
>> until 10 min ago, please let me know if anything needs done better/
>> correctly.
>
> I think you did it just about perfectly.  I've reviewed and accepted the merge
> proposal.  Maybe Andreas would like to merge and push it?
>
> -Barry
>
>

done
_______________________________________________
Python-mode mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/python-mode