2010/3/16 Tom Roche <tom_ro...@pobox.com>:
>
> 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 <tom_ro...@pobox.com>
> _______________________________________________
> Python-mode mailing list
> Python-mode@python.org
> 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
Python-mode@python.org
http://mail.python.org/mailman/listinfo/python-mode

Reply via email to