1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-12 16:23:57 +00:00
Commit Graph

126090 Commits

Author SHA1 Message Date
Paul Eggert
f791efc057 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.
2016-05-13 07:52:14 -07:00
Paul Eggert
1adfb5ee55 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
2016-05-13 07:45:30 -07:00
Paul Eggert
9c2a1a264c * doc/misc/texinfo.tex: Sync from gnulib. 2016-05-13 07:41:47 -07:00
Chris Feng
97c05cc892 Correct server/client address
* src/process.c (Fmake_network_process): :local is for servers and :remote
is for clients.
2016-05-13 11:34:39 +08:00
Ken Brown
6435f41f6d 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)
2016-05-12 15:52:26 -04:00
Stefan Monnier
ec7a173e03 * 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.
2016-05-12 15:50:24 -04:00
Glenn Morris
66cd4d8bd0 * lisp/emacs-lisp/find-func.el (find-feature-regexp)
(find-alias-regexp): Fix :version.
2016-05-12 10:35:27 -07:00
Stefan Monnier
28e8e49e08 * 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.
2016-05-12 13:08:34 -04:00
Lars Ingebrigtsen
73071b4cdb Support srcset in <img>
* lisp/net/shr.el (shr--preferred-image): Allow <img> tags
with srcset specifiers (bug#23459).
2016-05-12 17:45:27 +02:00
Michael Albinus
9872736ab7 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.
2016-05-12 13:01:11 +02:00
Michael Albinus
a8be7c1ec4 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.
2016-05-12 10:57:10 +02:00
Dmitry Gutov
1a5a05cf6f 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).
2016-05-12 03:18:45 +03:00
Dmitry Gutov
4c5a00b09f Make package-install-from-buffer not move point
* lisp/emacs-lisp/package.el (package-install-from-buffer):
Use save-excursion here (bug#22616).
2016-05-12 01:29:03 +03:00
Dmitry Gutov
9596ea1534 ; Revert "* emacs-lisp/lisp-mnt.el (lm-header): save-excursion"
This reverts commit bf3f6a961f.

(Bug#22616)
2016-05-12 01:18:38 +03:00
Dmitry Gutov
f79c352335 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).
2016-05-12 00:48:37 +03:00
Michael Albinus
d32f204856 ; Remove instrumentation of tramp.el 2016-05-11 16:50:56 +02:00
Michael Albinus
4c7f32977c ; Remove instrumentation of tramp-tests.el 2016-05-11 16:45:39 +02:00
Michael Albinus
51c816b9aa 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.
2016-05-11 10:12:26 +02:00
Dmitry Gutov
8d2f78c421 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.
2016-05-11 02:27:46 +03:00
Paul Eggert
62d7acae74 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.
2016-05-10 13:40:52 -07:00
Paul Eggert
9e6302cfc8 ; Merge from origin/emacs-25
The following commit was skipped:

fc8a4e0 ; Auto-commit of loaddefs files.
2016-05-10 07:44:29 -07:00
Paul Eggert
6d0703a01d 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...
2016-05-10 07:44:28 -07:00
Paul Eggert
433d366dc7 '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.
2016-05-10 07:41:40 -07:00
Alan Mackenzie
8939ae68d4 Revert "Fix spurious fontification of "for (; a * b;)" in CC Mode."
This reverts commit 89d1776b81.  It is
being reverted because it slowed down CC Mode's fontification too much
(factor ~3).  It was the fix to bug #7918.
2016-05-10 14:36:02 +00:00
Glenn Morris
fc8a4e0ad4 ; Auto-commit of loaddefs files. 2016-05-10 07:18:12 -04:00
Michael Albinus
cfa59d6a26 ; Instrument tramp-tests.el 2016-05-10 08:05:49 +02:00
Dmitry Gutov
d0d9f55b63 Allow newlines inside cl function arglists
* lisp/help.el (help-add-fundoc-usage): Allow newlines inside
ARGLIST (bug#21839).
2016-05-10 02:53:20 +03:00
Dmitry Gutov
963541a654 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).
2016-05-10 01:16:06 +03:00
Lars Ingebrigtsen
c20cc0986c 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.
2016-05-09 22:07:06 +02:00
Michael Albinus
a88f22bdde Pacify byte compiler in tramp.el
* lisp/net/tramp.el (tramp-time-diff): Use `tramp-compat-funcall'.
2016-05-09 21:08:51 +02:00
Michael Albinus
3c581d56ad ; Fix typo 2016-05-09 20:39:36 +02:00
Alan Mackenzie
e58f900e6d 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.
2016-05-09 18:12:52 +00:00
Paul Eggert
c8b7a6abd9 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
2016-05-09 10:59:29 -07:00
Paul Eggert
9418ab39bf ; Merge from origin/emacs-25
The following commit was skipped:

c760a60 tramp-sh.el: Work around a stat bug (backport from master)
2016-05-09 10:59:29 -07:00
Michael Albinus
d6dac367cc ; Instrument tramp.el 2016-05-09 19:55:49 +02:00
Alan Mackenzie
a8231e00cb 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.
2016-05-09 17:49:45 +00:00
Lars Ingebrigtsen
3b478989df Fix doc string in `insert'
* src/editfns.c (Finsert_and_inherit): The before-insertion
markers do not move.
(Finsert): Ditto.
2016-05-09 17:08:58 +02:00
Michael Albinus
608f2bd0ac ; Instrument tramp-tests.el 2016-05-09 16:53:49 +02:00
Dmitry Gutov
fd45b5276b 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.
2016-05-09 12:29:38 +03:00
Michael Albinus
60e9b006b5 Extend completion candidates in tramp.el
* lisp/net/tramp.el (tramp-parse-default-user-host): New defun.
(tramp-get-completion-function): Use it.
2016-05-09 09:20:34 +02:00
Michael Albinus
001d59c604 Revert e2f785991d for tramp.el
* lisp/net/tramp.el (tramp-time-diff): Revert previous change due to backwards
compatibility.
2016-05-09 09:18:50 +02:00
Dmitry Gutov
80bea210ff 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).
2016-05-09 03:42:14 +03:00
Paul Eggert
e2f785991d 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.
2016-05-08 12:46:22 -07:00
Paul Eggert
b479deadf4 * doc/misc/emacs-mime.texi (time-date): Document now-builtins better. 2016-05-08 11:50:19 -07:00
Alan Mackenzie
2eb6817ba9 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.
2016-05-08 13:24:20 +00:00
Michael Albinus
344eb61ab3 Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs 2016-05-08 11:47:33 +02:00
Michael Albinus
6ef5944516 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.
2016-05-08 11:47:08 +02:00
Paul Eggert
e8bda380bb 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.
2016-05-07 18:40:55 -07:00
Dmitry Gutov
4c175a6af5 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).
2016-05-08 02:09:36 +03:00
Dmitry Gutov
950c9a5d4a * test/lisp/jit-lock-tests.el: New file. 2016-05-08 02:00:25 +03:00