diff options
| author | Glenn Morris | 2013-02-21 08:56:49 -0800 |
|---|---|---|
| committer | Glenn Morris | 2013-02-21 08:56:49 -0800 |
| commit | cfbf790d80eaa399afceecd9a6c3e2e76bca59b0 (patch) | |
| tree | b2c7ea684fb8d24d5f51d6959aa38854e335d9b6 /lisp | |
| parent | d20e6e9093f74ce2e435a3dac948df200e767405 (diff) | |
| parent | 62cfd799f17a31188b3cdb9ffbe1421b4e6cba5d (diff) | |
| download | emacs-cfbf790d80eaa399afceecd9a6c3e2e76bca59b0.tar.gz emacs-cfbf790d80eaa399afceecd9a6c3e2e76bca59b0.zip | |
Merge from emacs-24; up to 2012-12-21T07:35:02Z!ueno@gnu.org
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/ChangeLog | 15 | ||||
| -rw-r--r-- | lisp/net/tramp.el | 2 | ||||
| -rw-r--r-- | lisp/progmodes/python.el | 65 |
3 files changed, 50 insertions, 32 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 4210740791f..6258293be7e 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,18 @@ | |||
| 1 | 2013-02-21 Fabián Ezequiel Gallina <fgallina@cuca> | ||
| 2 | |||
| 3 | * progmodes/python.el (python-info-current-defun): Enhance | ||
| 4 | match-data cluttering prevention. | ||
| 5 | |||
| 6 | 2013-02-21 Glenn Morris <rgm@gnu.org> | ||
| 7 | |||
| 8 | * net/tramp.el (tramp-get-debug-buffer): Ensure outline.el is not | ||
| 9 | loaded while outline-regexp is let bound. (Bug#9584) | ||
| 10 | |||
| 11 | 2013-02-21 Fabián Ezequiel Gallina <fgallina@cuca> | ||
| 12 | |||
| 13 | * progmodes/python.el (python-info-current-defun): Fix failed | ||
| 14 | defun name retrieval because of unwanted match-data cluttering. | ||
| 15 | |||
| 1 | 2013-02-21 Michael Albinus <michael.albinus@gmx.de> | 16 | 2013-02-21 Michael Albinus <michael.albinus@gmx.de> |
| 2 | 17 | ||
| 3 | * net/tramp.el (tramp-ssh-controlmaster-template): Make it a | 18 | * net/tramp.el (tramp-ssh-controlmaster-template): Make it a |
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index 5305484e920..4bfe541f053 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el | |||
| @@ -1354,6 +1354,8 @@ The outline level is equal to the verbosity of the Tramp message." | |||
| 1354 | (get-buffer-create (tramp-debug-buffer-name vec)) | 1354 | (get-buffer-create (tramp-debug-buffer-name vec)) |
| 1355 | (when (bobp) | 1355 | (when (bobp) |
| 1356 | (setq buffer-undo-list t) | 1356 | (setq buffer-undo-list t) |
| 1357 | ;; So it does not get loaded while outline-regexp is let-bound. | ||
| 1358 | (require 'outline) | ||
| 1357 | ;; Activate `outline-mode'. This runs `text-mode-hook' and | 1359 | ;; Activate `outline-mode'. This runs `text-mode-hook' and |
| 1358 | ;; `outline-mode-hook'. We must prevent that local processes | 1360 | ;; `outline-mode-hook'. We must prevent that local processes |
| 1359 | ;; die. Yes: I've seen `flyspell-mode', which starts "ispell". | 1361 | ;; die. Yes: I've seen `flyspell-mode', which starts "ispell". |
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index da56fe70329..f0f67d01845 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el | |||
| @@ -2959,39 +2959,40 @@ not inside a defun." | |||
| 2959 | (type)) | 2959 | (type)) |
| 2960 | (catch 'exit | 2960 | (catch 'exit |
| 2961 | (while (python-nav-beginning-of-defun 1) | 2961 | (while (python-nav-beginning-of-defun 1) |
| 2962 | (when (and | 2962 | (when (save-match-data |
| 2963 | (or (not last-indent) | 2963 | (and |
| 2964 | (< (current-indentation) last-indent)) | 2964 | (or (not last-indent) |
| 2965 | (or | 2965 | (< (current-indentation) last-indent)) |
| 2966 | (and first-run | 2966 | (or |
| 2967 | (and first-run | ||
| 2968 | (save-excursion | ||
| 2969 | ;; If this is the first run, we may add | ||
| 2970 | ;; the current defun at point. | ||
| 2971 | (setq first-run nil) | ||
| 2972 | (goto-char starting-pos) | ||
| 2973 | (python-nav-beginning-of-statement) | ||
| 2974 | (beginning-of-line 1) | ||
| 2975 | (looking-at-p | ||
| 2976 | python-nav-beginning-of-defun-regexp))) | ||
| 2977 | (< starting-pos | ||
| 2967 | (save-excursion | 2978 | (save-excursion |
| 2968 | ;; If this is the first run, we may add | 2979 | (let ((min-indent |
| 2969 | ;; the current defun at point. | 2980 | (+ (current-indentation) |
| 2970 | (setq first-run nil) | 2981 | python-indent-offset))) |
| 2971 | (goto-char starting-pos) | 2982 | (if (< starting-indentation min-indent) |
| 2972 | (python-nav-beginning-of-statement) | 2983 | ;; If the starting indentation is not |
| 2973 | (beginning-of-line 1) | 2984 | ;; within the min defun indent make the |
| 2974 | (looking-at-p | 2985 | ;; check fail. |
| 2975 | python-nav-beginning-of-defun-regexp))) | 2986 | starting-pos |
| 2976 | (< starting-pos | 2987 | ;; Else go to the end of defun and add |
| 2977 | (save-excursion | 2988 | ;; up the current indentation to the |
| 2978 | (let ((min-indent | 2989 | ;; ending position. |
| 2979 | (+ (current-indentation) | 2990 | (python-nav-end-of-defun) |
| 2980 | python-indent-offset))) | 2991 | (+ (point) |
| 2981 | (if (< starting-indentation min-indent) | 2992 | (if (>= (current-indentation) min-indent) |
| 2982 | ;; If the starting indentation is not | 2993 | (1+ (current-indentation)) |
| 2983 | ;; within the min defun indent make the | 2994 | 0))))))))) |
| 2984 | ;; check fail. | 2995 | (save-match-data (setq last-indent (current-indentation))) |
| 2985 | starting-pos | ||
| 2986 | ;; Else go to the end of defun and add | ||
| 2987 | ;; up the current indentation to the | ||
| 2988 | ;; ending position. | ||
| 2989 | (python-nav-end-of-defun) | ||
| 2990 | (+ (point) | ||
| 2991 | (if (>= (current-indentation) min-indent) | ||
| 2992 | (1+ (current-indentation)) | ||
| 2993 | 0)))))))) | ||
| 2994 | (setq last-indent (current-indentation)) | ||
| 2995 | (if (or (not include-type) type) | 2996 | (if (or (not include-type) type) |
| 2996 | (setq names (cons (match-string-no-properties 1) names)) | 2997 | (setq names (cons (match-string-no-properties 1) names)) |
| 2997 | (let ((match (split-string (match-string-no-properties 0)))) | 2998 | (let ((match (split-string (match-string-no-properties 0)))) |