~a-roehler/python-mode/XEmacs-compat-test

« back to all changes in this revision

Viewing changes to python-mode.el

  • Committer: Andreas Roehler
  • Date: 2012-01-21 12:27:51 UTC
  • Revision ID: andreas.roehler@online.de-20120121122751-wsei5dvoup10bcna
py-forward-into-nomenclature-jumps-over-CamelCased-words

lp:919540 fixed

BTW [[:lower:]] doesn't recognise german "ß", 
Emacs bug, 
`py-forward-into-nomenclature' will stop wrongly probably






Show diffs side-by-side

added added

removed removed

Lines of Context:
4816
4816
;; Py-down commands end
4817
4817
 
4818
4818
;; ripped from cc-mode
4819
 
(defun py-forward-into-nomenclature (&optional arg)
 
4819
(defun py-forward-into-nomenclature (&optional arg iact)
4820
4820
  "Move forward to end of a nomenclature section or word.
4821
4821
 
4822
4822
With \\[universal-argument] (programmatically, optional argument ARG), do it that many times.
4828
4828
        erg)
4829
4829
    (if (> arg 0)
4830
4830
        (setq erg (re-search-forward
4831
 
                   "\\(\\W\\|[_]\\)*\\([[:alnum:]]*\\)"
 
4831
                   ;; Albatross
 
4832
                   ;; "\\(\\W\\|[_]\\)*\\([A-Z]*[a-z0-9]*\\)"
 
4833
                   "\\(\\W\\|[_]\\)*\\([A-Z]*[[:lower:][:digit:]]*\\)"
4832
4834
                   (point-max) t arg))
4833
4835
      (while (and (< arg 0)
4834
4836
                  (setq erg (re-search-backward
4837
4839
        (forward-char 1)
4838
4840
        (setq arg (1+ arg)))
4839
4841
      (when erg (setq erg (1+ erg))))
4840
 
    (when (and py-report-position-p (interactive-p)) (message "%s" erg))
 
4842
    (when (and py-report-position-p (or iact (interactive-p))) (message "%s" erg))
4841
4843
    erg))
4842
4844
 
4843
4845
(defun py-backward-into-nomenclature (&optional arg)