diff options
| author | Eli Zaretskii | 2013-04-20 11:01:06 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2013-04-20 11:01:06 +0300 |
| commit | 47ec731ececec750654e12cbd649e2cd90e069e8 (patch) | |
| tree | ae1f5c33a4a1c4e95a1b920dd29d882e31ddb020 /lisp | |
| parent | 373b3ea63375d70183e90ce4a1fb7895336813cd (diff) | |
| parent | 806bda47ddb469f6206ecc533458eadae6a5b575 (diff) | |
| download | emacs-47ec731ececec750654e12cbd649e2cd90e069e8.tar.gz emacs-47ec731ececec750654e12cbd649e2cd90e069e8.zip | |
Merge from trunk.
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/ChangeLog | 10 | ||||
| -rw-r--r-- | lisp/progmodes/gud.el | 30 | ||||
| -rw-r--r-- | lisp/progmodes/python.el | 9 | ||||
| -rw-r--r-- | lisp/progmodes/sh-script.el | 4 |
4 files changed, 44 insertions, 9 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a09d37352f7..9bb155b74da 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,13 @@ | |||
| 1 | 2013-04-19 Masatake YAMATO <yamato@redhat.com> | ||
| 2 | |||
| 3 | * progmodes/sh-script.el (sh-imenu-generic-expression): Handle | ||
| 4 | function names with a single character. (Bug#11182) | ||
| 5 | |||
| 6 | 2013-04-19 Dima Kogan <dima@secretsauce.net> (tiny change) | ||
| 7 | |||
| 8 | * progmodes/gud.el (gud-perldb-marker-filter): Understand position info | ||
| 9 | for subroutines defined in an eval (bug#14182). | ||
| 10 | |||
| 1 | 2013-04-19 Thierry Volpiatto <thierry.volpiatto@gmail.com> | 11 | 2013-04-19 Thierry Volpiatto <thierry.volpiatto@gmail.com> |
| 2 | 12 | ||
| 3 | * bookmark.el (bookmark-completing-read): Improve handling of empty | 13 | * bookmark.el (bookmark-completing-read): Improve handling of empty |
diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el index d339495d76a..4e31c5e827c 100644 --- a/lisp/progmodes/gud.el +++ b/lisp/progmodes/gud.el | |||
| @@ -1487,14 +1487,38 @@ into one that invokes an Emacs-enabled debugging session. | |||
| 1487 | (let ((output "")) | 1487 | (let ((output "")) |
| 1488 | 1488 | ||
| 1489 | ;; Process all the complete markers in this chunk. | 1489 | ;; Process all the complete markers in this chunk. |
| 1490 | (while (string-match "\032\032\\(\\([a-zA-Z]:\\)?[^:\n]*\\):\\([0-9]*\\):.*\n" | 1490 | ;; |
| 1491 | gud-marker-acc) | 1491 | ;; Here I match the string coming out of perldb. |
| 1492 | ;; The strings can look like any of | ||
| 1493 | ;; | ||
| 1494 | ;; "\032\032/tmp/tst.pl:6:0\n" | ||
| 1495 | ;; "\032\032(eval 5)[/tmp/tst.pl:6]:3:0\n" | ||
| 1496 | ;; "\032\032(eval 17)[Basic/Core/Core.pm.PL (i.e. PDL::Core.pm):2931]:1:0\n" | ||
| 1497 | ;; | ||
| 1498 | ;; From those I want the filename and the line number. First I look for | ||
| 1499 | ;; the eval case. If that doesn't match, I look for the "normal" case. | ||
| 1500 | (while | ||
| 1501 | (string-match | ||
| 1502 | (eval-when-compile | ||
| 1503 | (let ((file-re "\\(?:[a-zA-Z]:\\)?[^:\n]*")) | ||
| 1504 | (concat "\032\032\\(?:" | ||
| 1505 | (concat | ||
| 1506 | "(eval [0-9]+)\\[" | ||
| 1507 | "\\(" file-re "\\)" ; Filename. | ||
| 1508 | "\\(?: (i\\.e\\. [^)]*)\\)?" | ||
| 1509 | ":\\([0-9]*\\)\\]") ; Line number. | ||
| 1510 | "\\|" | ||
| 1511 | (concat | ||
| 1512 | "\\(?1:" file-re "\\)" ; Filename. | ||
| 1513 | ":\\(?2:[0-9]*\\)") ; Line number. | ||
| 1514 | "\\):.*\n"))) | ||
| 1515 | gud-marker-acc) | ||
| 1492 | (setq | 1516 | (setq |
| 1493 | 1517 | ||
| 1494 | ;; Extract the frame position from the marker. | 1518 | ;; Extract the frame position from the marker. |
| 1495 | gud-last-frame | 1519 | gud-last-frame |
| 1496 | (cons (match-string 1 gud-marker-acc) | 1520 | (cons (match-string 1 gud-marker-acc) |
| 1497 | (string-to-number (match-string 3 gud-marker-acc))) | 1521 | (string-to-number (match-string 2 gud-marker-acc))) |
| 1498 | 1522 | ||
| 1499 | ;; Append any text before the marker to the output we're going | 1523 | ;; Append any text before the marker to the output we're going |
| 1500 | ;; to return - we don't include the marker in this text. | 1524 | ;; to return - we don't include the marker in this text. |
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index 06d07d6ee3c..2165c835057 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el | |||
| @@ -3176,6 +3176,7 @@ To this: | |||
| 3176 | (\"decorator\" . 173) | 3176 | (\"decorator\" . 173) |
| 3177 | (\"decorator.wrap\" . 353) | 3177 | (\"decorator.wrap\" . 353) |
| 3178 | (\"decorator.wrapped_f\" . 393))" | 3178 | (\"decorator.wrapped_f\" . 393))" |
| 3179 | ;; Inspired by imenu--flatten-index-alist removed in revno 21853. | ||
| 3179 | (apply | 3180 | (apply |
| 3180 | 'nconc | 3181 | 'nconc |
| 3181 | (mapcar | 3182 | (mapcar |
| @@ -3187,14 +3188,14 @@ To this: | |||
| 3187 | (cond ((or (numberp pos) (markerp pos)) | 3188 | (cond ((or (numberp pos) (markerp pos)) |
| 3188 | (list (cons name pos))) | 3189 | (list (cons name pos))) |
| 3189 | ((listp pos) | 3190 | ((listp pos) |
| 3190 | (message "%S" item) | ||
| 3191 | (cons | 3191 | (cons |
| 3192 | (cons name (cdar pos)) | 3192 | (cons name (cdar pos)) |
| 3193 | (python-imenu-create-flat-index (cddr item) name)))))) | 3193 | (python-imenu-create-flat-index (cddr item) name)))))) |
| 3194 | (or alist | 3194 | (or alist |
| 3195 | (let ((python-imenu-format-item-label-function (lambda (type name) name)) | 3195 | (let* ((fn (lambda (type name) name)) |
| 3196 | (python-imenu-format-parent-item-label-function (lambda (type name) name)) | 3196 | (python-imenu-format-item-label-function fn) |
| 3197 | (python-imenu-format-parent-item-jump-label-function (lambda (type name) name))) | 3197 | (python-imenu-format-parent-item-label-function fn) |
| 3198 | (python-imenu-format-parent-item-jump-label-function fn)) | ||
| 3198 | (python-imenu-create-index)))))) | 3199 | (python-imenu-create-index)))))) |
| 3199 | 3200 | ||
| 3200 | 3201 | ||
diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el index e197f9cfabe..07e9bb85c4e 100644 --- a/lisp/progmodes/sh-script.el +++ b/lisp/progmodes/sh-script.el | |||
| @@ -335,11 +335,11 @@ shell it really is." | |||
| 335 | . ((nil | 335 | . ((nil |
| 336 | ;; function FOO | 336 | ;; function FOO |
| 337 | ;; function FOO() | 337 | ;; function FOO() |
| 338 | "^\\s-*function\\s-+\\\([[:alpha:]_][[:alnum:]_]+\\)\\s-*\\(?:()\\)?" | 338 | "^\\s-*function\\s-+\\\([[:alpha:]_][[:alnum:]_]*\\)\\s-*\\(?:()\\)?" |
| 339 | 1) | 339 | 1) |
| 340 | ;; FOO() | 340 | ;; FOO() |
| 341 | (nil | 341 | (nil |
| 342 | "^\\s-*\\([[:alpha:]_][[:alnum:]_]+\\)\\s-*()" | 342 | "^\\s-*\\([[:alpha:]_][[:alnum:]_]*\\)\\s-*()" |
| 343 | 1) | 343 | 1) |
| 344 | ))) | 344 | ))) |
| 345 | "Alist of regular expressions for recognizing shell function definitions. | 345 | "Alist of regular expressions for recognizing shell function definitions. |