diff options
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/ChangeLog | 16 | ||||
-rw-r--r-- | lisp/iswitchb.el | 2 | ||||
-rw-r--r-- | lisp/net/tramp.el | 19 | ||||
-rw-r--r-- | lisp/profiler.el | 8 | ||||
-rw-r--r-- | lisp/progmodes/python.el | 16 |
5 files changed, 41 insertions, 20 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 26739a286e3..d1b827966de 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,19 @@ +2013-03-30 Fabián Ezequiel Gallina <fabian@anue.biz> + + Un-indent after "pass" and "return" statements (Bug#13888) + * progmodes/python.el (python-indent-block-enders): New var. + (python-indent-calculate-indentation): Use it. + +2013-03-30 Michael Albinus <michael.albinus@gmx.de> + + * net/tramp.el (tramp-drop-volume-letter): Make it an ordinary + defun. Defining it as defalias could introduce too eager + byte-compiler optimization. (Bug#14030) + +2013-03-30 Chong Yidong <cyd@gnu.org> + + * iswitchb.el (iswitchb-read-buffer): Fix typo. + 2013-03-30 Leo Liu <sdl.web@gmail.com> * kmacro.el (kmacro-call-macro): Add optional arg MACRO. diff --git a/lisp/iswitchb.el b/lisp/iswitchb.el index 68749f1b012..07873db38e1 100644 --- a/lisp/iswitchb.el +++ b/lisp/iswitchb.el @@ -597,7 +597,7 @@ the selection process begins. Used by isearchb.el." ;; The map is generated every time so that it can inherit new ;; functions. (let ((map (copy-keymap minibuffer-local-map)) - buf-sel iswitchb-final-text map + buf-sel iswitchb-final-text icomplete-mode) ; prevent icomplete starting up (define-key map "?" 'iswitchb-completion-help) (define-key map "\C-s" 'iswitchb-next-match) diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index 86f7f338b27..7795d9f808c 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -1660,23 +1660,16 @@ FILE must be a local file name on a connection identified via VEC." (tramp-compat-font-lock-add-keywords 'emacs-lisp-mode '("\\<with-tramp-connection-property\\>")) -(defalias 'tramp-drop-volume-letter - (if (memq system-type '(cygwin windows-nt)) - (lambda (name) - "Cut off unnecessary drive letter from file NAME. +(defun tramp-drop-volume-letter (name) + "Cut off unnecessary drive letter from file NAME. The functions `tramp-*-handle-expand-file-name' call `expand-file-name' locally on a remote file name. When the local system is a W32 system but the remote system is Unix, this introduces a superfluous drive letter into the file name. This function removes it." - (save-match-data - (if (string-match "\\`[a-zA-Z]:/" name) - (replace-match "/" nil t name) - name))) - - 'identity)) - -(if (featurep 'xemacs) - (defalias 'tramp-drop-volume-letter 'identity)) + (save-match-data + (if (string-match "\\`[a-zA-Z]:/" name) + (replace-match "/" nil t name) + name))) (defun tramp-cleanup (vec) "Cleanup connection VEC, but keep the debug buffer." diff --git a/lisp/profiler.el b/lisp/profiler.el index 07192a39bef..093a01a8602 100644 --- a/lisp/profiler.el +++ b/lisp/profiler.el @@ -5,18 +5,20 @@ ;; Author: Tomohiro Matsuyama <tomo@cx4a.org> ;; Keywords: lisp -;; This program is free software; you can redistribute it and/or modify +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software: you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation, either version 3 of the License, or ;; (at your option) any later version. -;; This program is distributed in the hope that it will be useful, +;; GNU Emacs is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License -;; along with this program. If not, see <http://www.gnu.org/licenses/>. +;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. ;;; Commentary: diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index f0f67d01845..d1009534e49 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -638,6 +638,12 @@ It makes underscores and dots word constituent chars.") These make `python-indent-calculate-indentation' subtract the value of `python-indent-offset'.") +(defvar python-indent-block-enders '("return" "pass") + "List of words that mark the end of a block. +These make `python-indent-calculate-indentation' subtract the +value of `python-indent-offset' when `python-indent-context' is +AFTER-LINE.") + (defun python-indent-guess-indent-offset () "Guess and set `python-indent-offset' for the current buffer." (interactive) @@ -763,9 +769,13 @@ START is the buffer position where the sexp starts." (save-excursion (goto-char context-start) (current-indentation)) - (if (progn - (back-to-indentation) - (looking-at (regexp-opt python-indent-dedenters))) + (if (or (save-excursion + (back-to-indentation) + (looking-at (regexp-opt python-indent-dedenters))) + (save-excursion + (python-util-forward-comment -1) + (python-nav-beginning-of-statement) + (member (current-word) python-indent-block-enders))) python-indent-offset 0))) ;; When inside of a string, do nothing. just use the current |