From 93b144bbaa4bcef356655613cf2fc4fa14e09df6 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sat, 30 Jan 2016 18:38:51 -0800 Subject: [PATCH 01/56] Pacify GCC on C library without glibc API MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Without this change, with --enable-gcc-warnings GCC would complain “error: redundant redeclaration of ‘aligned_alloc’”. * configure.ac: Simplify aligned_alloc testing. * src/alloc.c (aligned_alloc): Don’t use if DARWIN_OS, since the simplified configure.ac no longer checks for that. Don’t declare if HAVE_ALIGNED_ALLOC. Correct misspelling of HAVE_ALIGNED_ALLOC in ifdef. --- configure.ac | 10 ++-------- src/alloc.c | 9 ++++++--- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/configure.ac b/configure.ac index 5d6fcda86c4..57bde94d854 100644 --- a/configure.ac +++ b/configure.ac @@ -3806,14 +3806,8 @@ getpwent endpwent getgrent endgrent \ cfmakeraw cfsetspeed copysign __executable_start log2) LIBS=$OLD_LIBS -dnl No need to check for aligned_alloc and posix_memalign if using -dnl gmalloc.o, as it supplies them, unless we're using hybrid_malloc. -dnl Don't use these functions on Darwin as they are incompatible with -dnl unexmacosx.c. -if (test -z "$GMALLOC_OBJ" || test "$hybrid_malloc" = yes) \ - && test "$opsys" != darwin; then - AC_CHECK_FUNCS([aligned_alloc posix_memalign], [break]) -fi +dnl No need to check for posix_memalign if aligned_alloc works. +AC_CHECK_FUNCS([aligned_alloc posix_memalign], [break]) dnl Cannot use AC_CHECK_FUNCS AC_CACHE_CHECK([for __builtin_unwind_init], diff --git a/src/alloc.c b/src/alloc.c index d379761c168..5f74d9061e5 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -1105,15 +1105,18 @@ lisp_free (void *block) /* Use aligned_alloc if it or a simple substitute is available. Address sanitization breaks aligned allocation, as of gcc 4.8.2 and - clang 3.3 anyway. */ + clang 3.3 anyway. Aligned allocation is incompatible with + unexmacosx.c, so don't use it on Darwin. */ -#if ! ADDRESS_SANITIZER +#if ! ADDRESS_SANITIZER && ! DARWIN_OS # if !defined SYSTEM_MALLOC && !defined DOUG_LEA_MALLOC && !defined HYBRID_MALLOC # define USE_ALIGNED_ALLOC 1 +# ifndef HAVE_ALIGNED_ALLOC /* Defined in gmalloc.c. */ void *aligned_alloc (size_t, size_t); +# endif # elif defined HYBRID_MALLOC -# if defined ALIGNED_ALLOC || defined HAVE_POSIX_MEMALIGN +# if defined HAVE_ALIGNED_ALLOC || defined HAVE_POSIX_MEMALIGN # define USE_ALIGNED_ALLOC 1 # define aligned_alloc hybrid_aligned_alloc /* Defined in gmalloc.c. */ From b920a0ee6b31e0b89771e8a986ef9e11e8ae4aa1 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sat, 30 Jan 2016 20:05:26 -0800 Subject: [PATCH 02/56] Spelling fixes --- lisp/progmodes/prolog.el | 2 +- lisp/ses.el | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/lisp/progmodes/prolog.el b/lisp/progmodes/prolog.el index 3767dbaa1e8..4f23f87dd59 100644 --- a/lisp/progmodes/prolog.el +++ b/lisp/progmodes/prolog.el @@ -1036,7 +1036,7 @@ VERSION is of the format (Major . Minor)" (define-abbrev-table 'prolog-mode-abbrev-table ()) -;; Becauses this can `eval' its arguments, any variable that gets +;; Because this can `eval' its arguments, any variable that gets ;; processed by it should be marked as :risky. (defun prolog-find-value-by-system (alist) "Get value from ALIST according to `prolog-system'." diff --git a/lisp/ses.el b/lisp/ses.el index 858833e9e5e..50101945f34 100644 --- a/lisp/ses.el +++ b/lisp/ses.el @@ -446,10 +446,8 @@ is nil if SYM is not a symbol that names a cell." (ses-get-cell (car rowcol) (cdr rowcol))))))) (defun ses-plist-delq (plist prop) - "Return PLIST after deletion of proprerty/value pair. - -PROP is the symbol identifying the property/value pair. PLIST may -be modified by border effect." + "Return PLIST after deleting the first pair (if any) with symbol PROP. +This can alter PLIST." (cond ((null plist) nil) ((eq (car plist) prop) (cddr plist)) From b250d2996abccadb5765dd6974a1210b25ca83a0 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sat, 30 Jan 2016 20:16:20 -0800 Subject: [PATCH 03/56] Spelling fix --- src/xwidget.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/xwidget.c b/src/xwidget.c index 8745416f3db..f436e95d686 100644 --- a/src/xwidget.c +++ b/src/xwidget.c @@ -320,7 +320,7 @@ xwidget_show_view (struct xwidget_view *xv) xv->y + xv->clip_top); } -/* Hide an xvidget view. */ +/* Hide an xwidget view. */ static void xwidget_hide_view (struct xwidget_view *xv) { From 98bdbdbebb42a29b6be391bc9b3a68456ffeadd2 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Sat, 30 Jan 2016 21:34:32 -0800 Subject: [PATCH 04/56] Correct reference to DARWIN_OS preprocessor symbol * src/alloc.c: Correct a preprocessor reference to DARWIN_OS, which may not be defined. --- src/alloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/alloc.c b/src/alloc.c index 5f74d9061e5..6c6c1aade8e 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -1108,7 +1108,7 @@ lisp_free (void *block) clang 3.3 anyway. Aligned allocation is incompatible with unexmacosx.c, so don't use it on Darwin. */ -#if ! ADDRESS_SANITIZER && ! DARWIN_OS +#if ! ADDRESS_SANITIZER && !defined DARWIN_OS # if !defined SYSTEM_MALLOC && !defined DOUG_LEA_MALLOC && !defined HYBRID_MALLOC # define USE_ALIGNED_ALLOC 1 # ifndef HAVE_ALIGNED_ALLOC From 20c7e34a713eee988cbc261ec0bfb457668164ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simen=20Heggest=C3=B8yl?= Date: Sun, 31 Jan 2016 10:14:10 +0100 Subject: [PATCH 05/56] ; * etc/NEWS: Fix renamed command name Command `package-install-user-selected-packages' was renamed to `package-install-selected-packages' in f3b43fca. --- etc/NEWS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/etc/NEWS b/etc/NEWS index a7348e4e6f2..a3d9e84cc6e 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -492,7 +492,7 @@ which were installed by the user (as opposed to installed as dependencies). This variable can also be manually customized. --- -*** New command `package-install-user-selected-packages' installs all +*** New command `package-install-selected-packages' installs all packages from `package-selected-packages' which are currently missing. --- From cdecbedbf0cc0872bc41e842f67a5af40109f29d Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Sun, 31 Jan 2016 13:34:03 +0100 Subject: [PATCH 06/56] Fix return value of imap-starttls-open * lisp/net/imap.el (imap-starttls-open): Fix return value. --- lisp/net/imap.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lisp/net/imap.el b/lisp/net/imap.el index 5c5ed868172..7e4cc72028f 100644 --- a/lisp/net/imap.el +++ b/lisp/net/imap.el @@ -752,8 +752,9 @@ sure of changing the value of `foo'." (lambda (capabilities) (when (string-match-p "STARTTLS" capabilities) "1 STARTTLS\r\n")))) - (done (and process - (memq (process-status process) '(open run))))) + (done (if (and process + (memq (process-status process) '(open run))) + process))) (message "imap: Connecting with STARTTLS...%s" (if done "done" "failed")) done)) From fc48106d0bdbd938ec51c1f9609b7a58108d8f00 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Sun, 31 Jan 2016 14:29:14 +0100 Subject: [PATCH 07/56] Fix imap-starttls-open * lisp/net/imap.el (imap-starttls-open): Log imap process output. Call imap-parse-greeting. (Bug#22500) --- lisp/net/imap.el | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/lisp/net/imap.el b/lisp/net/imap.el index 7e4cc72028f..e5a14d75dee 100644 --- a/lisp/net/imap.el +++ b/lisp/net/imap.el @@ -747,14 +747,19 @@ sure of changing the value of `foo'." :capability-command "1 CAPABILITY\r\n" :always-query-capabilities t :end-of-command "\r\n" - :success " OK " + :success "^1 OK " :starttls-function - (lambda (capabilities) - (when (string-match-p "STARTTLS" capabilities) - "1 STARTTLS\r\n")))) - (done (if (and process - (memq (process-status process) '(open run))) - process))) + #'(lambda (capabilities) + (when (string-match-p "STARTTLS" capabilities) + "1 STARTTLS\r\n")))) + done) + (when process + (imap-log buffer) + (when (memq (process-status process) '(open run)) + (setq done process) + (with-current-buffer buffer + (goto-char (point-min)) + (imap-parse-greeting)))) (message "imap: Connecting with STARTTLS...%s" (if done "done" "failed")) done)) From a8273dacd51fc2dfa917722ad25390c64759318d Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sun, 31 Jan 2016 18:10:12 +0200 Subject: [PATCH 08/56] Fix display of overlay strings with 'display' and 'box' property * src/xdisp.c (get_next_display_element): Take the box face from display stack level that comes from a buffer, not an overlay string. (Bug#22499) --- src/xdisp.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/xdisp.c b/src/xdisp.c index 78fddd60fc0..8f1e98d99ef 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -7234,14 +7234,23 @@ get_next_display_element (struct it *it) buffer position is stored in the 'position' member of the iteration stack slot below the current one, see handle_single_display_spec. By - contrast, it->current.pos was is not yet updated + contrast, it->current.pos was not yet updated to point to that buffer position; that will happen in pop_it, after we finish displaying the current string. Note that we already checked above that it->sp is positive, so subtracting one from it is safe. */ if (it->from_disp_prop_p) - pos = (it->stack + it->sp - 1)->position; + { + int stackp = it->sp - 1; + + /* Find the stack level with data from buffer. */ + while (stackp >= 0 + && STRINGP ((it->stack + stackp)->string)) + stackp--; + eassert (stackp >= 0); + pos = (it->stack + stackp)->position; + } else INC_TEXT_POS (pos, it->multibyte_p); From 7b1d2b1b620b0c5815fba705eedd5f1353f0c488 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 31 Jan 2016 10:38:41 -0800 Subject: [PATCH 09/56] Fix (c & 040) typo in emergency escapes * src/keyboard.c (handle_interrupt): Fix recently-introduced typo (040 should have been ~040) that silently suppressed auto-saves after emergency escapes. Redo comparison to avoid similar problems. --- src/keyboard.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/keyboard.c b/src/keyboard.c index 20aa2dbd389..546c0128328 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -10302,7 +10302,7 @@ handle_interrupt (bool in_signal_handler) { write_stdout ("Auto-save? (y or n) "); c = read_stdin (); - if ((c & 040) == 'Y') + if (c == 'y' || c == 'Y') { Fdo_auto_save (Qt, Qnil); #ifdef MSDOS @@ -10334,7 +10334,7 @@ handle_interrupt (bool in_signal_handler) write_stdout ("Abort (and dump core)? (y or n) "); #endif c = read_stdin (); - if ((c & ~040) == 'Y') + if (c == 'y' || c == 'Y') emacs_abort (); while (c != '\n') c = read_stdin (); From 86ce76b8e31a94ab91632daff02e0a84f5e68bcf Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 31 Jan 2016 12:18:03 -0800 Subject: [PATCH 10/56] ; Fix ChangeLog.2 commit ID. --- ChangeLog.2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ChangeLog.2 b/ChangeLog.2 index 27c6ce3318a..59215466842 100644 --- a/ChangeLog.2 +++ b/ChangeLog.2 @@ -26338,7 +26338,7 @@ This file records repository revisions from commit 9d56a21e6a696ad19ac65c4b405aeca44785884a (exclusive) to -commit d5195155f9a297dc45a40c9b7175715ffe4f1612 (inclusive). +commit e6b7b6d89ff9288a49099f041752908b5eb9613e (inclusive). See ChangeLog.1 for earlier changes. ;; Local Variables: From cedd7cad092809a97c1ed7fb883b68fa844cea58 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 31 Jan 2016 13:43:13 -0800 Subject: [PATCH 11/56] autogen.sh now arranges for git to check hashes Suggested by Karl Fogel in: http://lists.gnu.org/archive/html/emacs-devel/2016-01/msg01802.html * autogen.sh: Do "git config transfer.fsckObjects true". --- autogen.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/autogen.sh b/autogen.sh index a63c53c903c..877bb8476f7 100755 --- a/autogen.sh +++ b/autogen.sh @@ -220,6 +220,11 @@ echo timestamp > src/stamp-h.in || exit ## Configure Git, if using Git. if test -d .git && (git status -s) >/dev/null 2>&1; then + # Check hashes when transferring objects among repositories. + + git config transfer.fsckObjects true || exit + + # Configure 'git diff' hunk header format. git config 'diff.elisp.xfuncname' \ From c90e1b4da89b3cb24a72ee201b83976cc5a3e630 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 31 Jan 2016 15:50:51 -0800 Subject: [PATCH 12/56] =?UTF-8?q?Improve=20elisp=20=E2=80=9CSecurity=20Con?= =?UTF-8?q?siderations=E2=80=9D=20doc?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * doc/lispref/os.texi (Security Considerations): Mention call-process and rename-file as opposed to shell commands. Add some more cross-references. --- doc/lispref/os.texi | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/doc/lispref/os.texi b/doc/lispref/os.texi index 8e3720eb947..c5e3672a35a 100644 --- a/doc/lispref/os.texi +++ b/doc/lispref/os.texi @@ -2959,34 +2959,40 @@ Buffers}. @item Authentication Emacs has several functions that deal with passwords, e.g., -@code{password-read}. Although these functions do not attempt to +@code{read-passwd}. @xref{Reading a Password}. +Although these functions do not attempt to broadcast passwords to the world, their implementations are not proof against determined attackers with access to Emacs internals. For -example, even if Elisp code attempts to scrub a password from +example, even if Elisp code uses @code{clear-string} to scrub a password from its memory after using it, remnants of the password may still reside -in the garbage-collected free list. +in the garbage-collected free list. @xref{Modifying Strings}. @item Code injection Emacs can send commands to many other applications, and applications should take care that strings sent as operands of these commands are -not misinterpreted as directives. For example, when sending a shell +not misinterpreted as directives. For example, when using a shell command to rename a file @var{a} to @var{b}, do not simply use the string @code{mv @var{a} @var{b}}, because either file name might start with @samp{-}, or might contain shell metacharacters like @samp{;}. Although functions like @code{shell-quote-argument} can help avoid this sort of problem, they are not panaceas; for example, on a POSIX platform @code{shell-quote-argument} quotes shell metacharacters but -not leading @samp{-}. @xref{Shell Arguments}. +not leading @samp{-}. @xref{Shell Arguments}. Typically it is safer +to use @code{call-process} than a subshell. @xref{Synchronous +Processes}. And it is safer yet to use builtin Emacs functions; for +example, use @code{(rename-file "@var{a}" "@var{b}" t)} instead of +invoking @command{mv}. @xref{Changing Files}. @item Coding systems Emacs attempts to infer the coding systems of the files and network -connections it accesses. If it makes a mistake, or if the other -parties to the network connection disagree with Emacs's deductions, +connections it accesses. @xref{Coding Systems}. +If Emacs infers incorrectly, or if the other +parties to the network connection disagree with Emacs's inferences, the resulting system could be unreliable. Also, even when it infers correctly, Emacs often can use bytes that other programs cannot. For -example, although to Emacs the NUL (all bits zero) byte is just a +example, although to Emacs the null byte is just a character like any other, many other applications treat it as a string -terminator and mishandle strings or files containing NUL bytes. +terminator and mishandle strings or files containing null bytes. @item Environment and configuration variables POSIX specifies several environment variables that can affect how @@ -2998,7 +3004,7 @@ environment variables (e.g., @env{PATH}, @env{POSIXLY_CORRECT}, @env{SHELL}, @env{TMPDIR}) need to have properly-configured values in order to get standard behavior for any utility Emacs might invoke. Even seemingly-benign variables like @env{TZ} may have security -implications. +implications. @xref{System Environment}. Emacs has customization and other variables with similar considerations. For example, if the variable @code{shell-file-name} @@ -3025,6 +3031,7 @@ other applications do. For example, even when @code{(file-readable-p "foo.txt")} returns @code{t}, it could be that @file{foo.txt} is unreadable because some other program changed the file's permissions between the call to @code{file-readable-p} and now. +@xref{Testing Accessibility}. @item Resource limits When Emacs exhausts memory or other operating system resources, its From 2fbd1dabebf01029ef449389b9f4cb0b43aa62d9 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 31 Jan 2016 16:53:24 -0800 Subject: [PATCH 13/56] * etc/HISTORY: Add some more history, plus git tags. --- etc/HISTORY | 71 ++++++++++++++++++++++++++++++++++------------------- 1 file changed, 46 insertions(+), 25 deletions(-) diff --git a/etc/HISTORY b/etc/HISTORY index 04264256801..810702622fa 100644 --- a/etc/HISTORY +++ b/etc/HISTORY @@ -1,14 +1,35 @@ - GNU Emacs versions and their release dates + GNU Emacs history, versions, and release dates For more details about release contents, see the NEWS* files. +Most of the development history of GNU Emacs is available in its +source code repository . +However, in the early days GNU Emacs was developed without using +version control systems and was published via half-inch 9-track +1600-bpi magnetic tape reels. Although information about this early +development is sketchy, the following text summarizes what is known. + +EMACS started out as a set of macros atop the TECO text editor, and +was first operational in late 1976. It was inspired by earlier work +such as the E editor of Stanford, and was based on older TECO macro +sets. EMACS in turn inspired several similar editors. See: +Stallman RM. EMACS: The Extensible, Customizable Self-Documenting +Display Editor. AI Memo 519a, MIT, 1981-03-26 +. + +In 1984, work began on GNU Emacs, a fresh implementation designed to +run on GNU and GNU-like systems, with a full-featured Lisp at its +core. GNU Emacs 1.0 through 1.12 were released in early 1985. The +next version after 1.12 was 13; this was the initial public release. + +Here is a list of known GNU Emacs stable releases starting with the +initial public release. Entries in the list are of the form "GNU +Emacs N (DATE) TAG", where N is the version number, DATE the release +date, and TAG (if present) the corresponding tag in the source code +repository. Any commentary about the version starts on the next line. Dates are approximate in the following list; some are when the version was made, some are when it was announced. - -GNU Emacs 1.0 through 1.12 were released in early 1985. -The next release after 1.12 was 13. - GNU Emacs 13 (1985-03-20) Initial release announced on Usenet. @@ -135,15 +156,15 @@ GNU Emacs 19.32 (1996-07-31) GNU Emacs 19.33 (1996-08-11) -GNU Emacs 19.34 (1996-08-21) +GNU Emacs 19.34 (1996-08-21) emacs-19.34 -GNU Emacs 20.1 (1997-09-15) +GNU Emacs 20.1 (1997-09-15) emacs-20.1 -GNU Emacs 20.2 (1997-09-19) +GNU Emacs 20.2 (1997-09-19) emacs-20.2 -GNU Emacs 20.3 (1998-08-19) +GNU Emacs 20.3 (1998-08-19) emacs-20.3 -GNU Emacs 20.4 (1999-07-12) +GNU Emacs 20.4 (1999-07-12) emacs-20.4 GNU Emacs 20.5 (1999-12-04) @@ -151,40 +172,40 @@ GNU Emacs 20.6 (2000-02-15) GNU Emacs 20.7 (2000-06-13) -GNU Emacs 21.1 (2001-10-20) +GNU Emacs 21.1 (2001-10-20) emacs-21.1 -GNU Emacs 21.2 (2002-03-16) +GNU Emacs 21.2 (2002-03-16) emacs-21.2 -GNU Emacs 21.3 (2003-03-19) +GNU Emacs 21.3 (2003-03-19) emacs-21.3 GNU Emacs 21.4 (2005-02-08) GNU Emacs 21.4a (2005-02-17) This is Emacs 21.4 with an updated notice in etc/PROBLEMS. -GNU Emacs 22.1 (2007-06-02) +GNU Emacs 22.1 (2007-06-02) emacs-22.1 -GNU Emacs 22.2 (2008-03-26) +GNU Emacs 22.2 (2008-03-26) emacs-22.2 -GNU Emacs 22.3 (2008-09-05) +GNU Emacs 22.3 (2008-09-05) emacs-22.3 -GNU Emacs 23.1 (2009-07-29) +GNU Emacs 23.1 (2009-07-29) emacs-23.1 -GNU Emacs 23.2 (2010-05-08) +GNU Emacs 23.2 (2010-05-08) emacs-23.2 -GNU Emacs 23.3 (2011-03-10) +GNU Emacs 23.3 (2011-03-10) emacs-23.3 -GNU Emacs 23.4 (2012-01-29) +GNU Emacs 23.4 (2012-01-29) emacs-23.4 -GNU Emacs 24.1 (2012-06-10) +GNU Emacs 24.1 (2012-06-10) emacs-24.1 -GNU Emacs 24.2 (2012-08-27) +GNU Emacs 24.2 (2012-08-27) emacs-24.2 -GNU Emacs 24.3 (2013-03-10) +GNU Emacs 24.3 (2013-03-10) emacs-24.3 -GNU Emacs 24.4 (2014-10-20) +GNU Emacs 24.4 (2014-10-20) emacs-24.4 -GNU Emacs 24.5 (2015-04-10) +GNU Emacs 24.5 (2015-04-10) emacs-24.5 ---------------------------------------------------------------------- From 43cb9f8ff378100ec31cb576faf347a87a05ba5d Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 31 Jan 2016 17:31:23 -0800 Subject: [PATCH 14/56] Omit unnecessary history from Lisp intro * doc/lispintro/emacs-lisp-intro.texi (Review, Digression into C) (Conclusion): Reword so as not to talk about earlier versions of Emacs in what should be an intro. --- doc/lispintro/emacs-lisp-intro.texi | 44 +++++++---------------------- 1 file changed, 10 insertions(+), 34 deletions(-) diff --git a/doc/lispintro/emacs-lisp-intro.texi b/doc/lispintro/emacs-lisp-intro.texi index 6c4f305d86d..78c1865703e 100644 --- a/doc/lispintro/emacs-lisp-intro.texi +++ b/doc/lispintro/emacs-lisp-intro.texi @@ -4309,38 +4309,18 @@ documentation, an optional interactive declaration, and the body of the definition. @need 1250 -For example, in an early version of Emacs, the function definition was -as follows. (It is slightly more complex now that it seeks the first -non-whitespace character rather than the first visible character.) +For example, in Emacs the function definition of +@code{dired-unmark-all-marks} is as follows. @smallexample @group -(defun back-to-indentation () - "Move point to first visible character on line." +(defun dired-unmark-all-marks () + "Remove all marks from all files in the Dired buffer." (interactive) - (beginning-of-line 1) - (skip-chars-forward " \t")) + (dired-unmark-all-files ?\r)) @end group @end smallexample -@ignore -In GNU Emacs 22, - -(defun backward-to-indentation (&optional arg) - "Move backward ARG lines and position at first nonblank character." - (interactive "p") - (forward-line (- (or arg 1))) - (skip-chars-forward " \t")) - -(defun back-to-indentation () - "Move point to the first non-whitespace character on this line." - (interactive) - (beginning-of-line 1) - (skip-syntax-forward " " (line-end-position)) - ;; Move back over chars that have whitespace syntax but have the p flag. - (backward-prefix-chars)) -@end ignore - @item interactive Declare to the interpreter that the function can be used interactively. This special form may be followed by a string with one @@ -9123,13 +9103,12 @@ deleted@footnote{More precisely, and requiring more expert knowledge to understand, the two integers are of type @code{Lisp_Object}, which can also be a C union instead of an integer type.}. -In early versions of Emacs, these two numbers were thirty-two bits -long, but the code is slowly being generalized to handle other -lengths. Three of the available bits are used to specify the type of -information; the remaining bits are used as content. +Integer widths depend on the machine, and are typically 32 or 64 bits. +A few of the bits are used to specify the type of information; the +remaining bits are used as content. @samp{XINT} is a C macro that extracts the relevant number from the -longer collection of bits; the three other bits are discarded. +longer collection of bits; the type bits are discarded. @need 800 The command in @code{delete-and-extract-region} looks like this: @@ -18724,10 +18703,7 @@ Even though it is short, @code{split-line} contains expressions we have not studied: @code{skip-chars-forward}, @code{indent-to}, @code{current-column} and @code{insert-and-inherit}. -Consider the @code{skip-chars-forward} function. (It is part of the -function definition for @code{back-to-indentation}, which is shown in -@ref{Review, , Review}.) - +Consider the @code{skip-chars-forward} function. In GNU Emacs, you can find out more about @code{skip-chars-forward} by typing @kbd{C-h f} (@code{describe-function}) and the name of the function. This gives you the function documentation. From 3b734e1273220596485f2dcbdb3be916eba53047 Mon Sep 17 00:00:00 2001 From: Kyle Meyer Date: Mon, 1 Feb 2016 08:48:35 -0500 Subject: [PATCH 15/56] * org/org-compat.el (org-font-lock-ensure): Fix bogus test (bug#22399) --- lisp/org/org-compat.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/org/org-compat.el b/lisp/org/org-compat.el index 6403d4df04d..cf6aafc9854 100644 --- a/lisp/org/org-compat.el +++ b/lisp/org/org-compat.el @@ -479,9 +479,9 @@ LIMIT." (not (null pos))))) (defalias 'org-font-lock-ensure - (if (fboundp 'org-font-lock-ensure) + (if (fboundp 'font-lock-ensure) #'font-lock-ensure - (lambda (_beg _end) (font-lock-fontify-buffer)))) + (lambda (&optional _beg _end) (font-lock-fontify-buffer)))) (defun org-floor* (x &optional y) "Return a list of the floor of X and the fractional part of X. From d766ca8ff1e4ff1a30385508e1f456fad6bfe9f8 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 1 Feb 2016 08:29:28 -0800 Subject: [PATCH 16/56] Chatter when autogen.sh changes Git configuration MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * autogen.sh (git_config): New function. Use it instead of ‘git config’. --- autogen.sh | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/autogen.sh b/autogen.sh index 877bb8476f7..42a779ea8c8 100755 --- a/autogen.sh +++ b/autogen.sh @@ -220,17 +220,32 @@ echo timestamp > src/stamp-h.in || exit ## Configure Git, if using Git. if test -d .git && (git status -s) >/dev/null 2>&1; then + # Like 'git config NAME VALUE', but verbose on change and exit on failure. + + git_config () + { + name=$1 + value=$2 + ovalue=`git config --get "$name"` && test "$ovalue" = "$value" || { + echo "${Configuring_git}git config $name '$value'" + Configuring_git= + git config "$name" "$value" || exit + } + } + Configuring_git='Configuring git... +' + # Check hashes when transferring objects among repositories. - git config transfer.fsckObjects true || exit + git_config transfer.fsckObjects true # Configure 'git diff' hunk header format. - git config 'diff.elisp.xfuncname' \ - '^\(def[^[:space:]]+[[:space:]]+([^()[:space:]]+)' || exit - git config 'diff.texinfo.xfuncname' \ - '^@node[[:space:]]+([^,[:space:]][^,]+)' || exit + git_config 'diff.elisp.xfuncname' \ + '^\(def[^[:space:]]+[[:space:]]+([^()[:space:]]+)' + git_config 'diff.texinfo.xfuncname' \ + '^@node[[:space:]]+([^,[:space:]][^,]+)' # Install Git hooks. From e639e10a63c574609df3f745c4adb538415d9b1b Mon Sep 17 00:00:00 2001 From: Martin Rudalics Date: Mon, 1 Feb 2016 19:01:34 +0100 Subject: [PATCH 17/56] Some corrections in Elisp manual * doc/lispref/buffers.texi (Read Only Buffers): Describe optional argument POSITION. * doc/lispref/debugging.texi (Error Debugging): `debug-on-signal' is an option. * doc/lispref/display.texi (Refresh Screen): Describe optional argument FRAME of `redraw-frame'. (Attribute Functions): Describe optional argument CHARACTER of `face-font'. (Defining Images): `image-load-path' is an option. (Beeping): `ring-bell-function' is an option. * doc/lispref/frames.texi (Size and Position): The PIXELWISE argument of `set-frame-size' is optional. (Raising and Lowering): The TERMINAL argument of `tty-top-frame' is optional. * doc/lispref/keymaps.texi (Controlling Active Maps): Fix doc of `set-transient-map'. * doc/lispref/minibuf.texi (Text from Minibuffer): `read-regexp-defaults-function' is an option. (Minibuffer Contents): `delete-minibuffer-contents' is a command. * doc/lispref/modes.texi (Mode Line Variables): `mode-line-position' and `mode-line-modes' are variables, not options. * doc/lispref/strings.texi (Creating Strings): The START argument of `substring' is optional. * doc/lispref/text.texi (Buffer Contents): Describe optional argument NO-PROPERTIES of `thing-at-point'. (User-Level Deletion): Both arguments of `delete-trailing-whitespace' are optional. (Margins): Use @key{RET} instead of @kbd{RET}. * doc/lispref/windows.texi (Display Action Functions): Write non-@code{nil} instead of non-nil. (Choosing Window Options): The WINDOW arg of `split-window-sensibly' is optional. (Choosing Window Options): Write non-@code{nil} instead of non-nil. (Window Start and End): Both args of `window-group-end' are optional. * src/buffer.c (Fbarf_if_buffer_read_only): Rename argument POS to POSITION to keep consisteny with doc-string. --- doc/lispref/buffers.texi | 10 +++++++--- doc/lispref/debugging.texi | 4 ++-- doc/lispref/display.texi | 21 ++++++++++++++------- doc/lispref/frames.texi | 4 ++-- doc/lispref/keymaps.texi | 19 +++++++++++-------- doc/lispref/minibuf.texi | 10 +++++----- doc/lispref/modes.texi | 8 ++++---- doc/lispref/strings.texi | 5 +++-- doc/lispref/text.texi | 9 ++++++--- doc/lispref/windows.texi | 24 +++++++++++++----------- src/buffer.c | 10 +++++----- 11 files changed, 72 insertions(+), 52 deletions(-) diff --git a/doc/lispref/buffers.texi b/doc/lispref/buffers.texi index e56d77c7b92..1f7f263fb21 100644 --- a/doc/lispref/buffers.texi +++ b/doc/lispref/buffers.texi @@ -755,10 +755,14 @@ When disabling Read Only mode, it disables View mode if View mode was enabled. @end deffn -@defun barf-if-buffer-read-only +@defun barf-if-buffer-read-only &optional position This function signals a @code{buffer-read-only} error if the current -buffer is read-only. @xref{Using Interactive}, for another way to -signal an error if the current buffer is read-only. +buffer is read-only. If the text at @var{position} (which defaults to +point) has the @code{inhibit-read-only} text property set, the error +will not be raised. + +@xref{Using Interactive}, for another way to signal an error if the +current buffer is read-only. @end defun @node Buffer List diff --git a/doc/lispref/debugging.texi b/doc/lispref/debugging.texi index 3f1574fac6c..98c47052cb0 100644 --- a/doc/lispref/debugging.texi +++ b/doc/lispref/debugging.texi @@ -141,7 +141,7 @@ If @code{eval-expression-debug-on-error} is @code{nil}, then the value of @code{debug-on-error} is not changed during @code{eval-expression}. @end defopt -@defvar debug-on-signal +@defopt debug-on-signal Normally, errors caught by @code{condition-case} never invoke the debugger. The @code{condition-case} gets a chance to handle the error before the debugger gets a chance. @@ -158,7 +158,7 @@ course of affairs, and you may not even realize that errors happen there. If you need to debug code wrapped in @code{condition-case}, consider using @code{condition-case-unless-debug} (@pxref{Handling Errors}). -@end defvar +@end defopt @defopt debug-on-event If you set @code{debug-on-event} to a special event (@pxref{Special diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi index aa98ed40ee5..323895927a9 100644 --- a/doc/lispref/display.texi +++ b/doc/lispref/display.texi @@ -47,8 +47,9 @@ that Emacs presents to the user. contents of a given frame (@pxref{Frames}). This is useful if the screen is corrupted. -@defun redraw-frame frame -This function clears and redisplays frame @var{frame}. +@defun redraw-frame &optional frame +This function clears and redisplays frame @var{frame}. If @var{frame} +is omitted or nil, it redraws the selected frame. @end defun Even more powerful is @code{redraw-display}: @@ -2686,8 +2687,14 @@ considered, until a specified attribute is found. To ensure that the return value is always specified, use a value of @code{default} for @var{inherit}. -@defun face-font face &optional frame +@defun face-font face &optional frame character This function returns the name of the font of face @var{face}. + +If the optional argument @var{frame} is specified, it returns the name +of the font of @var{face} for that frame. If @var{frame} is omitted or +@code{nil}, the selected frame is used. And, in this case, if the +optional third argument @var{character} is supplied, it returns the font +name used for @var{character}. @end defun @defun face-foreground face &optional frame inherit @@ -5324,7 +5331,7 @@ returned. If no specification is satisfied, @code{nil} is returned. The image is looked for in @code{image-load-path}. @end defun -@defvar image-load-path +@defopt image-load-path This variable's value is a list of locations in which to search for image files. If an element is a string or a variable symbol whose value is a string, the string is taken to be the name of a directory @@ -5343,7 +5350,7 @@ should specify the image as follows: @example (defimage foo-image '((:type xpm :file "foo/bar.xpm"))) @end example -@end defvar +@end defopt @defun image-load-path-for-library library image &optional path no-error This function returns a suitable search path for images used by the @@ -6899,12 +6906,12 @@ provided the terminal's Termcap entry defines the visible bell capability (@samp{vb}). @end defopt -@defvar ring-bell-function +@defopt ring-bell-function If this is non-@code{nil}, it specifies how Emacs should ring the bell. Its value should be a function of no arguments. If this is non-@code{nil}, it takes precedence over the @code{visible-bell} variable. -@end defvar +@end defopt @node Window Systems @section Window Systems diff --git a/doc/lispref/frames.texi b/doc/lispref/frames.texi index b98e3a5cdd1..15a9bd911ff 100644 --- a/doc/lispref/frames.texi +++ b/doc/lispref/frames.texi @@ -847,7 +847,7 @@ With some window managers you may have to set this to non-@code{nil} in order to make a frame appear truly maximized or full-screen. @end defopt -@defun set-frame-size frame width height pixelwise +@defun set-frame-size frame width height &optional pixelwise This function sets the size of the text area of @var{frame}, measured in terms of the canonical height and width of a character on @var{frame} (@pxref{Frame Font}). @@ -2236,7 +2236,7 @@ parameters. @xref{Management Parameters}. terminal frames. On each text terminal, only the top frame is displayed at any one time. -@defun tty-top-frame terminal +@defun tty-top-frame &optional terminal This function returns the top frame on @var{terminal}. @var{terminal} should be a terminal object, a frame (meaning that frame's terminal), or @code{nil} (meaning the selected frame's terminal). If it does not diff --git a/doc/lispref/keymaps.texi b/doc/lispref/keymaps.texi index 354be3cdd92..0ea30283d7d 100644 --- a/doc/lispref/keymaps.texi +++ b/doc/lispref/keymaps.texi @@ -950,22 +950,25 @@ are used before @code{minor-mode-map-alist} and @end defvar @cindex transient keymap -@defun set-transient-map keymap &optional keep +@defun set-transient-map keymap &optional keep-pred on-exit This function adds @var{keymap} as a @dfn{transient} keymap, which takes precedence over other keymaps for one (or more) subsequent keys. -Normally, @var{keymap} is used just once, to look up the very next -key. If the optional argument @var{pred} is @code{t}, the map stays -active as long as the user types keys defined in @var{keymap}; when -the user types a key that is not in @var{keymap}, the transient keymap -is deactivated and normal key lookup continues for that key. +Normally, @var{keymap} is used just once, to look up the very next key. +If the optional argument @var{keep-pred} is @code{t}, the map stays +active as long as the user types keys defined in @var{keymap}; when the +user types a key that is not in @var{keymap}, the transient keymap is +deactivated and normal key lookup continues for that key. -The @var{pred} argument can also be a function. In that case, the +The @var{keep-pred} argument can also be a function. In that case, the function is called with no arguments, prior to running each command, while @var{keymap} is active; it should return non-@code{nil} if @var{keymap} should stay active. -This function works by adding and removing @code{keymap} from the +The optional argument @var{on-exit}, if non-nil, specifies a function +that is called, with no arguments, after @var{keymap} is deactivated. + +This function works by adding and removing @var{keymap} from the variable @code{overriding-terminal-local-map}, which takes precedence over all other active keymaps (@pxref{Searching Keymaps}). @end defun diff --git a/doc/lispref/minibuf.texi b/doc/lispref/minibuf.texi index e24d2cd643a..6f41090ebea 100644 --- a/doc/lispref/minibuf.texi +++ b/doc/lispref/minibuf.texi @@ -272,7 +272,7 @@ History}). If it is omitted or @code{nil}, the history list defaults to @code{regexp-history}. @end defun -@defvar read-regexp-defaults-function +@defopt read-regexp-defaults-function The function @code{read-regexp} may use the value of this variable to determine its list of default regular expressions. If non-@code{nil}, the value of this variable should be either: @@ -288,7 +288,7 @@ or a list of strings. @noindent See @code{read-regexp} above for details of how these values are used. -@end defvar +@end defopt @defvar minibuffer-allow-text-properties If this variable is @code{nil}, then @code{read-from-minibuffer} @@ -2336,11 +2336,11 @@ This is like @code{minibuffer-contents}, except that it does not copy text properties, just the characters themselves. @xref{Text Properties}. @end defun -@defun delete-minibuffer-contents -This function erases the editable contents of the minibuffer (that is, +@deffn Command delete-minibuffer-contents +This command erases the editable contents of the minibuffer (that is, everything except the prompt), if a minibuffer is current. Otherwise, it erases the entire current buffer. -@end defun +@end deffn @node Recursive Mini @section Recursive Minibuffers diff --git a/doc/lispref/modes.texi b/doc/lispref/modes.texi index 2b621e4337b..66f7a352023 100644 --- a/doc/lispref/modes.texi +++ b/doc/lispref/modes.texi @@ -1943,11 +1943,11 @@ Its default value displays the buffer name, padded with spaces to at least 12 columns. @end defvar -@defopt mode-line-position +@defvar mode-line-position This variable indicates the position in the buffer. Its default value displays the buffer percentage and, optionally, the buffer size, the line number and the column number. -@end defopt +@end defvar @defvar vc-mode The variable @code{vc-mode}, buffer-local in each buffer, records @@ -1956,11 +1956,11 @@ and, if so, which kind. Its value is a string that appears in the mode line, or @code{nil} for no version control. @end defvar -@defopt mode-line-modes +@defvar mode-line-modes This variable displays the buffer's major and minor modes. Its default value also displays the recursive editing level, information on the process status, and whether narrowing is in effect. -@end defopt +@end defvar @defvar mode-line-remote This variable is used to show whether @code{default-directory} for the diff --git a/doc/lispref/strings.texi b/doc/lispref/strings.texi index 091db5e4ebb..9d6613c522c 100644 --- a/doc/lispref/strings.texi +++ b/doc/lispref/strings.texi @@ -145,11 +145,12 @@ This returns a string containing the characters @var{characters}. @end example @end defun -@defun substring string start &optional end +@defun substring string &optional start end This function returns a new string which consists of those characters from @var{string} in the range from (and including) the character at the index @var{start} up to (but excluding) the character at the index -@var{end}. The first character is at index zero. +@var{end}. The first character is at index zero. With one argument, +this function just copies @var{string}. @example @group diff --git a/doc/lispref/text.texi b/doc/lispref/text.texi index 41991c9482c..4c3a1a01e7d 100644 --- a/doc/lispref/text.texi +++ b/doc/lispref/text.texi @@ -303,7 +303,7 @@ there, the function returns @code{nil}. Otherwise, a nearby symbol or word on the same line is acceptable. @end defun -@defun thing-at-point thing +@defun thing-at-point thing &optional no-properties Return the @var{thing} around or next to point, as a string. The argument @var{thing} is a symbol which specifies a kind of syntactic @@ -311,6 +311,9 @@ entity. Possibilities include @code{symbol}, @code{list}, @code{sexp}, @code{defun}, @code{filename}, @code{url}, @code{word}, @code{sentence}, @code{whitespace}, @code{line}, @code{page}, and others. +When the optional argument @var{no-properties} is non-@code{nil}, this +function strips text properties from the return value. + @example ---------- Buffer: foo ---------- Gentlemen may cry ``Pea@point{}ce! Peace!,'' @@ -804,7 +807,7 @@ A blank line is defined as a line containing only tabs and spaces. @code{delete-blank-lines} returns @code{nil}. @end deffn -@deffn Command delete-trailing-whitespace start end +@deffn Command delete-trailing-whitespace &optional start end Delete trailing whitespace in the region defined by @var{start} and @var{end}. @@ -1763,7 +1766,7 @@ is value of @code{indent-line-function} in Paragraph-Indent Text mode. @defopt left-margin This variable specifies the base left margin column. In Fundamental -mode, @kbd{RET} indents to this column. This variable automatically +mode, @key{RET} indents to this column. This variable automatically becomes buffer-local when set in any fashion. @end defopt diff --git a/doc/lispref/windows.texi b/doc/lispref/windows.texi index 771bd4eeb29..f61f08a7f24 100644 --- a/doc/lispref/windows.texi +++ b/doc/lispref/windows.texi @@ -2415,9 +2415,10 @@ If this function chooses a window on another frame, it makes that frame visible and, unless @var{alist} contains an @code{inhibit-switch-frame} entry (@pxref{Choosing Window Options}), raises that frame if necessary. -If @var{alist} has a non-nil @code{frame-predicate} entry, its value is a -function taking one argument (a frame), returning non-nil if the -frame is a candidate; this function replaces the default predicate. +If @var{alist} has a non-@code{nil} @code{frame-predicate} entry, its +value is a function taking one argument (a frame), returning +non-@code{nil} if the frame is a candidate; this function replaces the +default predicate. If @var{alist} has a non-@code{nil} @code{inhibit-same-window} entry, the selected window is used; thus if the selected frame has a single @@ -2637,10 +2638,11 @@ and return either a new window (which will be used to display the desired buffer) or @code{nil} (which means the splitting failed). @end defopt -@defun split-window-sensibly window -This function tries to split @var{window}, and return the newly -created window. If @var{window} cannot be split, it returns -@code{nil}. +@defun split-window-sensibly &optional window +This function tries to split @var{window}, and return the newly created +window. If @var{window} cannot be split, it returns @code{nil}. If +@var{window} is omitted or @code{nil}, it defaults to the selected +window. This function obeys the usual rules that determine when a window may be split (@pxref{Splitting Windows}). It first tries to split by @@ -2671,9 +2673,9 @@ to split this way. @end defopt @defopt even-window-sizes -This variable, if non-nil, causes @code{display-buffer} to even window -sizes whenever it reuses an existing window and that window is adjacent -to the selected one. +This variable, if non-@code{nil}, causes @code{display-buffer} to even +window sizes whenever it reuses an existing window and that window is +adjacent to the selected one. If its value is @code{width-only}, sizes are evened only if the reused window is on the left or right of the selected one and the selected @@ -3161,7 +3163,7 @@ text will end if scrolling is not required. @end defun @vindex window-group-end-function -@defun window-group-end window update +@defun window-group-end &optional window update This function is like @code{window-end}, except that when @var{window} is a part of a group of windows (@pxref{Window Group}), @code{window-group-end} returns the end position of the entire group. diff --git a/src/buffer.c b/src/buffer.c index 74b6fb6a47f..653e3fe05f8 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -2145,16 +2145,16 @@ DEFUN ("barf-if-buffer-read-only", Fbarf_if_buffer_read_only, doc: /* Signal a `buffer-read-only' error if the current buffer is read-only. If the text under POSITION (which defaults to point) has the `inhibit-read-only' text property set, the error will not be raised. */) - (Lisp_Object pos) + (Lisp_Object position) { - if (NILP (pos)) - XSETFASTINT (pos, PT); + if (NILP (position)) + XSETFASTINT (position, PT); else - CHECK_NUMBER (pos); + CHECK_NUMBER (position); if (!NILP (BVAR (current_buffer, read_only)) && NILP (Vinhibit_read_only) - && NILP (Fget_text_property (pos, Qinhibit_read_only, Qnil))) + && NILP (Fget_text_property (position, Qinhibit_read_only, Qnil))) xsignal1 (Qbuffer_read_only, Fcurrent_buffer ()); return Qnil; } From ee8b46699523cc1dea7b3d03e3cccff3d62cd847 Mon Sep 17 00:00:00 2001 From: Karl Fogel Date: Mon, 1 Feb 2016 12:46:45 -0600 Subject: [PATCH 18/56] Recommend enabling integrity-checking in git * admin/notes/git-workflow: Recommend setting transfer.fsckObjects. This is related to the autogen.sh changes made by Paul Eggert in commit d766ca8f (2016-02-01) and commit cedd7cad (2016-02-01), and to my edits today to http://www.emacswiki.org/emacs/GitForEmacsDevs and to emacswiki.org/emacs/GitQuickStartForEmacsDevs. See also the thread "Recommend these .gitconfig settings for git integrity." at https://lists.gnu.org/archive/html/emacs-devel/2016-01/threads.html#01802. --- admin/notes/git-workflow | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/admin/notes/git-workflow b/admin/notes/git-workflow index 3c2c76c8909..b6168c31bd5 100644 --- a/admin/notes/git-workflow +++ b/admin/notes/git-workflow @@ -9,6 +9,11 @@ If you haven't configured git before you should first do: git config --global user.name "Frank Chu" git config --global user.email "fchu@example.com" +git config --global transfer.fsckObjects true + +(See the thread "Recommend these .gitconfig settings for git integrity." +[https://lists.gnu.org/archive/html/emacs-devel/2016-01/threads.html#01802] +for more details about why that last line is there.) Initial setup ============= From 1d07dcd720890764774770e0ad24ba11a5bda233 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simen=20Heggest=C3=B8yl?= Date: Mon, 1 Feb 2016 21:38:25 +0100 Subject: [PATCH 19/56] Highlight two additional SCSS keywords * lisp/textmodes/css-mode.el (css-bang-ids): New defconst holding CSS identifiers on the form !foo. (scss-bang-ids): New defconst holding SCSS identifiers on the form !foo. (css--font-lock-keywords): Highlight the new SCSS bang identifiers in `font-lock-builtin-face'. * test/indent/css-mode.css: Add bang rule test case. * test/indent/scss-mode.css: Add test cases for the introduced bang rules. --- lisp/textmodes/css-mode.el | 12 ++++++++++-- test/indent/css-mode.css | 2 +- test/indent/scss-mode.scss | 11 ++++++++++- 3 files changed, 21 insertions(+), 4 deletions(-) diff --git a/lisp/textmodes/css-mode.el b/lisp/textmodes/css-mode.el index 96a82baa56c..b3a41d3822c 100644 --- a/lisp/textmodes/css-mode.el +++ b/lisp/textmodes/css-mode.el @@ -54,6 +54,14 @@ '("charset" "font-face" "import" "media" "namespace" "page") "Identifiers that appear in the form @foo.") +(defconst css-bang-ids + '("important") + "Identifiers that appear in the form !foo.") + +(defconst scss-bang-ids + '("default" "global" "optional") + "Additional identifiers that appear in the form !foo in SCSS.") + (defconst css-descriptor-ids '("ascent" "baseline" "bbox" "cap-height" "centerline" "definition-src" "descent" "font-family" "font-size" "font-stretch" "font-style" @@ -236,8 +244,8 @@ (defun css--font-lock-keywords (&optional sassy) `((,(concat "!\\s-*" - (regexp-opt (append (if sassy '("global")) - '("important")))) + (regexp-opt (append (if sassy scss-bang-ids) + css-bang-ids))) (0 font-lock-builtin-face)) ;; Atrules keywords. IDs not in css-at-ids are valid (ignored). ;; In fact the regexp should probably be diff --git a/test/indent/css-mode.css b/test/indent/css-mode.css index 24166b00282..3a00739bfc4 100644 --- a/test/indent/css-mode.css +++ b/test/indent/css-mode.css @@ -9,7 +9,7 @@ article[role="main"] { } a, b:hover, c { - color: black; + color: black !important; } a, b:hover { /* bug:20282 */ diff --git a/test/indent/scss-mode.scss b/test/indent/scss-mode.scss index 02a4a98a8c5..e1ec90a5299 100644 --- a/test/indent/scss-mode.scss +++ b/test/indent/scss-mode.scss @@ -40,11 +40,20 @@ p.#{$name} var } article[role="main"] { $toto: 500 !global; - float: left; + $var-with-default: 300 !default; + float: left !important; width: 600px / 888px * 100%; height: 100px / 888px * 100%; } +%placeholder { + color: #f0f0f0; +} + +button { + @extend %placeholder !optional; +} + @import 'reset'; @mixin border-radius($radius) { From 9f60d7e9a27b107d5bd35bf9d7621a300e17dbfb Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Mon, 1 Feb 2016 20:53:44 -0500 Subject: [PATCH 20/56] Mark some risky calendar variables. * lisp/calendar/cal-china.el (chinese-calendar-time-zone): Remove risky setting for deleted obsolete alias. (calendar-chinese-standard-time-zone-name) (calendar-chinese-daylight-saving-start) (calendar-chinese-daylight-saving-end): * lisp/calendar/calendar.el (calendar-iso-date-display-form) (calendar-european-date-display-form) (calendar-american-date-display-form, calendar-date-display-form): * lisp/calendar/diary-lib.el (diary-remind-message) (diary-header-line-format): * lisp/calendar/solar.el (calendar-time-display-form) (calendar-location-name): Mark as risky. --- lisp/calendar/cal-china.el | 6 +++--- lisp/calendar/calendar.el | 4 ++++ lisp/calendar/diary-lib.el | 2 ++ lisp/calendar/solar.el | 2 ++ 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/lisp/calendar/cal-china.el b/lisp/calendar/cal-china.el index cfddd6b6953..661a8185bf4 100644 --- a/lisp/calendar/cal-china.el +++ b/lisp/calendar/cal-china.el @@ -71,9 +71,6 @@ Default is for Beijing. This is an expression in `year' since it changed at ;; It gets eval'd. ;;;###autoload (put 'calendar-chinese-time-zone 'risky-local-variable t) -;;;###autoload -(put 'chinese-calendar-time-zone 'risky-local-variable t) - ;; FIXME unused. (defcustom calendar-chinese-location-name "Beijing" @@ -98,6 +95,7 @@ Default is for no daylight saving time." This is an expression depending on `year' because it changed at 1928-01-01 00:00:00 from `PMT' to `CST'." :type 'sexp + :risky t :group 'calendar-chinese) (defcustom calendar-chinese-daylight-time-zone-name "CDT" @@ -115,6 +113,7 @@ at 1928-01-01 00:00:00 from `PMT' to `CST'." Default is for no daylight saving time. See documentation of `calendar-daylight-savings-starts'." :type 'sexp + :risky t :group 'calendar-chinese) (defcustom calendar-chinese-daylight-saving-end nil @@ -125,6 +124,7 @@ Default is for no daylight saving time. See documentation of Default is for no daylight saving time. See documentation of `calendar-daylight-savings-ends'." :type 'sexp + :risky t :group 'calendar-chinese) (defcustom calendar-chinese-daylight-saving-start-time 0 diff --git a/lisp/calendar/calendar.el b/lisp/calendar/calendar.el index 5dec3eca52d..ccdae484fa6 100644 --- a/lisp/calendar/calendar.el +++ b/lisp/calendar/calendar.el @@ -850,6 +850,7 @@ For examples of three common styles, see `diary-american-date-forms', Normally you should not customize this, but `calendar-date-display-form' \(which see)." :type 'sexp + :risky t :version "23.1" :group 'calendar) @@ -859,6 +860,7 @@ Normally you should not customize this, but `calendar-date-display-form' Normally you should not customize this, but `calendar-date-display-form' \(which see)." :type 'sexp + :risky t :group 'calendar) (defcustom calendar-american-date-display-form @@ -867,6 +869,7 @@ Normally you should not customize this, but `calendar-date-display-form' Normally you should not customize this, but `calendar-date-display-form' \(which see)." :type 'sexp + :risky t :group 'calendar) (defcustom calendar-date-display-form @@ -892,6 +895,7 @@ would give the usual American style in fixed-length fields. The variables `calendar-american-date-display-form' provide some defaults for three common styles." :type 'sexp + :risky t :set-after '(calendar-date-style calendar-iso-date-display-form calendar-european-date-display-form calendar-american-date-display-form) diff --git a/lisp/calendar/diary-lib.el b/lisp/calendar/diary-lib.el index 0523d8355b3..9ba4e358e38 100644 --- a/lisp/calendar/diary-lib.el +++ b/lisp/calendar/diary-lib.el @@ -296,6 +296,7 @@ Used by the function `diary-remind', a pseudo-pattern is a list of expressions that can involve the keywords `days' (a number), `date' \(a list of month, day, year), and `diary-entry' (a string)." :type 'sexp + :risky t :group 'diary) (defcustom diary-abbreviated-year-flag t @@ -412,6 +413,7 @@ The format of the header is specified by `diary-header-line-format'." Only used if `diary-header-line-flag' is non-nil." :group 'diary :type 'sexp + :risky t :initialize 'custom-initialize-default :set 'diary-set-header :version "23.3") ; frame-width -> window-width diff --git a/lisp/calendar/solar.el b/lisp/calendar/solar.el index eb64b770e86..15f5b7436cd 100644 --- a/lisp/calendar/solar.el +++ b/lisp/calendar/solar.el @@ -70,6 +70,7 @@ For example, the form would give military-style times like `21:07 (UTC)'." :type 'sexp + :risky t :group 'calendar) (defcustom calendar-latitude nil @@ -131,6 +132,7 @@ variable `calendar-latitude' paired with the variable `calendar-longitude'. This variable should be set in `site-start'.el." :type 'sexp + :risky t :group 'calendar) (defcustom solar-error 0.5 From 93f21530ad0a17310f97f1a25dfbc67b249bf2e7 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Mon, 1 Feb 2016 20:59:32 -0500 Subject: [PATCH 21/56] Improve the custom type of some user options. * lisp/autoinsert.el (auto-insert-alist): * lisp/replace.el (query-replace-from-to-separator): * lisp/gnus/gnus-art.el (gnus-hidden-properties): * lisp/gnus/gnus-gravatar.el (gnus-gravatar-properties): * lisp/gnus/gnus-picon.el (gnus-picon-properties): * lisp/progmodes/prolog.el (prolog-keywords, prolog-types) (prolog-mode-specificators, prolog-determinism-specificators) (prolog-directives, prolog-program-name, prolog-program-switches) (prolog-consult-string, prolog-compile-string, prolog-eof-string) (prolog-prompt-regexp): Improve custom type. --- lisp/autoinsert.el | 12 ++++++++++- lisp/gnus/gnus-art.el | 2 +- lisp/gnus/gnus-gravatar.el | 2 +- lisp/gnus/gnus-picon.el | 2 +- lisp/progmodes/prolog.el | 44 +++++++++++++++++++++++--------------- lisp/replace.el | 2 +- 6 files changed, 42 insertions(+), 22 deletions(-) diff --git a/lisp/autoinsert.el b/lisp/autoinsert.el index e5dd62ff4d8..43fa31288e6 100644 --- a/lisp/autoinsert.el +++ b/lisp/autoinsert.el @@ -305,7 +305,17 @@ ACTION may be a skeleton to insert (see `skeleton-insert'), an absolute file-name or one relative to `auto-insert-directory' or a function to call. ACTION may also be a vector containing several successive single actions as described above, e.g. [\"header.insert\" date-and-author-update]." - :type 'sexp + :type '(alist :key-type + (choice (regexp :tag "Regexp matching file name") + (symbol :tag "Major mode") + (cons :tag "Condition and description" + (choice :tag "Condition" + (regexp :tag "Regexp matching file name") + (symbol :tag "Major mode")) + (string :tag "Description"))) + ;; There's no custom equivalent of "repeat" for vectors. + :value-type (choice file function + (sexp :tag "Skeleton or vector"))) :version "25.1" :group 'auto-insert) diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el index 54bbfd857f1..366d14aca1d 100644 --- a/lisp/gnus/gnus-art.el +++ b/lisp/gnus/gnus-art.el @@ -260,7 +260,7 @@ This can also be a list of the above values." ;; needed there. And XEmacs doesn't handle `intangible' anyway. '(invisible t) "Property list to use for hiding text." - :type 'sexp + :type 'plist :group 'gnus-article-hiding) ;; Fixme: This isn't the right thing for mixed graphical and non-graphical diff --git a/lisp/gnus/gnus-gravatar.el b/lisp/gnus/gnus-gravatar.el index deb6e4bc4c9..de7203d9d10 100644 --- a/lisp/gnus/gnus-gravatar.el +++ b/lisp/gnus/gnus-gravatar.el @@ -41,7 +41,7 @@ If nil, default to `gravatar-size'." (defcustom gnus-gravatar-properties '(:ascent center :relief 1) "List of image properties applied to Gravatar images." - :type 'sexp + :type 'plist :version "24.1" :group 'gnus-gravatar) diff --git a/lisp/gnus/gnus-picon.el b/lisp/gnus/gnus-picon.el index 6365e8e2ff7..bbbe0eded4e 100644 --- a/lisp/gnus/gnus-picon.el +++ b/lisp/gnus/gnus-picon.el @@ -73,7 +73,7 @@ Some people may want to add \"unknown\" to this list." (defcustom gnus-picon-properties '(:color-symbols (("None" . "white"))) "List of image properties applied to picons." - :type 'sexp + :type 'plist :version "24.3" :group 'gnus-picon) diff --git a/lisp/progmodes/prolog.el b/lisp/progmodes/prolog.el index 4f23f87dd59..9c15f3b6a0e 100644 --- a/lisp/progmodes/prolog.el +++ b/lisp/progmodes/prolog.el @@ -272,9 +272,6 @@ ;; Version 0.1.35: ;; o Minor font-lock bug fixes. -;;; TODO: - -;; Replace ":type 'sexp" with more precise Custom types. ;;; Code: @@ -441,7 +438,12 @@ Legal values: "Alist of Prolog keywords which is used for font locking of directives." :version "24.1" :group 'prolog-font-lock - :type 'sexp + ;; Note that "(repeat string)" also allows "nil" (repeat-count 0). + ;; This gets processed by prolog-find-value-by-system, which + ;; allows both the car and the cdr to be a list to eval. + ;; Though the latter must have the form '(eval ...)'. + ;; Of course, none of this is documented... + :type '(repeat (list (choice symbol sexp) (choice (repeat string) sexp))) :risky t) (defcustom prolog-types @@ -451,7 +453,7 @@ Legal values: "Alist of Prolog types used by font locking." :version "24.1" :group 'prolog-font-lock - :type 'sexp + :type '(repeat (list (choice symbol sexp) (choice (repeat string) sexp))) :risky t) (defcustom prolog-mode-specificators @@ -461,7 +463,7 @@ Legal values: "Alist of Prolog mode specificators used by font locking." :version "24.1" :group 'prolog-font-lock - :type 'sexp + :type '(repeat (list (choice symbol sexp) (choice (repeat string) sexp))) :risky t) (defcustom prolog-determinism-specificators @@ -472,7 +474,7 @@ Legal values: "Alist of Prolog determinism specificators used by font locking." :version "24.1" :group 'prolog-font-lock - :type 'sexp + :type '(repeat (list (choice symbol sexp) (choice (repeat string) sexp))) :risky t) (defcustom prolog-directives @@ -482,7 +484,7 @@ Legal values: "Alist of Prolog source code directives used by font locking." :version "24.1" :group 'prolog-font-lock - :type 'sexp + :type '(repeat (list (choice symbol sexp) (choice (repeat string) sexp))) :risky t) @@ -569,7 +571,8 @@ the first column (i.e., DCG heads) inserts ` -->' and newline." (or (car names) "prolog")))) "Alist of program names for invoking an inferior Prolog with `run-prolog'." :group 'prolog-inferior - :type 'sexp + :type '(alist :key-type (choice symbol sexp) + :value-type (group (choice string (const nil) sexp))) :risky t) (defun prolog-program-name () (prolog-find-value-by-system prolog-program-name)) @@ -580,7 +583,7 @@ the first column (i.e., DCG heads) inserts ` -->' and newline." "Alist of switches given to inferior Prolog run with `run-prolog'." :version "24.1" :group 'prolog-inferior - :type 'sexp + :type '(repeat (list (choice symbol sexp) (choice (repeat string) sexp))) :risky t) (defun prolog-program-switches () (prolog-find-value-by-system prolog-program-switches)) @@ -604,7 +607,8 @@ Some parts of the string are replaced: region of a buffer, in which case it is the number of lines before the region." :group 'prolog-inferior - :type 'sexp + :type '(alist :key-type (choice symbol sexp) + :value-type (group (choice string (const nil) sexp))) :risky t) (defun prolog-consult-string () @@ -631,17 +635,21 @@ Some parts of the string are replaced: If `prolog-program-name' is non-nil, it is a string sent to a Prolog process. If `prolog-program-name' is nil, it is an argument to the `compile' function." :group 'prolog-inferior - :type 'sexp + :type '(alist :key-type (choice symbol sexp) + :value-type (group (choice string (const nil) sexp))) :risky t) (defun prolog-compile-string () (prolog-find-value-by-system prolog-compile-string)) (defcustom prolog-eof-string "end_of_file.\n" - "Alist of strings that represent end of file for prolog. -nil means send actual operating system end of file." + "String or alist of strings that represent end of file for prolog. +If nil, send actual operating system end of file." :group 'prolog-inferior - :type 'sexp + :type '(choice string + (const nil) + (alist :key-type (choice symbol sexp) + :value-type (group (choice string (const nil) sexp)))) :risky t) (defcustom prolog-prompt-regexp @@ -653,7 +661,8 @@ nil means send actual operating system end of file." "Alist of prompts of the prolog system command line." :version "24.1" :group 'prolog-inferior - :type 'sexp + :type '(alist :key-type (choice symbol sexp) + :value-type (group (choice string (const nil) sexp))) :risky t) (defun prolog-prompt-regexp () @@ -664,7 +673,8 @@ nil means send actual operating system end of file." ;; (t "^|: +")) ;; "Alist of regexps matching the prompt when consulting `user'." ;; :group 'prolog-inferior -;; :type 'sexp +;; :type '(alist :key-type (choice symbol sexp) +;; :value-type (group (choice string (const nil) sexp))) ;; :risky t) (defcustom prolog-debug-on-string "debug.\n" diff --git a/lisp/replace.el b/lisp/replace.el index f5c8d33b5f5..dfe8cd739a2 100644 --- a/lisp/replace.el +++ b/lisp/replace.el @@ -85,7 +85,7 @@ from Isearch by using a key sequence like `C-s C-s M-%'." "24.3") ;; while preparing to dump, also stops customize-rogue listing this. :initialize 'custom-initialize-delay :group 'matching - :type 'sexp + :type '(choice string (sexp :tag "Display specification")) :version "25.1") (defcustom query-replace-from-history-variable 'query-replace-history From 4c3fae351a6015eef3a672529b0ba9877e16b08b Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Mon, 1 Feb 2016 21:00:58 -0500 Subject: [PATCH 22/56] ; * lisp/progmodes/prolog.el: Remove some obsolete commentary. --- lisp/progmodes/prolog.el | 33 ++++++++------------------------- 1 file changed, 8 insertions(+), 25 deletions(-) diff --git a/lisp/progmodes/prolog.el b/lisp/progmodes/prolog.el index 9c15f3b6a0e..9ee405b31e1 100644 --- a/lisp/progmodes/prolog.el +++ b/lisp/progmodes/prolog.el @@ -53,34 +53,16 @@ ;; all the bells and whistles one would expect, including syntax ;; highlighting and auto indentation. It can also send regions to an ;; inferior Prolog process. -;; -;; The code requires the comint, easymenu, info, imenu, and font-lock -;; libraries. These are normally distributed with GNU Emacs and -;; XEmacs. -;;; Installation: -;; -;; Insert the following lines in your init file: -;; -;; (setq load-path (cons "/usr/lib/xemacs/site-lisp" load-path)) -;; (autoload 'run-prolog "prolog" "Start a Prolog sub-process." t) -;; (autoload 'prolog-mode "prolog" "Major mode for editing Prolog programs." t) -;; (autoload 'mercury-mode "prolog" "Major mode for editing Mercury programs." t) +;; Some settings you may wish to use: + ;; (setq prolog-system 'swi) ; optional, the system you are using; ;; ; see `prolog-system' below for possible values -;; (setq auto-mode-alist (append '(("\\.pl$" . prolog-mode) -;; ("\\.m$" . mercury-mode)) +;; (setq auto-mode-alist (append '(("\\.pl\\'" . prolog-mode) +;; ("\\.m\\'" . mercury-mode)) ;; auto-mode-alist)) ;; -;; where the path in the first line is the file system path to this file. -;; MSDOS paths can be written like "d:/programs/emacs-19.34/site-lisp". -;; Note: In XEmacs, either `/usr/lib/xemacs/site-lisp' (RPM default in -;; Red Hat-based distributions) or `/usr/local/lib/xemacs/site-lisp' -;; (default when compiling from sources) are automatically added to -;; `load-path', so the first line is not necessary provided that you -;; put this file in the appropriate place. -;; -;; The last s-expression above makes sure that files ending with .pl +;; The last expression above makes sure that files ending with .pl ;; are assumed to be Prolog files and not Perl, which is the default ;; Emacs setting. If this is not wanted, remove this line. It is then ;; necessary to either @@ -98,8 +80,8 @@ ;; If the command to start the prolog process ('sicstus', 'pl' or ;; 'swipl' for SWI prolog, etc.) is not available in the default path, ;; then it is necessary to set the value of the environment variable -;; EPROLOG to a shell command to invoke the prolog process. In XEmacs -;; and Emacs 20+ you can also customize the variable +;; EPROLOG to a shell command to invoke the prolog process. +;; You can also customize the variable ;; `prolog-program-name' (in the group `prolog-inferior') and provide ;; a full path for your Prolog system (swi, scitus, etc.). ;; @@ -109,6 +91,7 @@ ;; to keep the GNU Emacs compatibility. So if you work under Emacs ;; and see something that does not work do drop me a line, as I have ;; a smaller chance to notice this kind of bugs otherwise. +; [The above comment dates from 2011.] ;; Changelog: From cb035f348ecee23009461af9ce3aa6f92996684f Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Tue, 2 Feb 2016 05:16:34 +0100 Subject: [PATCH 23/56] Don't insert nil faces in shr * shr.el (shr-insert-table): Don't add nil faces, because that will show up in *Messages* as "Invalid face reference: nil [32 times]". --- lisp/net/shr.el | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/lisp/net/shr.el b/lisp/net/shr.el index 41c5f95700e..c600c745323 100644 --- a/lisp/net/shr.el +++ b/lisp/net/shr.el @@ -1754,17 +1754,18 @@ The preference is a float determined from `shr-prefer-media-type'." align))) (dolist (line lines) (end-of-line) - (let ((start (point))) - (insert - line - (propertize " " - 'display `(space :align-to (,pixel-align)) - 'face (and (> (length line) 0) - (shr-face-background - (get-text-property - (1- (length line)) 'face line))) - 'shr-table-indent shr-table-id) - shr-table-vertical-line) + (let ((start (point)) + (background (and (> (length line) 0) + (shr-face-background + (get-text-property + (1- (length line)) 'face line)))) + (space (propertize + " " + 'display `(space :align-to (,pixel-align)) + 'shr-table-indent shr-table-id))) + (when background + (setq space (propertize space 'face background))) + (insert line space shr-table-vertical-line) (shr-colorize-region start (1- (point)) (nth 5 column) (nth 6 column))) (forward-line 1)) From 9c3142dcc09841a8bd2c25a2ddd3a9121a5015b6 Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Tue, 2 Feb 2016 15:43:35 +1100 Subject: [PATCH 24/56] Clean up eww code slightly * eww.el (eww-browse-url): Clean up code slightly. --- lisp/net/eww.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lisp/net/eww.el b/lisp/net/eww.el index 29cde247e61..372b674ecd7 100644 --- a/lisp/net/eww.el +++ b/lisp/net/eww.el @@ -744,9 +744,9 @@ the like." ;;;###autoload (defun eww-browse-url (url &optional new-window) - (cond (new-window - (switch-to-buffer (generate-new-buffer "*eww*")) - (eww-mode))) + (when new-window + (switch-to-buffer (generate-new-buffer "*eww*")) + (eww-mode)) (eww url)) (defun eww-back-url () From ee0fbd854f452ef268de76892ed6b671c91f6d48 Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Tue, 2 Feb 2016 15:53:39 +1100 Subject: [PATCH 25/56] Make eww-browse-url with new-window parameter work again * eww.el (eww-browse-url): Stay in the same buffer if we're already in a eww mode buffer so that eww-browse-url with a new-window parameter works (bug#22244). --- lisp/net/eww.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lisp/net/eww.el b/lisp/net/eww.el index 372b674ecd7..128752a62ef 100644 --- a/lisp/net/eww.el +++ b/lisp/net/eww.el @@ -274,6 +274,10 @@ word(s) will be searched for via `eww-search-prefix'." (setq url (concat url "/")))) (setq url (concat eww-search-prefix (replace-regexp-in-string " " "+" url)))))) + (switch-to-buffer + (if (eq major-mode 'eww-mode) + (current-buffer) + (get-buffer-create "*eww*"))) (eww-setup-buffer) (plist-put eww-data :url url) (plist-put eww-data :title "") @@ -556,7 +560,6 @@ Currently this means either text/html or application/xhtml+xml." (goto-char (point-min))) (defun eww-setup-buffer () - (switch-to-buffer (get-buffer-create "*eww*")) (when (or (plist-get eww-data :url) (plist-get eww-data :dom)) (eww-save-history)) From 51362d68d14af92799c65198a690f769b04d456d Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Tue, 2 Feb 2016 15:57:07 +1100 Subject: [PATCH 26/56] Allow the user more control of popping up the eww window * eww.el (eww): Use pop-to-buffer-same-window (suggested by Michael Heerdegen) (bug#22244). --- lisp/net/eww.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/net/eww.el b/lisp/net/eww.el index 128752a62ef..147ba5fcda7 100644 --- a/lisp/net/eww.el +++ b/lisp/net/eww.el @@ -274,7 +274,7 @@ word(s) will be searched for via `eww-search-prefix'." (setq url (concat url "/")))) (setq url (concat eww-search-prefix (replace-regexp-in-string " " "+" url)))))) - (switch-to-buffer + (pop-to-buffer-same-window (if (eq major-mode 'eww-mode) (current-buffer) (get-buffer-create "*eww*"))) From 57134666465488819ac1fe0678484eefb9bd7853 Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Tue, 2 Feb 2016 18:00:02 +1100 Subject: [PATCH 27/56] Fix editing undo changes in eww fields * eww.el (eww-tag-form): Don't overwrite initial form data in text fields. (eww-process-text-input): Make `M-t' at the end of text fields work better (bug#19085). --- lisp/net/eww.el | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/lisp/net/eww.el b/lisp/net/eww.el index 147ba5fcda7..7f98b5b8c7b 100644 --- a/lisp/net/eww.el +++ b/lisp/net/eww.el @@ -921,6 +921,7 @@ network, but just re-display the HTML already fetched." (let ((eww-form (list (cons :method (dom-attr dom 'method)) (cons :action (dom-attr dom 'action)))) (start (point))) + (insert "\n") (shr-ensure-paragraph) (shr-generic dom) (unless (bolp) @@ -1030,6 +1031,7 @@ See URL `https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Input'.") (1- end))))) (let* ((form (get-text-property pos 'eww-form)) (properties (text-properties-at pos)) + (buffer-undo-list t) (inhibit-read-only t) (length (- end beg replace-length)) (type (plist-get form :type))) @@ -1050,13 +1052,13 @@ See URL `https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Input'.") ((< length 0) ;; Add padding. (save-excursion - (goto-char (1- end)) + (goto-char end) (goto-char (if (equal type "textarea") (1- (line-end-position)) (1+ (eww-end-of-field)))) (let ((start (point))) - (insert (make-string (abs length) ? )) + (insert (make-string (abs length) ? )) (set-text-properties start (point) properties)) (goto-char (1- end))))) (set-text-properties (plist-get form :start) (plist-get form :end) @@ -1070,8 +1072,9 @@ See URL `https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Input'.") (when (equal type "password") ;; Display passwords as asterisks. (let ((start (eww-beginning-of-field))) - (put-text-property start (+ start (length value)) - 'display (make-string (length value) ?*))))))))) + (put-text-property + start (+ start (length value)) + 'display (make-string (length value) ?*))))))))) (defun eww-tag-textarea (dom) (let ((start (point)) From c04e91134f256be298d8739d493aa8df7e8d05ec Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 1 Feb 2016 23:45:10 -0800 Subject: [PATCH 28/56] Add --git-config option to autogen.sh * autogen.sh: New options --git-config, --help. (git_config): New shell var. Alter function to respect this var. --- autogen.sh | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/autogen.sh b/autogen.sh index 42a779ea8c8..4a0fbb791e9 100755 --- a/autogen.sh +++ b/autogen.sh @@ -104,6 +104,21 @@ check_version () } +git_config=true + +for arg +do + case $arg in + --git-config=false) git_config=false;; + --git-config=true) git_config=true ;; + --help) + exec echo "$0: usage: $0 [--help|--git-config=[false|true]]";; + *) + echo >&2 "$0: $arg: unknown option"; exit 1;; + esac +done + + cat < src/stamp-h.in || exit ## Configure Git, if using Git. if test -d .git && (git status -s) >/dev/null 2>&1; then - # Like 'git config NAME VALUE', but verbose on change and exit on failure. + # Like 'git config NAME VALUE', but conditional on --git-config, + # verbose on change, and exiting on failure. git_config () { name=$1 value=$2 - ovalue=`git config --get "$name"` && test "$ovalue" = "$value" || { + + if $git_config; then + ovalue=`git config --get "$name"` && test "$ovalue" = "$value" || { echo "${Configuring_git}git config $name '$value'" Configuring_git= git config "$name" "$value" || exit - } + } + fi } Configuring_git='Configuring git... ' From 58bfb6a4f597b98f01169f42410df3184c451408 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Tue, 2 Feb 2016 19:16:22 +0200 Subject: [PATCH 29/56] More improvements for Ruby support in 'etags' * lib-src/etags.c (Ruby_functions): Tag Ruby accessors and alias_method. Identify constants even if the assignment is not followed by whitespace. (Bug#22241) * test/etags/ruby-src/test1.ruby: Add tests for constants, accessors, and alias_method. * test/etags/ETAGS.good_1: * test/etags/ETAGS.good_2: * test/etags/ETAGS.good_3: * test/etags/ETAGS.good_4: * test/etags/ETAGS.good_5: * test/etags/ETAGS.good_6: * test/etags/CTAGS.good: Adapt to changes in Ruby tests. --- lib-src/etags.c | 58 ++++++++++++++++++++++++++++++++-- test/etags/CTAGS.good | 14 +++++++- test/etags/ETAGS.good_1 | 22 ++++++++++--- test/etags/ETAGS.good_2 | 22 ++++++++++--- test/etags/ETAGS.good_3 | 22 ++++++++++--- test/etags/ETAGS.good_4 | 22 ++++++++++--- test/etags/ETAGS.good_5 | 22 ++++++++++--- test/etags/ETAGS.good_6 | 22 ++++++++++--- test/etags/ruby-src/test1.ruby | 9 ++++++ 9 files changed, 180 insertions(+), 33 deletions(-) diff --git a/lib-src/etags.c b/lib-src/etags.c index bdfced5bc9c..769a22027f7 100644 --- a/lib-src/etags.c +++ b/lib-src/etags.c @@ -4642,7 +4642,7 @@ Ruby_functions (FILE *inf) if (cp > name + 1) { bp = skip_spaces (cp); - if (*bp == '=' && c_isspace (bp[1])) + if (*bp == '=' && !(bp[1] == '=' || bp[1] == '>')) { if (colon && !c_isspace (colon[1])) name = colon + 1; @@ -4656,7 +4656,7 @@ Ruby_functions (FILE *inf) || LOOKING_AT (cp, "module")) { const char self_name[] = "self."; - const size_t self_size1 = sizeof ("self.") - 1; + const size_t self_size1 = sizeof (self_name) - 1; name = cp; @@ -4688,6 +4688,60 @@ Ruby_functions (FILE *inf) make_tag (name, cp - name, true, lb.buffer, cp - lb.buffer + 1, lineno, linecharno); } + else + { + /* Tag accessors and aliases. */ + while (*cp && *cp != '#') + { + bool reader = false, writer = false, alias = false; + + if (LOOKING_AT (cp, "attr_reader")) + reader = true; + else if (LOOKING_AT (cp, "attr_writer")) + writer = true; + else if (LOOKING_AT (cp, "attr_accessor")) + { + reader = true; + writer = true; + } + else if (LOOKING_AT (cp, "alias_method")) + alias = true; + if (reader || writer || alias) + { + do { + char *np = cp; + + cp = skip_name (cp); + if (reader) + make_tag (np, cp - np, true, + lb.buffer, cp - lb.buffer + 1, + lineno, linecharno); + if (writer) + { + size_t name_len = cp - np + 1; + char *wr_name = xnew (name_len + 1, char); + + memcpy (wr_name, np, name_len - 1); + memcpy (wr_name + name_len - 1, "=", 2); + pfnote (wr_name, true, lb.buffer, cp - lb.buffer + 1, + lineno, linecharno); + } + if (alias) + { + make_tag (np, cp - np, true, + lb.buffer, cp - lb.buffer + 1, + lineno, linecharno); + while (*cp && *cp != '#' && *cp != ';') + cp++; + } + } while (*cp == ',' + && (cp = skip_spaces (cp + 1), *cp && *cp != '#')); + } + cp = skip_name (cp); + while (*cp && *cp != '#' && notinname (*cp)) + cp++; + } + } } } diff --git a/test/etags/CTAGS.good b/test/etags/CTAGS.good index 846725ef713..c4962a7a207 100644 --- a/test/etags/CTAGS.good +++ b/test/etags/CTAGS.good @@ -177,6 +177,15 @@ $user_comment_lc php-src/lce_functions.php 115 /wh ps-src/rfc1245.ps /^\/wh { $/ /yen ps-src/rfc1245.ps /^\/yen \/.notdef \/.notdef \/.notdef \/.notdef \/.notdef / :a-forth-dictionary-entry forth-src/test-forth.fth /^create :a-forth-dictionary-entry$/ +:bar= ruby-src/test1.ruby /^ attr_writer :bar$/ +:foo ruby-src/test1.ruby /^ attr_reader :foo$/ +:qux ruby-src/test1.ruby /^ alias_method :qux, :tee$/ +:read1 ruby-src/test1.ruby /^ attr_reader :read1, :read2; attr_writer :wri/ +:read2 ruby-src/test1.ruby /^ attr_reader :read1, :read2; attr_writer :wri/ +:tee ruby-src/test1.ruby /^ attr_accessor :tee$/ +:tee= ruby-src/test1.ruby /^ attr_accessor :tee$/ +:write1= ruby-src/test1.ruby /^ attr_reader :read1, :read2; attr_writer :wri/ +:write2= ruby-src/test1.ruby /^ attr_reader :read1, :read2; attr_writer :wri/ < tex-src/texinfo.tex /^\\def<{{\\tt \\less}}$/ << ruby-src/test.rb /^ def <<(y)$/ <= ruby-src/test.rb /^ def <=(y)$/ @@ -460,7 +469,7 @@ Condition_Variable/t ada-src/2ataspri.ads /^ type Condition_Variable is privat Condition_Variable/t ada-src/2ataspri.ads /^ type Condition_Variable is$/ Configure pyt-src/server.py /^class Configure(Frame, ControlEdit):$/ ConfirmQuit pyt-src/server.py /^def ConfirmQuit(frame, context):$/ -Constant ruby-src/test1.ruby 26 +Constant ruby-src/test1.ruby 35 ControlEdit pyt-src/server.py /^class ControlEdit(Frame):$/ Controls pyt-src/server.py /^class Controls:$/ CopyTextString pas-src/common.pas /^function CopyTextString;(*($/ @@ -522,6 +531,7 @@ DOS_NT c-src/etags.c 117 DOS_NT c-src/etags.c 118 DUMPED c-src/emacs/src/gmalloc.c 80 Debug cp-src/functions.cpp /^void Debug ( int lineno, int level, char* func , c/ +Def_ ruby-src/test1.ruby 12 DisposeANameList pas-src/common.pas /^procedure DisposeANameList( $/ DisposeNameList pas-src/common.pas /^procedure DisposeNameList;$/ ELEM_I c-src/h.h 3 @@ -1457,6 +1467,7 @@ WorkingDays cp-src/functions.cpp /^int WorkingDays(Date a, Date b){$/ Write_Lock/p ada-src/2ataspri.adb /^ procedure Write_Lock (L : in out Lock; Ceiling_/ Write_Lock/p ada-src/2ataspri.ads /^ procedure Write_Lock (L : in out Lock; Ceiling_/ X c-src/h.h 100 +X ruby-src/test1.ruby /^ def X$/ XBOOL_VECTOR c-src/emacs/src/lisp.h /^XBOOL_VECTOR (Lisp_Object a)$/ XBUFFER c-src/emacs/src/lisp.h /^XBUFFER (Lisp_Object a)$/ XBUFFER_OBJFWD c-src/emacs/src/lisp.h /^XBUFFER_OBJFWD (union Lisp_Fwd *a)$/ @@ -1534,6 +1545,7 @@ XUNTAG c-src/emacs/src/lisp.h /^# define XUNTAG(a, type) lisp_h_XUNTAG (a, type XUNTAG c-src/emacs/src/lisp.h /^XUNTAG (Lisp_Object a, int type)$/ XWINDOW c-src/emacs/src/lisp.h /^XWINDOW (Lisp_Object a)$/ XX cp-src/x.cc 1 +Xyzzy ruby-src/test1.ruby 13 Y c-src/h.h 100 YACC c-src/etags.c 2199 YELLOW cp-src/screen.hpp 26 diff --git a/test/etags/ETAGS.good_1 b/test/etags/ETAGS.good_1 index c7b122111c4..435cd08da89 100644 --- a/test/etags/ETAGS.good_1 +++ b/test/etags/ETAGS.good_1 @@ -3009,17 +3009,29 @@ module ModuleExample1,0 def module_instance_method46,1051 def ModuleExample.module_class_methodmodule_class_method49,1131 -ruby-src/test1.ruby,191 +ruby-src/test1.ruby,635 class A1,0 def a(2,8 def b(5,38 module A9,57 class B10,66 ABC 11,76 - def foo!13,89 - def self._bar?(_bar?16,111 - def qux=(qux=20,162 -A::Constant Constant26,211 + Def_ 12,88 + Xyzzy 13,106 + def foo!15,121 + def self._bar?(_bar?18,143 + def qux=(qux=22,194 + def X25,232 + attr_reader :foo26,242 + attr_reader :read1,27,265 + attr_reader :read1, :read2;27,265 + attr_reader :read1, :read2; attr_writer :write1,:write1=27,265 + attr_reader :read1, :read2; attr_writer :write1, :write2:write2=27,265 + attr_writer :bar:bar=28,328 + attr_accessor :tee29,351 + attr_accessor :tee:tee=29,351 + alias_method :qux,30,376 +A::Constant Constant35,425 tex-src/testenv.tex,52 \newcommand{\nm}\nm4,77 diff --git a/test/etags/ETAGS.good_2 b/test/etags/ETAGS.good_2 index 8d0f33824a4..4abdc9098af 100644 --- a/test/etags/ETAGS.good_2 +++ b/test/etags/ETAGS.good_2 @@ -3580,17 +3580,29 @@ module ModuleExample1,0 def module_instance_method46,1051 def ModuleExample.module_class_methodmodule_class_method49,1131 -ruby-src/test1.ruby,191 +ruby-src/test1.ruby,635 class A1,0 def a(2,8 def b(5,38 module A9,57 class B10,66 ABC 11,76 - def foo!13,89 - def self._bar?(_bar?16,111 - def qux=(qux=20,162 -A::Constant Constant26,211 + Def_ 12,88 + Xyzzy 13,106 + def foo!15,121 + def self._bar?(_bar?18,143 + def qux=(qux=22,194 + def X25,232 + attr_reader :foo26,242 + attr_reader :read1,27,265 + attr_reader :read1, :read2;27,265 + attr_reader :read1, :read2; attr_writer :write1,:write1=27,265 + attr_reader :read1, :read2; attr_writer :write1, :write2:write2=27,265 + attr_writer :bar:bar=28,328 + attr_accessor :tee29,351 + attr_accessor :tee:tee=29,351 + alias_method :qux,30,376 +A::Constant Constant35,425 tex-src/testenv.tex,52 \newcommand{\nm}\nm4,77 diff --git a/test/etags/ETAGS.good_3 b/test/etags/ETAGS.good_3 index 060389c6232..94815caf489 100644 --- a/test/etags/ETAGS.good_3 +++ b/test/etags/ETAGS.good_3 @@ -3356,17 +3356,29 @@ module ModuleExample1,0 def module_instance_method46,1051 def ModuleExample.module_class_methodmodule_class_method49,1131 -ruby-src/test1.ruby,191 +ruby-src/test1.ruby,635 class A1,0 def a(2,8 def b(5,38 module A9,57 class B10,66 ABC 11,76 - def foo!13,89 - def self._bar?(_bar?16,111 - def qux=(qux=20,162 -A::Constant Constant26,211 + Def_ 12,88 + Xyzzy 13,106 + def foo!15,121 + def self._bar?(_bar?18,143 + def qux=(qux=22,194 + def X25,232 + attr_reader :foo26,242 + attr_reader :read1,27,265 + attr_reader :read1, :read2;27,265 + attr_reader :read1, :read2; attr_writer :write1,:write1=27,265 + attr_reader :read1, :read2; attr_writer :write1, :write2:write2=27,265 + attr_writer :bar:bar=28,328 + attr_accessor :tee29,351 + attr_accessor :tee:tee=29,351 + alias_method :qux,30,376 +A::Constant Constant35,425 tex-src/testenv.tex,52 \newcommand{\nm}\nm4,77 diff --git a/test/etags/ETAGS.good_4 b/test/etags/ETAGS.good_4 index 40404f9fc6e..f71e1b0a432 100644 --- a/test/etags/ETAGS.good_4 +++ b/test/etags/ETAGS.good_4 @@ -3173,17 +3173,29 @@ module ModuleExample1,0 def module_instance_method46,1051 def ModuleExample.module_class_methodmodule_class_method49,1131 -ruby-src/test1.ruby,191 +ruby-src/test1.ruby,635 class A1,0 def a(2,8 def b(5,38 module A9,57 class B10,66 ABC 11,76 - def foo!13,89 - def self._bar?(_bar?16,111 - def qux=(qux=20,162 -A::Constant Constant26,211 + Def_ 12,88 + Xyzzy 13,106 + def foo!15,121 + def self._bar?(_bar?18,143 + def qux=(qux=22,194 + def X25,232 + attr_reader :foo26,242 + attr_reader :read1,27,265 + attr_reader :read1, :read2;27,265 + attr_reader :read1, :read2; attr_writer :write1,:write1=27,265 + attr_reader :read1, :read2; attr_writer :write1, :write2:write2=27,265 + attr_writer :bar:bar=28,328 + attr_accessor :tee29,351 + attr_accessor :tee:tee=29,351 + alias_method :qux,30,376 +A::Constant Constant35,425 tex-src/testenv.tex,52 \newcommand{\nm}\nm4,77 diff --git a/test/etags/ETAGS.good_5 b/test/etags/ETAGS.good_5 index 432819d3b32..d51542c3a93 100644 --- a/test/etags/ETAGS.good_5 +++ b/test/etags/ETAGS.good_5 @@ -4091,17 +4091,29 @@ module ModuleExample1,0 def module_instance_method46,1051 def ModuleExample.module_class_methodmodule_class_method49,1131 -ruby-src/test1.ruby,191 +ruby-src/test1.ruby,635 class A1,0 def a(2,8 def b(5,38 module A9,57 class B10,66 ABC 11,76 - def foo!13,89 - def self._bar?(_bar?16,111 - def qux=(qux=20,162 -A::Constant Constant26,211 + Def_ 12,88 + Xyzzy 13,106 + def foo!15,121 + def self._bar?(_bar?18,143 + def qux=(qux=22,194 + def X25,232 + attr_reader :foo26,242 + attr_reader :read1,27,265 + attr_reader :read1, :read2;27,265 + attr_reader :read1, :read2; attr_writer :write1,:write1=27,265 + attr_reader :read1, :read2; attr_writer :write1, :write2:write2=27,265 + attr_writer :bar:bar=28,328 + attr_accessor :tee29,351 + attr_accessor :tee:tee=29,351 + alias_method :qux,30,376 +A::Constant Constant35,425 tex-src/testenv.tex,52 \newcommand{\nm}\nm4,77 diff --git a/test/etags/ETAGS.good_6 b/test/etags/ETAGS.good_6 index 4ad5d76db27..84b73198a4c 100644 --- a/test/etags/ETAGS.good_6 +++ b/test/etags/ETAGS.good_6 @@ -4091,17 +4091,29 @@ module ModuleExample1,0 def module_instance_method46,1051 def ModuleExample.module_class_methodmodule_class_method49,1131 -ruby-src/test1.ruby,191 +ruby-src/test1.ruby,635 class A1,0 def a(2,8 def b(5,38 module A9,57 class B10,66 ABC 11,76 - def foo!13,89 - def self._bar?(_bar?16,111 - def qux=(qux=20,162 -A::Constant Constant26,211 + Def_ 12,88 + Xyzzy 13,106 + def foo!15,121 + def self._bar?(_bar?18,143 + def qux=(qux=22,194 + def X25,232 + attr_reader :foo26,242 + attr_reader :read1,27,265 + attr_reader :read1, :read2;27,265 + attr_reader :read1, :read2; attr_writer :write1,:write1=27,265 + attr_reader :read1, :read2; attr_writer :write1, :write2:write2=27,265 + attr_writer :bar:bar=28,328 + attr_accessor :tee29,351 + attr_accessor :tee:tee=29,351 + alias_method :qux,30,376 +A::Constant Constant35,425 tex-src/testenv.tex,52 \newcommand{\nm}\nm4,77 diff --git a/test/etags/ruby-src/test1.ruby b/test/etags/ruby-src/test1.ruby index 26b7d538b64..75dcd51bbe0 100644 --- a/test/etags/ruby-src/test1.ruby +++ b/test/etags/ruby-src/test1.ruby @@ -9,6 +9,8 @@ end module A class B ABC = 4 + Def_ = 'blah' + Xyzzy =10 def foo! end @@ -20,6 +22,13 @@ module A def qux=(tee) end end + def X + attr_reader :foo + attr_reader :read1, :read2; attr_writer :write1, :write2 + attr_writer :bar + attr_accessor :tee + alias_method :qux, :tee + end end end From e42e662f26523ba0d10c41ab6deead85077c9f79 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Tue, 2 Feb 2016 19:50:08 +0200 Subject: [PATCH 30/56] Change Ruby file names and extensions recognized by 'etags' * lib-src/etags.c : New variable, holds names of Ruby files. : Treat .rb, .ru, and .rbw as Ruby extensions. : Add Ruby_filenames to the Ruby entry. * test/etags/ruby-src/test1.ru: Renamed from test1.ruby. (Bug#22241) --- lib-src/etags.c | 6 ++++-- test/etags/ruby-src/{test1.ruby => test1.ru} | 0 2 files changed, 4 insertions(+), 2 deletions(-) rename test/etags/ruby-src/{test1.ruby => test1.ru} (100%) diff --git a/lib-src/etags.c b/lib-src/etags.c index 769a22027f7..acf20ddceb9 100644 --- a/lib-src/etags.c +++ b/lib-src/etags.c @@ -729,7 +729,9 @@ static const char Python_help [] = generate a tag."; static const char *Ruby_suffixes [] = - { "rb", "ruby", NULL }; + { "rb", "ru", "rbw", NULL }; +static const char *Ruby_filenames [] = + { "Rakefile", "Thorfile", NULL }; static const char Ruby_help [] = "In Ruby code, 'def' or 'class' or 'module' at the beginning of\n\ a line generate a tag. Constants also generate a tag."; @@ -813,7 +815,7 @@ static language lang_names [] = { "proc", no_lang_help, plain_C_entries, plain_C_suffixes }, { "prolog", Prolog_help, Prolog_functions, Prolog_suffixes }, { "python", Python_help, Python_functions, Python_suffixes }, - { "ruby", Ruby_help, Ruby_functions, Ruby_suffixes }, + { "ruby", Ruby_help,Ruby_functions,Ruby_suffixes,Ruby_filenames }, { "scheme", Scheme_help, Scheme_functions, Scheme_suffixes }, { "tex", TeX_help, TeX_commands, TeX_suffixes }, { "texinfo", Texinfo_help, Texinfo_nodes, Texinfo_suffixes }, diff --git a/test/etags/ruby-src/test1.ruby b/test/etags/ruby-src/test1.ru similarity index 100% rename from test/etags/ruby-src/test1.ruby rename to test/etags/ruby-src/test1.ru From f6213ce79981747b3cb2c8213710986b93999fe5 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Tue, 2 Feb 2016 20:01:33 +0200 Subject: [PATCH 31/56] Fix file-name recognition in 'etags' * lib-src/etags.c (get_language_from_filename): If FILE includes a leading directory, compare only its basename to the known file names in lang_names[]. * test/etags/Makefile (RBSRC): Adapt to recent test1.ruby renaming. * test/etags/ETAGS.good_1: * test/etags/ETAGS.good_2: * test/etags/ETAGS.good_3: * test/etags/ETAGS.good_4: * test/etags/ETAGS.good_5: * test/etags/ETAGS.good_6: * test/etags/CTAGS.good: Adapt to changes in Ruby file names and to the results in Makefile due to the above etags.c fix. --- lib-src/etags.c | 8 ++ test/etags/CTAGS.good | 180 ++++++++++++++++++++++++++-------------- test/etags/ETAGS.good_1 | 128 +++++++++++++++++++--------- test/etags/ETAGS.good_2 | 129 +++++++++++++++++++--------- test/etags/ETAGS.good_3 | 128 +++++++++++++++++++--------- test/etags/ETAGS.good_4 | 128 +++++++++++++++++++--------- test/etags/ETAGS.good_5 | 129 +++++++++++++++++++--------- test/etags/ETAGS.good_6 | 129 +++++++++++++++++++--------- test/etags/Makefile | 2 +- 9 files changed, 665 insertions(+), 296 deletions(-) diff --git a/lib-src/etags.c b/lib-src/etags.c index acf20ddceb9..760685a6693 100644 --- a/lib-src/etags.c +++ b/lib-src/etags.c @@ -1485,8 +1485,16 @@ get_language_from_filename (char *file, int case_sensitive) { language *lang; const char **name, **ext, *suffix; + char *slash; /* Try whole file name first. */ + slash = strrchr (file, '/'); + if (slash != NULL) + file = slash + 1; +#ifdef DOS_NT + else if (file[0] && file[1] == ':') + file += 2; +#endif for (lang = lang_names; lang->name != NULL; lang++) if (lang->filenames != NULL) for (name = lang->filenames; *name != NULL; name++) diff --git a/test/etags/CTAGS.good b/test/etags/CTAGS.good index c4962a7a207..ac577e4acfd 100644 --- a/test/etags/CTAGS.good +++ b/test/etags/CTAGS.good @@ -1,17 +1,5 @@ #a-defer-word forth-src/test-forth.fth /^defer #a-defer-word$/ #some-storage forth-src/test-forth.fth /^2000 buffer: #some-storage$/ -$ make-src/Makefile /^ @-$(MAKE) OPTIONS='--no-members' ${LATEST}ediff$/ -$ make-src/Makefile /^ @-$(MAKE) OPTIONS='--declarations --no-members' $/ -$ make-src/Makefile /^ @-$(MAKE) OPTIONS='--members' ${LATEST}ediff$/ -$ make-src/Makefile /^ @-$(MAKE) OPTIONS='--regex=@regexfile --no-member/ -$ make-src/Makefile /^ @-$(MAKE) OPTIONS='nonexistent --members --declar/ -$ make-src/Makefile /^ @-$(MAKE) ${LATEST}cdiff$/ -$ make-src/Makefile /^ $(CC) ${FASTCFLAGS} -c $?$/ -$ make-src/Makefile /^ $(CC) ${FASTCFLAGS} -c $?$/ -$ make-src/Makefile /^ $(CC) ${FASTCFLAGS} -c $?$/ -$ make-src/Makefile /^ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o etags e/ -$ make-src/Makefile /^ $(CC) $(CFLAGS) $(CPPFLAGS) -DCTAGS $(LDFLAGS) -o/ -$$i make-src/Makefile 140 $0x80 c-src/sysdep.h 32 $SYS_##syscall_na c-src/sysdep.h 31 $domain php-src/lce_functions.php 175 @@ -41,6 +29,9 @@ $unk_comment_lc php-src/lce_functions.php 117 $user_comment php-src/lce_functions.php 109 $user_comment php-src/lce_functions.php 167 $user_comment_lc php-src/lce_functions.php 115 +${CHECKOBJS} make-src/Makefile /^${CHECKOBJS}: CFLAGS=-g3 -DNULLFREECHECK=0$/ +%cdiff make-src/Makefile /^%cdiff: CTAGS% CTAGS ${infiles}$/ +%ediff make-src/Makefile /^%ediff: ETAGS% ETAGS ${infiles}$/ ($_,$flag,$opt,$f,$r,@temp perl-src/yagrip.pl 8 ($prog,$_,@list perl-src/yagrip.pl 39 ($string,$flag,@string,@temp,@last perl-src/yagrip.pl 40 @@ -48,6 +39,7 @@ $user_comment_lc php-src/lce_functions.php 115 (another-forth-word forth-src/test-forth.fth /^: (another-forth-word) ( -- )$/ + ruby-src/test.rb /^ def +(y)$/ + tex-src/texinfo.tex /^\\def+{{\\tt \\char 43}}$/ +.PRECIOUS make-src/Makefile /^.PRECIOUS: ETAGS CTAGS ETAGS16 CTAGS16 ETAGS17 CTA/ /.notdef ps-src/rfc1245.ps /^\/.notdef \/.notdef \/.notdef \/.notdef \/.notdef \/.not/ /.notdef ps-src/rfc1245.ps /^\/.notdef \/.notdef \/.notdef \/.notdef \/.notdef \/.not/ /.notdef ps-src/rfc1245.ps /^\/.notdef \/.notdef \/.notdef \/.notdef \/.notdef \/.not/ @@ -138,6 +130,8 @@ $user_comment_lc php-src/lce_functions.php 115 /graymode ps-src/rfc1245.ps /^\/graymode true def$/ /grayness ps-src/rfc1245.ps /^\/grayness {$/ /guillemotleft ps-src/rfc1245.ps /^\/guillemotleft \/guillemotright \/ellipsis \/.notdef / +/home/www/pub/etags.c.gz make-src/Makefile /^\/home\/www\/pub\/etags.c.gz: etags.c$/ +/home/www/pub/software/unix/etags.tar.gz make-src/Makefile /^\/home\/www\/pub\/software\/unix\/etags.tar.gz: Makefile/ /hx ps-src/rfc1245.ps /^\/hx { $/ /i ps-src/rfc1245.ps /^\/i \/j \/k \/l \/m \/n \/o \/p \/q \/r \/s \/t \/u \/v \/w \/x \/y/ /iacute ps-src/rfc1245.ps /^\/iacute \/igrave \/icircumflex \/idieresis \/ntilde \/o/ @@ -177,15 +171,15 @@ $user_comment_lc php-src/lce_functions.php 115 /wh ps-src/rfc1245.ps /^\/wh { $/ /yen ps-src/rfc1245.ps /^\/yen \/.notdef \/.notdef \/.notdef \/.notdef \/.notdef / :a-forth-dictionary-entry forth-src/test-forth.fth /^create :a-forth-dictionary-entry$/ -:bar= ruby-src/test1.ruby /^ attr_writer :bar$/ -:foo ruby-src/test1.ruby /^ attr_reader :foo$/ -:qux ruby-src/test1.ruby /^ alias_method :qux, :tee$/ -:read1 ruby-src/test1.ruby /^ attr_reader :read1, :read2; attr_writer :wri/ -:read2 ruby-src/test1.ruby /^ attr_reader :read1, :read2; attr_writer :wri/ -:tee ruby-src/test1.ruby /^ attr_accessor :tee$/ -:tee= ruby-src/test1.ruby /^ attr_accessor :tee$/ -:write1= ruby-src/test1.ruby /^ attr_reader :read1, :read2; attr_writer :wri/ -:write2= ruby-src/test1.ruby /^ attr_reader :read1, :read2; attr_writer :wri/ +:bar= ruby-src/test1.ru /^ attr_writer :bar$/ +:foo ruby-src/test1.ru /^ attr_reader :foo$/ +:qux ruby-src/test1.ru /^ alias_method :qux, :tee$/ +:read1 ruby-src/test1.ru /^ attr_reader :read1, :read2; attr_writer :wri/ +:read2 ruby-src/test1.ru /^ attr_reader :read1, :read2; attr_writer :wri/ +:tee ruby-src/test1.ru /^ attr_accessor :tee$/ +:tee= ruby-src/test1.ru /^ attr_accessor :tee$/ +:write1= ruby-src/test1.ru /^ attr_reader :read1, :read2; attr_writer :wri/ +:write2= ruby-src/test1.ru /^ attr_reader :read1, :read2; attr_writer :wri/ < tex-src/texinfo.tex /^\\def<{{\\tt \\less}}$/ << ruby-src/test.rb /^ def <<(y)$/ <= ruby-src/test.rb /^ def <=(y)$/ @@ -216,16 +210,6 @@ $user_comment_lc php-src/lce_functions.php 115 > tex-src/texinfo.tex /^\\def>{{\\tt \\gtr}}$/ >field1 forth-src/test-forth.fth /^ 9 field >field1$/ >field2 forth-src/test-forth.fth /^ 5 field >field2$/ -@$ make-src/Makefile /^ @$(MAKE) OPTIONS='--no-members' ${LATEST}ediff$/ -@$ make-src/Makefile /^ @$(MAKE) OPTIONS='--declarations --no-members' ${/ -@$ make-src/Makefile /^ @$(MAKE) OPTIONS='--members' ${LATEST}ediff$/ -@$ make-src/Makefile /^ @$(MAKE) OPTIONS='--regex=@regexfile --no-members/ -@$ make-src/Makefile /^ @$(MAKE) OPTIONS='nonexistent --members --declara/ -@$ make-src/Makefile /^ @$(MAKE) ${LATEST}cdiff$/ -@$ make-src/Makefile /^ @$(MAKE) etags "CPPFLAGS=-UVERSION"$/ -@$ make-src/Makefile /^ @$(MAKE) CHECKOBJS= CHECKFLAGS= etags "CFLAGS=-an/ -@$ make-src/Makefile /^ @$(MAKE) CHECKOBJS= CHECKFLAGS= ctags "CFLAGS=-an/ -@$ make-src/Makefile /^ @$(MAKE) etags CHECKOBJS= CHECKFLAGS= REGEXOBJS= / A c.c 162 A cp-src/c.C 39 A cp-src/c.C 56 @@ -235,9 +219,10 @@ A cp-src/c.C 73 A cp-src/c.C 117 A cp-src/fail.C 7 A cp-src/fail.C 23 -A ruby-src/test1.ruby /^class A$/ -A ruby-src/test1.ruby /^module A$/ -ABC ruby-src/test1.ruby 11 +A ruby-src/test1.ru /^class A$/ +A ruby-src/test1.ru /^module A$/ +ABC ruby-src/test1.ru 11 +ADASRC make-src/Makefile /^ADASRC=etags-test-for.ada 2ataspri.adb 2ataspri.ad/ ADDRESS c-src/emacs/src/gmalloc.c /^#define ADDRESS(B) ((void *) (((B) - 1) * BLOCKSIZ/ ALIGNOF_STRUCT_LISP_VECTOR c-src/emacs/src/lisp.h 1378 ALLOCATED_BEFORE_DUMPING c-src/emacs/src/gmalloc.c /^#define ALLOCATED_BEFORE_DUMPING(P) \\$/ @@ -247,6 +232,7 @@ AND y-src/cccp.c 11 ANSIC c-src/h.h 84 ANSIC c-src/h.h 85 AREF c-src/emacs/src/lisp.h /^AREF (Lisp_Object array, ptrdiff_t idx)$/ +ARGS make-src/Makefile /^ARGS=- < srclist$/ ARITH_EQUAL c-src/emacs/src/lisp.h 3498 ARITH_GRTR c-src/emacs/src/lisp.h 3501 ARITH_GRTR_OR_EQUAL c-src/emacs/src/lisp.h 3503 @@ -259,6 +245,7 @@ ARRAY_MARK_FLAG c-src/emacs/src/lisp.h 768 ASCII_CHAR_P c-src/emacs/src/lisp.h /^#define ASCII_CHAR_P(c) UNSIGNED_CMP (c, <, 0x80)$/ ASET c-src/emacs/src/lisp.h /^ASET (Lisp_Object array, ptrdiff_t idx, Lisp_Objec/ ASIZE c-src/emacs/src/lisp.h /^ASIZE (Lisp_Object array)$/ +ASRC make-src/Makefile /^ASRC=empty.zz empty.zz.gz$/ AST_Array::AST_Array cp-src/c.C /^AST_Array::AST_Array(UTL_ScopedName *n, unsigned l/ AST_ConcreteType::AST_ConcreteType cp-src/c.C /^AST_ConcreteType::AST_ConcreteType(AST_Decl::NodeT/ AST_Root cp-src/c.C 92 @@ -300,7 +287,7 @@ B cp-src/c.C /^void B::B() {}$/ B cp-src/c.C 122 B cp-src/fail.C 8 B cp-src/fail.C 24 -B ruby-src/test1.ruby /^ class B$/ +B ruby-src/test1.ru /^ class B$/ BE_Node cp-src/c.C /^void BE_Node::BE_Node() {}$/ BE_Node cp-src/c.C 77 BITS_PER_BITS_WORD c-src/emacs/src/lisp.h 125 @@ -349,7 +336,7 @@ CAR_SAFE c-src/emacs/src/lisp.h /^CAR_SAFE (Lisp_Object c)$/ CATCHER c-src/emacs/src/lisp.h 3021 CDR c-src/emacs/src/lisp.h /^CDR (Lisp_Object c)$/ CDR_SAFE c-src/emacs/src/lisp.h /^CDR_SAFE (Lisp_Object c)$/ -CFLAGS make-src/Makefile 88 +CFLAGS make-src/Makefile /^CFLAGS=${WARNINGS} -ansi -g3 # -pg -O$/ CHAR c-src/etags.c /^#define CHAR(x) ((unsigned int)(x) & (CHARS - 1))/ CHAR y-src/cccp.c 7 CHARACTERBITS c-src/emacs/src/lisp.h 2457 @@ -377,7 +364,8 @@ CHAR_TABLE_SET c-src/emacs/src/lisp.h /^CHAR_TABLE_SET (Lisp_Object ct, int idx, CHAR_TABLE_STANDARD_SLOTS c-src/emacs/src/lisp.h 1697 CHAR_TYPE_SIZE cccp.y 87 CHAR_TYPE_SIZE y-src/cccp.y 87 -CHECKEROPTS make-src/Makefile 92 +CHECKFLAGS make-src/Makefile /^CHECKFLAGS=-DDEBUG -Wno-unused-function$/ +CHECKOBJS make-src/Makefile /^CHECKOBJS=chkmalloc.o chkxm.o$/ CHECK_ARRAY c-src/emacs/src/lisp.h /^CHECK_ARRAY (Lisp_Object x, Lisp_Object predicate)/ CHECK_BOOL_VECTOR c-src/emacs/src/lisp.h /^CHECK_BOOL_VECTOR (Lisp_Object x)$/ CHECK_BUFFER c-src/emacs/src/lisp.h /^CHECK_BUFFER (Lisp_Object x)$/ @@ -416,6 +404,7 @@ CK_REL_R parse.y /^#define CK_REL_R(x) if( ((x)>0 && MAX_ROW-(x)$/ test go-src/test1.go /^func test(p plus) {$/ +test make-src/Makefile /^test:$/ test php-src/ptest.php /^test $/ test.me22b lua-src/test.lua /^ local function test.me22b (one)$/ test.me_22a lua-src/test.lua /^ function test.me_22a(one, two)$/ @@ -4386,15 +4439,12 @@ warning cccp.y /^warning (msg)$/ warning y-src/cccp.y /^warning (msg)$/ weak c-src/emacs/src/lisp.h 1830 weak_alias c-src/emacs/src/gmalloc.c /^weak_alias (free, cfree)$/ +web ftp publish make-src/Makefile /^web ftp publish:$/ what c-src/etags.c 252 wheel_syms c-src/emacs/src/keyboard.c 4628 where c-src/emacs/src/lisp.h 2348 where cp-src/clheir.hpp 77 where_in_registry cp-src/clheir.hpp 15 -width make-src/Makefile 186 -width make-src/Makefile 189 -width make-src/Makefile 192 -width make-src/Makefile 195 windowWillClose objcpp-src/SimpleCalc.M /^- windowWillClose:sender$/ wipe_kboard c-src/emacs/src/keyboard.c /^wipe_kboard (KBOARD *kb)$/ womboid c-src/h.h 63 @@ -4432,6 +4482,7 @@ x-get-selection-internal c.c /^DEFUN ("x-get-selection-internal", Fx_get_selecti x-get-selection-internal c.c /^ Fx_get_selection_internal, Sx_get_selection/ xcar_addr c-src/emacs/src/lisp.h /^xcar_addr (Lisp_Object c)$/ xcdr_addr c-src/emacs/src/lisp.h /^xcdr_addr (Lisp_Object c)$/ +xdiff make-src/Makefile /^xdiff: ETAGS EXTAGS ${infiles}$/ xmalloc c-src/etags.c /^xmalloc (size_t size)$/ xnew c-src/etags.c /^#define xnew(n, Type) ((Type *) xmalloc ((n) / xrealloc c-src/etags.c /^xrealloc (void *ptr, size_t size)$/ @@ -4440,6 +4491,7 @@ xref-location-line el-src/emacs/lisp/progmodes/etags.el /^(cl-defmethod xref-loc xref-location-marker el-src/emacs/lisp/progmodes/etags.el /^(cl-defmethod xref-location-marker ((l xref-etags-/ xref-make-etags-location el-src/emacs/lisp/progmodes/etags.el /^(defun xref-make-etags-location (tag-info file)$/ xrnew c-src/etags.c /^#define xrnew(op, n, Type) ((op) = (Type *) xreall/ +xx make-src/Makefile /^xx="this line is here because of a fontlock bug$/ y cp-src/conway.hpp 7 y cp-src/clheir.hpp 49 y cp-src/clheir.hpp 58 diff --git a/test/etags/ETAGS.good_1 b/test/etags/ETAGS.good_1 index 435cd08da89..84831c9c743 100644 --- a/test/etags/ETAGS.good_1 +++ b/test/etags/ETAGS.good_1 @@ -2362,49 +2362,101 @@ function Square.something:Bar Bar14,148 local function test.me22b 25,297 local function test.me22b me22b25,297 -make-src/Makefile,1133 +make-src/Makefile,2175 LATEST=1,0 +RELEASELIST=2,10 +ADASRC=4,104 +ASRC=5,171 +CSRC=6,197 +CPSRC=10,423 +ELSRC=13,614 +ERLSRC=14,661 +FORTHSRC=15,702 +FSRC=16,726 +HTMLSRC=17,776 +JAVASRC=18,844 +LUASRC=19,907 +MAKESRC=20,926 +OBJCSRC=21,943 +OBJCPPSRC=22,999 +PASSRC=23,1035 +PERLSRC=24,1053 +PHPSRC=25,1108 +PSSRC=26,1156 +PROLSRC=27,1173 +PYTSRC=28,1210 +TEXSRC=29,1227 +YSRC=30,1282 +SRCS=31,1325 NONSRCS=35,1577 +VHDLFLAGS=37,1624 +COBOLFLAGS=38,1827 +POSTSCRIPTFLAGS=39,1889 +TCLFLAGS=40,1943 +GETOPTOBJS=42,2002 +RXINCLUDE=43,2034 +REGEXOBJS=44,2056 +CHECKOBJS=46,2075 +CHECKFLAGS=47,2105 +OBJS=48,2145 CPPFLAGS=49,2190 LDFLAGS=50,2259 +WARNINGS=51,2282 +CFLAGS=52,2466 FASTCFLAGS=55,2530 +FASTCFLAGSWARN=56,2591 FILTER=58,2641 - @-$($72,3063 - @-$($73,3112 - @-$($74,3176 - @-$($75,3222 - @-$($76,3290 - @-$($77,3382 - @$(81,3465 - @$(82,3513 - @$(83,3576 - @$(84,3621 - @$(85,3688 - @$(86,3779 -${CHECKOBJS}: CFLAGS=88,3805 - @env CHECKEROPTS=92,3921 - @$(98,4093 - @$(106,4249 - @$(110,4373 - @$(114,4499 - @for i in $(SRCS); do echo $$i;140,5320 - $(160,6058 - $(163,6119 - $(166,6182 - $(169,6233 - $(172,6322 - sdiff --suppress-common-lines --width=width186,6619 - sdiff --suppress-common-lines --width=width189,6708 - sdiff --suppress-common-lines --width=width192,6796 - sdiff --suppress-common-lines --width=width195,6885 - TEXTAGS=204,7127 - TEXTAGS=def:newcommand:newenvironment ${RUN} etags$* --regex=regex204,7127 - ${RUN} etags12 --members -o $@ --regex=regex207,7244 - ${RUN} ./ctags -o $@ --regex=regex213,7393 - ${RUN} ctags$* -wtTd --globals --members -o $@ --regex=regex216,7469 - TEXTAGS=219,7588 - TEXTAGS=def:newcommand:newenvironment ${RUN} ctags$* -wt -o $@ --regex=regex219,7588 - ${RUN} ./extags -e --regex-c=c222,7715 +REGEX=59,2695 +xx=60,2741 +MAKE:MAKE62,2790 +RUN=63,2825 +RUN=64,2865 +OPTIONS=65,2870 +ARGS=66,2922 +infiles 68,2940 +quiettest:quiettest70,3002 +test:test79,3409 +${CHECKOBJS}:${CHECKOBJS}88,3805 +checker:checker90,3849 +standalone:standalone96,4062 +prof:prof101,4168 +fastetags:fastetags104,4198 +fastctags:fastctags108,4322 +staticetags:staticetags112,4446 +rsynctofly:rsynctofly116,4608 +rsyncfromfly:rsyncfromfly119,4698 +web ftp publish:web ftp publish122,4794 +release distrib:release distrib129,5115 +tags:tags134,5255 +clean:clean136,5267 +srclist:srclist139,5302 +regexfile:regexfile143,5391 +/home/www/pub/etags.c.gz:/home/www/pub/etags.c.gz149,5566 +/home/www/pub/software/unix/etags.tar.gz:/home/www/pub/software/unix/etags.tar.gz156,5825 +regex.o:regex.o159,6031 +getopt.o:getopt.o162,6086 +getopt1.o:getopt1.o165,6147 +etags:etags168,6210 +ctags:ctags171,6299 +man manpage:man manpage174,6396 +etags.1.man:etags.1.man176,6422 +maintaining.info:maintaining.info179,6475 +TAGS:TAGS182,6557 +%ediff:%ediff185,6587 +oediff:oediff188,6677 +%cdiff:%cdiff191,6764 +xdiff:xdiff194,6854 +ETAGS:ETAGS197,6942 +ETAGS%:ETAGS%200,7012 +ETAGS13 ETAGS14 ETAGS15:ETAGS13 ETAGS14 ETAGS15203,7084 +ETAGS12:ETAGS12206,7216 +OTAGS:OTAGS209,7304 +CTAGS:CTAGS212,7369 +CTAGS%:CTAGS%215,7443 +CTAGS13 CTAGS14 CTAGS15:CTAGS13 CTAGS14 CTAGS15218,7545 +EXTAGS:EXTAGS221,7680 +.PRECIOUS:.PRECIOUS224,7838 +FRC:FRC226,7894 objc-src/Subprocess.h,98 #define Subprocess 41,1217 @@ -3009,7 +3061,7 @@ module ModuleExample1,0 def module_instance_method46,1051 def ModuleExample.module_class_methodmodule_class_method49,1131 -ruby-src/test1.ruby,635 +ruby-src/test1.ru,635 class A1,0 def a(2,8 def b(5,38 diff --git a/test/etags/ETAGS.good_2 b/test/etags/ETAGS.good_2 index 4abdc9098af..b97d5f75490 100644 --- a/test/etags/ETAGS.good_2 +++ b/test/etags/ETAGS.good_2 @@ -2931,50 +2931,101 @@ function Square.something:Bar Bar14,148 local function test.me22b 25,297 local function test.me22b me22b25,297 -make-src/Makefile,1156 +make-src/Makefile,2175 LATEST=1,0 +RELEASELIST=2,10 +ADASRC=4,104 +ASRC=5,171 +CSRC=6,197 +CPSRC=10,423 +ELSRC=13,614 +ERLSRC=14,661 +FORTHSRC=15,702 +FSRC=16,726 +HTMLSRC=17,776 +JAVASRC=18,844 +LUASRC=19,907 +MAKESRC=20,926 +OBJCSRC=21,943 +OBJCPPSRC=22,999 +PASSRC=23,1035 +PERLSRC=24,1053 +PHPSRC=25,1108 +PSSRC=26,1156 +PROLSRC=27,1173 +PYTSRC=28,1210 +TEXSRC=29,1227 +YSRC=30,1282 +SRCS=31,1325 NONSRCS=35,1577 +VHDLFLAGS=37,1624 +COBOLFLAGS=38,1827 +POSTSCRIPTFLAGS=39,1889 +TCLFLAGS=40,1943 +GETOPTOBJS=42,2002 +RXINCLUDE=43,2034 +REGEXOBJS=44,2056 +CHECKOBJS=46,2075 +CHECKFLAGS=47,2105 +OBJS=48,2145 CPPFLAGS=49,2190 LDFLAGS=50,2259 +WARNINGS=51,2282 +CFLAGS=52,2466 FASTCFLAGS=55,2530 +FASTCFLAGSWARN=56,2591 FILTER=58,2641 - @-$($72,3063 - @-$($73,3112 - @-$($74,3176 - @-$($75,3222 - @-$($76,3290 - @-$($77,3382 - @$(81,3465 - @$(82,3513 - @$(83,3576 - @$(84,3621 - @$(85,3688 - @$(86,3779 -${CHECKOBJS}: CFLAGS=88,3805 - @env CHECKEROPTS=92,3921 - @$(98,4093 - @$(106,4249 - @$(110,4373 - @$(114,4499 - @for i in $(140,5320 - @for i in $(SRCS); do echo $$i;140,5320 - $(160,6058 - $(163,6119 - $(166,6182 - $(169,6233 - $(172,6322 - sdiff --suppress-common-lines --width=width186,6619 - sdiff --suppress-common-lines --width=width189,6708 - sdiff --suppress-common-lines --width=width192,6796 - sdiff --suppress-common-lines --width=width195,6885 - TEXTAGS=204,7127 - TEXTAGS=def:newcommand:newenvironment ${RUN} etags$* --regex=regex204,7127 - ${RUN} etags12 --members -o $@ --regex=regex207,7244 - ${RUN} ./ctags -o $@ --regex=regex213,7393 - ${RUN} ctags$* -wtTd --globals --members -o $@ --regex=regex216,7469 - TEXTAGS=219,7588 - TEXTAGS=def:newcommand:newenvironment ${RUN} ctags$* -wt -o $@ --regex=regex219,7588 - ${RUN} ./extags -e --regex-c=c222,7715 +REGEX=59,2695 +xx=60,2741 +MAKE:MAKE62,2790 +RUN=63,2825 +RUN=64,2865 +OPTIONS=65,2870 +ARGS=66,2922 +infiles 68,2940 +quiettest:quiettest70,3002 +test:test79,3409 +${CHECKOBJS}:${CHECKOBJS}88,3805 +checker:checker90,3849 +standalone:standalone96,4062 +prof:prof101,4168 +fastetags:fastetags104,4198 +fastctags:fastctags108,4322 +staticetags:staticetags112,4446 +rsynctofly:rsynctofly116,4608 +rsyncfromfly:rsyncfromfly119,4698 +web ftp publish:web ftp publish122,4794 +release distrib:release distrib129,5115 +tags:tags134,5255 +clean:clean136,5267 +srclist:srclist139,5302 +regexfile:regexfile143,5391 +/home/www/pub/etags.c.gz:/home/www/pub/etags.c.gz149,5566 +/home/www/pub/software/unix/etags.tar.gz:/home/www/pub/software/unix/etags.tar.gz156,5825 +regex.o:regex.o159,6031 +getopt.o:getopt.o162,6086 +getopt1.o:getopt1.o165,6147 +etags:etags168,6210 +ctags:ctags171,6299 +man manpage:man manpage174,6396 +etags.1.man:etags.1.man176,6422 +maintaining.info:maintaining.info179,6475 +TAGS:TAGS182,6557 +%ediff:%ediff185,6587 +oediff:oediff188,6677 +%cdiff:%cdiff191,6764 +xdiff:xdiff194,6854 +ETAGS:ETAGS197,6942 +ETAGS%:ETAGS%200,7012 +ETAGS13 ETAGS14 ETAGS15:ETAGS13 ETAGS14 ETAGS15203,7084 +ETAGS12:ETAGS12206,7216 +OTAGS:OTAGS209,7304 +CTAGS:CTAGS212,7369 +CTAGS%:CTAGS%215,7443 +CTAGS13 CTAGS14 CTAGS15:CTAGS13 CTAGS14 CTAGS15218,7545 +EXTAGS:EXTAGS221,7680 +.PRECIOUS:.PRECIOUS224,7838 +FRC:FRC226,7894 objc-src/Subprocess.h,98 #define Subprocess 41,1217 @@ -3580,7 +3631,7 @@ module ModuleExample1,0 def module_instance_method46,1051 def ModuleExample.module_class_methodmodule_class_method49,1131 -ruby-src/test1.ruby,635 +ruby-src/test1.ru,635 class A1,0 def a(2,8 def b(5,38 diff --git a/test/etags/ETAGS.good_3 b/test/etags/ETAGS.good_3 index 94815caf489..108fcae16db 100644 --- a/test/etags/ETAGS.good_3 +++ b/test/etags/ETAGS.good_3 @@ -2682,49 +2682,101 @@ function Square.something:Bar Bar14,148 local function test.me22b 25,297 local function test.me22b me22b25,297 -make-src/Makefile,1133 +make-src/Makefile,2175 LATEST=1,0 +RELEASELIST=2,10 +ADASRC=4,104 +ASRC=5,171 +CSRC=6,197 +CPSRC=10,423 +ELSRC=13,614 +ERLSRC=14,661 +FORTHSRC=15,702 +FSRC=16,726 +HTMLSRC=17,776 +JAVASRC=18,844 +LUASRC=19,907 +MAKESRC=20,926 +OBJCSRC=21,943 +OBJCPPSRC=22,999 +PASSRC=23,1035 +PERLSRC=24,1053 +PHPSRC=25,1108 +PSSRC=26,1156 +PROLSRC=27,1173 +PYTSRC=28,1210 +TEXSRC=29,1227 +YSRC=30,1282 +SRCS=31,1325 NONSRCS=35,1577 +VHDLFLAGS=37,1624 +COBOLFLAGS=38,1827 +POSTSCRIPTFLAGS=39,1889 +TCLFLAGS=40,1943 +GETOPTOBJS=42,2002 +RXINCLUDE=43,2034 +REGEXOBJS=44,2056 +CHECKOBJS=46,2075 +CHECKFLAGS=47,2105 +OBJS=48,2145 CPPFLAGS=49,2190 LDFLAGS=50,2259 +WARNINGS=51,2282 +CFLAGS=52,2466 FASTCFLAGS=55,2530 +FASTCFLAGSWARN=56,2591 FILTER=58,2641 - @-$($72,3063 - @-$($73,3112 - @-$($74,3176 - @-$($75,3222 - @-$($76,3290 - @-$($77,3382 - @$(81,3465 - @$(82,3513 - @$(83,3576 - @$(84,3621 - @$(85,3688 - @$(86,3779 -${CHECKOBJS}: CFLAGS=88,3805 - @env CHECKEROPTS=92,3921 - @$(98,4093 - @$(106,4249 - @$(110,4373 - @$(114,4499 - @for i in $(SRCS); do echo $$i;140,5320 - $(160,6058 - $(163,6119 - $(166,6182 - $(169,6233 - $(172,6322 - sdiff --suppress-common-lines --width=width186,6619 - sdiff --suppress-common-lines --width=width189,6708 - sdiff --suppress-common-lines --width=width192,6796 - sdiff --suppress-common-lines --width=width195,6885 - TEXTAGS=204,7127 - TEXTAGS=def:newcommand:newenvironment ${RUN} etags$* --regex=regex204,7127 - ${RUN} etags12 --members -o $@ --regex=regex207,7244 - ${RUN} ./ctags -o $@ --regex=regex213,7393 - ${RUN} ctags$* -wtTd --globals --members -o $@ --regex=regex216,7469 - TEXTAGS=219,7588 - TEXTAGS=def:newcommand:newenvironment ${RUN} ctags$* -wt -o $@ --regex=regex219,7588 - ${RUN} ./extags -e --regex-c=c222,7715 +REGEX=59,2695 +xx=60,2741 +MAKE:MAKE62,2790 +RUN=63,2825 +RUN=64,2865 +OPTIONS=65,2870 +ARGS=66,2922 +infiles 68,2940 +quiettest:quiettest70,3002 +test:test79,3409 +${CHECKOBJS}:${CHECKOBJS}88,3805 +checker:checker90,3849 +standalone:standalone96,4062 +prof:prof101,4168 +fastetags:fastetags104,4198 +fastctags:fastctags108,4322 +staticetags:staticetags112,4446 +rsynctofly:rsynctofly116,4608 +rsyncfromfly:rsyncfromfly119,4698 +web ftp publish:web ftp publish122,4794 +release distrib:release distrib129,5115 +tags:tags134,5255 +clean:clean136,5267 +srclist:srclist139,5302 +regexfile:regexfile143,5391 +/home/www/pub/etags.c.gz:/home/www/pub/etags.c.gz149,5566 +/home/www/pub/software/unix/etags.tar.gz:/home/www/pub/software/unix/etags.tar.gz156,5825 +regex.o:regex.o159,6031 +getopt.o:getopt.o162,6086 +getopt1.o:getopt1.o165,6147 +etags:etags168,6210 +ctags:ctags171,6299 +man manpage:man manpage174,6396 +etags.1.man:etags.1.man176,6422 +maintaining.info:maintaining.info179,6475 +TAGS:TAGS182,6557 +%ediff:%ediff185,6587 +oediff:oediff188,6677 +%cdiff:%cdiff191,6764 +xdiff:xdiff194,6854 +ETAGS:ETAGS197,6942 +ETAGS%:ETAGS%200,7012 +ETAGS13 ETAGS14 ETAGS15:ETAGS13 ETAGS14 ETAGS15203,7084 +ETAGS12:ETAGS12206,7216 +OTAGS:OTAGS209,7304 +CTAGS:CTAGS212,7369 +CTAGS%:CTAGS%215,7443 +CTAGS13 CTAGS14 CTAGS15:CTAGS13 CTAGS14 CTAGS15218,7545 +EXTAGS:EXTAGS221,7680 +.PRECIOUS:.PRECIOUS224,7838 +FRC:FRC226,7894 objc-src/Subprocess.h,98 #define Subprocess 41,1217 @@ -3356,7 +3408,7 @@ module ModuleExample1,0 def module_instance_method46,1051 def ModuleExample.module_class_methodmodule_class_method49,1131 -ruby-src/test1.ruby,635 +ruby-src/test1.ru,635 class A1,0 def a(2,8 def b(5,38 diff --git a/test/etags/ETAGS.good_4 b/test/etags/ETAGS.good_4 index f71e1b0a432..1f10a40ccaf 100644 --- a/test/etags/ETAGS.good_4 +++ b/test/etags/ETAGS.good_4 @@ -2526,49 +2526,101 @@ function Square.something:Bar Bar14,148 local function test.me22b 25,297 local function test.me22b me22b25,297 -make-src/Makefile,1133 +make-src/Makefile,2175 LATEST=1,0 +RELEASELIST=2,10 +ADASRC=4,104 +ASRC=5,171 +CSRC=6,197 +CPSRC=10,423 +ELSRC=13,614 +ERLSRC=14,661 +FORTHSRC=15,702 +FSRC=16,726 +HTMLSRC=17,776 +JAVASRC=18,844 +LUASRC=19,907 +MAKESRC=20,926 +OBJCSRC=21,943 +OBJCPPSRC=22,999 +PASSRC=23,1035 +PERLSRC=24,1053 +PHPSRC=25,1108 +PSSRC=26,1156 +PROLSRC=27,1173 +PYTSRC=28,1210 +TEXSRC=29,1227 +YSRC=30,1282 +SRCS=31,1325 NONSRCS=35,1577 +VHDLFLAGS=37,1624 +COBOLFLAGS=38,1827 +POSTSCRIPTFLAGS=39,1889 +TCLFLAGS=40,1943 +GETOPTOBJS=42,2002 +RXINCLUDE=43,2034 +REGEXOBJS=44,2056 +CHECKOBJS=46,2075 +CHECKFLAGS=47,2105 +OBJS=48,2145 CPPFLAGS=49,2190 LDFLAGS=50,2259 +WARNINGS=51,2282 +CFLAGS=52,2466 FASTCFLAGS=55,2530 +FASTCFLAGSWARN=56,2591 FILTER=58,2641 - @-$($72,3063 - @-$($73,3112 - @-$($74,3176 - @-$($75,3222 - @-$($76,3290 - @-$($77,3382 - @$(81,3465 - @$(82,3513 - @$(83,3576 - @$(84,3621 - @$(85,3688 - @$(86,3779 -${CHECKOBJS}: CFLAGS=88,3805 - @env CHECKEROPTS=92,3921 - @$(98,4093 - @$(106,4249 - @$(110,4373 - @$(114,4499 - @for i in $(SRCS); do echo $$i;140,5320 - $(160,6058 - $(163,6119 - $(166,6182 - $(169,6233 - $(172,6322 - sdiff --suppress-common-lines --width=width186,6619 - sdiff --suppress-common-lines --width=width189,6708 - sdiff --suppress-common-lines --width=width192,6796 - sdiff --suppress-common-lines --width=width195,6885 - TEXTAGS=204,7127 - TEXTAGS=def:newcommand:newenvironment ${RUN} etags$* --regex=regex204,7127 - ${RUN} etags12 --members -o $@ --regex=regex207,7244 - ${RUN} ./ctags -o $@ --regex=regex213,7393 - ${RUN} ctags$* -wtTd --globals --members -o $@ --regex=regex216,7469 - TEXTAGS=219,7588 - TEXTAGS=def:newcommand:newenvironment ${RUN} ctags$* -wt -o $@ --regex=regex219,7588 - ${RUN} ./extags -e --regex-c=c222,7715 +REGEX=59,2695 +xx=60,2741 +MAKE:MAKE62,2790 +RUN=63,2825 +RUN=64,2865 +OPTIONS=65,2870 +ARGS=66,2922 +infiles 68,2940 +quiettest:quiettest70,3002 +test:test79,3409 +${CHECKOBJS}:${CHECKOBJS}88,3805 +checker:checker90,3849 +standalone:standalone96,4062 +prof:prof101,4168 +fastetags:fastetags104,4198 +fastctags:fastctags108,4322 +staticetags:staticetags112,4446 +rsynctofly:rsynctofly116,4608 +rsyncfromfly:rsyncfromfly119,4698 +web ftp publish:web ftp publish122,4794 +release distrib:release distrib129,5115 +tags:tags134,5255 +clean:clean136,5267 +srclist:srclist139,5302 +regexfile:regexfile143,5391 +/home/www/pub/etags.c.gz:/home/www/pub/etags.c.gz149,5566 +/home/www/pub/software/unix/etags.tar.gz:/home/www/pub/software/unix/etags.tar.gz156,5825 +regex.o:regex.o159,6031 +getopt.o:getopt.o162,6086 +getopt1.o:getopt1.o165,6147 +etags:etags168,6210 +ctags:ctags171,6299 +man manpage:man manpage174,6396 +etags.1.man:etags.1.man176,6422 +maintaining.info:maintaining.info179,6475 +TAGS:TAGS182,6557 +%ediff:%ediff185,6587 +oediff:oediff188,6677 +%cdiff:%cdiff191,6764 +xdiff:xdiff194,6854 +ETAGS:ETAGS197,6942 +ETAGS%:ETAGS%200,7012 +ETAGS13 ETAGS14 ETAGS15:ETAGS13 ETAGS14 ETAGS15203,7084 +ETAGS12:ETAGS12206,7216 +OTAGS:OTAGS209,7304 +CTAGS:CTAGS212,7369 +CTAGS%:CTAGS%215,7443 +CTAGS13 CTAGS14 CTAGS15:CTAGS13 CTAGS14 CTAGS15218,7545 +EXTAGS:EXTAGS221,7680 +.PRECIOUS:.PRECIOUS224,7838 +FRC:FRC226,7894 objc-src/Subprocess.h,98 #define Subprocess 41,1217 @@ -3173,7 +3225,7 @@ module ModuleExample1,0 def module_instance_method46,1051 def ModuleExample.module_class_methodmodule_class_method49,1131 -ruby-src/test1.ruby,635 +ruby-src/test1.ru,635 class A1,0 def a(2,8 def b(5,38 diff --git a/test/etags/ETAGS.good_5 b/test/etags/ETAGS.good_5 index d51542c3a93..0a6cfc8e8e6 100644 --- a/test/etags/ETAGS.good_5 +++ b/test/etags/ETAGS.good_5 @@ -3415,50 +3415,101 @@ function Square.something:Bar Bar14,148 local function test.me22b 25,297 local function test.me22b me22b25,297 -make-src/Makefile,1156 +make-src/Makefile,2175 LATEST=1,0 +RELEASELIST=2,10 +ADASRC=4,104 +ASRC=5,171 +CSRC=6,197 +CPSRC=10,423 +ELSRC=13,614 +ERLSRC=14,661 +FORTHSRC=15,702 +FSRC=16,726 +HTMLSRC=17,776 +JAVASRC=18,844 +LUASRC=19,907 +MAKESRC=20,926 +OBJCSRC=21,943 +OBJCPPSRC=22,999 +PASSRC=23,1035 +PERLSRC=24,1053 +PHPSRC=25,1108 +PSSRC=26,1156 +PROLSRC=27,1173 +PYTSRC=28,1210 +TEXSRC=29,1227 +YSRC=30,1282 +SRCS=31,1325 NONSRCS=35,1577 +VHDLFLAGS=37,1624 +COBOLFLAGS=38,1827 +POSTSCRIPTFLAGS=39,1889 +TCLFLAGS=40,1943 +GETOPTOBJS=42,2002 +RXINCLUDE=43,2034 +REGEXOBJS=44,2056 +CHECKOBJS=46,2075 +CHECKFLAGS=47,2105 +OBJS=48,2145 CPPFLAGS=49,2190 LDFLAGS=50,2259 +WARNINGS=51,2282 +CFLAGS=52,2466 FASTCFLAGS=55,2530 +FASTCFLAGSWARN=56,2591 FILTER=58,2641 - @-$($72,3063 - @-$($73,3112 - @-$($74,3176 - @-$($75,3222 - @-$($76,3290 - @-$($77,3382 - @$(81,3465 - @$(82,3513 - @$(83,3576 - @$(84,3621 - @$(85,3688 - @$(86,3779 -${CHECKOBJS}: CFLAGS=88,3805 - @env CHECKEROPTS=92,3921 - @$(98,4093 - @$(106,4249 - @$(110,4373 - @$(114,4499 - @for i in $(140,5320 - @for i in $(SRCS); do echo $$i;140,5320 - $(160,6058 - $(163,6119 - $(166,6182 - $(169,6233 - $(172,6322 - sdiff --suppress-common-lines --width=width186,6619 - sdiff --suppress-common-lines --width=width189,6708 - sdiff --suppress-common-lines --width=width192,6796 - sdiff --suppress-common-lines --width=width195,6885 - TEXTAGS=204,7127 - TEXTAGS=def:newcommand:newenvironment ${RUN} etags$* --regex=regex204,7127 - ${RUN} etags12 --members -o $@ --regex=regex207,7244 - ${RUN} ./ctags -o $@ --regex=regex213,7393 - ${RUN} ctags$* -wtTd --globals --members -o $@ --regex=regex216,7469 - TEXTAGS=219,7588 - TEXTAGS=def:newcommand:newenvironment ${RUN} ctags$* -wt -o $@ --regex=regex219,7588 - ${RUN} ./extags -e --regex-c=c222,7715 +REGEX=59,2695 +xx=60,2741 +MAKE:MAKE62,2790 +RUN=63,2825 +RUN=64,2865 +OPTIONS=65,2870 +ARGS=66,2922 +infiles 68,2940 +quiettest:quiettest70,3002 +test:test79,3409 +${CHECKOBJS}:${CHECKOBJS}88,3805 +checker:checker90,3849 +standalone:standalone96,4062 +prof:prof101,4168 +fastetags:fastetags104,4198 +fastctags:fastctags108,4322 +staticetags:staticetags112,4446 +rsynctofly:rsynctofly116,4608 +rsyncfromfly:rsyncfromfly119,4698 +web ftp publish:web ftp publish122,4794 +release distrib:release distrib129,5115 +tags:tags134,5255 +clean:clean136,5267 +srclist:srclist139,5302 +regexfile:regexfile143,5391 +/home/www/pub/etags.c.gz:/home/www/pub/etags.c.gz149,5566 +/home/www/pub/software/unix/etags.tar.gz:/home/www/pub/software/unix/etags.tar.gz156,5825 +regex.o:regex.o159,6031 +getopt.o:getopt.o162,6086 +getopt1.o:getopt1.o165,6147 +etags:etags168,6210 +ctags:ctags171,6299 +man manpage:man manpage174,6396 +etags.1.man:etags.1.man176,6422 +maintaining.info:maintaining.info179,6475 +TAGS:TAGS182,6557 +%ediff:%ediff185,6587 +oediff:oediff188,6677 +%cdiff:%cdiff191,6764 +xdiff:xdiff194,6854 +ETAGS:ETAGS197,6942 +ETAGS%:ETAGS%200,7012 +ETAGS13 ETAGS14 ETAGS15:ETAGS13 ETAGS14 ETAGS15203,7084 +ETAGS12:ETAGS12206,7216 +OTAGS:OTAGS209,7304 +CTAGS:CTAGS212,7369 +CTAGS%:CTAGS%215,7443 +CTAGS13 CTAGS14 CTAGS15:CTAGS13 CTAGS14 CTAGS15218,7545 +EXTAGS:EXTAGS221,7680 +.PRECIOUS:.PRECIOUS224,7838 +FRC:FRC226,7894 objc-src/Subprocess.h,98 #define Subprocess 41,1217 @@ -4091,7 +4142,7 @@ module ModuleExample1,0 def module_instance_method46,1051 def ModuleExample.module_class_methodmodule_class_method49,1131 -ruby-src/test1.ruby,635 +ruby-src/test1.ru,635 class A1,0 def a(2,8 def b(5,38 diff --git a/test/etags/ETAGS.good_6 b/test/etags/ETAGS.good_6 index 84b73198a4c..cb1264f3e00 100644 --- a/test/etags/ETAGS.good_6 +++ b/test/etags/ETAGS.good_6 @@ -3415,50 +3415,101 @@ function Square.something:Bar Bar14,148 local function test.me22b 25,297 local function test.me22b me22b25,297 -make-src/Makefile,1156 +make-src/Makefile,2175 LATEST=1,0 +RELEASELIST=2,10 +ADASRC=4,104 +ASRC=5,171 +CSRC=6,197 +CPSRC=10,423 +ELSRC=13,614 +ERLSRC=14,661 +FORTHSRC=15,702 +FSRC=16,726 +HTMLSRC=17,776 +JAVASRC=18,844 +LUASRC=19,907 +MAKESRC=20,926 +OBJCSRC=21,943 +OBJCPPSRC=22,999 +PASSRC=23,1035 +PERLSRC=24,1053 +PHPSRC=25,1108 +PSSRC=26,1156 +PROLSRC=27,1173 +PYTSRC=28,1210 +TEXSRC=29,1227 +YSRC=30,1282 +SRCS=31,1325 NONSRCS=35,1577 +VHDLFLAGS=37,1624 +COBOLFLAGS=38,1827 +POSTSCRIPTFLAGS=39,1889 +TCLFLAGS=40,1943 +GETOPTOBJS=42,2002 +RXINCLUDE=43,2034 +REGEXOBJS=44,2056 +CHECKOBJS=46,2075 +CHECKFLAGS=47,2105 +OBJS=48,2145 CPPFLAGS=49,2190 LDFLAGS=50,2259 +WARNINGS=51,2282 +CFLAGS=52,2466 FASTCFLAGS=55,2530 +FASTCFLAGSWARN=56,2591 FILTER=58,2641 - @-$($72,3063 - @-$($73,3112 - @-$($74,3176 - @-$($75,3222 - @-$($76,3290 - @-$($77,3382 - @$(81,3465 - @$(82,3513 - @$(83,3576 - @$(84,3621 - @$(85,3688 - @$(86,3779 -${CHECKOBJS}: CFLAGS=88,3805 - @env CHECKEROPTS=92,3921 - @$(98,4093 - @$(106,4249 - @$(110,4373 - @$(114,4499 - @for i in $(140,5320 - @for i in $(SRCS); do echo $$i;140,5320 - $(160,6058 - $(163,6119 - $(166,6182 - $(169,6233 - $(172,6322 - sdiff --suppress-common-lines --width=width186,6619 - sdiff --suppress-common-lines --width=width189,6708 - sdiff --suppress-common-lines --width=width192,6796 - sdiff --suppress-common-lines --width=width195,6885 - TEXTAGS=204,7127 - TEXTAGS=def:newcommand:newenvironment ${RUN} etags$* --regex=regex204,7127 - ${RUN} etags12 --members -o $@ --regex=regex207,7244 - ${RUN} ./ctags -o $@ --regex=regex213,7393 - ${RUN} ctags$* -wtTd --globals --members -o $@ --regex=regex216,7469 - TEXTAGS=219,7588 - TEXTAGS=def:newcommand:newenvironment ${RUN} ctags$* -wt -o $@ --regex=regex219,7588 - ${RUN} ./extags -e --regex-c=c222,7715 +REGEX=59,2695 +xx=60,2741 +MAKE:MAKE62,2790 +RUN=63,2825 +RUN=64,2865 +OPTIONS=65,2870 +ARGS=66,2922 +infiles 68,2940 +quiettest:quiettest70,3002 +test:test79,3409 +${CHECKOBJS}:${CHECKOBJS}88,3805 +checker:checker90,3849 +standalone:standalone96,4062 +prof:prof101,4168 +fastetags:fastetags104,4198 +fastctags:fastctags108,4322 +staticetags:staticetags112,4446 +rsynctofly:rsynctofly116,4608 +rsyncfromfly:rsyncfromfly119,4698 +web ftp publish:web ftp publish122,4794 +release distrib:release distrib129,5115 +tags:tags134,5255 +clean:clean136,5267 +srclist:srclist139,5302 +regexfile:regexfile143,5391 +/home/www/pub/etags.c.gz:/home/www/pub/etags.c.gz149,5566 +/home/www/pub/software/unix/etags.tar.gz:/home/www/pub/software/unix/etags.tar.gz156,5825 +regex.o:regex.o159,6031 +getopt.o:getopt.o162,6086 +getopt1.o:getopt1.o165,6147 +etags:etags168,6210 +ctags:ctags171,6299 +man manpage:man manpage174,6396 +etags.1.man:etags.1.man176,6422 +maintaining.info:maintaining.info179,6475 +TAGS:TAGS182,6557 +%ediff:%ediff185,6587 +oediff:oediff188,6677 +%cdiff:%cdiff191,6764 +xdiff:xdiff194,6854 +ETAGS:ETAGS197,6942 +ETAGS%:ETAGS%200,7012 +ETAGS13 ETAGS14 ETAGS15:ETAGS13 ETAGS14 ETAGS15203,7084 +ETAGS12:ETAGS12206,7216 +OTAGS:OTAGS209,7304 +CTAGS:CTAGS212,7369 +CTAGS%:CTAGS%215,7443 +CTAGS13 CTAGS14 CTAGS15:CTAGS13 CTAGS14 CTAGS15218,7545 +EXTAGS:EXTAGS221,7680 +.PRECIOUS:.PRECIOUS224,7838 +FRC:FRC226,7894 objc-src/Subprocess.h,98 #define Subprocess 41,1217 @@ -4091,7 +4142,7 @@ module ModuleExample1,0 def module_instance_method46,1051 def ModuleExample.module_class_methodmodule_class_method49,1131 -ruby-src/test1.ruby,635 +ruby-src/test1.ru,635 class A1,0 def a(2,8 def b(5,38 diff --git a/test/etags/Makefile b/test/etags/Makefile index 21a77eb0c5d..6e335711ff2 100644 --- a/test/etags/Makefile +++ b/test/etags/Makefile @@ -24,7 +24,7 @@ PHPSRC=$(addprefix ./php-src/,lce_functions.php ptest.php sendmail.php) PSSRC=$(addprefix ./ps-src/,rfc1245.ps) PROLSRC=$(addprefix ./prol-src/,ordsets.prolog natded.prolog) PYTSRC=$(addprefix ./pyt-src/,server.py) -RBSRC=$(addprefix ./ruby-src/,test.rb test1.ruby) +RBSRC=$(addprefix ./ruby-src/,test.rb test1.ru) TEXSRC=$(addprefix ./tex-src/,testenv.tex gzip.texi texinfo.tex nonewline.tex) YSRC=$(addprefix ./y-src/,parse.y parse.c atest.y cccp.c cccp.y) SRCS=${ADASRC} ${ASRC} ${CSRC} ${CPSRC} ${ELSRC} ${ERLSRC} ${FSRC}\ From 860da4dccb4f54391f3ff77a9dc23ca54e986cb4 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Tue, 2 Feb 2016 20:31:43 +0200 Subject: [PATCH 32/56] Fix names of tags generated for Ruby accessors * lib-src/etags.c (Ruby_functions): Don't include the leading colon ':' in tags for Ruby accessors and aliases. (Bug#22241) * test/etags/ETAGS.good_1: * test/etags/ETAGS.good_2: * test/etags/ETAGS.good_3: * test/etags/ETAGS.good_4: * test/etags/ETAGS.good_5: * test/etags/ETAGS.good_6: * test/etags/CTAGS.good: Adapt to changes in Ruby tags. --- lib-src/etags.c | 2 ++ test/etags/CTAGS.good | 18 +++++++++--------- test/etags/ETAGS.good_1 | 20 ++++++++++---------- test/etags/ETAGS.good_2 | 20 ++++++++++---------- test/etags/ETAGS.good_3 | 20 ++++++++++---------- test/etags/ETAGS.good_4 | 20 ++++++++++---------- test/etags/ETAGS.good_5 | 20 ++++++++++---------- test/etags/ETAGS.good_6 | 20 ++++++++++---------- 8 files changed, 71 insertions(+), 69 deletions(-) diff --git a/lib-src/etags.c b/lib-src/etags.c index 760685a6693..ca6fe51bdb6 100644 --- a/lib-src/etags.c +++ b/lib-src/etags.c @@ -4721,6 +4721,8 @@ Ruby_functions (FILE *inf) do { char *np = cp; + if (*np == ':') + np++; cp = skip_name (cp); if (reader) make_tag (np, cp - np, true, diff --git a/test/etags/CTAGS.good b/test/etags/CTAGS.good index ac577e4acfd..afb1096b084 100644 --- a/test/etags/CTAGS.good +++ b/test/etags/CTAGS.good @@ -171,15 +171,6 @@ ${CHECKOBJS} make-src/Makefile /^${CHECKOBJS}: CFLAGS=-g3 -DNULLFREECHECK=0$/ /wh ps-src/rfc1245.ps /^\/wh { $/ /yen ps-src/rfc1245.ps /^\/yen \/.notdef \/.notdef \/.notdef \/.notdef \/.notdef / :a-forth-dictionary-entry forth-src/test-forth.fth /^create :a-forth-dictionary-entry$/ -:bar= ruby-src/test1.ru /^ attr_writer :bar$/ -:foo ruby-src/test1.ru /^ attr_reader :foo$/ -:qux ruby-src/test1.ru /^ alias_method :qux, :tee$/ -:read1 ruby-src/test1.ru /^ attr_reader :read1, :read2; attr_writer :wri/ -:read2 ruby-src/test1.ru /^ attr_reader :read1, :read2; attr_writer :wri/ -:tee ruby-src/test1.ru /^ attr_accessor :tee$/ -:tee= ruby-src/test1.ru /^ attr_accessor :tee$/ -:write1= ruby-src/test1.ru /^ attr_reader :read1, :read2; attr_writer :wri/ -:write2= ruby-src/test1.ru /^ attr_reader :read1, :read2; attr_writer :wri/ < tex-src/texinfo.tex /^\\def<{{\\tt \\less}}$/ << ruby-src/test.rb /^ def <<(y)$/ <= ruby-src/test.rb /^ def <=(y)$/ @@ -2565,6 +2556,7 @@ bar c-src/c.c /^void bar() {while(0) {}}$/ bar c.c 143 bar c-src/h.h 19 bar cp-src/x.cc /^XX::bar()$/ +bar= ruby-src/test1.ru /^ attr_writer :bar$/ bas_syn prol-src/natded.prolog /^bas_syn(n(_)).$/ base c-src/emacs/src/lisp.h 2188 base cp-src/c.C /^double base (void) const { return rng_base; }$/ @@ -3014,6 +3006,7 @@ foo f-src/entry.for /^ character*(*) function foo()$/ foo f-src/entry.strange_suffix /^ character*(*) function foo()$/ foo f-src/entry.strange /^ character*(*) function foo()$/ foo php-src/ptest.php /^foo()$/ +foo ruby-src/test1.ru /^ attr_reader :foo$/ foo! ruby-src/test1.ru /^ def foo!$/ foobar c-src/c.c /^int foobar() {;}$/ foobar c.c /^extern void foobar (void) __attribute__ ((section / @@ -3886,6 +3879,7 @@ questo ../c/c.web 34 quiettest make-src/Makefile /^quiettest:$/ quit_char c-src/emacs/src/keyboard.c 192 quit_throw_to_read_char c-src/emacs/src/keyboard.c /^quit_throw_to_read_char (bool from_signal)$/ +qux ruby-src/test1.ru /^ alias_method :qux, :tee$/ qux= ruby-src/test1.ru /^ def qux=(tee)$/ r0 c-src/sysdep.h 54 r1 c-src/sysdep.h 55 @@ -3910,6 +3904,8 @@ read cp-src/conway.hpp /^ char read() { return alive; }$/ read php-src/lce_functions.php /^ function read()$/ read-key-sequence c-src/emacs/src/keyboard.c /^DEFUN ("read-key-sequence", Fread_key_sequence, Sr/ read-key-sequence-vector c-src/emacs/src/keyboard.c /^DEFUN ("read-key-sequence-vector", Fread_key_seque/ +read1 ruby-src/test1.ru /^ attr_reader :read1, :read2; attr_writer :wri/ +read2 ruby-src/test1.ru /^ attr_reader :read1, :read2; attr_writer :wri/ read_char c-src/emacs/src/keyboard.c /^read_char (int commandflag, Lisp_Object map,$/ read_char_help_form_unwind c-src/emacs/src/keyboard.c /^read_char_help_form_unwind (void)$/ read_char_minibuf_menu_prompt c-src/emacs/src/keyboard.c /^read_char_minibuf_menu_prompt (int commandflag,$/ @@ -4284,6 +4280,8 @@ tags-with-face el-src/emacs/lisp/progmodes/etags.el /^(defmacro tags-with-face ( target_multibyte c-src/emacs/src/regex.h 407 tcpdump html-src/software.html /^tcpdump$/ teats cp-src/c.C 127 +tee ruby-src/test1.ru /^ attr_accessor :tee$/ +tee= ruby-src/test1.ru /^ attr_accessor :tee$/ temporarily_switch_to_single_kboard c-src/emacs/src/keyboard.c /^temporarily_switch_to_single_kboard (struct frame / tend c-src/etags.c 2432 terminate objc-src/Subprocess.m /^- terminate:sender$/ @@ -4452,6 +4450,8 @@ womboid c-src/h.h 75 word_size c-src/emacs/src/lisp.h 1473 write php-src/lce_functions.php /^ function write()$/ write php-src/lce_functions.php /^ function write($save="yes")$/ +write1= ruby-src/test1.ru /^ attr_reader :read1, :read2; attr_writer :wri/ +write2= ruby-src/test1.ru /^ attr_reader :read1, :read2; attr_writer :wri/ write_abbrev c-src/abbrev.c /^write_abbrev (sym, stream)$/ write_classname c-src/etags.c /^write_classname (linebuffer *cn, const char *quali/ write_lex prol-src/natded.prolog /^write_lex(File):-$/ diff --git a/test/etags/ETAGS.good_1 b/test/etags/ETAGS.good_1 index 84831c9c743..87ab88fd6c2 100644 --- a/test/etags/ETAGS.good_1 +++ b/test/etags/ETAGS.good_1 @@ -3061,7 +3061,7 @@ module ModuleExample1,0 def module_instance_method46,1051 def ModuleExample.module_class_methodmodule_class_method49,1131 -ruby-src/test1.ru,635 +ruby-src/test1.ru,655 class A1,0 def a(2,8 def b(5,38 @@ -3074,15 +3074,15 @@ module A9,57 def self._bar?(_bar?18,143 def qux=(qux=22,194 def X25,232 - attr_reader :foo26,242 - attr_reader :read1,27,265 - attr_reader :read1, :read2;27,265 - attr_reader :read1, :read2; attr_writer :write1,:write1=27,265 - attr_reader :read1, :read2; attr_writer :write1, :write2:write2=27,265 - attr_writer :bar:bar=28,328 - attr_accessor :tee29,351 - attr_accessor :tee:tee=29,351 - alias_method :qux,30,376 + attr_reader :foofoo26,242 + attr_reader :read1,read127,265 + attr_reader :read1, :read2;read227,265 + attr_reader :read1, :read2; attr_writer :write1,write1=27,265 + attr_reader :read1, :read2; attr_writer :write1, :write2write2=27,265 + attr_writer :barbar=28,328 + attr_accessor :teetee29,351 + attr_accessor :teetee=29,351 + alias_method :qux,qux30,376 A::Constant Constant35,425 tex-src/testenv.tex,52 diff --git a/test/etags/ETAGS.good_2 b/test/etags/ETAGS.good_2 index b97d5f75490..861598232a9 100644 --- a/test/etags/ETAGS.good_2 +++ b/test/etags/ETAGS.good_2 @@ -3631,7 +3631,7 @@ module ModuleExample1,0 def module_instance_method46,1051 def ModuleExample.module_class_methodmodule_class_method49,1131 -ruby-src/test1.ru,635 +ruby-src/test1.ru,655 class A1,0 def a(2,8 def b(5,38 @@ -3644,15 +3644,15 @@ module A9,57 def self._bar?(_bar?18,143 def qux=(qux=22,194 def X25,232 - attr_reader :foo26,242 - attr_reader :read1,27,265 - attr_reader :read1, :read2;27,265 - attr_reader :read1, :read2; attr_writer :write1,:write1=27,265 - attr_reader :read1, :read2; attr_writer :write1, :write2:write2=27,265 - attr_writer :bar:bar=28,328 - attr_accessor :tee29,351 - attr_accessor :tee:tee=29,351 - alias_method :qux,30,376 + attr_reader :foofoo26,242 + attr_reader :read1,read127,265 + attr_reader :read1, :read2;read227,265 + attr_reader :read1, :read2; attr_writer :write1,write1=27,265 + attr_reader :read1, :read2; attr_writer :write1, :write2write2=27,265 + attr_writer :barbar=28,328 + attr_accessor :teetee29,351 + attr_accessor :teetee=29,351 + alias_method :qux,qux30,376 A::Constant Constant35,425 tex-src/testenv.tex,52 diff --git a/test/etags/ETAGS.good_3 b/test/etags/ETAGS.good_3 index 108fcae16db..52d5a613b61 100644 --- a/test/etags/ETAGS.good_3 +++ b/test/etags/ETAGS.good_3 @@ -3408,7 +3408,7 @@ module ModuleExample1,0 def module_instance_method46,1051 def ModuleExample.module_class_methodmodule_class_method49,1131 -ruby-src/test1.ru,635 +ruby-src/test1.ru,655 class A1,0 def a(2,8 def b(5,38 @@ -3421,15 +3421,15 @@ module A9,57 def self._bar?(_bar?18,143 def qux=(qux=22,194 def X25,232 - attr_reader :foo26,242 - attr_reader :read1,27,265 - attr_reader :read1, :read2;27,265 - attr_reader :read1, :read2; attr_writer :write1,:write1=27,265 - attr_reader :read1, :read2; attr_writer :write1, :write2:write2=27,265 - attr_writer :bar:bar=28,328 - attr_accessor :tee29,351 - attr_accessor :tee:tee=29,351 - alias_method :qux,30,376 + attr_reader :foofoo26,242 + attr_reader :read1,read127,265 + attr_reader :read1, :read2;read227,265 + attr_reader :read1, :read2; attr_writer :write1,write1=27,265 + attr_reader :read1, :read2; attr_writer :write1, :write2write2=27,265 + attr_writer :barbar=28,328 + attr_accessor :teetee29,351 + attr_accessor :teetee=29,351 + alias_method :qux,qux30,376 A::Constant Constant35,425 tex-src/testenv.tex,52 diff --git a/test/etags/ETAGS.good_4 b/test/etags/ETAGS.good_4 index 1f10a40ccaf..333274cb253 100644 --- a/test/etags/ETAGS.good_4 +++ b/test/etags/ETAGS.good_4 @@ -3225,7 +3225,7 @@ module ModuleExample1,0 def module_instance_method46,1051 def ModuleExample.module_class_methodmodule_class_method49,1131 -ruby-src/test1.ru,635 +ruby-src/test1.ru,655 class A1,0 def a(2,8 def b(5,38 @@ -3238,15 +3238,15 @@ module A9,57 def self._bar?(_bar?18,143 def qux=(qux=22,194 def X25,232 - attr_reader :foo26,242 - attr_reader :read1,27,265 - attr_reader :read1, :read2;27,265 - attr_reader :read1, :read2; attr_writer :write1,:write1=27,265 - attr_reader :read1, :read2; attr_writer :write1, :write2:write2=27,265 - attr_writer :bar:bar=28,328 - attr_accessor :tee29,351 - attr_accessor :tee:tee=29,351 - alias_method :qux,30,376 + attr_reader :foofoo26,242 + attr_reader :read1,read127,265 + attr_reader :read1, :read2;read227,265 + attr_reader :read1, :read2; attr_writer :write1,write1=27,265 + attr_reader :read1, :read2; attr_writer :write1, :write2write2=27,265 + attr_writer :barbar=28,328 + attr_accessor :teetee29,351 + attr_accessor :teetee=29,351 + alias_method :qux,qux30,376 A::Constant Constant35,425 tex-src/testenv.tex,52 diff --git a/test/etags/ETAGS.good_5 b/test/etags/ETAGS.good_5 index 0a6cfc8e8e6..fdf2329ee06 100644 --- a/test/etags/ETAGS.good_5 +++ b/test/etags/ETAGS.good_5 @@ -4142,7 +4142,7 @@ module ModuleExample1,0 def module_instance_method46,1051 def ModuleExample.module_class_methodmodule_class_method49,1131 -ruby-src/test1.ru,635 +ruby-src/test1.ru,655 class A1,0 def a(2,8 def b(5,38 @@ -4155,15 +4155,15 @@ module A9,57 def self._bar?(_bar?18,143 def qux=(qux=22,194 def X25,232 - attr_reader :foo26,242 - attr_reader :read1,27,265 - attr_reader :read1, :read2;27,265 - attr_reader :read1, :read2; attr_writer :write1,:write1=27,265 - attr_reader :read1, :read2; attr_writer :write1, :write2:write2=27,265 - attr_writer :bar:bar=28,328 - attr_accessor :tee29,351 - attr_accessor :tee:tee=29,351 - alias_method :qux,30,376 + attr_reader :foofoo26,242 + attr_reader :read1,read127,265 + attr_reader :read1, :read2;read227,265 + attr_reader :read1, :read2; attr_writer :write1,write1=27,265 + attr_reader :read1, :read2; attr_writer :write1, :write2write2=27,265 + attr_writer :barbar=28,328 + attr_accessor :teetee29,351 + attr_accessor :teetee=29,351 + alias_method :qux,qux30,376 A::Constant Constant35,425 tex-src/testenv.tex,52 diff --git a/test/etags/ETAGS.good_6 b/test/etags/ETAGS.good_6 index cb1264f3e00..95d59d3db39 100644 --- a/test/etags/ETAGS.good_6 +++ b/test/etags/ETAGS.good_6 @@ -4142,7 +4142,7 @@ module ModuleExample1,0 def module_instance_method46,1051 def ModuleExample.module_class_methodmodule_class_method49,1131 -ruby-src/test1.ru,635 +ruby-src/test1.ru,655 class A1,0 def a(2,8 def b(5,38 @@ -4155,15 +4155,15 @@ module A9,57 def self._bar?(_bar?18,143 def qux=(qux=22,194 def X25,232 - attr_reader :foo26,242 - attr_reader :read1,27,265 - attr_reader :read1, :read2;27,265 - attr_reader :read1, :read2; attr_writer :write1,:write1=27,265 - attr_reader :read1, :read2; attr_writer :write1, :write2:write2=27,265 - attr_writer :bar:bar=28,328 - attr_accessor :tee29,351 - attr_accessor :tee:tee=29,351 - alias_method :qux,30,376 + attr_reader :foofoo26,242 + attr_reader :read1,read127,265 + attr_reader :read1, :read2;read227,265 + attr_reader :read1, :read2; attr_writer :write1,write1=27,265 + attr_reader :read1, :read2; attr_writer :write1, :write2write2=27,265 + attr_writer :barbar=28,328 + attr_accessor :teetee29,351 + attr_accessor :teetee=29,351 + alias_method :qux,qux30,376 A::Constant Constant35,425 tex-src/testenv.tex,52 From a4278e28f6d6b22ba21468643c1cd8f6c60fb564 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Tue, 2 Feb 2016 22:09:32 +0200 Subject: [PATCH 33/56] Fix failure to compile ns-win.el in parallel builds * src/Makefile.in ($(lispsource)/term/ns-win.elc): Add order-only dependency on $(lispsource)/international/charprop.el. (Bug#22501) --- src/Makefile.in | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Makefile.in b/src/Makefile.in index fab10aeed47..f99a2f401ad 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -501,6 +501,11 @@ $(srcdir)/macuvs.h $(lispsource)/international/charprop.el: \ $(lispsource)/international/ucs-normalize.elc: | \ $(lispsource)/international/charprop.el +## ns-win.el loads ucs-normalize, so it also needs the above-mentioned +## 2 uni-*.el files to exist. +$(lispsource)/term/ns-win.elc: | \ + $(lispsource)/international/charprop.el + lispintdir = ${lispsource}/international ${lispintdir}/cp51932.el ${lispintdir}/eucjp-ms.el: FORCE ${MAKE} -C ../admin/charsets $(notdir $@) From 3696bf2f63782cbe14e76e2e3aa62f42b784e190 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Tue, 2 Feb 2016 15:53:01 -0500 Subject: [PATCH 34/56] * make-dist: Update for super-special file that can't live in etc/. --- make-dist | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/make-dist b/make-dist index 50662a4f2c4..db036e700c7 100755 --- a/make-dist +++ b/make-dist @@ -301,7 +301,7 @@ echo "Making links to top-level files" ln INSTALL README BUGS ${tempdir} ln ChangeLog.*[0-9] Makefile.in autogen.sh configure configure.ac ${tempdir} ln config.bat make-dist .dir-locals.el ${tempdir} -ln aclocal.m4 ${tempdir} +ln aclocal.m4 CONTRIBUTE ${tempdir} echo "Creating subdirectories" for subdir in site-lisp \ From 737193a44c1a6f52e910f262d5eaffec0270c024 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Tue, 2 Feb 2016 16:08:03 -0500 Subject: [PATCH 35/56] * make-dist: Add modules/. --- make-dist | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/make-dist b/make-dist index db036e700c7..719e8904e5b 100755 --- a/make-dist +++ b/make-dist @@ -311,7 +311,7 @@ for subdir in site-lisp \ nt nt/inc nt/inc/sys nt/inc/arpa nt/inc/netinet nt/icons \ `find etc lisp admin test -type d` \ doc doc/emacs doc/misc doc/man doc/lispref doc/lispintro \ - info m4 msdos \ + info m4 modules modules/mod-test msdos \ nextstep nextstep/templates \ nextstep/Cocoa nextstep/Cocoa/Emacs.base \ nextstep/Cocoa/Emacs.base/Contents \ @@ -323,7 +323,7 @@ do if [ "$with_tests" != "yes" ]; then case $subdir in - test*) continue ;; + test*|*/mod-test*) continue ;; esac fi @@ -405,6 +405,19 @@ echo "Making links to 'm4'" (cd m4 ln *.m4 ../${tempdir}/m4) +echo "Making links to 'modules'" +(cd modules + ln *.py ../${tempdir}/modules + if [ "$with_tests" = "yes" ]; then + for f in `find mod-test -type f`; do + case $f in + *.log|*.o|*.so) continue ;; + esac + ln $f ../$tempdir/modules/$f + done + fi +) + echo "Making links to 'nt'" (cd nt ln emacs-x86.manifest emacs-x64.manifest ../${tempdir}/nt From 74ebd4a7917f8f23cea2f0beed62097370c5464d Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Tue, 2 Feb 2016 16:19:15 -0500 Subject: [PATCH 36/56] * make-dist: Updates related to nt/. --- make-dist | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/make-dist b/make-dist index 719e8904e5b..1cd1a50d75a 100755 --- a/make-dist +++ b/make-dist @@ -362,7 +362,7 @@ echo "Making links to 'build-aux'" ln gitlog-to-changelog gitlog-to-emacslog ../${tempdir}/build-aux ln install-sh missing move-if-change ../${tempdir}/build-aux ln update-copyright update-subdirs ../${tempdir}/build-aux - ln dir_top make-info-dir ../${tempdir}/build-aux) + ln dir_top make-info-dir ar-lib ../${tempdir}/build-aux) echo "Making links to 'build-aux/snippet'" (cd build-aux/snippet @@ -421,9 +421,9 @@ echo "Making links to 'modules'" echo "Making links to 'nt'" (cd nt ln emacs-x86.manifest emacs-x64.manifest ../${tempdir}/nt - ln subdirs.el [a-z]*.bat [a-z]*.[ch] ../${tempdir}/nt + ln [a-z]*.bat [a-z]*.[ch] ../${tempdir}/nt ln *.in gnulib.mk ../${tempdir}/nt - ln mingw-cfg.site epaths.nt INSTALL.OLD ../${tempdir}/nt + ln mingw-cfg.site epaths.nt INSTALL.W64 ../${tempdir}/nt ln ChangeLog.*[0-9] INSTALL README README.W32 ../${tempdir}/nt) echo "Making links to 'nt/inc' and its subdirectories" From fe321fdb668c42f1fbb2590c6c8cabcfcc59ab13 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 2 Feb 2016 18:03:59 -0800 Subject: [PATCH 37/56] * autogen.sh: Revert all recent changes. --- autogen.sh | 47 ++++------------------------------------------- 1 file changed, 4 insertions(+), 43 deletions(-) diff --git a/autogen.sh b/autogen.sh index 4a0fbb791e9..a63c53c903c 100755 --- a/autogen.sh +++ b/autogen.sh @@ -104,21 +104,6 @@ check_version () } -git_config=true - -for arg -do - case $arg in - --git-config=false) git_config=false;; - --git-config=true) git_config=true ;; - --help) - exec echo "$0: usage: $0 [--help|--git-config=[false|true]]";; - *) - echo >&2 "$0: $arg: unknown option"; exit 1;; - esac -done - - cat < src/stamp-h.in || exit ## Configure Git, if using Git. if test -d .git && (git status -s) >/dev/null 2>&1; then - # Like 'git config NAME VALUE', but conditional on --git-config, - # verbose on change, and exiting on failure. - - git_config () - { - name=$1 - value=$2 - - if $git_config; then - ovalue=`git config --get "$name"` && test "$ovalue" = "$value" || { - echo "${Configuring_git}git config $name '$value'" - Configuring_git= - git config "$name" "$value" || exit - } - fi - } - Configuring_git='Configuring git... -' - - # Check hashes when transferring objects among repositories. - - git_config transfer.fsckObjects true - - # Configure 'git diff' hunk header format. - git_config 'diff.elisp.xfuncname' \ - '^\(def[^[:space:]]+[[:space:]]+([^()[:space:]]+)' - git_config 'diff.texinfo.xfuncname' \ - '^@node[[:space:]]+([^,[:space:]][^,]+)' + git config 'diff.elisp.xfuncname' \ + '^\(def[^[:space:]]+[[:space:]]+([^()[:space:]]+)' || exit + git config 'diff.texinfo.xfuncname' \ + '^@node[[:space:]]+([^,[:space:]][^,]+)' || exit # Install Git hooks. From 6191003fcd2bc65f2b18d5337f6f390d43f07173 Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Wed, 3 Feb 2016 13:35:10 +1100 Subject: [PATCH 38/56] Use pop-to-buffer-same-window in eww * lisp/net/eww.el: pop-to-buffer-same-window throughout instead of switch-to-buffer (bug#22244). --- lisp/net/eww.el | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lisp/net/eww.el b/lisp/net/eww.el index 7f98b5b8c7b..af6e0afdfa7 100644 --- a/lisp/net/eww.el +++ b/lisp/net/eww.el @@ -551,7 +551,7 @@ Currently this means either text/html or application/xhtml+xml." (declare-function mailcap-view-mime "mailcap" (type)) (defun eww-display-pdf () (let ((data (buffer-substring (point) (point-max)))) - (switch-to-buffer (get-buffer-create "*eww pdf*")) + (pop-to-buffer-same-window (get-buffer-create "*eww pdf*")) (let ((coding-system-for-write 'raw-text) (inhibit-read-only t)) (erase-buffer) @@ -748,7 +748,7 @@ the like." ;;;###autoload (defun eww-browse-url (url &optional new-window) (when new-window - (switch-to-buffer (generate-new-buffer "*eww*")) + (pop-to-buffer-same-window (generate-new-buffer "*eww*")) (eww-mode)) (eww url)) @@ -1728,7 +1728,7 @@ If CHARSET is nil then use UTF-8." (let ((buffer eww-current-buffer)) (quit-window) (when buffer - (switch-to-buffer buffer))) + (pop-to-buffer-same-window buffer))) (eww-restore-history history))) (defvar eww-history-mode-map @@ -1809,7 +1809,7 @@ If CHARSET is nil then use UTF-8." (unless buffer (error "No buffer on current line")) (quit-window) - (switch-to-buffer buffer))) + (pop-to-buffer-same-window buffer))) (defun eww-buffer-show () "Display buffer under point in eww buffer list." @@ -1818,7 +1818,7 @@ If CHARSET is nil then use UTF-8." (unless buffer (error "No buffer on current line")) (other-window -1) - (switch-to-buffer buffer) + (pop-to-buffer-same-window buffer) (other-window 1))) (defun eww-buffer-show-next () From 8b87ecb77dc8212e16be4ef8cb28fe2829f6877b Mon Sep 17 00:00:00 2001 From: Nicolas Petton Date: Wed, 3 Feb 2016 15:18:36 +0100 Subject: [PATCH 39/56] * lisp/emacs-lisp/map.el: Improvements to the docstring of the pcase macro --- lisp/emacs-lisp/map.el | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/lisp/emacs-lisp/map.el b/lisp/emacs-lisp/map.el index ebef27185ae..878611538fc 100644 --- a/lisp/emacs-lisp/map.el +++ b/lisp/emacs-lisp/map.el @@ -47,17 +47,18 @@ (pcase-defmacro map (&rest args) "Build a `pcase' pattern matching map elements. -The `pcase' pattern will match each element of PATTERN against -the corresponding elements of the map. +ARGS is a list of elements to be matched in the map. -Extra elements of the map are ignored if fewer ARGS are -given, and the match does not fail. +Each element of ARGS can be of the form (KEY PAT), in which case KEY is +evaluated and searched for in the map. The match fails if for any KEY +found in the map, the corresponding PAT doesn't match the value +associated to the KEY. -ARGS can be a list of the form (KEY PAT), in which case KEY in an -unquoted form. +Each element can also be a SYMBOL, which is an abbreviation of a (KEY +PAT) tuple of the form ('SYMBOL SYMBOL). -ARGS can also be a list of symbols, which stands for ('SYMBOL -SYMBOL)." +Keys in ARGS not found in the map are ignored, and the match doesn't +fail." `(and (pred mapp) ,@(map--make-pcase-bindings args))) From 8784ebf3a9f94c64cd09149c4906a3f494a1251d Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Wed, 3 Feb 2016 18:11:10 +0200 Subject: [PATCH 40/56] Fix x-popup-menu on TTYs without a mouse * src/menu.c (Fx_popup_menu): Be sure to initialize 'x' and 'y' for the TTY case without a mouse. (Bug#22538) --- src/menu.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/menu.c b/src/menu.c index caae228a259..cbddef35754 100644 --- a/src/menu.c +++ b/src/menu.c @@ -1236,6 +1236,9 @@ no quit occurs and `x-popup-menu' returns nil. */) { /* Use the mouse's current position. */ struct frame *new_f = SELECTED_FRAME (); + + XSETFASTINT (x, 0); + XSETFASTINT (y, 0); #ifdef HAVE_X_WINDOWS if (FRAME_X_P (new_f)) { From 504696d75dbd9b8159490ec4cd9da2b5578f2934 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Wed, 3 Feb 2016 18:24:20 +0200 Subject: [PATCH 41/56] Etags: yet another improvement in Ruby tags * lib-src/etags.c (Ruby_functions): Handle continuation lines in Ruby accessor definitions. (Bug#22241) * test/etags/ruby-src/test1.ru (A::B#X): Add some more tests for accessors and multiline definitions. * test/etags/ETAGS.good_1: * test/etags/ETAGS.good_2: * test/etags/ETAGS.good_3: * test/etags/ETAGS.good_4: * test/etags/ETAGS.good_5: * test/etags/ETAGS.good_6: * test/etags/CTAGS.good: Adapt to changes in Ruby tags. --- lib-src/etags.c | 77 +++++++++++++++++++++++++----------- test/etags/CTAGS.good | 18 +++++---- test/etags/ETAGS.good_1 | 24 ++++++----- test/etags/ETAGS.good_2 | 24 ++++++----- test/etags/ETAGS.good_3 | 24 ++++++----- test/etags/ETAGS.good_4 | 24 ++++++----- test/etags/ETAGS.good_5 | 24 ++++++----- test/etags/ETAGS.good_6 | 24 ++++++----- test/etags/ruby-src/test1.ru | 10 +++-- 9 files changed, 155 insertions(+), 94 deletions(-) diff --git a/lib-src/etags.c b/lib-src/etags.c index ca6fe51bdb6..bb2758941a4 100644 --- a/lib-src/etags.c +++ b/lib-src/etags.c @@ -4630,6 +4630,7 @@ static void Ruby_functions (FILE *inf) { char *cp = NULL; + bool reader = false, writer = false, alias = false, continuation = false; LOOP_ON_INPUT_LINES (inf, lb, cp) { @@ -4638,7 +4639,9 @@ Ruby_functions (FILE *inf) char *name; cp = skip_spaces (cp); - if (c_isalpha (*cp) && c_isupper (*cp)) /* constants */ + if (!continuation + /* Constants. */ + && c_isalpha (*cp) && c_isupper (*cp)) { char *bp, *colon = NULL; @@ -4661,9 +4664,11 @@ Ruby_functions (FILE *inf) } } } - else if ((is_method = LOOKING_AT (cp, "def")) /* module/class/method */ - || (is_class = LOOKING_AT (cp, "class")) - || LOOKING_AT (cp, "module")) + else if (!continuation + /* Modules, classes, methods. */ + && ((is_method = LOOKING_AT (cp, "def")) + || (is_class = LOOKING_AT (cp, "class")) + || LOOKING_AT (cp, "module"))) { const char self_name[] = "self."; const size_t self_size1 = sizeof (self_name) - 1; @@ -4701,21 +4706,27 @@ Ruby_functions (FILE *inf) else { /* Tag accessors and aliases. */ + + if (!continuation) + reader = writer = alias = false; + while (*cp && *cp != '#') { - bool reader = false, writer = false, alias = false; - - if (LOOKING_AT (cp, "attr_reader")) - reader = true; - else if (LOOKING_AT (cp, "attr_writer")) - writer = true; - else if (LOOKING_AT (cp, "attr_accessor")) + if (!continuation) { - reader = true; - writer = true; + reader = writer = alias = false; + if (LOOKING_AT (cp, "attr_reader")) + reader = true; + else if (LOOKING_AT (cp, "attr_writer")) + writer = true; + else if (LOOKING_AT (cp, "attr_accessor")) + { + reader = true; + writer = true; + } + else if (LOOKING_AT (cp, "alias_method")) + alias = true; } - else if (LOOKING_AT (cp, "alias_method")) - alias = true; if (reader || writer || alias) { do { @@ -4725,9 +4736,12 @@ Ruby_functions (FILE *inf) np++; cp = skip_name (cp); if (reader) - make_tag (np, cp - np, true, - lb.buffer, cp - lb.buffer + 1, - lineno, linecharno); + { + make_tag (np, cp - np, true, + lb.buffer, cp - lb.buffer + 1, + lineno, linecharno); + continuation = false; + } if (writer) { size_t name_len = cp - np + 1; @@ -4737,19 +4751,34 @@ Ruby_functions (FILE *inf) memcpy (wr_name + name_len - 1, "=", 2); pfnote (wr_name, true, lb.buffer, cp - lb.buffer + 1, lineno, linecharno); + continuation = false; } if (alias) { - make_tag (np, cp - np, true, - lb.buffer, cp - lb.buffer + 1, - lineno, linecharno); + if (!continuation) + make_tag (np, cp - np, true, + lb.buffer, cp - lb.buffer + 1, + lineno, linecharno); + continuation = false; while (*cp && *cp != '#' && *cp != ';') - cp++; + { + if (*cp == ',') + continuation = true; + else if (!c_isspace (*cp)) + continuation = false; + cp++; + } + if (*cp == ';') + continuation = false; } - } while (*cp == ',' + cp = skip_spaces (cp); + } while ((alias + ? (*cp == ',') + : (continuation = (*cp == ','))) && (cp = skip_spaces (cp + 1), *cp && *cp != '#')); } - cp = skip_name (cp); + if (*cp != '#') + cp = skip_name (cp); while (*cp && *cp != '#' && notinname (*cp)) cp++; } diff --git a/test/etags/CTAGS.good b/test/etags/CTAGS.good index afb1096b084..b78c194ac44 100644 --- a/test/etags/CTAGS.good +++ b/test/etags/CTAGS.good @@ -454,7 +454,7 @@ Condition_Variable/t ada-src/2ataspri.ads /^ type Condition_Variable is privat Condition_Variable/t ada-src/2ataspri.ads /^ type Condition_Variable is$/ Configure pyt-src/server.py /^class Configure(Frame, ControlEdit):$/ ConfirmQuit pyt-src/server.py /^def ConfirmQuit(frame, context):$/ -Constant ruby-src/test1.ru 35 +Constant ruby-src/test1.ru 39 ControlEdit pyt-src/server.py /^class ControlEdit(Frame):$/ Controls pyt-src/server.py /^class Controls:$/ CopyTextString pas-src/common.pas /^function CopyTextString;(*($/ @@ -2556,11 +2556,12 @@ bar c-src/c.c /^void bar() {while(0) {}}$/ bar c.c 143 bar c-src/h.h 19 bar cp-src/x.cc /^XX::bar()$/ -bar= ruby-src/test1.ru /^ attr_writer :bar$/ +bar= ruby-src/test1.ru /^ attr_writer :bar,$/ bas_syn prol-src/natded.prolog /^bas_syn(n(_)).$/ base c-src/emacs/src/lisp.h 2188 base cp-src/c.C /^double base (void) const { return rng_base; }$/ base cp-src/Range.h /^ double base (void) const { return rng_base; }$/ +baz= ruby-src/test1.ru /^ :baz,$/ bb c.c 275 bbb c.c 251 bbbbbb c-src/h.h 113 @@ -3514,6 +3515,7 @@ modifier_symbols c-src/emacs/src/keyboard.c 6327 modify_event_symbol c-src/emacs/src/keyboard.c /^modify_event_symbol (ptrdiff_t symbol_num, int mod/ module_class_method ruby-src/test.rb /^ def ModuleExample.module_class_method$/ module_instance_method ruby-src/test.rb /^ def module_instance_method$/ +more= ruby-src/test1.ru /^ :more$/ more_aligned_int c.c 165 morecore_nolock c-src/emacs/src/gmalloc.c /^morecore_nolock (size_t size)$/ morecore_recursing c-src/emacs/src/gmalloc.c 604 @@ -3879,7 +3881,7 @@ questo ../c/c.web 34 quiettest make-src/Makefile /^quiettest:$/ quit_char c-src/emacs/src/keyboard.c 192 quit_throw_to_read_char c-src/emacs/src/keyboard.c /^quit_throw_to_read_char (bool from_signal)$/ -qux ruby-src/test1.ru /^ alias_method :qux, :tee$/ +qux ruby-src/test1.ru /^ alias_method :qux, :tee, attr_accessor :bogu/ qux= ruby-src/test1.ru /^ def qux=(tee)$/ r0 c-src/sysdep.h 54 r1 c-src/sysdep.h 55 @@ -3904,8 +3906,8 @@ read cp-src/conway.hpp /^ char read() { return alive; }$/ read php-src/lce_functions.php /^ function read()$/ read-key-sequence c-src/emacs/src/keyboard.c /^DEFUN ("read-key-sequence", Fread_key_sequence, Sr/ read-key-sequence-vector c-src/emacs/src/keyboard.c /^DEFUN ("read-key-sequence-vector", Fread_key_seque/ -read1 ruby-src/test1.ru /^ attr_reader :read1, :read2; attr_writer :wri/ -read2 ruby-src/test1.ru /^ attr_reader :read1, :read2; attr_writer :wri/ +read1 ruby-src/test1.ru /^ attr_reader :read1 , :read2; attr_writer :wr/ +read2 ruby-src/test1.ru /^ attr_reader :read1 , :read2; attr_writer :wr/ read_char c-src/emacs/src/keyboard.c /^read_char (int commandflag, Lisp_Object map,$/ read_char_help_form_unwind c-src/emacs/src/keyboard.c /^read_char_help_form_unwind (void)$/ read_char_minibuf_menu_prompt c-src/emacs/src/keyboard.c /^read_char_minibuf_menu_prompt (int commandflag,$/ @@ -4164,6 +4166,7 @@ substitute c-src/etags.c /^substitute (char *in, char *out, struct re_registe/ subsubsec=\relax tex-src/texinfo.tex /^\\let\\appendixsubsubsec=\\relax$/ subsubsection perl-src/htlmify-cystic 27 subsubsection=\relax tex-src/texinfo.tex /^\\let\\appendixsubsubsection=\\relax$/ +subtle ruby-src/test1.ru /^ :tee ; attr_reader :subtle$/ subtree prol-src/natded.prolog /^subtree(T,T).$/ suffix c-src/etags.c 186 suffixes c-src/etags.c 195 @@ -4450,8 +4453,8 @@ womboid c-src/h.h 75 word_size c-src/emacs/src/lisp.h 1473 write php-src/lce_functions.php /^ function write()$/ write php-src/lce_functions.php /^ function write($save="yes")$/ -write1= ruby-src/test1.ru /^ attr_reader :read1, :read2; attr_writer :wri/ -write2= ruby-src/test1.ru /^ attr_reader :read1, :read2; attr_writer :wri/ +write1= ruby-src/test1.ru /^ attr_reader :read1 , :read2; attr_writer :wr/ +write2= ruby-src/test1.ru /^ attr_reader :read1 , :read2; attr_writer :wr/ write_abbrev c-src/abbrev.c /^write_abbrev (sym, stream)$/ write_classname c-src/etags.c /^write_classname (linebuffer *cn, const char *quali/ write_lex prol-src/natded.prolog /^write_lex(File):-$/ @@ -4492,6 +4495,7 @@ xref-location-marker el-src/emacs/lisp/progmodes/etags.el /^(cl-defmethod xref-l xref-make-etags-location el-src/emacs/lisp/progmodes/etags.el /^(defun xref-make-etags-location (tag-info file)$/ xrnew c-src/etags.c /^#define xrnew(op, n, Type) ((op) = (Type *) xreall/ xx make-src/Makefile /^xx="this line is here because of a fontlock bug$/ +xyz ruby-src/test1.ru /^ alias_method :xyz,$/ y cp-src/conway.hpp 7 y cp-src/clheir.hpp 49 y cp-src/clheir.hpp 58 diff --git a/test/etags/ETAGS.good_1 b/test/etags/ETAGS.good_1 index 87ab88fd6c2..1390187863f 100644 --- a/test/etags/ETAGS.good_1 +++ b/test/etags/ETAGS.good_1 @@ -3061,7 +3061,7 @@ module ModuleExample1,0 def module_instance_method46,1051 def ModuleExample.module_class_methodmodule_class_method49,1131 -ruby-src/test1.ru,655 +ruby-src/test1.ru,828 class A1,0 def a(2,8 def b(5,38 @@ -3075,15 +3075,19 @@ module A9,57 def qux=(qux=22,194 def X25,232 attr_reader :foofoo26,242 - attr_reader :read1,read127,265 - attr_reader :read1, :read2;read227,265 - attr_reader :read1, :read2; attr_writer :write1,write1=27,265 - attr_reader :read1, :read2; attr_writer :write1, :write2write2=27,265 - attr_writer :barbar=28,328 - attr_accessor :teetee29,351 - attr_accessor :teetee=29,351 - alias_method :qux,qux30,376 -A::Constant Constant35,425 + attr_reader :read1 read127,265 + attr_reader :read1 , :read2;read227,265 + attr_reader :read1 , :read2; attr_writer :write1,write1=27,265 + attr_reader :read1 , :read2; attr_writer :write1, :write2write2=27,265 + attr_writer :bar,bar=28,329 + :baz,baz=29,353 + :moremore=30,377 + attr_accessor :teetee31,401 + attr_accessor :teetee=31,401 + alias_method :qux,qux32,426 + alias_method :xyz,xyz33,478 + :tee ; attr_reader :subtlesubtle34,503 +A::Constant Constant39,568 tex-src/testenv.tex,52 \newcommand{\nm}\nm4,77 diff --git a/test/etags/ETAGS.good_2 b/test/etags/ETAGS.good_2 index 861598232a9..f8b1546ef48 100644 --- a/test/etags/ETAGS.good_2 +++ b/test/etags/ETAGS.good_2 @@ -3631,7 +3631,7 @@ module ModuleExample1,0 def module_instance_method46,1051 def ModuleExample.module_class_methodmodule_class_method49,1131 -ruby-src/test1.ru,655 +ruby-src/test1.ru,828 class A1,0 def a(2,8 def b(5,38 @@ -3645,15 +3645,19 @@ module A9,57 def qux=(qux=22,194 def X25,232 attr_reader :foofoo26,242 - attr_reader :read1,read127,265 - attr_reader :read1, :read2;read227,265 - attr_reader :read1, :read2; attr_writer :write1,write1=27,265 - attr_reader :read1, :read2; attr_writer :write1, :write2write2=27,265 - attr_writer :barbar=28,328 - attr_accessor :teetee29,351 - attr_accessor :teetee=29,351 - alias_method :qux,qux30,376 -A::Constant Constant35,425 + attr_reader :read1 read127,265 + attr_reader :read1 , :read2;read227,265 + attr_reader :read1 , :read2; attr_writer :write1,write1=27,265 + attr_reader :read1 , :read2; attr_writer :write1, :write2write2=27,265 + attr_writer :bar,bar=28,329 + :baz,baz=29,353 + :moremore=30,377 + attr_accessor :teetee31,401 + attr_accessor :teetee=31,401 + alias_method :qux,qux32,426 + alias_method :xyz,xyz33,478 + :tee ; attr_reader :subtlesubtle34,503 +A::Constant Constant39,568 tex-src/testenv.tex,52 \newcommand{\nm}\nm4,77 diff --git a/test/etags/ETAGS.good_3 b/test/etags/ETAGS.good_3 index 52d5a613b61..a1e895af7f6 100644 --- a/test/etags/ETAGS.good_3 +++ b/test/etags/ETAGS.good_3 @@ -3408,7 +3408,7 @@ module ModuleExample1,0 def module_instance_method46,1051 def ModuleExample.module_class_methodmodule_class_method49,1131 -ruby-src/test1.ru,655 +ruby-src/test1.ru,828 class A1,0 def a(2,8 def b(5,38 @@ -3422,15 +3422,19 @@ module A9,57 def qux=(qux=22,194 def X25,232 attr_reader :foofoo26,242 - attr_reader :read1,read127,265 - attr_reader :read1, :read2;read227,265 - attr_reader :read1, :read2; attr_writer :write1,write1=27,265 - attr_reader :read1, :read2; attr_writer :write1, :write2write2=27,265 - attr_writer :barbar=28,328 - attr_accessor :teetee29,351 - attr_accessor :teetee=29,351 - alias_method :qux,qux30,376 -A::Constant Constant35,425 + attr_reader :read1 read127,265 + attr_reader :read1 , :read2;read227,265 + attr_reader :read1 , :read2; attr_writer :write1,write1=27,265 + attr_reader :read1 , :read2; attr_writer :write1, :write2write2=27,265 + attr_writer :bar,bar=28,329 + :baz,baz=29,353 + :moremore=30,377 + attr_accessor :teetee31,401 + attr_accessor :teetee=31,401 + alias_method :qux,qux32,426 + alias_method :xyz,xyz33,478 + :tee ; attr_reader :subtlesubtle34,503 +A::Constant Constant39,568 tex-src/testenv.tex,52 \newcommand{\nm}\nm4,77 diff --git a/test/etags/ETAGS.good_4 b/test/etags/ETAGS.good_4 index 333274cb253..32390fab324 100644 --- a/test/etags/ETAGS.good_4 +++ b/test/etags/ETAGS.good_4 @@ -3225,7 +3225,7 @@ module ModuleExample1,0 def module_instance_method46,1051 def ModuleExample.module_class_methodmodule_class_method49,1131 -ruby-src/test1.ru,655 +ruby-src/test1.ru,828 class A1,0 def a(2,8 def b(5,38 @@ -3239,15 +3239,19 @@ module A9,57 def qux=(qux=22,194 def X25,232 attr_reader :foofoo26,242 - attr_reader :read1,read127,265 - attr_reader :read1, :read2;read227,265 - attr_reader :read1, :read2; attr_writer :write1,write1=27,265 - attr_reader :read1, :read2; attr_writer :write1, :write2write2=27,265 - attr_writer :barbar=28,328 - attr_accessor :teetee29,351 - attr_accessor :teetee=29,351 - alias_method :qux,qux30,376 -A::Constant Constant35,425 + attr_reader :read1 read127,265 + attr_reader :read1 , :read2;read227,265 + attr_reader :read1 , :read2; attr_writer :write1,write1=27,265 + attr_reader :read1 , :read2; attr_writer :write1, :write2write2=27,265 + attr_writer :bar,bar=28,329 + :baz,baz=29,353 + :moremore=30,377 + attr_accessor :teetee31,401 + attr_accessor :teetee=31,401 + alias_method :qux,qux32,426 + alias_method :xyz,xyz33,478 + :tee ; attr_reader :subtlesubtle34,503 +A::Constant Constant39,568 tex-src/testenv.tex,52 \newcommand{\nm}\nm4,77 diff --git a/test/etags/ETAGS.good_5 b/test/etags/ETAGS.good_5 index fdf2329ee06..ee19bcfc9d2 100644 --- a/test/etags/ETAGS.good_5 +++ b/test/etags/ETAGS.good_5 @@ -4142,7 +4142,7 @@ module ModuleExample1,0 def module_instance_method46,1051 def ModuleExample.module_class_methodmodule_class_method49,1131 -ruby-src/test1.ru,655 +ruby-src/test1.ru,828 class A1,0 def a(2,8 def b(5,38 @@ -4156,15 +4156,19 @@ module A9,57 def qux=(qux=22,194 def X25,232 attr_reader :foofoo26,242 - attr_reader :read1,read127,265 - attr_reader :read1, :read2;read227,265 - attr_reader :read1, :read2; attr_writer :write1,write1=27,265 - attr_reader :read1, :read2; attr_writer :write1, :write2write2=27,265 - attr_writer :barbar=28,328 - attr_accessor :teetee29,351 - attr_accessor :teetee=29,351 - alias_method :qux,qux30,376 -A::Constant Constant35,425 + attr_reader :read1 read127,265 + attr_reader :read1 , :read2;read227,265 + attr_reader :read1 , :read2; attr_writer :write1,write1=27,265 + attr_reader :read1 , :read2; attr_writer :write1, :write2write2=27,265 + attr_writer :bar,bar=28,329 + :baz,baz=29,353 + :moremore=30,377 + attr_accessor :teetee31,401 + attr_accessor :teetee=31,401 + alias_method :qux,qux32,426 + alias_method :xyz,xyz33,478 + :tee ; attr_reader :subtlesubtle34,503 +A::Constant Constant39,568 tex-src/testenv.tex,52 \newcommand{\nm}\nm4,77 diff --git a/test/etags/ETAGS.good_6 b/test/etags/ETAGS.good_6 index 95d59d3db39..f4d9ab8c1a1 100644 --- a/test/etags/ETAGS.good_6 +++ b/test/etags/ETAGS.good_6 @@ -4142,7 +4142,7 @@ module ModuleExample1,0 def module_instance_method46,1051 def ModuleExample.module_class_methodmodule_class_method49,1131 -ruby-src/test1.ru,655 +ruby-src/test1.ru,828 class A1,0 def a(2,8 def b(5,38 @@ -4156,15 +4156,19 @@ module A9,57 def qux=(qux=22,194 def X25,232 attr_reader :foofoo26,242 - attr_reader :read1,read127,265 - attr_reader :read1, :read2;read227,265 - attr_reader :read1, :read2; attr_writer :write1,write1=27,265 - attr_reader :read1, :read2; attr_writer :write1, :write2write2=27,265 - attr_writer :barbar=28,328 - attr_accessor :teetee29,351 - attr_accessor :teetee=29,351 - alias_method :qux,qux30,376 -A::Constant Constant35,425 + attr_reader :read1 read127,265 + attr_reader :read1 , :read2;read227,265 + attr_reader :read1 , :read2; attr_writer :write1,write1=27,265 + attr_reader :read1 , :read2; attr_writer :write1, :write2write2=27,265 + attr_writer :bar,bar=28,329 + :baz,baz=29,353 + :moremore=30,377 + attr_accessor :teetee31,401 + attr_accessor :teetee=31,401 + alias_method :qux,qux32,426 + alias_method :xyz,xyz33,478 + :tee ; attr_reader :subtlesubtle34,503 +A::Constant Constant39,568 tex-src/testenv.tex,52 \newcommand{\nm}\nm4,77 diff --git a/test/etags/ruby-src/test1.ru b/test/etags/ruby-src/test1.ru index 75dcd51bbe0..bc9dbec36a2 100644 --- a/test/etags/ruby-src/test1.ru +++ b/test/etags/ruby-src/test1.ru @@ -24,10 +24,14 @@ module A end def X attr_reader :foo - attr_reader :read1, :read2; attr_writer :write1, :write2 - attr_writer :bar + attr_reader :read1 , :read2; attr_writer :write1, :write2 + attr_writer :bar, + :baz, + :more attr_accessor :tee - alias_method :qux, :tee + alias_method :qux, :tee, attr_accessor :bogus + alias_method :xyz, + :tee ; attr_reader :subtle end end end From 2c0dc9fa70dcde56f68db6e72309f995e5c0e6e0 Mon Sep 17 00:00:00 2001 From: Noam Postavsky Date: Wed, 3 Feb 2016 19:48:45 +0200 Subject: [PATCH 42/56] Fix warning message in hack-local-variables * lisp/files.el (hack-local-variables): use 'thisbuf' to reference the original buffer name in the warning message. (Bug#21681) --- lisp/files.el | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lisp/files.el b/lisp/files.el index 3898dff0383..72c2752634e 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -3426,7 +3426,11 @@ local variables, but directory-local variables may still be applied." (format-message "%s: `lexical-binding' at end of file unreliable" (file-name-nondirectory - (or buffer-file-name "")))))) + ;; We are called from + ;; 'with-temp-buffer', so we need + ;; to use 'thisbuf's name in the + ;; warning message. + (or (buffer-file-name thisbuf) "")))))) (t (ignore-errors (push (cons (if (eq var 'eval) From 91557f5e2decb723544a703d01f11879be07fd04 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 3 Feb 2016 17:13:04 -0800 Subject: [PATCH 43/56] Quoting fixes in doc strings and diagnostics * lisp/emacs-lisp/bytecomp.el (byte-compile-setq, byte-compile-funcall): * lisp/gnus/mml-smime.el (mml-smime-get-dns-cert) (mml-smime-get-ldap-cert): Follow user style preference when quoting diagnostics. --- CONTRIBUTE | 2 +- admin/release-process | 18 +++++++++--------- doc/misc/tramp.texi | 2 +- lisp/emacs-lisp/bytecomp.el | 8 +++++--- lisp/emacs-lisp/map.el | 2 +- lisp/emacs-lisp/pcase.el | 6 +++--- lisp/gnus/mml-smime.el | 4 ++-- lisp/xwidget.el | 8 ++++---- 8 files changed, 26 insertions(+), 24 deletions(-) diff --git a/CONTRIBUTE b/CONTRIBUTE index 3ccaff3393f..f1f3a3f86fc 100644 --- a/CONTRIBUTE +++ b/CONTRIBUTE @@ -252,7 +252,7 @@ Emacs uses ERT, Emacs Lisp Regression Testing, for testing. See (info for more information on writing and running tests. If your test lasts longer than some few seconds, mark it in its -`ert-deftest' definition with ":tags '(:expensive-test)". +'ert-deftest' definition with ":tags '(:expensive-test)". To run tests on the entire Emacs tree, run "make check" from the top-level directory. Most tests are in the directory diff --git a/admin/release-process b/admin/release-process index 5a95fa2d7bc..2f23dac9b7f 100644 --- a/admin/release-process +++ b/admin/release-process @@ -7,7 +7,7 @@ Each release cycle will be split into two periods. ** Phase one: development The first phase of the release schedule is the "heads-down" working -period for new features, on the `master' branch and several feature +period for new features, on the 'master' branch and several feature branches. ** Phase two: fixing and stabilizing the release branch @@ -23,11 +23,11 @@ new features. At the beginning of this phase, a release branch called "emacs-NN" ("NN" represents the major version number of the new Emacs release) -will be cut from `master'. When that happens, the version number on -`master' should be incremented; use admin/admin.el's `set-version' +will be cut from 'master'. When that happens, the version number on +'master' should be incremented; use admin/admin.el's 'set-version' command to do that, then commit the changes it made and push to -`master'. For major releases, also update the value of -`customize-changed-options-previous-release'. +'master'. For major releases, also update the value of +'customize-changed-options-previous-release'. The 2 main manuals, the User Manual and the Emacs Lisp Manual, need to be proofread, preferably by at least 2 different persons, and any @@ -35,7 +35,7 @@ uncovered problems fixed. This is a lot of work, so it is advisable to divide the job between several people (see the checklist near the end of this file). -In parallel to this phase, `master' can receive new features, to be +In parallel to this phase, 'master' can receive new features, to be released in the next release cycle. From time to time, the master branches merges bugfix commits from the "emacs-NN" branch. @@ -55,7 +55,7 @@ Change "block" to "unblock" to unblock the bug. * TO BE DONE SHORTLY BEFORE RELEASE ** Make sure the Copyright date reflects the current year in the source -files. See `admin/notes/years' for information about maintaining +files. See 'admin/notes/years' for information about maintaining copyright years for GNU Emacs. ** Make sure the necessary sources and scripts for any generated files @@ -344,10 +344,10 @@ windows.texi * OTHER INFORMATION -For Emacs's versioning scheme, see `admin/notes/versioning'. +For Emacs's versioning scheme, see 'admin/notes/versioning'. For instructions to create pretest or release tarballs, announcements, -etc., see `admin/make-tarball.txt'. +etc., see 'admin/make-tarball.txt'. Local variables: diff --git a/doc/misc/tramp.texi b/doc/misc/tramp.texi index 7bf2e532e01..9320a6e166f 100644 --- a/doc/misc/tramp.texi +++ b/doc/misc/tramp.texi @@ -2036,7 +2036,7 @@ When @end ifset is @code{nil} (the default), such problems do not occur. -To ``turns off'' the backup feature for @value{tramp} files and stop +To ``turn off'' the backup feature for @value{tramp} files and stop @value{tramp} from saving to the backup directory, use this: @ifset emacs diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index 4ee8b37719f..1526e2fdeb9 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el @@ -1169,7 +1169,7 @@ Each function's symbol gets added to `byte-compile-noruntime-functions'." (display-warning 'bytecomp string level byte-compile-log-buffer))) (defun byte-compile-warn (format &rest args) - "Issue a byte compiler warning; use (format FORMAT ARGS...) for message." + "Issue a byte compiler warning; use (format-message FORMAT ARGS...) for message." (setq format (apply #'format-message format args)) (if byte-compile-error-on-warn (error "%s" format) ; byte-compile-file catches and logs it @@ -3746,7 +3746,8 @@ discarding." (if (= (logand len 1) 1) (progn (byte-compile-log-warning - (format "missing value for `%S' at end of setq" (car (last args))) + (format-message + "missing value for `%S' at end of setq" (car (last args))) nil :error) (byte-compile-form `(signal 'wrong-number-of-arguments '(setq ,len)) @@ -4017,7 +4018,8 @@ that suppresses all warnings during execution of BODY." (progn (mapc 'byte-compile-form (cdr form)) (byte-compile-out 'byte-call (length (cdr (cdr form))))) - (byte-compile-log-warning "`funcall' called with no arguments" nil :error) + (byte-compile-log-warning + (format-message "`funcall' called with no arguments") nil :error) (byte-compile-form '(signal 'wrong-number-of-arguments '(funcall 0)) byte-compile--for-effect))) diff --git a/lisp/emacs-lisp/map.el b/lisp/emacs-lisp/map.el index 878611538fc..ec8d3d79d9f 100644 --- a/lisp/emacs-lisp/map.el +++ b/lisp/emacs-lisp/map.el @@ -55,7 +55,7 @@ found in the map, the corresponding PAT doesn't match the value associated to the KEY. Each element can also be a SYMBOL, which is an abbreviation of a (KEY -PAT) tuple of the form ('SYMBOL SYMBOL). +PAT) tuple of the form (\\='SYMBOL SYMBOL). Keys in ARGS not found in the map are ignored, and the match doesn't fail." diff --git a/lisp/emacs-lisp/pcase.el b/lisp/emacs-lisp/pcase.el index 7be997e6469..7e164c0fe5c 100644 --- a/lisp/emacs-lisp/pcase.el +++ b/lisp/emacs-lisp/pcase.el @@ -111,7 +111,7 @@ CASES is a list of elements of the form (PATTERN CODE...). A structural PATTERN describes a template that identifies a class -of values. For example, the pattern `(,foo ,bar) matches any +of values. For example, the pattern \\=`(,foo ,bar) matches any two element list, binding its elements to symbols named `foo' and `bar' -- in much the same way that `cl-destructuring-bind' would. @@ -119,12 +119,12 @@ A significant difference from `cl-destructuring-bind' is that, if a pattern match fails, the next case is tried until either a successful match is found or there are no more cases. -Another difference is that pattern elements may be backquoted, +Another difference is that pattern elements may be quoted, meaning they must match exactly: The pattern \\='(foo bar) matches only against two element lists containing the symbols `foo' and `bar' in that order. (As a short-hand, atoms always match themselves, such as numbers or strings, and need not be -quoted). +quoted.) Lastly, a pattern can be logical, such as (pred numberp), that matches any number-like element; or the symbol `_', that matches diff --git a/lisp/gnus/mml-smime.el b/lisp/gnus/mml-smime.el index 2d8f25c5003..248e63682c8 100644 --- a/lisp/gnus/mml-smime.el +++ b/lisp/gnus/mml-smime.el @@ -216,7 +216,7 @@ Whether the passphrase is cached at all is controlled by ""))))) (if (setq cert (smime-cert-by-dns who)) (setq result (list 'certfile (buffer-name cert))) - (setq bad (format "`%s' not found. " who)))) + (setq bad (gnus-format-message "`%s' not found. " who)))) (quit)) result)) @@ -235,7 +235,7 @@ Whether the passphrase is cached at all is controlled by ""))))) (if (setq cert (smime-cert-by-ldap who)) (setq result (list 'certfile (buffer-name cert))) - (setq bad (format "`%s' not found. " who)))) + (setq bad (gnus-format-message "`%s' not found. " who)))) (quit)) result)) diff --git a/lisp/xwidget.el b/lisp/xwidget.el index 8c8e679c8da..cd8ec0ec29d 100644 --- a/lisp/xwidget.el +++ b/lisp/xwidget.el @@ -144,7 +144,7 @@ Interactively, URL defaults to the string looking like a url around point." (defun xwidget-webkit-scroll-up () "Scroll webkit up. Depending on the value of `xwidget-webkit-scroll-behavior', -this scrolls in 'native' fashion, or like `image-mode' would." +this scrolls in `native' fashion, or like `image-mode' would." (interactive) (if (eq xwidget-webkit-scroll-behavior 'native) (xwidget-set-adjustment (xwidget-webkit-last-session) 'vertical t 50) @@ -153,7 +153,7 @@ this scrolls in 'native' fashion, or like `image-mode' would." (defun xwidget-webkit-scroll-down () "Scroll webkit down. Depending on the value of `xwidget-webkit-scroll-behavior', -this scrolls in 'native' fashion, or like `image-mode' would." +this scrolls in `native' fashion, or like `image-mode' would." (interactive) (if (eq xwidget-webkit-scroll-behavior 'native) (xwidget-set-adjustment (xwidget-webkit-last-session) 'vertical t -50) @@ -162,7 +162,7 @@ this scrolls in 'native' fashion, or like `image-mode' would." (defun xwidget-webkit-scroll-forward () "Scroll webkit forwards. Depending on the value of `xwidget-webkit-scroll-behavior', -this scrolls in 'native' fashion, or like `image-mode' would." +this scrolls in `native' fashion, or like `image-mode' would." (interactive) (if (eq xwidget-webkit-scroll-behavior 'native) (xwidget-set-adjustment (xwidget-webkit-last-session) 'horizontal t 50) @@ -171,7 +171,7 @@ this scrolls in 'native' fashion, or like `image-mode' would." (defun xwidget-webkit-scroll-backward () "Scroll webkit backwards. Depending on the value of `xwidget-webkit-scroll-behavior', -this scrolls in 'native' fashion, or like `image-mode' would." +this scrolls in `native' fashion, or like `image-mode' would." (interactive) (if (eq xwidget-webkit-scroll-behavior 'native) (xwidget-set-adjustment (xwidget-webkit-last-session) 'horizontal t -50) From 255b68f00ba74dbe2f6014b38cf17c8390be6561 Mon Sep 17 00:00:00 2001 From: Teemu Likonen Date: Thu, 4 Feb 2016 14:09:06 +1100 Subject: [PATCH 44/56] Fix IMAP doc example * doc/misc/gnus.texi (Client-Side IMAP Splitting): Fix example. --- doc/misc/gnus.texi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/misc/gnus.texi b/doc/misc/gnus.texi index ab96684eb62..8dd0c1ba9d5 100644 --- a/doc/misc/gnus.texi +++ b/doc/misc/gnus.texi @@ -14325,7 +14325,7 @@ Here's a complete example @code{nnimap} backend with a client-side @example (nnimap "imap.example.com" (nnimap-inbox "INBOX") - (nnimap-split-methods + (nnimap-split-fancy (| ("MailScanner-SpamCheck" "spam" "spam.detected") (to "foo@@bar.com" "foo") "undecided"))) From 66b315c9c94c871de2c70b92ac69ef86f19d8a2f Mon Sep 17 00:00:00 2001 From: Dima Kogan Date: Thu, 4 Feb 2016 14:24:18 +1100 Subject: [PATCH 45/56] Make erc work when subword-mode is switched on * lisp/erc/erc-backend.el (erc-forward-word, erc-word-at-arg-p) (erc-bounds-of-word-at-point): New functions to do word-based things when subword-mode is switched on. * lisp/erc/erc-button.el (erc-button-add-nickname-buttons): Use them (bug#17558). --- lisp/erc/erc-backend.el | 28 +++++++++++++++++++++++++++- lisp/erc/erc-button.el | 16 ++++++++-------- 2 files changed, 35 insertions(+), 9 deletions(-) diff --git a/lisp/erc/erc-backend.el b/lisp/erc/erc-backend.el index 694f66eb050..6d508e203f4 100644 --- a/lisp/erc/erc-backend.el +++ b/lisp/erc/erc-backend.el @@ -474,13 +474,39 @@ Currently this is called by `erc-send-input'." nil t)) (split-string (buffer-string) "\n")))) +(defun erc-forward-word () + "Moves forward one word, ignoring any subword settings. If no +subword-mode is active, then this is (forward-word)." + (skip-syntax-forward "^w") + (> (skip-syntax-forward "w") 0)) + +(defun erc-word-at-arg-p (pos) + "Reports whether the char after a given POS has word syntax. +If POS is out of range, the value is nil." + (let ((c (char-after pos))) + (if c + (eq ?w (char-syntax c)) + nil))) + +(defun erc-bounds-of-word-at-point () + "Returns the bounds of a word at point, or nil if we're not at +a word. If no subword-mode is active, then this +is (bounds-of-thing-at-point 'word)." + (if (or (erc-word-at-arg-p (point)) + (erc-word-at-arg-p (1- (point)))) + (save-excursion + (let* ((start (progn (skip-syntax-backward "w") (point))) + (end (progn (skip-syntax-forward "w") (point)))) + (cons start end))) + nil)) + ;; Used by CTCP functions (defun erc-upcase-first-word (str) "Upcase the first word in STR." (with-temp-buffer (insert str) (goto-char (point-min)) - (upcase-word 1) + (upcase-region (point) (progn (erc-forward-word) (point))) (buffer-string))) (defun erc-server-setup-periodical-ping (buffer) diff --git a/lisp/erc/erc-button.el b/lisp/erc/erc-button.el index e1ccea90dd1..7d509196330 100644 --- a/lisp/erc/erc-button.el +++ b/lisp/erc/erc-button.el @@ -300,14 +300,14 @@ specified by `erc-button-alist'." (when (or (eq t form) (eval form)) (goto-char (point-min)) - (while (forward-word 1) - (setq bounds (bounds-of-thing-at-point 'word)) - (setq word (buffer-substring-no-properties - (car bounds) (cdr bounds))) - (when (or (and (erc-server-buffer-p) (erc-get-server-user word)) - (and erc-channel-users (erc-get-channel-user word))) - (erc-button-add-button (car bounds) (cdr bounds) - fun t (list word))))))) + (while (erc-forward-word) + (when (setq bounds (erc-bounds-of-word-at-point)) + (setq word (buffer-substring-no-properties + (car bounds) (cdr bounds))) + (when (or (and (erc-server-buffer-p) (erc-get-server-user word)) + (and erc-channel-users (erc-get-channel-user word))) + (erc-button-add-button (car bounds) (cdr bounds) + fun t (list word)))))))) (defun erc-button-add-buttons-1 (regexp entry) "Search through the buffer for matches to ENTRY and add buttons." From 56ed4e188603180aa8c9f1272da0954a80875c5c Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Thu, 4 Feb 2016 15:28:57 +1100 Subject: [PATCH 46/56] Allow eww text fields to grow * lisp/net/eww.el (eww-process-text-input): Allow text fields to grow when typing in stuff that's longer than the original width. --- lisp/net/eww.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/net/eww.el b/lisp/net/eww.el index af6e0afdfa7..f8d7c75aa2b 100644 --- a/lisp/net/eww.el +++ b/lisp/net/eww.el @@ -1046,7 +1046,7 @@ See URL `https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Input'.") (1- (line-end-position)) (eww-end-of-field))) (while (and (> length 0) - (eql (following-char) ? )) + (eql (char-after (1- (point))) ? )) (delete-region (1- (point)) (point)) (cl-decf length)))) ((< length 0) From a43a1dcc3d4a2e1eeecac43017a21779fb1557b3 Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Thu, 4 Feb 2016 15:35:20 +1100 Subject: [PATCH 47/56] Insert complete alt texts when images are disabled * lisp/net/shr.el (shr-tag-img): When images are disabled, insert the complete alt/title string (bug#22293). --- lisp/net/shr.el | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lisp/net/shr.el b/lisp/net/shr.el index c600c745323..611f0a90f69 100644 --- a/lisp/net/shr.el +++ b/lisp/net/shr.el @@ -1409,9 +1409,7 @@ The preference is a float determined from `shr-prefer-media-type'." (and shr-blocked-images (string-match shr-blocked-images url))) (setq shr-start (point)) - (if (> (string-width alt) 8) - (shr-insert (truncate-string-to-width alt 8)) - (shr-insert alt))) + (shr-insert alt)) ((and (not shr-ignore-cache) (url-is-cached (shr-encode-url url))) (funcall shr-put-image-function (shr-get-image-data url) alt)) From 7f818250739d9b7404dbe79326e1bf89fce0fd13 Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Thu, 4 Feb 2016 15:42:08 +1100 Subject: [PATCH 48/56] Make it possible to TAB to input fields * lisp/net/eww.el (eww-tag-input): Make it possible to TAB to input fields (bug#22540). --- lisp/net/eww.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lisp/net/eww.el b/lisp/net/eww.el index f8d7c75aa2b..7cb324e2399 100644 --- a/lisp/net/eww.el +++ b/lisp/net/eww.el @@ -1136,7 +1136,9 @@ See URL `https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Input'.") (t (eww-form-text dom))) (unless (= start (point)) - (put-text-property start (1+ start) 'help-echo "Input field")))) + (put-text-property start (1+ start) 'help-echo "Input field") + ;; Mark this as an element we can TAB to. + (put-text-property start (1+ start) 'shr-url dom)))) (defun eww-tag-select (dom) (shr-ensure-paragraph) From d90ab1e2215cd7afbc1957a4928b3a35931cd425 Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Thu, 4 Feb 2016 16:05:05 +1100 Subject: [PATCH 49/56] Fix typo in eww-make-unique-file-name * lisp/net/eww.el (eww-make-unique-file-name): Make this function actually work. --- lisp/net/eww.el | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/lisp/net/eww.el b/lisp/net/eww.el index 7cb324e2399..6872be4edaa 100644 --- a/lisp/net/eww.el +++ b/lisp/net/eww.el @@ -1469,21 +1469,21 @@ Differences in #targets are ignored." string))) (defun eww-make-unique-file-name (file directory) - (cond - ((zerop (length file)) - (setq file "!")) - ((string-match "\\`[.]" file) - (setq file (concat "!" file)))) - (let ((count 1) - (stem file) - (suffix "")) - (when (string-match "\\`\\(.*\\)\\([.][^.]+\\)" file) - (setq stem (match-string 1) - suffix (match-string 2))) - (while (file-exists-p (expand-file-name file directory)) - (setq file (format "%s(%d)%s" stem count suffix)) - (setq count (1+ count))) - (expand-file-name file directory))) + (cond + ((zerop (length file)) + (setq file "!")) + ((string-match "\\`[.]" file) + (setq file (concat "!" file)))) + (let ((count 1) + (stem file) + (suffix "")) + (when (string-match "\\`\\(.*\\)\\([.][^.]+\\)" file) + (setq stem (match-string 1 file) + suffix (match-string 2))) + (while (file-exists-p (expand-file-name file directory)) + (setq file (format "%s(%d)%s" stem count suffix)) + (setq count (1+ count))) + (expand-file-name file directory))) (defun eww-set-character-encoding (charset) "Set character encoding to CHARSET. From 3311f4080b5210900e582a2836d30d5ed101f3f0 Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Thu, 4 Feb 2016 16:10:49 +1100 Subject: [PATCH 50/56] Fix bookmark display widths * lisp/net/eww.el (eww-list-bookmarks): Pop to the buffer before preparing it so that the widths are computed correctly (bug#22328). --- lisp/net/eww.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/net/eww.el b/lisp/net/eww.el index 6872be4edaa..a96241d69f9 100644 --- a/lisp/net/eww.el +++ b/lisp/net/eww.el @@ -1542,8 +1542,8 @@ If CHARSET is nil then use UTF-8." (defun eww-list-bookmarks () "Display the bookmarks." (interactive) - (eww-bookmark-prepare) - (pop-to-buffer "*eww bookmarks*")) + (pop-to-buffer "*eww bookmarks*") + (eww-bookmark-prepare)) (defun eww-bookmark-prepare () (eww-read-bookmarks) From af6ab7efc7a6ce83a289e05792498fa9354e6a32 Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Thu, 4 Feb 2016 16:44:06 +1100 Subject: [PATCH 51/56] Make shr not bug out on images on non-graphical displays * lisp/net/shr.el (shr-put-image): Don't bug out on alt-less images on non-graphical displays (bug#22327). --- lisp/net/shr.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/net/shr.el b/lisp/net/shr.el index 611f0a90f69..bfda6543b68 100644 --- a/lisp/net/shr.el +++ b/lisp/net/shr.el @@ -966,7 +966,7 @@ element is the data blob and the second element is the content-type." (image-animated-p image)))) (image-animate image nil 60))) image) - (insert alt))) + (insert (or alt "")))) (defun shr-rescale-image (data &optional content-type) "Rescale DATA, if too big, to fit the current buffer." From d93d2c5b16dc98671a35374ac20fa6f7108f1c7c Mon Sep 17 00:00:00 2001 From: Kevin Brubeck Unhammer Date: Thu, 4 Feb 2016 16:49:42 +1100 Subject: [PATCH 52/56] Make tracking faces in Emacs work more reliably * lisp/erc/erc-track.el (erc-faces-in): Always return lists of faces to avoid later ambiguity (bug#22424). Copyright-paperwork-exempt: Yes --- lisp/erc/erc-track.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/erc/erc-track.el b/lisp/erc/erc-track.el index 1750cb77845..4d8feb52759 100644 --- a/lisp/erc/erc-track.el +++ b/lisp/erc/erc-track.el @@ -971,7 +971,8 @@ is in `erc-mode'." "Return a list of all faces used in STR." (let ((i 0) (m (length str)) - (faces (erc-list (get-text-property 0 'face str))) + (faces (let ((face1 (get-text-property 0 'face str))) + (when face1 (list face1)))) cur) (while (and (setq i (next-single-property-change i 'face str m)) (not (= i m))) From 8c562b2d7f6378b71e0dcbc172a4dd6673895256 Mon Sep 17 00:00:00 2001 From: Francis Litterio Date: Thu, 4 Feb 2016 16:55:01 +1100 Subject: [PATCH 53/56] Make /QUIT in erc more robust * lisp/erc/erc.el (erc-kill-query-buffers): Don't bug out if we're issuing /QUIT to disconnected servers (bug#22099). --- lisp/erc/erc.el | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/lisp/erc/erc.el b/lisp/erc/erc.el index 3e96bb279e8..51ab20e330a 100644 --- a/lisp/erc/erc.el +++ b/lisp/erc/erc.el @@ -6083,13 +6083,15 @@ If it doesn't exist, create it." (or (file-accessible-directory-p dir) (error "Cannot access %s" dir))) (defun erc-kill-query-buffers (process) - "Kill all buffers of PROCESS." + "Kill all buffers of PROCESS. +Does nothing if PROCESS is not a process object." ;; here, we only want to match the channel buffers, to avoid ;; "selecting killed buffers" b0rkage. - (erc-with-all-buffers-of-server process - (lambda () - (not (erc-server-buffer-p))) - (kill-buffer (current-buffer)))) + (when (processp process) + (erc-with-all-buffers-of-server process + (lambda () + (not (erc-server-buffer-p))) + (kill-buffer (current-buffer))))) (defun erc-nick-at-point () "Give information about the nickname at `point'. From 66c462005cc873d8e9dee684d525daa036d4f757 Mon Sep 17 00:00:00 2001 From: Carlos Pita Date: Thu, 4 Feb 2016 17:03:34 +1100 Subject: [PATCH 54/56] Make complection in erc use consistent casing * lisp/erc/erc-pcomplete.el (pcomplete-erc-all-nicks): Make case in the complection consistent (bug#18509). Copyright-paperwork-exempt: Yes --- lisp/erc/erc-pcomplete.el | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lisp/erc/erc-pcomplete.el b/lisp/erc/erc-pcomplete.el index cf3f51ba3f6..9f572396de8 100644 --- a/lisp/erc/erc-pcomplete.el +++ b/lisp/erc/erc-pcomplete.el @@ -238,10 +238,12 @@ If optional argument IGNORE-SELF is non-nil, don't return the current nick." "Returns a list of all nicks on the current server." (let (nicks) (erc-with-server-buffer - (maphash (lambda (nick _user) - (setq nicks (cons (concat nick postfix) nicks))) + (maphash (lambda (_nick user) + (setq nicks (cons + (concat (erc-server-user-nickname user) postfix) + nicks))) erc-server-users)) - nicks)) + nicks)) (defun pcomplete-erc-channels () "Returns a list of channels associated with the current server." From b99141da55d130cdf6d50b9247a6c10d925a7238 Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Thu, 4 Feb 2016 17:51:53 +1100 Subject: [PATCH 55/56] Make erc completion case-insensitive again * lisp/erc/erc.el (erc-completion-at-point): Make erc completion case-insensitive again (bug#11360). --- etc/NEWS | 4 ++++ lisp/erc/erc.el | 9 ++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/etc/NEWS b/etc/NEWS index a3d9e84cc6e..d4691b908e8 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -428,6 +428,10 @@ specified message types for the respective specified targets. --- *** Reconnection is now asynchronous. +--- +*** Nick completion is now case-insentive again after inadvertently +being made case-sensitive in Emacs 24.2. + ** Midnight-mode --- diff --git a/lisp/erc/erc.el b/lisp/erc/erc.el index 51ab20e330a..7b734460a3c 100644 --- a/lisp/erc/erc.el +++ b/lisp/erc/erc.el @@ -1141,7 +1141,7 @@ which the local user typed." (define-key map "\C-c\C-u" 'erc-kill-input) (define-key map "\C-c\C-x" 'erc-quit-server) (define-key map "\M-\t" 'ispell-complete-word) - (define-key map "\t" 'completion-at-point) + (define-key map "\t" 'erc-completion-at-point) ;; Suppress `font-lock-fontify-block' key binding since it ;; destroys face properties. @@ -3991,6 +3991,13 @@ Prompt for one if called interactively." (format "MODE %s +k %s" tgt key) (format "MODE %s -k" tgt))))) +(defun erc-completion-at-point () + "Perform complection on the text around point case-insentitively. +See `completion-at-point'." + (interactive) + (let ((completion-ignore-case t)) + (completion-at-point))) + (defun erc-quit-server (reason) "Disconnect from current server after prompting for REASON. `erc-quit-reason' works with this just like with `erc-cmd-QUIT'." From ee7399792f865905d393df05c3d4e5ec309aa06c Mon Sep 17 00:00:00 2001 From: David Edmondson Date: Thu, 4 Feb 2016 16:52:01 +1100 Subject: [PATCH 56/56] Make erc work better when encountering unknown prefix chars * lisp/erc/erc.el (erc-channel-receive-names): Output a warning instead of erroring out on unknown prefix chars (bug#22380). --- lisp/erc/erc.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/erc/erc.el b/lisp/erc/erc.el index 7b734460a3c..ef3a6b3b3ca 100644 --- a/lisp/erc/erc.el +++ b/lisp/erc/erc.el @@ -4832,7 +4832,7 @@ channel." ((pred (eq op-ch)) op) ((pred (eq adm-ch)) admin) ((pred (eq own-ch)) owner) - (_ (error "Unknown prefix char `%S'" ch) voice)) + (_ (message "Unknown prefix char `%S'" ch) voice)) 'on))) (when updatep ;; If we didn't issue the NAMES request (consider two clients