[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r112194: Merge from emacs-24; up to r
From: |
Glenn Morris |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r112194: Merge from emacs-24; up to r111341 |
Date: |
Sat, 30 Mar 2013 09:55:47 -0700 |
User-agent: |
Bazaar (2.5.0) |
------------------------------------------------------------
revno: 112194 [merge]
committer: Glenn Morris <address@hidden>
branch nick: trunk
timestamp: Sat 2013-03-30 09:55:47 -0700
message:
Merge from emacs-24; up to r111341
modified:
etc/srecode/ede-autoconf.srt
lisp/ChangeLog
lisp/iswitchb.el
lisp/net/tramp.el
lisp/profiler.el
lisp/progmodes/python.el
test/ChangeLog
test/automated/python-tests.el
=== modified file 'etc/srecode/ede-autoconf.srt'
--- a/etc/srecode/ede-autoconf.srt 2013-03-30 16:36:22 +0000
+++ b/etc/srecode/ede-autoconf.srt 2013-03-30 16:55:47 +0000
@@ -1,21 +1,23 @@
-;; ede/templates/autoconf.srt --- Templates for autoconf used by EDE.
-;;
+;;; ede/templates/autoconf.srt --- Templates for autoconf used by EDE
+
;; Copyright (C) 2010, 2012-2013 Free Software Foundation, Inc.
-;;
+
;; Author: Eric M. Ludlam <address@hidden>
-;;
-;; This program 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 2, or (at
-;; your option) any later version.
-
-;; This program 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.
+
+;; 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.
+
+;; 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/>.
set mode "autoconf-mode"
set escape_start "{{"
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2013-03-30 13:49:00 +0000
+++ b/lisp/ChangeLog 2013-03-30 16:55:47 +0000
@@ -1,3 +1,19 @@
+2013-03-30 Fabián Ezequiel Gallina <address@hidden>
+
+ 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 <address@hidden>
+
+ * 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 <address@hidden>
+
+ * iswitchb.el (iswitchb-read-buffer): Fix typo.
+
2013-03-30 Leo Liu <address@hidden>
* kmacro.el (kmacro-call-macro): Add optional arg MACRO.
=== modified file 'lisp/iswitchb.el'
--- a/lisp/iswitchb.el 2013-02-15 19:19:29 +0000
+++ b/lisp/iswitchb.el 2013-03-30 16:55:47 +0000
@@ -597,7 +597,7 @@
;; 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)
=== modified file 'lisp/net/tramp.el'
--- a/lisp/net/tramp.el 2013-03-18 13:04:13 +0000
+++ b/lisp/net/tramp.el 2013-03-30 16:55:47 +0000
@@ -1660,23 +1660,16 @@
(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."
=== modified file 'lisp/profiler.el'
--- a/lisp/profiler.el 2013-02-05 02:12:58 +0000
+++ b/lisp/profiler.el 2013-03-30 16:55:47 +0000
@@ -5,18 +5,20 @@
;; Author: Tomohiro Matsuyama <address@hidden>
;; 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:
=== modified file 'lisp/progmodes/python.el'
--- a/lisp/progmodes/python.el 2013-02-21 16:56:49 +0000
+++ b/lisp/progmodes/python.el 2013-03-30 16:55:47 +0000
@@ -638,6 +638,12 @@
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 @@
(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
=== modified file 'test/ChangeLog'
--- a/test/ChangeLog 2013-03-11 16:31:55 +0000
+++ b/test/ChangeLog 2013-03-30 16:55:47 +0000
@@ -1,3 +1,8 @@
+2013-03-30 Fabián Ezequiel Gallina <address@hidden>
+
+ * automated/python-tests.el (python-indent-block-enders): New test.
+ (python-info-current-defun-2): Fix test.
+
2013-03-05 Paul Eggert <address@hidden>
* indent/octave.m: Fix encoding error in comment. Add coding tag.
=== modified file 'test/automated/python-tests.el'
--- a/test/automated/python-tests.el 2013-02-28 06:30:48 +0000
+++ b/test/automated/python-tests.el 2013-03-30 16:55:47 +0000
@@ -444,6 +444,28 @@
(should (eq (car (python-indent-context)) 'after-line))
(should (= (python-indent-calculate-indentation) 0))))
+(ert-deftest python-indent-block-enders ()
+ "Test `python-indent-block-enders' value honouring."
+ (python-tests-with-temp-buffer
+ "
+Class foo(object):
+
+ def bar(self):
+ if self.baz:
+ return (1,
+ 2,
+ 3)
+
+ else:
+ pass
+"
+ (python-tests-look-at "3)")
+ (forward-line 1)
+ (= (python-indent-calculate-indentation) 12)
+ (python-tests-look-at "pass")
+ (forward-line 1)
+ (= (python-indent-calculate-indentation) 8)))
+
;;; Navigation
@@ -1546,13 +1568,13 @@
return []
def b():
- pass
+ do_b()
def a():
- pass
+ do_a()
def c(self):
- pass
+ do_c()
"
(forward-line 1)
(should (string= "C" (python-info-current-defun)))
@@ -1582,7 +1604,7 @@
(python-tests-look-at "def c(self):")
(should (string= "C.c" (python-info-current-defun)))
(should (string= "def C.c" (python-info-current-defun t)))
- (python-tests-look-at "pass")
+ (python-tests-look-at "do_c()")
(should (string= "C.c" (python-info-current-defun)))
(should (string= "def C.c" (python-info-current-defun t)))))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r112194: Merge from emacs-24; up to r111341,
Glenn Morris <=