diff options
| author | Glenn Morris | 2013-03-30 09:55:47 -0700 |
|---|---|---|
| committer | Glenn Morris | 2013-03-30 09:55:47 -0700 |
| commit | 8d3655be5a5c41b1f0a9985bcdb614693fce67e5 (patch) | |
| tree | c213796b69a9d40c6563c211c20ea815754ad560 | |
| parent | 14a581695f7b9c70b8531a41a327a2e01f6125ba (diff) | |
| parent | b011a6e8011c51e09f28d528a541509c17d4eed0 (diff) | |
| download | emacs-8d3655be5a5c41b1f0a9985bcdb614693fce67e5.tar.gz emacs-8d3655be5a5c41b1f0a9985bcdb614693fce67e5.zip | |
Merge from emacs-24; up to 2012-12-26T16:22:18Z!michael.albinus@gmx.de
| -rw-r--r-- | etc/srecode/ede-autoconf.srt | 28 | ||||
| -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 | ||||
| -rw-r--r-- | test/ChangeLog | 5 | ||||
| -rw-r--r-- | test/automated/python-tests.el | 30 |
8 files changed, 87 insertions, 37 deletions
diff --git a/etc/srecode/ede-autoconf.srt b/etc/srecode/ede-autoconf.srt index 3a292132eed..5eb2d2d24e5 100644 --- a/etc/srecode/ede-autoconf.srt +++ b/etc/srecode/ede-autoconf.srt | |||
| @@ -1,21 +1,23 @@ | |||
| 1 | ;; ede/templates/autoconf.srt --- Templates for autoconf used by EDE. | 1 | ;;; ede/templates/autoconf.srt --- Templates for autoconf used by EDE |
| 2 | ;; | 2 | |
| 3 | ;; Copyright (C) 2010, 2012-2013 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2010, 2012-2013 Free Software Foundation, Inc. |
| 4 | ;; | 4 | |
| 5 | ;; Author: Eric M. Ludlam <eric@siege-engine.com> | 5 | ;; Author: Eric M. Ludlam <eric@siege-engine.com> |
| 6 | ;; | ||
| 7 | ;; This program is free software; you can redistribute it and/or | ||
| 8 | ;; modify it under the terms of the GNU General Public License as | ||
| 9 | ;; published by the Free Software Foundation; either version 2, or (at | ||
| 10 | ;; your option) any later version. | ||
| 11 | 6 | ||
| 12 | ;; This program is distributed in the hope that it will be useful, but | 7 | ;; This file is part of GNU Emacs. |
| 13 | ;; WITHOUT ANY WARRANTY; without even the implied warranty of | 8 | |
| 14 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 9 | ;; GNU Emacs is free software: you can redistribute it and/or modify |
| 15 | ;; General Public License for more details. | 10 | ;; it under the terms of the GNU General Public License as published by |
| 11 | ;; the Free Software Foundation, either version 3 of the License, or | ||
| 12 | ;; (at your option) any later version. | ||
| 13 | |||
| 14 | ;; GNU Emacs is distributed in the hope that it will be useful, | ||
| 15 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 16 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 17 | ;; GNU General Public License for more details. | ||
| 16 | 18 | ||
| 17 | ;; You should have received a copy of the GNU General Public License | 19 | ;; You should have received a copy of the GNU General Public License |
| 18 | ;; along with this program. If not, see <http://www.gnu.org/licenses/>. | 20 | ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. |
| 19 | 21 | ||
| 20 | set mode "autoconf-mode" | 22 | set mode "autoconf-mode" |
| 21 | set escape_start "{{" | 23 | set escape_start "{{" |
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 26739a286e3..d1b827966de 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,19 @@ | |||
| 1 | 2013-03-30 Fabián Ezequiel Gallina <fabian@anue.biz> | ||
| 2 | |||
| 3 | Un-indent after "pass" and "return" statements (Bug#13888) | ||
| 4 | * progmodes/python.el (python-indent-block-enders): New var. | ||
| 5 | (python-indent-calculate-indentation): Use it. | ||
| 6 | |||
| 7 | 2013-03-30 Michael Albinus <michael.albinus@gmx.de> | ||
| 8 | |||
| 9 | * net/tramp.el (tramp-drop-volume-letter): Make it an ordinary | ||
| 10 | defun. Defining it as defalias could introduce too eager | ||
| 11 | byte-compiler optimization. (Bug#14030) | ||
| 12 | |||
| 13 | 2013-03-30 Chong Yidong <cyd@gnu.org> | ||
| 14 | |||
| 15 | * iswitchb.el (iswitchb-read-buffer): Fix typo. | ||
| 16 | |||
| 1 | 2013-03-30 Leo Liu <sdl.web@gmail.com> | 17 | 2013-03-30 Leo Liu <sdl.web@gmail.com> |
| 2 | 18 | ||
| 3 | * kmacro.el (kmacro-call-macro): Add optional arg MACRO. | 19 | * 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." | |||
| 597 | ;; The map is generated every time so that it can inherit new | 597 | ;; The map is generated every time so that it can inherit new |
| 598 | ;; functions. | 598 | ;; functions. |
| 599 | (let ((map (copy-keymap minibuffer-local-map)) | 599 | (let ((map (copy-keymap minibuffer-local-map)) |
| 600 | buf-sel iswitchb-final-text map | 600 | buf-sel iswitchb-final-text |
| 601 | icomplete-mode) ; prevent icomplete starting up | 601 | icomplete-mode) ; prevent icomplete starting up |
| 602 | (define-key map "?" 'iswitchb-completion-help) | 602 | (define-key map "?" 'iswitchb-completion-help) |
| 603 | (define-key map "\C-s" 'iswitchb-next-match) | 603 | (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." | |||
| 1660 | (tramp-compat-font-lock-add-keywords | 1660 | (tramp-compat-font-lock-add-keywords |
| 1661 | 'emacs-lisp-mode '("\\<with-tramp-connection-property\\>")) | 1661 | 'emacs-lisp-mode '("\\<with-tramp-connection-property\\>")) |
| 1662 | 1662 | ||
| 1663 | (defalias 'tramp-drop-volume-letter | 1663 | (defun tramp-drop-volume-letter (name) |
| 1664 | (if (memq system-type '(cygwin windows-nt)) | 1664 | "Cut off unnecessary drive letter from file NAME. |
| 1665 | (lambda (name) | ||
| 1666 | "Cut off unnecessary drive letter from file NAME. | ||
| 1667 | The functions `tramp-*-handle-expand-file-name' call `expand-file-name' | 1665 | The functions `tramp-*-handle-expand-file-name' call `expand-file-name' |
| 1668 | locally on a remote file name. When the local system is a W32 system | 1666 | locally on a remote file name. When the local system is a W32 system |
| 1669 | but the remote system is Unix, this introduces a superfluous drive | 1667 | but the remote system is Unix, this introduces a superfluous drive |
| 1670 | letter into the file name. This function removes it." | 1668 | letter into the file name. This function removes it." |
| 1671 | (save-match-data | 1669 | (save-match-data |
| 1672 | (if (string-match "\\`[a-zA-Z]:/" name) | 1670 | (if (string-match "\\`[a-zA-Z]:/" name) |
| 1673 | (replace-match "/" nil t name) | 1671 | (replace-match "/" nil t name) |
| 1674 | name))) | 1672 | name))) |
| 1675 | |||
| 1676 | 'identity)) | ||
| 1677 | |||
| 1678 | (if (featurep 'xemacs) | ||
| 1679 | (defalias 'tramp-drop-volume-letter 'identity)) | ||
| 1680 | 1673 | ||
| 1681 | (defun tramp-cleanup (vec) | 1674 | (defun tramp-cleanup (vec) |
| 1682 | "Cleanup connection VEC, but keep the debug buffer." | 1675 | "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 @@ | |||
| 5 | ;; Author: Tomohiro Matsuyama <tomo@cx4a.org> | 5 | ;; Author: Tomohiro Matsuyama <tomo@cx4a.org> |
| 6 | ;; Keywords: lisp | 6 | ;; Keywords: lisp |
| 7 | 7 | ||
| 8 | ;; This program is free software; you can redistribute it and/or modify | 8 | ;; This file is part of GNU Emacs. |
| 9 | |||
| 10 | ;; GNU Emacs is free software: you can redistribute it and/or modify | ||
| 9 | ;; it under the terms of the GNU General Public License as published by | 11 | ;; it under the terms of the GNU General Public License as published by |
| 10 | ;; the Free Software Foundation, either version 3 of the License, or | 12 | ;; the Free Software Foundation, either version 3 of the License, or |
| 11 | ;; (at your option) any later version. | 13 | ;; (at your option) any later version. |
| 12 | 14 | ||
| 13 | ;; This program is distributed in the hope that it will be useful, | 15 | ;; GNU Emacs is distributed in the hope that it will be useful, |
| 14 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | 16 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 15 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 17 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 16 | ;; GNU General Public License for more details. | 18 | ;; GNU General Public License for more details. |
| 17 | 19 | ||
| 18 | ;; You should have received a copy of the GNU General Public License | 20 | ;; You should have received a copy of the GNU General Public License |
| 19 | ;; along with this program. If not, see <http://www.gnu.org/licenses/>. | 21 | ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. |
| 20 | 22 | ||
| 21 | ;;; Commentary: | 23 | ;;; Commentary: |
| 22 | 24 | ||
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.") | |||
| 638 | These make `python-indent-calculate-indentation' subtract the value of | 638 | These make `python-indent-calculate-indentation' subtract the value of |
| 639 | `python-indent-offset'.") | 639 | `python-indent-offset'.") |
| 640 | 640 | ||
| 641 | (defvar python-indent-block-enders '("return" "pass") | ||
| 642 | "List of words that mark the end of a block. | ||
| 643 | These make `python-indent-calculate-indentation' subtract the | ||
| 644 | value of `python-indent-offset' when `python-indent-context' is | ||
| 645 | AFTER-LINE.") | ||
| 646 | |||
| 641 | (defun python-indent-guess-indent-offset () | 647 | (defun python-indent-guess-indent-offset () |
| 642 | "Guess and set `python-indent-offset' for the current buffer." | 648 | "Guess and set `python-indent-offset' for the current buffer." |
| 643 | (interactive) | 649 | (interactive) |
| @@ -763,9 +769,13 @@ START is the buffer position where the sexp starts." | |||
| 763 | (save-excursion | 769 | (save-excursion |
| 764 | (goto-char context-start) | 770 | (goto-char context-start) |
| 765 | (current-indentation)) | 771 | (current-indentation)) |
| 766 | (if (progn | 772 | (if (or (save-excursion |
| 767 | (back-to-indentation) | 773 | (back-to-indentation) |
| 768 | (looking-at (regexp-opt python-indent-dedenters))) | 774 | (looking-at (regexp-opt python-indent-dedenters))) |
| 775 | (save-excursion | ||
| 776 | (python-util-forward-comment -1) | ||
| 777 | (python-nav-beginning-of-statement) | ||
| 778 | (member (current-word) python-indent-block-enders))) | ||
| 769 | python-indent-offset | 779 | python-indent-offset |
| 770 | 0))) | 780 | 0))) |
| 771 | ;; When inside of a string, do nothing. just use the current | 781 | ;; When inside of a string, do nothing. just use the current |
diff --git a/test/ChangeLog b/test/ChangeLog index 43648ad1bb1..cd4414cd079 100644 --- a/test/ChangeLog +++ b/test/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2013-03-30 Fabián Ezequiel Gallina <fabian@anue.biz> | ||
| 2 | |||
| 3 | * automated/python-tests.el (python-indent-block-enders): New test. | ||
| 4 | (python-info-current-defun-2): Fix test. | ||
| 5 | |||
| 1 | 2013-03-05 Paul Eggert <eggert@cs.ucla.edu> | 6 | 2013-03-05 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 7 | ||
| 3 | * indent/octave.m: Fix encoding error in comment. Add coding tag. | 8 | * indent/octave.m: Fix encoding error in comment. Add coding tag. |
diff --git a/test/automated/python-tests.el b/test/automated/python-tests.el index ab8eb4816d3..d0a7ab57250 100644 --- a/test/automated/python-tests.el +++ b/test/automated/python-tests.el | |||
| @@ -444,6 +444,28 @@ objects = Thing.objects.all() \\\\ | |||
| 444 | (should (eq (car (python-indent-context)) 'after-line)) | 444 | (should (eq (car (python-indent-context)) 'after-line)) |
| 445 | (should (= (python-indent-calculate-indentation) 0)))) | 445 | (should (= (python-indent-calculate-indentation) 0)))) |
| 446 | 446 | ||
| 447 | (ert-deftest python-indent-block-enders () | ||
| 448 | "Test `python-indent-block-enders' value honouring." | ||
| 449 | (python-tests-with-temp-buffer | ||
| 450 | " | ||
| 451 | Class foo(object): | ||
| 452 | |||
| 453 | def bar(self): | ||
| 454 | if self.baz: | ||
| 455 | return (1, | ||
| 456 | 2, | ||
| 457 | 3) | ||
| 458 | |||
| 459 | else: | ||
| 460 | pass | ||
| 461 | " | ||
| 462 | (python-tests-look-at "3)") | ||
| 463 | (forward-line 1) | ||
| 464 | (= (python-indent-calculate-indentation) 12) | ||
| 465 | (python-tests-look-at "pass") | ||
| 466 | (forward-line 1) | ||
| 467 | (= (python-indent-calculate-indentation) 8))) | ||
| 468 | |||
| 447 | 469 | ||
| 448 | ;;; Navigation | 470 | ;;; Navigation |
| 449 | 471 | ||
| @@ -1546,13 +1568,13 @@ class C(object): | |||
| 1546 | return [] | 1568 | return [] |
| 1547 | 1569 | ||
| 1548 | def b(): | 1570 | def b(): |
| 1549 | pass | 1571 | do_b() |
| 1550 | 1572 | ||
| 1551 | def a(): | 1573 | def a(): |
| 1552 | pass | 1574 | do_a() |
| 1553 | 1575 | ||
| 1554 | def c(self): | 1576 | def c(self): |
| 1555 | pass | 1577 | do_c() |
| 1556 | " | 1578 | " |
| 1557 | (forward-line 1) | 1579 | (forward-line 1) |
| 1558 | (should (string= "C" (python-info-current-defun))) | 1580 | (should (string= "C" (python-info-current-defun))) |
| @@ -1582,7 +1604,7 @@ class C(object): | |||
| 1582 | (python-tests-look-at "def c(self):") | 1604 | (python-tests-look-at "def c(self):") |
| 1583 | (should (string= "C.c" (python-info-current-defun))) | 1605 | (should (string= "C.c" (python-info-current-defun))) |
| 1584 | (should (string= "def C.c" (python-info-current-defun t))) | 1606 | (should (string= "def C.c" (python-info-current-defun t))) |
| 1585 | (python-tests-look-at "pass") | 1607 | (python-tests-look-at "do_c()") |
| 1586 | (should (string= "C.c" (python-info-current-defun))) | 1608 | (should (string= "C.c" (python-info-current-defun))) |
| 1587 | (should (string= "def C.c" (python-info-current-defun t))))) | 1609 | (should (string= "def C.c" (python-info-current-defun t))))) |
| 1588 | 1610 | ||