]> code.delx.au - gnu-emacs/log
gnu-emacs
8 years agoImprove display of tex-verbatim and Info quoted
Paul Eggert [Fri, 13 May 2016 20:30:33 +0000 (13:30 -0700)]
Improve display of tex-verbatim and Info quoted

Problem reported by Glenn Morris (Bug#19889).
* doc/emacs/display.texi (Standard Faces):
* doc/lispref/display.texi (Basic Faces):
* etc/NEWS: Mention fixed-pitch-serif.
* lisp/faces.el (face-font-family-alternatives):
New family alias Monospace Serif.
(fixed-pitch-serif): New face, which uses the new family.
* lisp/info.el (Info-quoted):
* lisp/textmodes/tex-mode.el (tex-verbatim): Use the new face.
* test/lisp/legacy/font-parse-tests.el (font-parse-tests--data):
Add test case for Monospace Serif.

8 years ago* lisp/net/sieve-mode.el: Handle the text:... notation
Stefan Monnier [Fri, 13 May 2016 18:32:22 +0000 (14:32 -0400)]
* lisp/net/sieve-mode.el: Handle the text:... notation

Get rid of redundant :group keywords.
(sieve-mode-syntax-table): Move initialization into declaration.
(sieve-syntax-propertize, sieve-syntax-propertize-text): New functions.
(sieve-mode): Use them.

8 years agoTweak check-declare-directory performance
Paul Eggert [Fri, 13 May 2016 15:37:56 +0000 (08:37 -0700)]
Tweak check-declare-directory performance

* lisp/emacs-lisp/check-declare.el (check-declare-directory):
Use ‘find ... -exec ... +’ for speed.

8 years agoSync from gnulib
Paul Eggert [Fri, 13 May 2016 14:51:45 +0000 (07:51 -0700)]
Sync from gnulib

This incorporates a spelling fix, plus:
2016-05-09 Fix undefined behaviour in gettext.h
* lib/gettext.h, lib/mktime.c:
Copy from gnulib.

8 years agoMerge from origin/emacs-25
Paul Eggert [Fri, 13 May 2016 14:45:30 +0000 (07:45 -0700)]
Merge from origin/emacs-25

9c2a1a2 * doc/misc/texinfo.tex: Sync from gnulib.
66cd4d8 * lisp/emacs-lisp/find-func.el (find-feature-regexp) (find-al...
1a5a05c Do not mistake colon at the end of regexp for slash symbol
4c5a00b Make package-install-from-buffer not move point
9596ea1 ; Revert "* emacs-lisp/lisp-mnt.el (lm-header): save-excursion"
f79c352 Redo the fix for bug#21839
8d2f78c Don't treat JS spread as contination method call

8 years ago* doc/misc/texinfo.tex: Sync from gnulib.
Paul Eggert [Fri, 13 May 2016 14:41:07 +0000 (07:41 -0700)]
* doc/misc/texinfo.tex: Sync from gnulib.

8 years agoCorrect server/client address
Chris Feng [Fri, 13 May 2016 03:34:39 +0000 (11:34 +0800)]
Correct server/client address

* src/process.c (Fmake_network_process): :local is for servers and :remote
is for clients.

8 years agoAutosave buffers on logout if HAVE_NTGUI
Ken Brown [Thu, 12 May 2016 19:52:26 +0000 (15:52 -0400)]
Autosave buffers on logout if HAVE_NTGUI

* src/w32fns.c (w32_wnd_proc): Pass a WM_ENDSESSION message on to
w32_read_socket.

* src/w32term.c (w32_read_socket): Create an event of type
END_SESSION_EVENT if a WM_ENDSESSION message is received.

* src/termhooks.h [HAVE_NTGUI]: New event kind END_SESSION_EVENT.

* src/keyboard.c [HAVE_NTGUI] (syms_of_keyboard): New symbol
`end-session'.
(kbd_buffer_get_event): Return an end-session event if an event of
type END_SESSION_EVENT is read.
(keys_of_keyboard): Bind the end-session event to kill-emacs in
special-event-map.  (Bug#23483)

8 years ago* lisp/cedet/semantic/{db-el,symref}.el: Mark unused vars
Stefan Monnier [Thu, 12 May 2016 19:50:24 +0000 (15:50 -0400)]
* lisp/cedet/semantic/{db-el,symref}.el: Mark unused vars

* lisp/cedet/semantic/db-el.el: Use _ to mark unused vars.
(object-print): Use cl-call-next-method instead of call-next-method.
* lisp/cedet/semantic/symref.el: Use _ to mark unused vars.

8 years ago* lisp/emacs-lisp/find-func.el (find-feature-regexp)
Glenn Morris [Thu, 12 May 2016 17:35:27 +0000 (10:35 -0700)]
* lisp/emacs-lisp/find-func.el (find-feature-regexp)
(find-alias-regexp): Fix :version.

8 years ago* lisp/cedet/semantic: Silence some warnings
Stefan Monnier [Thu, 12 May 2016 17:08:34 +0000 (13:08 -0400)]
* lisp/cedet/semantic: Silence some warnings

* lisp/cedet/semantic/db-el.el (emacs-lisp-mode)
(semanticdb-get-database-tables): Use make-instance to silence warnings.

* lisp/cedet/semantic/symref.el: Require semantic/find since we use
some macros from there.  Silence compilation warnings:
Replace initargs with slot names in oref/oset.
Move `SYMREF TOOLS' section earlier so definitions precede their use.

8 years agoSupport srcset in <img>
Lars Ingebrigtsen [Thu, 12 May 2016 15:45:17 +0000 (17:45 +0200)]
Support srcset in <img>

* lisp/net/shr.el (shr--preferred-image): Allow <img> tags
with srcset specifiers (bug#23459).

8 years agoDo not autoload some functions of tramp.el
Michael Albinus [Thu, 12 May 2016 11:01:11 +0000 (13:01 +0200)]
Do not autoload some functions of tramp.el

* lisp/net/tramp.el (tramp-completion-file-name-handler):
Autoload a shortened version of this function, avoid recursive load.
(tramp-completion-file-name-handler-alist)
(tramp-completion-mode-p)
(tramp-completion-handle-expand-file-name)
(tramp-completion-handle-file-name-all-completions)
(tramp-completion-handle-file-name-completion): Do not autoload.

8 years agoAvoid recursive load of tramp.el
Michael Albinus [Thu, 12 May 2016 08:57:10 +0000 (10:57 +0200)]
Avoid recursive load of tramp.el

* lisp/net/tramp.el (tramp-completion-file-name-handler):
Autoload a shortened version of this function, avoid recursive load.

8 years agoDo not mistake colon at the end of regexp for slash symbol
Dmitry Gutov [Thu, 12 May 2016 00:18:45 +0000 (03:18 +0300)]
Do not mistake colon at the end of regexp for slash symbol

* lisp/progmodes/ruby-mode.el (ruby-syntax-propertize):
Check the parse state in the "Symbols with special characters"
rule (bug#23515).

8 years agoMake package-install-from-buffer not move point
Dmitry Gutov [Wed, 11 May 2016 22:29:03 +0000 (01:29 +0300)]
Make package-install-from-buffer not move point

* lisp/emacs-lisp/package.el (package-install-from-buffer):
Use save-excursion here (bug#22616).

8 years ago; Revert "* emacs-lisp/lisp-mnt.el (lm-header): save-excursion"
Dmitry Gutov [Wed, 11 May 2016 22:18:38 +0000 (01:18 +0300)]
; Revert "* emacs-lisp/lisp-mnt.el (lm-header): save-excursion"

This reverts commit bf3f6a961f378f35a292c41c0bfbdae88ee1b1b9.

(Bug#22616)

8 years agoRedo the fix for bug#21839
Dmitry Gutov [Wed, 11 May 2016 21:48:37 +0000 (00:48 +0300)]
Redo the fix for bug#21839

* lisp/help.el (help-add-fundoc-usage): Undo the previous change.
(help--make-usage-docstring): Escape newlines when printing.

* lisp/emacs-lisp/cl-macs.el (cl--transform-lambda):
Ditto (bug#21839).

8 years ago; Remove instrumentation of tramp.el
Michael Albinus [Wed, 11 May 2016 14:50:56 +0000 (16:50 +0200)]
; Remove instrumentation of tramp.el

8 years ago; Remove instrumentation of tramp-tests.el
Michael Albinus [Wed, 11 May 2016 14:45:39 +0000 (16:45 +0200)]
; Remove instrumentation of tramp-tests.el

8 years agoFix a problem of tramp-tests on hydra.
Michael Albinus [Wed, 11 May 2016 08:12:26 +0000 (10:12 +0200)]
Fix a problem of tramp-tests on hydra.

* test/lisp/net/tramp-tests.el (tramp-test06-directory-file-name):
Nullify `tramp-default-method' due to hydra.

8 years agoDon't treat JS spread as contination method call
Dmitry Gutov [Tue, 10 May 2016 23:26:54 +0000 (02:26 +0300)]
Don't treat JS spread as contination method call

* lisp/progmodes/js.el (js--indent-operator-re):
Allow only one dot (bug#23492).

* test/indent/js.js (default): Add a corresponding example.

8 years agoPacify byte-compiler in lisp/vc
Paul Eggert [Tue, 10 May 2016 20:40:17 +0000 (13:40 -0700)]
Pacify byte-compiler in lisp/vc

* lisp/vc/vc-bzr.el, lisp/vc/vc-cvs.el, lisp/vc/vc-hg.el:
* lisp/vc/vc-rcs.el, lisp/vc/vc-src.el:
Declare functions defined elsewhere, to forestall “might not
be defined at runtime” warnings.

8 years ago; Merge from origin/emacs-25
Paul Eggert [Tue, 10 May 2016 14:44:29 +0000 (07:44 -0700)]
; Merge from origin/emacs-25

The following commit was skipped:

fc8a4e0 ; Auto-commit of loaddefs files.

8 years agoMerge from origin/emacs-25
Paul Eggert [Tue, 10 May 2016 14:44:28 +0000 (07:44 -0700)]
Merge from origin/emacs-25

d0d9f55 Allow newlines inside cl function arglists
963541a Publicize cl--generic-all-functions
3c581d5 ; Fix typo
e58f900 Add some "safe-local-variable" declarations for compatibility...

8 years ago'text-quoting-style' now affects only ` and '
Paul Eggert [Tue, 10 May 2016 14:38:23 +0000 (07:38 -0700)]
'text-quoting-style' now affects only ` and '

Change 'text-quoting-style' so that it no longer affects
formatting of curved quotes in format arguments to functions like
'message'.  In particular, when this variable's value is 'grave',
all quotes in formats are output as-is.
* doc/lispref/help.texi (Keys in Documentation):
* doc/lispref/strings.texi (Formatting Strings):
* doc/lispref/tips.texi (Documentation Tips):
* etc/NEWS:
* src/doc.c (syms_of_doc): Document this.
* lisp/help-fns.el (describe-function-1):
* src/doc.c (text_quoting_style, Fsubstitute_command_keys)
(syms_of_doc):
* src/editfns.c (styled_format): Omit now-unnecessary code.
* src/lisp.h (LEAVE_QUOTING_STYLE): Remove.

8 years agoRevert "Fix spurious fontification of "for (; a * b;)" in CC Mode."
Alan Mackenzie [Tue, 10 May 2016 14:36:02 +0000 (14:36 +0000)]
Revert "Fix spurious fontification of "for (; a * b;)" in CC Mode."

This reverts commit 89d1776b81ab552192ee41f13ce84ff86bda4556.  It is
being reverted because it slowed down CC Mode's fontification too much
(factor ~3).  It was the fix to bug #7918.

8 years ago; Auto-commit of loaddefs files.
Glenn Morris [Tue, 10 May 2016 11:18:12 +0000 (07:18 -0400)]
; Auto-commit of loaddefs files.

8 years ago; Instrument tramp-tests.el
Michael Albinus [Tue, 10 May 2016 06:05:49 +0000 (08:05 +0200)]
; Instrument tramp-tests.el

8 years agoAllow newlines inside cl function arglists
Dmitry Gutov [Mon, 9 May 2016 23:53:20 +0000 (02:53 +0300)]
Allow newlines inside cl function arglists

* lisp/help.el (help-add-fundoc-usage): Allow newlines inside
ARGLIST (bug#21839).

8 years agoPublicize cl--generic-all-functions
Dmitry Gutov [Mon, 9 May 2016 22:15:12 +0000 (01:15 +0300)]
Publicize cl--generic-all-functions

* lisp/emacs-lisp/cl-generic.el (cl-generic-all-functions):
Rename from cl--generic-all-functions.  Update both callers.

* lisp/cedet/semantic/db-el.el
(semanticdb-find-tags-external-children-of-type-method):
And use it here (bug#23042).

8 years agoMove "Recent messages" earlier in report-emacs-bug
Lars Ingebrigtsen [Mon, 9 May 2016 20:06:25 +0000 (22:06 +0200)]
Move "Recent messages" earlier in report-emacs-bug

* lisp/mail/emacsbug.el (report-emacs-bug): Move the "Recent
messages" part earlier so that users can see it and remove it
if they want.

8 years agoPacify byte compiler in tramp.el
Michael Albinus [Mon, 9 May 2016 19:08:51 +0000 (21:08 +0200)]
Pacify byte compiler in tramp.el

* lisp/net/tramp.el (tramp-time-diff): Use `tramp-compat-funcall'.

8 years ago; Fix typo
Michael Albinus [Mon, 9 May 2016 18:39:36 +0000 (20:39 +0200)]
; Fix typo

8 years agoAdd some "safe-local-variable" declarations for compatibility with master.
Alan Mackenzie [Mon, 9 May 2016 18:12:52 +0000 (18:12 +0000)]
Add some "safe-local-variable" declarations for compatibility with master.

These enable C files from the master repository to be visited in Emacs 25
without generating irritating questions about configuration variable safety.

* lisp/progmodes/cc-vars.el: (c-string-list-p, c-string-or-string-list-p): New
functions.
(c-noise-macro-names, c-noise-macro-with-parens-names): give the
safe-local-variable property c-string-list-p.
(c-macro-names-with-semicolon): give the safe-local-variable property
c-string-or-string-list-p.

8 years agoMerge from origin/emacs-25
Paul Eggert [Mon, 9 May 2016 17:59:29 +0000 (10:59 -0700)]
Merge from origin/emacs-25

3b47898 Fix doc string in `insert'
b479dea * doc/misc/emacs-mime.texi (time-date): Document now-builtins...
cd27f73 Say 'All results processed' at the end
4ffec91 Document automatic adjustment of process' logical window dime...
dc66271 ; Fix typos and stylistic glitches in NEWS

8 years ago; Merge from origin/emacs-25
Paul Eggert [Mon, 9 May 2016 17:59:29 +0000 (10:59 -0700)]
; Merge from origin/emacs-25

The following commit was skipped:

c760a60 tramp-sh.el: Work around a stat bug (backport from master)

8 years ago; Instrument tramp.el
Michael Albinus [Mon, 9 May 2016 17:55:49 +0000 (19:55 +0200)]
; Instrument tramp.el

8 years agoCC Mode now uses the new :after-hook feature of define-derived-mode
Alan Mackenzie [Mon, 9 May 2016 17:49:45 +0000 (17:49 +0000)]
CC Mode now uses the new :after-hook feature of define-derived-mode

It now runs internal variable setting functions after the mode hooks, no
longer runs the mode hooks twice, and declares the configuration variables for
noise macros and macros with semicolons as safe variables (when given suitable
arguments).

Fixes bug #16759 and bug #23476.

* .dir-locals: Put the c-noise-macros-with-paren-names setting back into the C
Mode value.

* lisp/progmodes/cc-mode.el: (c-basic-common-init): Remove the call to
c-make-macro-with-semi-re.
(c-mode, c++-mode, objc-mode, java-mode, idl-mode, pike-mode, awk-mode): Move
c-make-noise-macro-regexps and c-make-macro-with-semi-re (where appropriate)
and c-update-modeline into the :after-hook form.  Remove the explicit settings
of the syntax table, the abbreviation table and the local key map, since they
duplicate forms generated by define-derived-mode.  Remove the explicit
invocation of each mode's mode hook, since they duplicate ones generated by
define-derived-mode.

* lisp/progmodes/cc-vars.el: (c-string-list-p, c-string-or-string-list-p): New
functions.
(c-noise-macro-names, c-noise-macro-with-parens-names): give the
save-local-variable property c-string-list-p.
(c-macro-names-with-semicolon): give the save-local-variable property
c-string-or-string-list-p.

* doc/misc/cc-mode.texi: (Macros with ;, Noise Macros): Note that it's not
necessary to call the regexp generating functions after setting the pertinent
configuration values in a mode hook.

8 years agoFix doc string in `insert'
Lars Ingebrigtsen [Mon, 9 May 2016 15:08:58 +0000 (17:08 +0200)]
Fix doc string in `insert'

* src/editfns.c (Finsert_and_inherit): The before-insertion
markers do not move.
(Finsert): Ditto.

8 years ago; Instrument tramp-tests.el
Michael Albinus [Mon, 9 May 2016 14:53:49 +0000 (16:53 +0200)]
; Instrument tramp-tests.el

8 years agoFix the jit-lock-fontify-now test names
Dmitry Gutov [Mon, 9 May 2016 09:29:18 +0000 (12:29 +0300)]
Fix the jit-lock-fontify-now test names

* test/lisp/jit-lock-tests.el
(jit-lock-fontify-now-mends-the-gaps)
(jit-lock-fontify-now-does-not-refontify-unnecessarily):
Fix the test names.

8 years agoExtend completion candidates in tramp.el
Michael Albinus [Mon, 9 May 2016 07:20:34 +0000 (09:20 +0200)]
Extend completion candidates in tramp.el

* lisp/net/tramp.el (tramp-parse-default-user-host): New defun.
(tramp-get-completion-function): Use it.

8 years agoRevert e2f785991d0c696fbb2bc2f331f888d979b8da82 for tramp.el
Michael Albinus [Mon, 9 May 2016 07:18:50 +0000 (09:18 +0200)]
Revert e2f785991d0c696fbb2bc2f331f888d979b8da82 for tramp.el

* lisp/net/tramp.el (tramp-time-diff): Revert previous change due to backwards
compatibility.

8 years agoEmulate interactive mode
Dmitry Gutov [Mon, 9 May 2016 00:41:49 +0000 (03:41 +0300)]
Emulate interactive mode

* test/lisp/jit-lock-tests.el (jit-lock-tests--setup-buffer)
(jit-lock-does-not-refontify-unnecessarily):
Bind noninteractive to nil (bug#23278).

8 years agoSimplify now that float-time etc. are built-in
Paul Eggert [Sun, 8 May 2016 19:46:00 +0000 (12:46 -0700)]
Simplify now that float-time etc. are built-in

This was prompted by warnings about calls to now-obsolete functions.
* lisp/calendar/time-date.el (encode-time-value):
Use setq rather than a recursive call, to avoid a warning
about calling this obsolete function.
* lisp/calendar/time-date.el (encode-time-value)
(with-decoded-time-value, time-to-seconds, time-to-number-of-days):
* lisp/erc/erc.el (erc-emacs-time-to-erc-time):
* lisp/net/rcirc.el (rcirc-float-time):
* lisp/org/org-compat.el (org-float-time):
Simplify now that time-add and float-time are now built-in.
* lisp/calendar/time-date.el (time-add, time-subtract, time-less-p):
* lisp/net/newst-backend.el (time-add):
* lisp/org/org.el (time-subtract):
Remove backward-compatibility definitions; they are now built-in.
* lisp/calendar/timeclock.el (timeclock-time-to-seconds)
(timeclock-seconds-to-time):
* lisp/net/rcirc.el (rcirc-float-time):
* lisp/org/org-compat.el (org-float-time):
Now obsolete, since callers can just use float-time and
seconds-to-time.  All uses changed.
* lisp/emacs-lisp/ert.el (ert-results-pop-to-timings):
* lisp/gnus/gnus-art.el (article-lapsed-string):
* lisp/gnus/gnus-diary.el (gnus-user-format-function-d):
* lisp/gnus/gnus-group.el (gnus-group-timestamp-delta):
* lisp/gnus/nndiary.el (nndiary-compute-reminders):
* lisp/net/tramp.el (tramp-time-diff):
* lisp/org/org-clock.el (org-clock-timestamps-change):
Prefer the time-subtract builtin to the subtract-time alias.
* lisp/files.el (dir-locals-find-file, dir-locals-read-from-dir):
* test/lisp/character-fold-tests.el (character-fold--speed-test):
Prefer the float-time builtin to the time-to-seconds alias.
* lisp/org/org-agenda.el, lisp/org/org-clock.el, lisp/org/org-list.el:
* lisp/org/org-timer.el, lisp/org/org.el:
Adjust to org-float-time deprecation.

8 years ago* doc/misc/emacs-mime.texi (time-date): Document now-builtins better.
Paul Eggert [Sun, 8 May 2016 18:49:55 +0000 (11:49 -0700)]
* doc/misc/emacs-mime.texi (time-date): Document now-builtins better.

8 years agoAdd :after-hook facility to define-derived-mode.
Alan Mackenzie [Sun, 8 May 2016 13:24:20 +0000 (13:24 +0000)]
Add :after-hook facility to define-derived-mode.

This allow a form to be evaluated _after_ a major mode's hooks have been run.
It is needed to solve some problems in CC Mode, including bug #16759 and
bug #23476.

* lisp/emacs-lisp/derived.el (define-derived-mode): introduce the new argument
`:after-hook', and generate the requisite code for it.
(derived-mode-make-docstring): Take account of the possibility of :after-hook.

* lisp/subr.el (delayed-after-hook-forms): New variable.
(run-mode-hooks): As the last thing evaluate the forms in
delayed-after-hook-forms.

* doc/lispref/modes.texi (Derived Modes): Document :after-hook.
(Mode Hooks): Document the new feature in run-mode-hooks.

* etc/NEWS: Note the new feature.

8 years agoMerge branch 'master' of git.sv.gnu.org:/srv/git/emacs
Michael Albinus [Sun, 8 May 2016 09:47:33 +0000 (11:47 +0200)]
Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs

8 years agoFix recursive load of tramp.elc
Michael Albinus [Sun, 8 May 2016 09:47:08 +0000 (11:47 +0200)]
Fix recursive load of tramp.elc

* lisp/net/tramp.el (tramp-completion-file-name-handler):
Check also for `tramp-completion-mode-p'.
(tramp-completion-mode, tramp-completion-mode-p): Autoload them.

8 years agoPrefer grep -E/-F to egrep/fgrep
Paul Eggert [Sun, 8 May 2016 01:40:10 +0000 (18:40 -0700)]
Prefer grep -E/-F to egrep/fgrep

POSIX marked egrep and fgrep as legacy apps in SUSv2 (1997) and
withdrew them in SUSv3 (2001), and these days grep -E and grep -F
are probably more portable.
* lib-src/etags.c (main):
* lisp/eshell/em-unix.el (eshell-grep, eshell/egrep)
(eshell/fgrep):
* lisp/cedet/semantic/symref.el (semantic-symref-find-text):
* lisp/eshell/esh-var.el (eshell-apply-indices):
* lisp/progmodes/ada-xref.el (ada-xref-search-with-egrep)
(ada-find-in-src-path):
* lisp/textmodes/ispell.el (ispell-grep-command):
(ispell-lookup-words):
Use or document grep -E and grep -F instead of egrep and fgrep.
* lisp/textmodes/ispell.el (ispell-grep-options):
Use -Ei on all platforms, not just MS-Windows.

8 years agoAvoid unnecessary work if a chunk is empty
Dmitry Gutov [Sat, 7 May 2016 23:01:22 +0000 (02:01 +0300)]
Avoid unnecessary work if a chunk is empty

* lisp/jit-lock.el (jit-lock-fontify-now): Avoid unnecessary work
if a chunk is empty (bug#23278).

8 years ago* test/lisp/jit-lock-tests.el: New file.
Dmitry Gutov [Sat, 7 May 2016 23:00:25 +0000 (02:00 +0300)]
* test/lisp/jit-lock-tests.el: New file.

8 years agoSay 'All results processed' at the end
Dmitry Gutov [Sat, 7 May 2016 21:23:54 +0000 (00:23 +0300)]
Say 'All results processed' at the end

* lisp/progmodes/xref.el (xref--query-replace-1):
Say 'All results processed' at the end if the user hadn't
cancelled the process (bug#23284).

8 years agoContinue to fix Bug#10085
Michael Albinus [Sat, 7 May 2016 20:52:30 +0000 (22:52 +0200)]
Continue to fix Bug#10085

* lisp/net/tramp.el (tramp-completion-file-name-handler-alist)
<expand-file-name>: Add handler.
(tramp-completion-handle-expand-file-name): New defun.
(tramp-handle-file-name-as-directory): Handle completion mode case.

* test/lisp/net/tramp-tests.el (tramp-test06-directory-file-name):
Fix test.
(tramp-test24-file-name-completion): Extend test.

8 years agoRevert change 8e4595a... due to annoyance it causes the development team.
Alan Mackenzie [Sat, 7 May 2016 20:28:18 +0000 (20:28 +0000)]
Revert change 8e4595a... due to annoyance it causes the development team.

Change 8e4595a438fe85dd109756886cdeaeea2e665afb from 2016-04-30 17:28:24
+0000 was an enhancement to .dir-locals to allow correct fontification
of certain macro constructs.

* .dir-locals.el: Remove the two forms for C Mode dealing with noise macros.

8 years ago* lisp/emacs-lisp/edebug.el (edebug-sit-on-break): Give it a version number.
Alan Mackenzie [Sat, 7 May 2016 17:10:36 +0000 (17:10 +0000)]
* lisp/emacs-lisp/edebug.el (edebug-sit-on-break): Give it a version number.

8 years agoAdd tests for CSS mode completion
Simen Heggestøyl [Sat, 7 May 2016 14:32:29 +0000 (16:32 +0200)]
Add tests for CSS mode completion

* test/lisp/textmodes/css-mode-tests.el (css-test-property-values)
(css-test-property-values-no-duplicates)
(css-test-value-class-lookup): Use `seq-sort'.
(css-mode-tests--completions): New helper function for retrieving CSS
completions.
(css-test-complete-bang-rule, scss-test-complete-bang-rule)
(css-test-complete-property-value, css-test-complete-pseudo-class)
(css-test-complete-pseudo-element, css-test-complete-at-rule)
(scss-test-complete-at-rule, css-test-complete-property)
(css-test-complete-selector, css-test-complete-nested-selector)
(scss-test-complete-nested-selector): New tests.

8 years agoDocument automatic adjustment of process' logical window dimensions
Eli Zaretskii [Sat, 7 May 2016 09:16:27 +0000 (12:16 +0300)]
Document automatic adjustment of process' logical window dimensions

* doc/lispref/processes.texi (Process Buffers): Document
'set-process-window-size' and
'window-adjust-process-window-size-function'.

* etc/NEWS: Mention the new functionality and variable.

* src/process.c (Fset_process_window_size): Improve the doc string.

8 years agoAdd an option in Edebug to prevent pauses after `h', 'f', and `o'.
Alan Mackenzie [Sat, 7 May 2016 06:42:29 +0000 (06:42 +0000)]
Add an option in Edebug to prevent pauses after `h', 'f', and `o'.

Requested by Paul Pogonyshev.  Also add in documentation for Edebug config
variables which was missing.

* lisp/emacs-lisp/edebug.el (edebug-sit-on-break): New customizable option.
(edebug--display-1): Test edebug-sit-on-break before pausing 1 second.

* doc/lispref/edebug.texi (Jumping): Document the effect of the new option.
(Edebug Options): Document the new option.  Also add documentation for
edebug-eval-macro-args, edebug-print-length, edebug-print-level,
edebug-print-circle, edebug-sit-for-seconds.

* etc/NEWS: Note the new feature.

8 years agoscheme.el: Turn literal tabs into \t
Jorgen Schaefer [Sat, 7 May 2016 10:22:48 +0000 (12:22 +0200)]
scheme.el: Turn literal tabs into \t

* lisp/progmodes/scheme.el: The last change to turn tabs into spaces
also caught some literal tabs in character classes. Fix this by
adding \t to those classes.

8 years agoMake 'backtab' work in table-mode on text terminals
Tino Calancha [Sat, 7 May 2016 08:19:26 +0000 (11:19 +0300)]
Make 'backtab' work in table-mode on text terminals

* lisp/textmodes/table.el (table-cell-bindings): Bind 'backtab'
explicitly.  (Bug#23456)

8 years agoTry to speed-up display of many all-blank lines
Eli Zaretskii [Sat, 7 May 2016 08:00:36 +0000 (11:00 +0300)]
Try to speed-up display of many all-blank lines

* src/bidi.c (bidi_initialize): Use anchored regexps for
paragraph start and paragraph separator sequences.  (Bug#23457)

8 years agoCorrect hack-local-variables change from Thu May 5 11:05:49 2016 +0000
Alan Mackenzie [Fri, 6 May 2016 18:58:49 +0000 (18:58 +0000)]
Correct hack-local-variables change from Thu May 5 11:05:49 2016 +0000

Prevent hack-local-variables being called from the fundamental-mode mode call
early in normal-mode.  This fixes bug #23460 and bug #23463.

* lisp/files.el (normal-mode) Replace call to fundamental-mode with calls to
the things it calls, with the exception of hack-local-variables.

* etc/NEWS: Add an entry to note the calling of hack-local-variables at each
major mode initialization.

8 years agoPort xref-tests to master branch
Paul Eggert [Fri, 6 May 2016 17:09:13 +0000 (10:09 -0700)]
Port xref-tests to master branch

Also, add a test to make this problem less likely in the future.
* test/Makefile.in (check-no-automated-subdir): New rule.
(check, check-expensive, check-maybe): Depend on it.
* test/automated/data/xref/file1.txt: Rename to ...
* test/data/xref/file1.txt: ... here.
* test/automated/data/xref/file2.txt: Rename to ...
* test/data/xref/file2.txt: ... here.
* test/automated/xref-tests.el: Rename to ...
* test/lisp/progmodes/xref-tests.el: ... here.
(xref-tests-data-dir): Use EMACS_TEST_DIRECTORY.

8 years ago; Fix typos and stylistic glitches in NEWS
Michael Albinus [Fri, 6 May 2016 15:53:18 +0000 (17:53 +0200)]
; Fix typos and stylistic glitches in NEWS

8 years agotramp-sh.el: Work around a stat bug (backport from master)
Michael Albinus [Thu, 5 May 2016 08:23:06 +0000 (10:23 +0200)]
tramp-sh.el: Work around a stat bug (backport from master)

* lisp/net/tramp-sh.el (tramp-get-remote-stat): Do not use
stat versions which produce shell quoted output.  See also
coreutils Bug#23422.

(cherry picked from commit 6aad36ace9953b9672b13be68416d205532d5e59)

8 years agoMerge from origin/emacs-25
Paul Eggert [Fri, 6 May 2016 06:11:11 +0000 (23:11 -0700)]
Merge from origin/emacs-25

50650cb Doc fixes for fclist and grep
5e814e0 Minor doc fixes for quoting
3347a73 `nreverse' the marker pairs list
1a4127d Use save-excursion in xref-location-marker more
ab3ba91 shell-quote-argument DIR when appropriate
922c7a3 Rework xref-query-replace-in-results
3fe3510 * lisp/replace.el (query-replace-read-from): Use minibuffer-w...
0932b94 Fix todo-mode bug involving archived items (bug#23447)
e68ad1f ; * etc/NEWS: Tiny edit. (Bug#23432)
adc80b7 ; * test/automated/xref-tests.el: Add copyright and license.
4d8fd9c Handle "empty line" regexp in xref searches
f559b37 Add tests for xref-collect-matches
6428aa0 Use grep-find-ignored-directories instead of vc-directory-exc...
6f82d8e Clear buffer-undo-list when showing xrefs
c68a091 Note the quote translation in `message' in section "incompati...
52f86a7 * etc/NEWS: Mention (message "%s" (format ...)).
93703c5 (Common Keywords): Correct what missing :group means
79e5800 Improve documentation of Dired's 'A' and 'Q' commands
2ea2a2f Doc fixes for quoting
8544b98 posnp doc clarification
805204f Mention what a missing :group does
ec554d7 Fix documentation of dired-aux search/replace commands

8 years agoDoc fixes for fclist and grep
Paul Eggert [Thu, 5 May 2016 19:48:33 +0000 (12:48 -0700)]
Doc fixes for fclist and grep

A newline is needed between two fc-list calls.
egrep and fgrep have been withdrawn from POSIX,
so document grep -E and grep -F instead.

8 years agoSupport completion of HTML tags in CSS selectors
Simen Heggestøyl [Thu, 5 May 2016 19:21:10 +0000 (21:21 +0200)]
Support completion of HTML tags in CSS selectors

* lisp/textmodes/css-mode.el (css--html-tags): New variable holding a
list of HTML tags for completion.
(css--nested-selectors-allowed): New variable for determining whether
nested selectors are allowed in the current mode.
(css--complete-selector): New function for completing part of a CSS
selector.
(css-completion-at-point): Support completion of selectors.
(scss-mode): Allow nested selectors.

8 years agoMake `R' in eww work more reliably
Lars Ingebrigtsen [Thu, 5 May 2016 17:41:11 +0000 (19:41 +0200)]
Make `R' in eww work more reliably

* lisp/net/eww.el (eww-score-readability): Protect against
null children.

8 years agoMinor doc fixes for quoting
Paul Eggert [Thu, 5 May 2016 13:39:17 +0000 (06:39 -0700)]
Minor doc fixes for quoting

* doc/lispref/control.texi (Signaling Errors):
* doc/lispref/display.texi (Displaying Messages):
Don’t say that formats “generate”.  Try to word more clearly.
* etc/NEWS: Coalesce near-duplicate entries.

8 years ago`nreverse' the marker pairs list
Dmitry Gutov [Thu, 5 May 2016 13:01:52 +0000 (16:01 +0300)]
`nreverse' the marker pairs list

* lisp/progmodes/xref.el (xref--buf-pairs-iterator): `nreverse'
the marker pairs list for each buffer before returning.

8 years agoCall hack-local-variables from major modes rather than from file visiting
Alan Mackenzie [Thu, 5 May 2016 11:05:49 +0000 (11:05 +0000)]
Call hack-local-variables from major modes rather than from file visiting

This prevents file/directory local variables from being lost when the major
mode is set or changed.

This fixes bug #15577 and bug #23407.

* lisp/files.el (normal-mode): Call `hack-local-variables' when the major mode
function hasn't already done so.
(hack-local-variables): Rename parameter `mode-only' to `handle-mode', make
its previous non-nil setting be t, and introduce the following action for a
non-nil non-t value: apply all settings apart from `mode'.

* lisp/subr.el (run-mode-hooks): call `hack-local-variables' for buffers
which are visiting files.

* doc/emacs/custom.texi (File Variables): Note that setting a major mode also
sets file variables.
(Directory Variables): Note that `mode', `eval', and `unibyte' can be set as
dir local variables, but `coding' can't.

* doc/lispref/modes.texi (Major Mode Conventions): Say that `run-mode-hooks'
also calls `hack-local-variables'.
(Auto Major Mode): Say that `find-file' no longer runs `hack-local-variables',
as from 25.2.  Remove vagueness from `normal-mode' and `set-auto-mode' by
saying that the mode IS SET, not merely "selected" or "chosen".
(Mode Hooks): Document change to `run-mode-hooks'.

* doc/lispref/variables.texi (File Local Variables): Document change to
`hack-local-variables'.

8 years agotramp-sh.el: Work around a stat bug
Michael Albinus [Thu, 5 May 2016 08:23:06 +0000 (10:23 +0200)]
tramp-sh.el: Work around a stat bug

* lisp/net/tramp-sh.el (tramp-get-remote-stat): Do not use
stat versions which produce shell quoted output.  See also
coreutils Bug#23422.

8 years agoFix autogen.sh for separate worktrees
Noam Postavsky [Thu, 5 May 2016 04:09:22 +0000 (21:09 -0700)]
Fix autogen.sh for separate worktrees

* autogen.sh: Use the $hooks variable in the $sample_hooks loop, instead
of assuming .git/hooks is a directory.

8 years agoUse save-excursion in xref-location-marker more
Dmitry Gutov [Thu, 5 May 2016 01:28:14 +0000 (04:28 +0300)]
Use save-excursion in xref-location-marker more

* lisp/progmodes/elisp-mode.el (xref-location-marker): Use
save-excursion, in order not to alter the value of point if the
buffer is currently open in the background (problem reported by
Robert Weiner).

* lisp/progmodes/etags.el (xref-location-marker): Same.

8 years agoshell-quote-argument DIR when appropriate
Dmitry Gutov [Thu, 5 May 2016 01:15:23 +0000 (04:15 +0300)]
shell-quote-argument DIR when appropriate

* lisp/progmodes/project.el (project-file-completion-table):
`shell-quote-argument' DIR as well.

* lisp/progmodes/xref.el (xref--rgrep-command): Pass DIR through
`shell-quote-argument' (bug#23453).  Thanks for Kaushal Modi for
pointing out the problem.  Assert that DIR doesn't start with `~'.

8 years agoRework xref-query-replace-in-results
Dmitry Gutov [Wed, 4 May 2016 23:52:34 +0000 (02:52 +0300)]
Rework xref-query-replace-in-results

* lisp/progmodes/xref.el (xref-query-replace-in-results): Collect
all xrefs from the buffer first, then delegate most of the
processing to the value returned by xref--buf-pairs-iterator.
(xref--buf-pairs-iterator): New function.  Return an "iterator"
which partitions returned markers into buffers, and only processes
markers from one buffer at a time.  When an xref is out of date,
skip it with a message instead of signaling error (bug#23284).
(xref--outdated-p): Extract from xref--buf-pairs-iterator.  Trim
CR from both strings before comparing.
(xref--query-replace-1): Remove the variable current-buf, no need
to track it anymore.  Simplify the filter-predicate and search
functions accordingly.  Iterate over buffer-markers pairs returned
by the iterator, and call `perform-replace' for each of them.  Use
multi-query-replace-map (bug#23284).  Use `switch-to-buffer' every
time after the first, in order not to jump between windows.

* test/automated/xref-tests.el
(xref--buf-pairs-iterator-groups-markers-by-buffers-1)
(xref--buf-pairs-iterator-groups-markers-by-buffers-2)
(xref--buf-pairs-iterator-cleans-up-markers): New tests.

8 years ago* lisp/replace.el (query-replace-read-from): Use minibuffer-with-setup-hook
Juri Linkov [Wed, 4 May 2016 20:05:33 +0000 (23:05 +0300)]
* lisp/replace.el (query-replace-read-from): Use minibuffer-with-setup-hook

to set minibuffer-local value of text-property-default-nonsticky.
(Bug#23418, bug#23127)

8 years agoAllow `text-quoting-style' to be `leave', i.e. no translation of quotes.
Alan Mackenzie [Wed, 4 May 2016 19:59:50 +0000 (19:59 +0000)]
Allow `text-quoting-style' to be `leave', i.e. no translation of quotes.

* lisp/help-fns.el (describe-function-1): Don't set coding system to UTF-8
when text-quoting-style is `leave'.

* src/lisp.h (enum text_quoting_style): Add identifier LEAVE_QUOTING_STYLE.

* src/doc.c (syms_of_doc): New symbol "leave".  Amend doc string of
`text_quoting_style'.
(text_quoting_style): Handle `leave' by returning LEAVE_QUOTING_STYLE.
(Fsubstitute_command_keys): Don't translate quotes when quoting_style is
LEAVE_QUOTING_STYLE.

* src/editfns.c (styled_format): Set quoting_style to -1 when
text-quoting-style is `leave'.

8 years agoFix todo-mode bug involving archived items (bug#23447)
Stephen Berman [Wed, 4 May 2016 19:52:32 +0000 (21:52 +0200)]
Fix todo-mode bug involving archived items (bug#23447)

* lisp/calendar/todo-mode.el (todo-jump-to-category): When jumping
from Todo Categories mode to a category with only archived items
and todo-skip-archived-categories is non-nil, make sure the
archive file buffer is in Todo Archive mode to prevent
todo-category-select from raising an error, and don't set
todo-current-todo-file, since that makes todo-show display the
archived category.  Remove a no-op call to kill-buffer, which is
already called in todo-insert-category-line.

8 years ago; * etc/NEWS: Tiny edit. (Bug#23432)
Glenn Morris [Wed, 4 May 2016 17:23:21 +0000 (13:23 -0400)]
; * etc/NEWS: Tiny edit. (Bug#23432)

8 years ago* lisp/emulation/viper(-cmd)?.el: Use lexical-binding.
Stefan Monnier [Wed, 4 May 2016 15:09:01 +0000 (11:09 -0400)]
* lisp/emulation/viper(-cmd)?.el: Use lexical-binding.

* lisp/emulation/viper-cmd.el: Use lexical-binding.
(viper-change-state-to-vi, viper-change-state-to-emacs): Allow dummy
args, for use in advice-add.
(viper--init-message): Rename from init-message.
(viper-minibuffer-standard-hook): Adjust accordingly.
(viper-undo): Remove unused var `modified'.
(viper-read-string-with-history, viper-set-searchstyle-toggling-macros):
Don't use dynamic vars as args.
(viper-submit-report): Clarify use of dynamic vars.

* lisp/emulation/viper.el: Use lexical-binding and nadvice.
Remove redundant :group keywords.  Group the (if viper-mode) at top-level.
Use add-function rather than a `(lambda ...).
(viper--advice-list): New var.
(viper--advice-add, viper--deactivate-advice-list): New funs.
(viper-go-away, viper-set-hooks, viper-non-hook-settings): Use them.
(viper-non-hook-settings): Don't hook into find-file any more.

8 years ago* lisp/vc/ediff-util.el: Use lexical-binding.
Stefan Monnier [Wed, 4 May 2016 13:12:49 +0000 (09:12 -0400)]
* lisp/vc/ediff-util.el: Use lexical-binding.

8 years ago* lisp/progmodes/js.el (js-syntax-propertize): Recognize shebang line.
Stefan Monnier [Wed, 4 May 2016 12:53:00 +0000 (08:53 -0400)]
* lisp/progmodes/js.el (js-syntax-propertize): Recognize shebang line.

8 years ago; * test/automated/xref-tests.el: Add copyright and license.
Glenn Morris [Wed, 4 May 2016 02:36:40 +0000 (19:36 -0700)]
; * test/automated/xref-tests.el: Add copyright and license.

8 years agoAdd an animation sanity check
Lars Ingebrigtsen [Tue, 3 May 2016 23:37:01 +0000 (01:37 +0200)]
Add an animation sanity check

* lisp/image.el (image-multi-frame-p): Give up on animations
if it seems like they are too slow (bug#23431).

8 years agoHandle "empty line" regexp in xref searches
Dmitry Gutov [Tue, 3 May 2016 22:59:29 +0000 (01:59 +0300)]
Handle "empty line" regexp in xref searches

* lisp/progmodes/xref.el (xref--collect-matches-1): Stop after one
match if re-search-forward doesn't move point (bug#23426).

* test/automated/xref-tests.el
(xref-collect-matches-finds-an-empty-line-regexp-match):
Uncomment test.

8 years agoAdd tests for xref-collect-matches
Dmitry Gutov [Tue, 3 May 2016 22:38:02 +0000 (01:38 +0300)]
Add tests for xref-collect-matches

* test/automated/xref-tests.el: New file.  Add tests for
xref-collect-matches.

8 years agoUse grep-find-ignored-directories instead of vc-directory-exclusion-list
Dmitry Gutov [Tue, 3 May 2016 22:02:43 +0000 (01:02 +0300)]
Use grep-find-ignored-directories instead of vc-directory-exclusion-list

* lisp/dired-aux.el (dired-do-find-regexp):
Use grep-find-ignored-directories instead of
vc-directory-exclusion-list.  The result should be functionally
similar (the former uses the latter as the default value), but it
should be more consistent and appropriate WRT user
customizations.
(dired-do-find-regexp-and-replace): Update the docstring.

* lisp/dired.el: Update the corresponding autoloads.

* doc/emacs/dired.texi (Operating on Files): Update the
documentation accordingly.

8 years agoClear buffer-undo-list when showing xrefs
Dmitry Gutov [Tue, 3 May 2016 21:42:43 +0000 (00:42 +0300)]
Clear buffer-undo-list when showing xrefs

* lisp/progmodes/xref.el (xref--show-xref-buffer): Clear
buffer-undo-list and temporarily bind it to t while rendering the
buffer contents.

8 years agoNote the quote translation in `message' in section "incompatible changes".
Alan Mackenzie [Tue, 3 May 2016 20:27:48 +0000 (20:27 +0000)]
Note the quote translation in `message' in section "incompatible changes".

* etc/NEWS: Note that `message' translates quotes, that the translation
cannot be disabled, and that `format' can be used to get the old
behavior back.

8 years ago* etc/NEWS: Mention (message "%s" (format ...)).
Paul Eggert [Tue, 3 May 2016 20:30:21 +0000 (13:30 -0700)]
* etc/NEWS: Mention (message "%s" (format ...)).

8 years agoabbrev-tests.el fix
Lars Ingebrigtsen [Tue, 3 May 2016 17:21:47 +0000 (19:21 +0200)]
abbrev-tests.el fix

* test/lisp/abbrev-tests.el (abbrev-table-p-test): Don't check
internal implementation detail.

8 years ago(Common Keywords): Correct what missing :group means
Lars Ingebrigtsen [Tue, 3 May 2016 17:06:13 +0000 (19:06 +0200)]
(Common Keywords): Correct what missing :group means

* doc/lispref/customize.texi (Common Keywords): Correct what
missing :group means.

8 years agoImprove documentation of Dired's 'A' and 'Q' commands
Eli Zaretskii [Tue, 3 May 2016 16:14:31 +0000 (19:14 +0300)]
Improve documentation of Dired's 'A' and 'Q' commands

* lisp/dired-aux.el (dired-do-find-regexp)
(dired-do-find-regexp-and-replace): Mention
'grep-find-ignored-files' and 'vc-directory-exclusion-list', and
also the fact that REGEXP should be palatable by Grep.  (Bug#23426)
* lisp/dired.el: Update the corresponding autoload forms.

* doc/emacs/dired.texi (Operating on Files): Mention
'grep-find-ignored-files' and 'vc-directory-exclusion-list'.
(Bug#23429)

8 years ago(shr-rescale-image): Clarify logic slightly
Lars Ingebrigtsen [Tue, 3 May 2016 15:26:54 +0000 (17:26 +0200)]
(shr-rescale-image): Clarify logic slightly

* lisp/net/shr.el (shr-rescale-image): Clarify logic slightly.

8 years agoDoc fixes for quoting
Paul Eggert [Tue, 3 May 2016 15:02:16 +0000 (08:02 -0700)]
Doc fixes for quoting

* doc/emacs/text.texi, doc/lispintro/emacs-lisp-intro.texi:
* doc/lispref/control.texi, doc/lispref/display.texi:
* doc/lispref/help.texi, doc/lispref/strings.texi, lisp/subr.el:
* src/callint.c, src/doprnt.c, src/editfns.c:
Document quoting a bit more systematically.
Problem reported by Alan Mackenzie (Bug#23425).

8 years agoBind `widget-button-click' to mouse-1/-2 instead of down-mouse-1/-2
Martin Rudalics [Tue, 3 May 2016 06:38:49 +0000 (08:38 +0200)]
Bind `widget-button-click' to mouse-1/-2 instead of down-mouse-1/-2

* lisp/wid-edit.el (widget-keymap): Bind `widget-button-click'
to mouse-1/-2 instead of down-mouse-1/-2.  Suggested by Stefan
Monnier.  (Bug#19185, Bug#20398)