Now on revision 112260. ------------------------------------------------------------ revno: 112260 committer: Glenn Morris branch nick: trunk timestamp: Tue 2013-04-09 18:22:15 -0700 message: Standardize license text diff: === modified file 'lisp/pcmpl-x.el' --- lisp/pcmpl-x.el 2013-04-07 07:14:00 +0000 +++ lisp/pcmpl-x.el 2013-04-10 01:22:15 +0000 @@ -1,23 +1,25 @@ ;;; pcmpl-x.el --- completion for miscellaneous tools -*- lexical-binding: t; -*- -;; Copyright (C) 2013 Free Software Foundation, Inc. +;; Copyright (C) 2013 Free Software Foundation, Inc. ;; Author: Leo Liu ;; Keywords: processes, tools, convenience ;; Package: pcomplete -;; 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 . +;; along with GNU Emacs. If not, see . ;;; Code: ------------------------------------------------------------ revno: 112259 committer: Glenn Morris branch nick: trunk timestamp: Tue 2013-04-09 18:20:51 -0700 message: Fix typos diff: === modified file 'etc/PROBLEMS' --- etc/PROBLEMS 2013-04-07 11:01:56 +0000 +++ etc/PROBLEMS 2013-04-10 01:20:51 +0000 @@ -1412,17 +1412,16 @@ (emacs:2286): LIBDBUSMENU-GTK-CRITICAL **: watch_submenu: assertion `GTK_IS_MENU_SHELL(menu)' failed -This happens if the Emacs binary has been renamed. The cause it the Ubuntu +This happens if the Emacs binary has been renamed. The cause is the Ubuntu appmenu concept. It tries to track Emacs menus and show them in the top panel, instead of in each Emacs window. This is not properly implemented, so it fails for Emacs. The order of menus is wrong, and things like copy/paste -that depends on what state Emacs is in, is usually wrong (i.e. paste disabled +that depend on what state Emacs is in are usually wrong (i.e. paste disabled even if you should be able to paste, and similar). You can get back menus on each frame by starting emacs like this: % env UBUNTU_MENUPROXY= emacs - * Runtime problems on character terminals ** The meta key does not work on xterm. ------------------------------------------------------------ revno: 112258 fixes bug: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=14054 committer: Stefan Monnier branch nick: trunk timestamp: Tue 2013-04-09 16:10:47 -0400 message: * src/minibuf.c (Ftest_completion): Ignore non-string/symbol keys in hash tables. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-04-08 18:04:58 +0000 +++ src/ChangeLog 2013-04-09 20:10:47 +0000 @@ -1,3 +1,8 @@ +2013-04-09 Stefan Monnier + + * minibuf.c (Ftest_completion): Ignore non-string/symbol keys in hash + tables (bug#14054). + 2013-04-08 Stefan Monnier * window.c (select_window): Don't record_buffer while the invariant is === modified file 'src/minibuf.c' --- src/minibuf.c 2013-04-02 01:54:56 +0000 +++ src/minibuf.c 2013-04-09 20:10:47 +0000 @@ -1800,17 +1800,21 @@ { struct Lisp_Hash_Table *h = XHASH_TABLE (collection); i = hash_lookup (h, string, NULL); + Lisp_Object key = Qnil; if (i >= 0) tem = HASH_KEY (h, i); else for (i = 0; i < HASH_TABLE_SIZE (h); ++i) if (!NILP (HASH_HASH (h, i)) + && (key = HASH_KEY (h, i), + SYMBOLP (key) ? key = Fsymbol_name (key) : key, + STRINGP (key)) && EQ (Fcompare_strings (string, make_number (0), Qnil, - HASH_KEY (h, i), make_number (0) , Qnil, + key, make_number (0) , Qnil, completion_ignore_case ? Qt : Qnil), Qt)) { - tem = HASH_KEY (h, i); + tem = key; break; } if (!STRINGP (tem)) ------------------------------------------------------------ revno: 112257 committer: Tassilo Horn branch nick: trunk timestamp: Tue 2013-04-09 21:18:53 +0200 message: * themes/tsdh-dark-theme.el (tsdh-dark): Add some more faces. diff: === modified file 'etc/ChangeLog' --- etc/ChangeLog 2013-04-09 17:54:50 +0000 +++ etc/ChangeLog 2013-04-09 19:18:53 +0000 @@ -1,3 +1,7 @@ +2013-04-09 Tassilo Horn + + * themes/tsdh-dark-theme.el (tsdh-dark): Add some more faces. + 2013-04-09 Masatake YAMATO * NEWS: Mention `sh-mode' own `add-log-current-defun-function'. === modified file 'etc/themes/tsdh-dark-theme.el' --- etc/themes/tsdh-dark-theme.el 2013-01-02 16:13:04 +0000 +++ etc/themes/tsdh-dark-theme.el 2013-04-09 19:18:53 +0000 @@ -64,7 +64,10 @@ '(highlight ((t (:background "sea green")))) '(hl-line ((t (:background "grey25")))) '(hl-paren-face ((t (:weight bold))) t) + '(icomplete-first-match ((t (:foreground "deep sky blue" :weight bold)))) '(lusty-file-face ((t (:foreground "SpringGreen1"))) t) + '(magit-header ((t (:box 1 :weight bold)))) + '(magit-section-title ((t (:inherit magit-header :background "dark slate blue")))) '(menu ((t (:background "gray30" :foreground "gray70")))) '(minibuffer-prompt ((t (:background "yellow" :foreground "medium blue" :box (:line-width -1 :color "red" :style released-button) :weight bold)))) '(mode-line ((t (:box (:line-width 1 :color "red") :family "DejaVu Sans")))) ------------------------------------------------------------ revno: 112256 committer: Masatake YAMATO branch nick: trunk timestamp: Wed 2013-04-10 02:54:50 +0900 message: * etc/NEWS: Mention `sh-mode' own `add-log-current-defun-function'. diff: === modified file 'etc/ChangeLog' --- etc/ChangeLog 2013-04-07 11:01:56 +0000 +++ etc/ChangeLog 2013-04-09 17:54:50 +0000 @@ -1,3 +1,7 @@ +2013-04-09 Masatake YAMATO + + * NEWS: Mention `sh-mode' own `add-log-current-defun-function'. + 2013-04-07 Jan Djärv * PROBLEMS: Mention Ubuntu warnings about libdbusmenu. === modified file 'etc/NEWS' --- etc/NEWS 2013-04-05 14:00:08 +0000 +++ etc/NEWS 2013-04-09 17:54:50 +0000 @@ -84,6 +84,11 @@ ** New command `kmacro-to-register' to store keyboard macros in registers. +** Shell Script mode + +*** `sh-mode' now has the mode own `add-log-current-defun-function'. +You can pick the name of the function and the variables with `C-x 4 a'. + * Changes in Specialized Modes and Packages in Emacs 24.4 ------------------------------------------------------------ revno: 112255 fixes bug: http://debbugs.gnu.org/14112 committer: Masatake YAMATO branch nick: trunk timestamp: Wed 2013-04-10 02:37:17 +0900 message: * test/automated/add-log-tests.el: New file. diff: === modified file 'test/ChangeLog' --- test/ChangeLog 2013-03-30 16:55:47 +0000 +++ test/ChangeLog 2013-04-09 17:37:17 +0000 @@ -1,3 +1,7 @@ +2013-04-09 Masatake YAMATO + + * automated/add-log-tests.el: New file. (Bug#14112) + 2013-03-30 Fabián Ezequiel Gallina * automated/python-tests.el (python-indent-block-enders): New test. === added file 'test/automated/add-log-tests.el' --- test/automated/add-log-tests.el 1970-01-01 00:00:00 +0000 +++ test/automated/add-log-tests.el 2013-04-09 17:37:17 +0000 @@ -0,0 +1,84 @@ +;;; add-log-tests.el --- Test suite for add-log. + +;; Copyright (C) 2013 Free Software Foundation, Inc. + +;; Author: Masatake YAMATO +;; Keywords: vc tools + +;; 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 GNU Emacs. If not, see . + +;;; Code: + +(require 'add-log) + +(defmacro add-log-current-defun-deftest (name doc major-mode + content marker expected-defun) + "Generate an ert test for mode-own `add-log-current-defun-function'. +Run `add-log-current-defun' at the point where MARKER specifies in a +buffer which content is CONTENT under MAJOR-MODE. Then it compares the +result with EXPECTED-DEFUN." + (let ((xname (intern (concat "add-log-current-defun-test-" + (symbol-name name) + )))) + `(ert-deftest ,xname () + ,doc + (with-temp-buffer + (insert ,content) + (goto-char (point-min)) + (funcall ',major-mode) + (should (equal (when (search-forward ,marker nil t) + (replace-match "" nil t) + (add-log-current-defun)) + ,expected-defun)))))) + +(add-log-current-defun-deftest + sh-func1 + "Test sh-current-defun-name can find function." + sh-mode " +function foo +{ + >< +}" "><" "foo") + +(add-log-current-defun-deftest + sh-func2 + "Test sh-current-defun-name can find function." + sh-mode " +foo() +{ + >< +}" "><" "foo") + +(add-log-current-defun-deftest + sh-func3 + "Test sh-current-defun-name can find function." + sh-mode " +function foo() +{ + >< +}" "><" "foo") + +(add-log-current-defun-deftest + sh-var + "Test sh-current-defun-name can find variabe definition." + sh-mode " +PATH=a:/ab:/usr/abc +DIR=/pr><" "DIR") + +(provide 'add-log-tests) + +;;; add-log-tests.el ends here ------------------------------------------------------------ revno: 112254 fixes bug: http://debbugs.gnu.org/14112 committer: Masatake YAMATO branch nick: trunk timestamp: Wed 2013-04-10 02:31:17 +0900 message: * lisp/progmodes/sh-script.el: Implement `sh-mode' own `add-log-current-defun-function'. (sh-current-defun-name): New function. (sh-mode): Use the function. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-04-09 09:36:25 +0000 +++ lisp/ChangeLog 2013-04-09 17:31:17 +0000 @@ -1,3 +1,10 @@ +2013-04-10 Masatake YAMATO + + * progmodes/sh-script.el: Implement `sh-mode' own + `add-log-current-defun-function' (bug#14112). + (sh-current-defun-name): New function. + (sh-mode): Use the function. + 2013-04-09 Bastien Guerry * simple.el (choose-completion-string): Fix docstring (bug#14163). === modified file 'lisp/progmodes/sh-script.el' --- lisp/progmodes/sh-script.el 2013-03-05 17:13:01 +0000 +++ lisp/progmodes/sh-script.el 2013-04-09 17:31:17 +0000 @@ -353,6 +353,28 @@ :group 'sh-script :version "20.4") +(defun sh-current-defun-name () + "Find the name of function or variable at point. +For use in `add-log-current-defun-function'." + (save-excursion + (end-of-line) + (when (re-search-backward + (concat "\\(?:" + ;; function FOO + ;; function FOO() + "^\\s-*function\\s-+\\\([[:alpha:]_][[:alnum:]_]*\\)\\s-*\\(?:()\\)?" + "\\)\\|\\(?:" + ;; FOO() + "^\\s-*\\([[:alpha:]_][[:alnum:]_]*\\)\\s-*()" + "\\)\\|\\(?:" + ;; FOO= + "^\\([[:alpha:]_][[:alnum:]_]*\\)=" + "\\)") + nil t) + (or (match-string-no-properties 1) + (match-string-no-properties 2) + (match-string-no-properties 3))))) + (defvar sh-shell-variables nil "Alist of shell variable names that should be included in completion. These are used for completion in addition to all the variables named @@ -1533,6 +1555,7 @@ (setq-local skeleton-newline-indent-rigidly t) (setq-local defun-prompt-regexp (concat "^\\(function[ \t]\\|[[:alnum:]]+[ \t]+()[ \t]+\\)")) + (setq-local add-log-current-defun-function #'sh-current-defun-name) ;; Parse or insert magic number for exec, and set all variables depending ;; on the shell thus determined. (sh-set-shell ------------------------------------------------------------ revno: 112253 committer: Glenn Morris branch nick: trunk timestamp: Tue 2013-04-09 06:17:36 -0400 message: Auto-commit of generated files. diff: === modified file 'autogen/configure' --- autogen/configure 2013-04-07 10:19:05 +0000 +++ autogen/configure 2013-04-09 10:17:36 +0000 @@ -9842,7 +9842,7 @@ W32_RES="emacs.res" # Tell the linker that emacs.res is an object (which we compile from # the rc file), not a linker script. - W32_RES_LINK="-Wl,-bpe-i386 -Wl,emacs.res" + W32_RES_LINK="-Wl,emacs.res" fi ------------------------------------------------------------ revno: 112252 committer: Bastien Guerry branch nick: trunk timestamp: Tue 2013-04-09 11:36:25 +0200 message: * simple.el (choose-completion-string): Fix docstring (bug#14163). diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-04-08 02:21:59 +0000 +++ lisp/ChangeLog 2013-04-09 09:36:25 +0000 @@ -1,3 +1,7 @@ +2013-04-09 Bastien Guerry + + * simple.el (choose-completion-string): Fix docstring (bug#14163). + 2013-04-08 Stefan Monnier * emacs-lisp/edebug.el (edebug-mode): Fix typo (bug#14144). === modified file 'lisp/simple.el' --- lisp/simple.el 2013-03-17 15:00:37 +0000 +++ lisp/simple.el 2013-04-09 09:36:25 +0000 @@ -6628,7 +6628,9 @@ (defun choose-completion-string (choice &optional buffer base-position insert-function) "Switch to BUFFER and insert the completion choice CHOICE. -BASE-POSITION, says where to insert the completion." +BASE-POSITION says where to insert the completion. +INSERT-FUNCTION says how to insert the completion and falls +back on `completion-list-insert-choice-function' when nil." ;; If BUFFER is the minibuffer, exit the minibuffer ;; unless it is reading a file name and CHOICE is a directory, ------------------------------------------------------------ revno: 112251 committer: Ken Brown branch nick: trunk timestamp: Mon 2013-04-08 22:38:56 -0400 message: Fix icon for the cygw32 build on 64-bit Cygwin. (Bug#12993) * nt/emacs.rc: Use 64-bit manifest for 64-bit Cygwin build. * configure.ac (W32_RES_LINK): Remove unnecessary linker directive `-Wl,-bpe-i386', which is confusing in the 64-bit case. diff: === modified file 'ChangeLog' --- ChangeLog 2013-04-07 06:21:40 +0000 +++ ChangeLog 2013-04-09 02:38:56 +0000 @@ -1,3 +1,9 @@ +2013-04-09 Ken Brown + + * configure.ac (W32_RES_LINK): Remove unneeded linker directive + `-Wl,-bpe-i386', which is confusing in the 64-bit case. + (Bug#12993) + 2013-04-07 Paul Eggert Fix --enable-profiling bug introduced by 2013-02-25 change (Bug#13783). === modified file 'configure.ac' --- configure.ac 2013-04-07 06:21:40 +0000 +++ configure.ac 2013-04-09 02:38:56 +0000 @@ -1527,7 +1527,7 @@ W32_RES="emacs.res" # Tell the linker that emacs.res is an object (which we compile from # the rc file), not a linker script. - W32_RES_LINK="-Wl,-bpe-i386 -Wl,emacs.res" + W32_RES_LINK="-Wl,emacs.res" fi AC_SUBST(W32_OBJ) AC_SUBST(W32_LIBS) === modified file 'nt/ChangeLog' --- nt/ChangeLog 2013-04-01 07:28:56 +0000 +++ nt/ChangeLog 2013-04-09 02:38:56 +0000 @@ -1,3 +1,8 @@ +2013-04-09 Ken Brown + + * emacs.rc: Use 64-bit manifest for 64-bit Cygwin build. + (Bug#12993) + 2013-04-01 Eli Zaretskii * README: A better documentation of ddeclient.exe. === modified file 'nt/emacs.rc' --- nt/emacs.rc 2013-03-05 03:59:35 +0000 +++ nt/emacs.rc 2013-04-09 02:38:56 +0000 @@ -1,6 +1,6 @@ Emacs ICON icons/emacs.ico 32649 CURSOR icons/hand.cur -#ifdef WIN64 +#if defined (WIN64) || defined (__x86_64__) 1 24 "emacs-x64.manifest" #else 1 24 "emacs-x86.manifest"