diff options
| author | Joakim Verona | 2013-04-10 08:30:26 +0200 |
|---|---|---|
| committer | Joakim Verona | 2013-04-10 08:30:26 +0200 |
| commit | a1002a150a8497832b98f167cb4ecd807f1684e7 (patch) | |
| tree | da28ae5ac8a521b688e0d8eb60e9ea287edcdd5c /lisp | |
| parent | b7ef53c752790136ca12dcca9e291bf88c0e5bee (diff) | |
| parent | b60e25d6bc17deb6b553afb2cebe96e79dfadab5 (diff) | |
| download | emacs-a1002a150a8497832b98f167cb4ecd807f1684e7.tar.gz emacs-a1002a150a8497832b98f167cb4ecd807f1684e7.zip | |
auto upstream
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/ChangeLog | 11 | ||||
| -rw-r--r-- | lisp/pcmpl-x.el | 10 | ||||
| -rw-r--r-- | lisp/progmodes/sh-script.el | 23 | ||||
| -rw-r--r-- | lisp/simple.el | 4 |
4 files changed, 43 insertions, 5 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 95aadd40fd6..01887620250 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,14 @@ | |||
| 1 | 2013-04-10 Masatake YAMATO <yamato@redhat.com> | ||
| 2 | |||
| 3 | * progmodes/sh-script.el: Implement `sh-mode' own | ||
| 4 | `add-log-current-defun-function' (bug#14112). | ||
| 5 | (sh-current-defun-name): New function. | ||
| 6 | (sh-mode): Use the function. | ||
| 7 | |||
| 8 | 2013-04-09 Bastien Guerry <bzg@gnu.org> | ||
| 9 | |||
| 10 | * simple.el (choose-completion-string): Fix docstring (bug#14163). | ||
| 11 | |||
| 1 | 2013-04-08 Stefan Monnier <monnier@iro.umontreal.ca> | 12 | 2013-04-08 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 13 | ||
| 3 | * emacs-lisp/edebug.el (edebug-mode): Fix typo (bug#14144). | 14 | * emacs-lisp/edebug.el (edebug-mode): Fix typo (bug#14144). |
diff --git a/lisp/pcmpl-x.el b/lisp/pcmpl-x.el index 6ef592b969d..86d8dc652c3 100644 --- a/lisp/pcmpl-x.el +++ b/lisp/pcmpl-x.el | |||
| @@ -1,23 +1,25 @@ | |||
| 1 | ;;; pcmpl-x.el --- completion for miscellaneous tools -*- lexical-binding: t; -*- | 1 | ;;; pcmpl-x.el --- completion for miscellaneous tools -*- lexical-binding: t; -*- |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2013 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2013 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Leo Liu <sdl.web@gmail.com> | 5 | ;; Author: Leo Liu <sdl.web@gmail.com> |
| 6 | ;; Keywords: processes, tools, convenience | 6 | ;; Keywords: processes, tools, convenience |
| 7 | ;; Package: pcomplete | 7 | ;; Package: pcomplete |
| 8 | 8 | ||
| 9 | ;; This program is free software; you can redistribute it and/or modify | 9 | ;; This file is part of GNU Emacs. |
| 10 | |||
| 11 | ;; GNU Emacs is free software: you can redistribute it and/or modify | ||
| 10 | ;; it under the terms of the GNU General Public License as published by | 12 | ;; 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 | 13 | ;; the Free Software Foundation, either version 3 of the License, or |
| 12 | ;; (at your option) any later version. | 14 | ;; (at your option) any later version. |
| 13 | 15 | ||
| 14 | ;; This program is distributed in the hope that it will be useful, | 16 | ;; GNU Emacs is distributed in the hope that it will be useful, |
| 15 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | 17 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 16 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 18 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 17 | ;; GNU General Public License for more details. | 19 | ;; GNU General Public License for more details. |
| 18 | 20 | ||
| 19 | ;; You should have received a copy of the GNU General Public License | 21 | ;; You should have received a copy of the GNU General Public License |
| 20 | ;; along with this program. If not, see <http://www.gnu.org/licenses/>. | 22 | ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. |
| 21 | 23 | ||
| 22 | ;;; Code: | 24 | ;;; Code: |
| 23 | 25 | ||
diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el index 8f1954402e5..e197f9cfabe 100644 --- a/lisp/progmodes/sh-script.el +++ b/lisp/progmodes/sh-script.el | |||
| @@ -353,6 +353,28 @@ See `sh-feature' and `imenu-generic-expression'." | |||
| 353 | :group 'sh-script | 353 | :group 'sh-script |
| 354 | :version "20.4") | 354 | :version "20.4") |
| 355 | 355 | ||
| 356 | (defun sh-current-defun-name () | ||
| 357 | "Find the name of function or variable at point. | ||
| 358 | For use in `add-log-current-defun-function'." | ||
| 359 | (save-excursion | ||
| 360 | (end-of-line) | ||
| 361 | (when (re-search-backward | ||
| 362 | (concat "\\(?:" | ||
| 363 | ;; function FOO | ||
| 364 | ;; function FOO() | ||
| 365 | "^\\s-*function\\s-+\\\([[:alpha:]_][[:alnum:]_]*\\)\\s-*\\(?:()\\)?" | ||
| 366 | "\\)\\|\\(?:" | ||
| 367 | ;; FOO() | ||
| 368 | "^\\s-*\\([[:alpha:]_][[:alnum:]_]*\\)\\s-*()" | ||
| 369 | "\\)\\|\\(?:" | ||
| 370 | ;; FOO= | ||
| 371 | "^\\([[:alpha:]_][[:alnum:]_]*\\)=" | ||
| 372 | "\\)") | ||
| 373 | nil t) | ||
| 374 | (or (match-string-no-properties 1) | ||
| 375 | (match-string-no-properties 2) | ||
| 376 | (match-string-no-properties 3))))) | ||
| 377 | |||
| 356 | (defvar sh-shell-variables nil | 378 | (defvar sh-shell-variables nil |
| 357 | "Alist of shell variable names that should be included in completion. | 379 | "Alist of shell variable names that should be included in completion. |
| 358 | These are used for completion in addition to all the variables named | 380 | These are used for completion in addition to all the variables named |
| @@ -1533,6 +1555,7 @@ with your script for an edit-interpret-debug cycle." | |||
| 1533 | (setq-local skeleton-newline-indent-rigidly t) | 1555 | (setq-local skeleton-newline-indent-rigidly t) |
| 1534 | (setq-local defun-prompt-regexp | 1556 | (setq-local defun-prompt-regexp |
| 1535 | (concat "^\\(function[ \t]\\|[[:alnum:]]+[ \t]+()[ \t]+\\)")) | 1557 | (concat "^\\(function[ \t]\\|[[:alnum:]]+[ \t]+()[ \t]+\\)")) |
| 1558 | (setq-local add-log-current-defun-function #'sh-current-defun-name) | ||
| 1536 | ;; Parse or insert magic number for exec, and set all variables depending | 1559 | ;; Parse or insert magic number for exec, and set all variables depending |
| 1537 | ;; on the shell thus determined. | 1560 | ;; on the shell thus determined. |
| 1538 | (sh-set-shell | 1561 | (sh-set-shell |
diff --git a/lisp/simple.el b/lisp/simple.el index 9baa1b7c884..5adb634e195 100644 --- a/lisp/simple.el +++ b/lisp/simple.el | |||
| @@ -6628,7 +6628,9 @@ the default method of inserting the completion in BUFFER.") | |||
| 6628 | (defun choose-completion-string (choice &optional | 6628 | (defun choose-completion-string (choice &optional |
| 6629 | buffer base-position insert-function) | 6629 | buffer base-position insert-function) |
| 6630 | "Switch to BUFFER and insert the completion choice CHOICE. | 6630 | "Switch to BUFFER and insert the completion choice CHOICE. |
| 6631 | BASE-POSITION, says where to insert the completion." | 6631 | BASE-POSITION says where to insert the completion. |
| 6632 | INSERT-FUNCTION says how to insert the completion and falls | ||
| 6633 | back on `completion-list-insert-choice-function' when nil." | ||
| 6632 | 6634 | ||
| 6633 | ;; If BUFFER is the minibuffer, exit the minibuffer | 6635 | ;; If BUFFER is the minibuffer, exit the minibuffer |
| 6634 | ;; unless it is reading a file name and CHOICE is a directory, | 6636 | ;; unless it is reading a file name and CHOICE is a directory, |