]> git.eshelyaron.com Git - emacs.git/log
emacs.git
6 years agoRestore antlr-mode's intended mode-name construct fix/bug-2034
Phil Sainty [Sat, 7 Jul 2018 09:09:24 +0000 (21:09 +1200)]
Restore antlr-mode's intended mode-name construct

* lisp/progmodes/antlr-mode.el (antlr-mode): Restore antlr-mode's
intended mode-name, as CC mode now supports arbitrary mode line
constructs.

Note that the NAME supplied to 'define-derived-mode' should be a
string, so the original (commented) code wasn't quite right.

6 years agoSupport mode line constructs for 'mode-name' in c-mode (bug#2034)
Phil Sainty [Mon, 2 Jul 2018 11:58:34 +0000 (23:58 +1200)]
Support mode line constructs for 'mode-name' in c-mode (bug#2034)

Also make the inclusion of minor mode flags in 'mode-name' optional.

* lisp/progmodes/cc-vars.el (c-modeline-display-flags): New user
option.
* lisp/progmodes/cc-cmds.el (c-modeline-flags): New variable.
(c--modeline-major-mode): New internal buffer-local variable.
(c-update-modeline): Use mode line constructs, rather than string
concatenation, to optionally include minor mode flags in 'mode-name'.

* lisp/progmodes/cc-cmds.el (c-toggle-auto-newline)
(c-toggle-hungry-state, c-toggle-auto-hungry-state)
(c-toggle-electric-state, c-toggle-comment-style):
* lisp/progmodes/cc-mode.el (c-electric-indent-mode-hook)
(c-electric-indent-local-mode-hook): Remove redundant calls to
'c-update-modeline'.  It is no longer necessary to call this function
every time one of the minor mode states changes.  The remaining calls
are in 'c-basic-common-init' (which is called via 'c-common-init' by
all the major modes defined in cc-mode.el), and in the :after-hook of
those modes (which ensures that 'mode-name' is still processed for a
derived mode that doesn't call 'c-common-init' itself).

* lisp/progmodes/cc-mode.el (c-submit-bug-report):
* lisp/progmodes/cc-styles.el (c-set-style): Format 'mode-name'.

* doc/misc/cc-mode.texi: Document 'c-modeline-display-flags'.

* etc/NEWS: Mention new user option and behaviors.

* lisp/progmodes/cc-engine.el:
* lisp/progmodes/cc-mode.el: Remove commented remnants of
'c-submode-indicators'.  This code was commented out in commit
cb694ab73063cc92342daf96d009cdc6d086bc0b in which the indicators were
moved directly into 'mode-name' (to prevent lighter text for other
minor modes from appearing inbetween).  These indicators are now
replaced by 'c-modeline-flags'.

6 years agoAdjust previous jsonrpc change
João Távora [Tue, 3 Jul 2018 07:21:42 +0000 (08:21 +0100)]
Adjust previous jsonrpc change

(nth 2) is probably a better alternative to caddr, and in Emacs 26.1
we can pass 0 as :service to automatically find an available port.

* lisp/jsonrpc.el (jsonrpc--call-deferred): Use cl-caddr.

* test/lisp/jsonrpc-tests.el
(jsonrpc--call-with-emacsrpc-fixture): Pass 0 as :service to when
making the listen server.

6 years ago* lisp/mail/sendmail.el (mail-from-style):
Glenn Morris [Tue, 3 Jul 2018 05:07:08 +0000 (22:07 -0700)]
* lisp/mail/sendmail.el (mail-from-style):
Improve obsolescence message.

6 years ago; Merge from origin/emacs-26
Glenn Morris [Tue, 3 Jul 2018 02:19:26 +0000 (19:19 -0700)]
; Merge from origin/emacs-26

The following commit was skipped:

8c70142 (origin/emacs-26) ; Auto-commit of loaddefs files.

6 years agoMerge from origin/emacs-26
Glenn Morris [Tue, 3 Jul 2018 02:19:26 +0000 (19:19 -0700)]
Merge from origin/emacs-26

fc5cae7 ; Fix ChangeLog typo.
e17a5e5 ; make change-history-commit
f205928 * etc/HISTORY: Cite Brinkoff on early history.
4e58ca8 Document internal use of 'above-suspended' z-group frame para...
4bd43b0 Increase max-lisp-eval-depth adjustment while in debugger (bu...
ab98352 Improve on last change in replace-buffer-contents
2f149c0 Fix a factual error in Introduction to Emacs Lisp
8ad50a3 ; * lisp/files.el (buffer-offer-save): Doc fix.  (Bug#32000)
c80f31f Minor improvements in documentation of imenu.el
8ebb683 Avoid errors with recentering in 'skeleton-insert'
e980a3c * src/lisp.h: Omit obsolete comment re bytecode stack.
eec71eb Speed up replace-buffer-contents
93c41ce Remove extra process call from vc-git-find-file-hook
7ea0873 ; Update some commentary
4a7f423 Speed up vc-git-dir-status-files
9134c84 Avoid compiler warning using coding.h

Conflicts:
src/editfns.c

6 years ago; Merge from origin/emacs-26
Glenn Morris [Tue, 3 Jul 2018 02:19:05 +0000 (19:19 -0700)]
; Merge from origin/emacs-26

The following commit was skipped:

1f50379 Sync with Tramp 2.3.4.  Do not merge with master

6 years agoMerge from origin/emacs-26
Glenn Morris [Tue, 3 Jul 2018 02:19:05 +0000 (19:19 -0700)]
Merge from origin/emacs-26

d008ef3 * src/xdisp.c (Vmouse_autoselect_window): Clarify doc-string ...
6f6d525 Detect a non-list package archive content properly (Bug#22311)

6 years ago; Auto-commit of loaddefs files.
Glenn Morris [Tue, 3 Jul 2018 00:45:00 +0000 (20:45 -0400)]
; Auto-commit of loaddefs files.

6 years agoMake lisp/jsonrpc.el work with Emacs 25.1
João Távora [Mon, 2 Jul 2018 14:57:24 +0000 (15:57 +0100)]
Make lisp/jsonrpc.el work with Emacs 25.1

* jsonrpc.el (Package-Requires): Require Emacs 25.1
(jsonrpc-lambda): Use cl-gensym.
(jsonrpc--call-deferred): Caddr doesn't exist in
emacs 25.1.

* jsonrpc-tests.el
(jsonrpc--call-with-emacsrpc-fixture): New function.
(jsonrpc--with-emacsrpc-fixture): Use it.
(deferred-action-complex-tests): Adjust test for Emacs 25.1

6 years agoOptionally add argument description in minor mode DOC (bug#10754)
John Shahid [Mon, 2 Jul 2018 03:34:53 +0000 (23:34 -0400)]
Optionally add argument description in minor mode DOC (bug#10754)

Add a paragraph to minor mode's docstring documenting the mode's ARG
usage if the supplied docstring doesn't already contain the word "ARG".

* easy-mmode.el (easy-mmode--arg-docstring): New const.
(easy-mmode--arg-docstring): New function.
(define-minor-mode): Use them.

Remove argument documentation from all minor modes.

6 years agoFix last change
Eli Zaretskii [Sun, 1 Jul 2018 16:19:51 +0000 (19:19 +0300)]
Fix last change

* src/w32console.c (Fset_screen_color): Call Frecenter with 2
arguments.  (Bug#31325)

* etc/NEWS:
* doc/lispref/windows.texi (Textual Scrolling): Clarify the
role of the second argument to 'recenter'.

6 years agoAdd a new argument to 'recenter' to allow finer control of redisplay
John Shahid [Thu, 28 Jun 2018 13:13:45 +0000 (09:13 -0400)]
Add a new argument to 'recenter' to allow finer control of redisplay

* window.c (recenter): Add a new REDISPLAY argument to allow the
caller to control the redisplay behavior.  'recenter' will only
redisplay the frame if this new arg and 'recenter-redisplay' are
both non-nil.
(recenter-top-bottom): Pass an extra non-nil argument to
'recenter' to force a redisplay.  (Bug#31325)

6 years ago; Fix ChangeLog typo.
Paul Eggert [Sun, 1 Jul 2018 15:36:30 +0000 (08:36 -0700)]
; Fix ChangeLog typo.

6 years ago; make change-history-commit
Paul Eggert [Sun, 1 Jul 2018 15:35:18 +0000 (08:35 -0700)]
; make change-history-commit

6 years ago* etc/HISTORY: Cite Brinkoff on early history.
Paul Eggert [Sun, 1 Jul 2018 15:25:46 +0000 (08:25 -0700)]
* etc/HISTORY: Cite Brinkoff on early history.

6 years ago; Auto-commit of loaddefs files.
Glenn Morris [Sun, 1 Jul 2018 11:27:20 +0000 (07:27 -0400)]
; Auto-commit of loaddefs files.

6 years agoMinor change in tramp-tests.el
Michael Albinus [Sun, 1 Jul 2018 09:58:55 +0000 (11:58 +0200)]
Minor change in tramp-tests.el

* test/lisp/net/tramp-tests.el (tramp-test03-file-name-host-rules):
Cleanup before running the test.

6 years agoDocument internal use of 'above-suspended' z-group frame parameter
Martin Rudalics [Sun, 1 Jul 2018 08:22:59 +0000 (10:22 +0200)]
Document internal use of 'above-suspended' z-group frame parameter

* src/w32fns.c (w32_dialog_in_progress, x_set_z_group):
* src/xterm.c (x_set_z_group): Clarify the internal use of
'above-suspended' when setting a frame's 'z-group' parameter.

6 years ago* lisp/hexl.el (hexl-follow-ascii-mode): Fix last fix (bug#32021)
Stefan Monnier [Sun, 1 Jul 2018 04:08:11 +0000 (00:08 -0400)]
* lisp/hexl.el (hexl-follow-ascii-mode): Fix last fix (bug#32021)

6 years agoUnbreak bootstrap
Glenn Morris [Sun, 1 Jul 2018 01:56:49 +0000 (18:56 -0700)]
Unbreak bootstrap

* lisp/jsonrpc.el (jsonrpc-connection, jsonrpc-process-connection):
Don't autoload defclass, else dumping fails loading loaddefs.el
due to trying to autoload eieio-defclass-autoload.

6 years ago* doc/lispref/text.texi (JSONRPC): Add missing menu.
Glenn Morris [Sun, 1 Jul 2018 01:51:35 +0000 (18:51 -0700)]
* doc/lispref/text.texi (JSONRPC): Add missing menu.

6 years ago* lisp/jsonrpc.el (subr-x): Only require when compiling
João Távora [Sat, 30 Jun 2018 20:14:16 +0000 (21:14 +0100)]
* lisp/jsonrpc.el (subr-x): Only require when compiling

6 years ago* lisp/jsonrpc.el: Add "Package-Requires" and "Version" headers
João Távora [Sat, 30 Jun 2018 20:11:05 +0000 (21:11 +0100)]
* lisp/jsonrpc.el: Add "Package-Requires" and "Version" headers

6 years agoAdd lisp/jsonrpc.el
João Távora [Sat, 30 Jun 2018 18:06:43 +0000 (19:06 +0100)]
Add lisp/jsonrpc.el

* doc/lispref/text.texi (Text): Add JSONRPC.
(JSONRPC): New node.

* etc/NEWS (New Modes and Packages in Emacs 27.1): Mention jsonrpc.el

* lisp/jsonrpc.el: New file.

* test/lisp/jsonrpc-tests.el: New file.

6 years ago* lisp/hexl.el (hexl-follow-ascii-mode): Fix a typo. (Bug#32021)
Eli Zaretskii [Sat, 30 Jun 2018 17:59:20 +0000 (20:59 +0300)]
* lisp/hexl.el (hexl-follow-ascii-mode): Fix a typo.  (Bug#32021)

6 years agoIncrease max-lisp-eval-depth adjustment while in debugger (bug#31919)
Gemini Lasswell [Wed, 20 Jun 2018 20:58:33 +0000 (13:58 -0700)]
Increase max-lisp-eval-depth adjustment while in debugger (bug#31919)

* src/eval.c (call_debugger): Increase the amount of extra Lisp
evaluation depth given to the debugger to allow it to call cl-print.
* lisp/emacs-lisp/debug.el (debugger-setup-buffer): Add a comment
to suggest updating call_debugger when changing print-level.

6 years agoImprove on last change in replace-buffer-contents
Eli Zaretskii [Sat, 30 Jun 2018 13:50:31 +0000 (16:50 +0300)]
Improve on last change in replace-buffer-contents

* src/editfns.c (Freplace_buffer_contents): Call modification
hooks only for the actual region where changes are made.
(Bug#31888)

6 years agoFix a factual error in Introduction to Emacs Lisp
Eli Zaretskii [Sat, 30 Jun 2018 13:13:01 +0000 (16:13 +0300)]
Fix a factual error in Introduction to Emacs Lisp

* doc/lispintro/emacs-lisp-intro.texi (Buffer Names): Update the
key that exits the splash screen.  (Bug#32019)

6 years ago; * lisp/files.el (buffer-offer-save): Doc fix. (Bug#32000)
Eli Zaretskii [Sat, 30 Jun 2018 09:54:58 +0000 (12:54 +0300)]
; * lisp/files.el (buffer-offer-save): Doc fix.  (Bug#32000)

6 years agoMinor improvements in documentation of imenu.el
Eli Zaretskii [Sat, 30 Jun 2018 09:22:05 +0000 (12:22 +0300)]
Minor improvements in documentation of imenu.el

* lisp/imenu.el (imenu-generic-skip-comments-and-strings)
(imenu--generic-function): Doc fixes.  (Bug#31962)

6 years agoAvoid errors with recentering in 'skeleton-insert'
Eli Zaretskii [Sat, 30 Jun 2018 09:07:24 +0000 (12:07 +0300)]
Avoid errors with recentering in 'skeleton-insert'

* lisp/skeleton.el (skeleton-insert): Don't recenter if we are
running in a buffer other than the one displayed in the selected
window.  (Bug#31950)

6 years agoSpeed up reading sub-process output on MS-Windows
Eli Zaretskii [Sat, 30 Jun 2018 08:43:42 +0000 (11:43 +0300)]
Speed up reading sub-process output on MS-Windows

* src/w32proc.c (syms_of_ntproc) <w32-pipe-read-delay>: Set to
zero.  For the details, see this discussion:
http://lists.gnu.org/archive/html/emacs-devel/2018-06/msg00711.html.
* src/w32.c (_sys_read_ahead): Update the commentary for
w32-pipe-read-delay usage.

* doc/emacs/msdos.texi (Windows Processes): Document
w32-pipe-read-delay.

* etc/NEWS: Mention the change of the value of w32-pipe-read-delay.

6 years agoSpeed-up let-binding of automatically-local variables
Eli Zaretskii [Sat, 30 Jun 2018 08:17:25 +0000 (11:17 +0300)]
Speed-up let-binding of automatically-local variables

* src/data.c (set_default_internal): Use FOR_EACH_LIVE_BUFFER
when binding variables that don't nominally have a local
value, to avoid slowing down due to a large number of dead
buffers.  (Bug#18522) (Bug#31853)

6 years agoUpdate from Gnulib
Paul Eggert [Sat, 30 Jun 2018 00:31:04 +0000 (17:31 -0700)]
Update from Gnulib

This incorporates:
2018-06-29 regex: glibc does not use intprops.h
2018-06-28 regex: port to recently proposed glibc regex merge
2018-06-25 Continue to use spaces for indentation, not tabs
2018-06-25 manywarnings: Don't enable -Wjump-misses-init by default
2018-06-25 acl-internal.h: remove _GL_ATTRIBUTE_CONST on void function
2018-06-24 manywarnings: accommodate GCC 9: remove -Wchkp and -Wabi
2018-06-24 maint: clarify comments about sticky EOF
2018-06-24 af_alg: avoid hangs when reading from streams
2018-06-17 crypto: use byteswap
2018-06-17 getloadavg: Return 0 on MS-Windows without Cygwi
2018-06-17 getloadavg: Allow building on MS-Windows without Cygwin
* build-aux/config.guess, build-aux/config.sub, doc/misc/texinfo.tex:
* lib/acl-internal.c, lib/acl-internal.h, lib/get-permissions.c:
* lib/getloadavg.c, lib/gettimeofday.c, lib/md5.c, lib/pselect.c:
* lib/set-permissions.c, lib/sha1.c, lib/sha256.c, lib/sha512.c:
* lib/time.in.h, m4/getloadavg.m4, m4/gnulib-common.m4:
* m4/manywarnings.m4, m4/pthread_sigmask.m4, m4/vararrays.m4:
Copy from Gnulib.

6 years agounbind_to performance tuning
Paul Eggert [Sat, 30 Jun 2018 00:07:38 +0000 (17:07 -0700)]
unbind_to performance tuning

* src/alloc.c (which_symbols):
* src/dispnew.c (Fredisplay):
* src/editfns.c (Fsubst_char_in_region):
* src/fileio.c (Fdo_auto_save):
* src/indent.c (Fvertical_motion):
* src/keymap.c (Fcurrent_active_maps):
* src/lread.c (Feval_buffer):
* src/minibuf.c (get_minibuffer):
* src/sysdep.c (system_process_attributes):
* src/textprop.c (Fnext_single_char_property_change)
(Fprevious_single_char_property_change):
* src/window.c (Fscroll_other_window, Fscroll_other_window_down):
* src/xdisp.c (Fformat_mode_line):
Help the compiler eliminate tail recursion in call to unbind_to.
* src/coding.c (decode_coding_gap):
Omit unnecessary unbind_to, as we’re about to call unbind_to anyway.
* src/coding.c (Fread_coding_system):
* src/eval.c (eval_sub):
* src/xdisp.c (handle_single_display_spec, decode_mode_spec):
* src/xselect.c (x_get_local_selection):
Avoid need to save a machine register when calling unbind_to.
* src/minibuf.c (Ftry_completion, Fall_completions):
Omit unnecessary assignment.

6 years ago* src/lisp.h: Omit obsolete comment re bytecode stack.
Paul Eggert [Fri, 29 Jun 2018 18:14:36 +0000 (11:14 -0700)]
* src/lisp.h: Omit obsolete comment re bytecode stack.

6 years ago* lisp/url/url-http.el (url-http-create-request): Doc fix.
Andreas Schwab [Fri, 29 Jun 2018 15:33:26 +0000 (17:33 +0200)]
* lisp/url/url-http.el (url-http-create-request): Doc fix.

6 years agoUse a non-proxy request when retrieving https URLs via a proxy
Andreas Schwab [Fri, 29 Jun 2018 15:24:31 +0000 (17:24 +0200)]
Use a non-proxy request when retrieving https URLs via a proxy

* lisp/url/url-http.el
(url-https-proxy-after-change-function): Bind url-http-proxy
to nil around url-http-create-request.

6 years agoSpeed up replace-buffer-contents
Eli Zaretskii [Fri, 29 Jun 2018 13:55:20 +0000 (16:55 +0300)]
Speed up replace-buffer-contents

* src/editfns.c (EXTRA_CONTEXT_FIELDS): Add a_unibyte and
b_unibyte members.
(rbc_quitcounter): New static variable.
(Freplace_buffer_contents): Initialize a_unibyte, b_unibyte, and
rbc_quitcounter.  Inhibit modification hooks if they were not
already inhibited.  Use rarely_quit to allow user to quit, to
avoid calling maybe_quit too frequently (which hurts performance).
Remove redundant assertions (which hurt performance too much).
Call signal_after_change and update_compositions after all the
changes are done.
(buffer_chars_equal): Remove redundant assertions (which hurt
performance).  Avoid using BUF_FETCH_CHAR_AS_MULTIBYTE, which
hurts performance by referencing Lisp symbols; instead, use
lower-level macros with explicit tests to select which macro to
use.  (Bug#31888)

6 years agoSync with Tramp 2.4.0
Michael Albinus [Fri, 29 Jun 2018 08:17:46 +0000 (10:17 +0200)]
Sync with Tramp 2.4.0

* doc/misc/trampver.texi:
* lisp/net/trampver.el: Change version to "2.4.0".

* lisp/net/tramp-gvfs.el (tramp-gvfs-handler-mounted-unmounted):
Ignore unknown GVFS methods.

* test/lisp/net/tramp-tests.el (tramp-test42-asynchronous-requests):
Tag as :unstable.

6 years ago* src/lisp.h: Add comment (Bug#31996#25).
Paul Eggert [Fri, 29 Jun 2018 07:29:13 +0000 (00:29 -0700)]
* src/lisp.h: Add comment (Bug#31996#25).

6 years agoLet ediff '=' compare against ancestor buffer (Bug#11320)
Noam Postavsky [Sat, 12 May 2018 01:56:56 +0000 (21:56 -0400)]
Let ediff '=' compare against ancestor buffer (Bug#11320)

* lisp/vc/ediff-util.el (ediff-inferior-compare-regions): Ask user
whether to compare against the ancestor or merge buffer.  Use
read-multiple-choice for A vs B buffer query.

6 years agoFix recently-introduced SAFE_FREE bug
Paul Eggert [Thu, 28 Jun 2018 20:49:48 +0000 (13:49 -0700)]
Fix recently-introduced SAFE_FREE bug

Problem reported by Andy Moreton (Bug#31996).
* src/lisp.h (union specbinding.unwind_array):
Remove unused member func.  Move array after nelts, as this is
likely to generate more efficient code in safe_free, which can
call xfree with the same value either way.
(safe_free): Also handle SPECPDL_UNWIND_AWAY.

6 years agoTune SAFE_FREE
Paul Eggert [Thu, 28 Jun 2018 07:37:08 +0000 (00:37 -0700)]
Tune SAFE_FREE

On my platform (Fedora 28 x86-64, AMD Phenom II X4 910e) this sped
up a SAFE_FREE-using microbenchmark (string-distance "abc" "abc")
by about 18%, and shrank the Emacs text size by about 0.1%.
* src/callint.c (Fcall_interactively):
* src/callproc.c (call_process):
* src/doc.c (get_doc_string, Fsnarf_documentation):
* src/editfns.c (Freplace_buffer_contents):
* src/emacs-module.c (funcall_module):
* src/eval.c (Flet):
* src/process.c (Fmake_process):
* src/term.c (tty_menu_show):
* src/xdisp.c (safe__call):
* src/xmenu.c (x_menu_show):
Use SAFE_FREE_UNBIND_TO.
* src/data.c (wrong_choice): No need to call SAFE_FREE here.
* src/lisp.h (USE_SAFE_ALLOCA):
* src/regex.c (REGEX_USE_SAFE_ALLOCA):
Do not declare sa_must_free local; no longer needed.
All uses removed.
(SAFE_FREE): Rewrite in terms of safe_free.
(safe_free): New function, optimized to use xfree.
(SAFE_FREE_UNBIND_TO): New macro.
(safe_free_unbind_to): New function.

6 years agoRemove extra process call from vc-git-find-file-hook
Dmitry Gutov [Thu, 28 Jun 2018 00:14:56 +0000 (03:14 +0300)]
Remove extra process call from vc-git-find-file-hook

* lisp/vc/vc-git.el (vc-git-find-file-hook): Resolve FIXMEs.

6 years ago; Update some commentary
Dmitry Gutov [Thu, 28 Jun 2018 00:05:19 +0000 (03:05 +0300)]
; Update some commentary

* lisp/vc/vc-git.el (vc-git-state): Remove outdated commentary.
(vc-git-dir-status-goto-stage): Move a TODO here.
(vc-git-conflicted-files): From here.
(vc-git-find-file-hook): Add a FIXME.

6 years agoSpeed up vc-git-dir-status-files
Dmitry Gutov [Thu, 28 Jun 2018 00:03:36 +0000 (03:03 +0300)]
Speed up vc-git-dir-status-files

* lisp/vc/vc-git.el (vc-git-dir-status-goto-stage): Call 'git
ls-files -u' for the ls-files-conflict stage
(https://lists.gnu.org/archive/html/emacs-devel/2018-06/msg00885.html).

6 years ago; * etc/NEWS: Fix recently added entries.
Eli Zaretskii [Wed, 27 Jun 2018 18:08:28 +0000 (21:08 +0300)]
; * etc/NEWS: Fix recently added entries.

6 years agoAvoid compiler warning using coding.h
Eli Zaretskii [Wed, 27 Jun 2018 15:02:45 +0000 (18:02 +0300)]
Avoid compiler warning using coding.h

* src/coding.h: Add INLINE_HEADER_BEGIN..INLINE_HEADER_END, since
this header now has an extern INLINE function.

6 years agoRespect s-s-b-default-predicate when killing terminal
João Távora [Wed, 27 Jun 2018 13:19:00 +0000 (14:19 +0100)]
Respect s-s-b-default-predicate when killing terminal

Fixes: Bug#31951
* lisp/server.el (server-save-buffers-kill-terminal): Only pass
PRED=t to save-some-bufers if ARG in non-nil.

6 years agoAllow 'file:' protocol for Info-follow-nearest-node.
Vincent Belaïche [Wed, 27 Jun 2018 13:18:52 +0000 (15:18 +0200)]
Allow 'file:' protocol for Info-follow-nearest-node.

6 years agoSync with Tramp 2.3.4. Do not merge with master
Michael Albinus [Wed, 27 Jun 2018 11:08:18 +0000 (13:08 +0200)]
Sync with Tramp 2.3.4.  Do not merge with master

* doc/misc/trampver.texi:
* lisp/net/trampver.el: Change version to "2.3.4".

* lisp/net/tramp-smb.el (tramp-smb-handle-delete-directory):
Check, that the directory has been removed indeed.

* test/lisp/net/tramp-tests.el (tramp-test21-file-links): Adapt test.
(tramp--test-emacs25-p): New defun.
(tramp-test34-vc-registered): Use it.

6 years ago* src/xdisp.c (Vmouse_autoselect_window): Clarify doc-string (Bug#31975)
Martin Rudalics [Wed, 27 Jun 2018 07:07:59 +0000 (09:07 +0200)]
* src/xdisp.c (Vmouse_autoselect_window): Clarify doc-string (Bug#31975)

6 years agoDetect a non-list package archive content properly (Bug#22311)
Noam Postavsky [Sat, 16 Jun 2018 22:59:43 +0000 (18:59 -0400)]
Detect a non-list package archive content properly (Bug#22311)

* lisp/emacs-lisp/package.el (package--download-one-archive): Use
`read' instead of `read-from-string'; the latter always returns a
cons, so the `listp' check on its return value doesn't make sense.  It
was changed from `read' to `read-from-string' in 2015-04-01 "*
emacs-lisp/package.el: Implement asynchronous refreshing", but that
change was not needed because `read' works fine on strings as well as
buffers.

6 years agoMerge from origin/emacs-26
Glenn Morris [Tue, 26 Jun 2018 14:51:01 +0000 (07:51 -0700)]
Merge from origin/emacs-26

12c77f6 (origin/emacs-26) Add ido-fallback special variable (Bug#31707)
826e8d1 Merge branch 'emacs-26' of git.sv.gnu.org:/srv/git/emacs into...
c784876 Tighten a cross-reference in documentation
517dc0b Fix last change in tramp-sh.el
f43186f Revert previous patch; comment was OK after all.
4c3306e Fix lead comment for count_trailing_zero_bits
b419f27 ; * doc/emacs/files.texi (Interlocking): Fix a non-portable @...
7488de4 * lisp/emacs-lisp/regexp-opt.el (regexp-opt): Fix docstring q...
0b69807 Make a minor update to the CSS mode docstring
9a53b6d Say how to override a primitive interactive spec
1d77078 Fix Bug#31941

6 years agoAdd ido-fallback special variable (Bug#31707)
Christophe Junke [Mon, 4 Jun 2018 08:39:43 +0000 (10:39 +0200)]
Add ido-fallback special variable (Bug#31707)

Before ido.el switch to lexical-binding, it was possible for other
packages to modify the 'fallback' variables declared inside
'ido-file-internal' and 'ido-buffer-internal'.
* lisp/ido.el (ido-fallback): New variable.
(ido-buffer-internal, ido-file-internal): Reset ido-fallback to nil
before prompting user.  Use ido-fallback when ido-exit is 'fallback'.
(ido-fallback-command): Add optional FALLBACK-COMMAND argument.

Copyright-paperwork-exempt: yes

6 years agoReformat package.el message strings for future l10n
Jean-Christophe Helary [Wed, 20 Jun 2018 16:19:00 +0000 (12:19 -0400)]
Reformat package.el message strings for future l10n

* lisp/emacs-lisp/package.el (package-buffer-info)
(package--download-one-archive, package-install-selected-packages)
(package-autoremove, describe-package-1, package-menu-toggle-hiding)
(package-menu-hide-package, package-menu--mark-upgrades-1)
(package-menu--list-to-prompt, package-menu--prompt-transaction-p)
(package-menu-execute, package-menu--find-and-notify-upgrades):
Reformat message strings to remove need for plural computation.  Try
to put full sentences in source string literals.
* test/lisp/emacs-lisp/package-tests.el
(package-test-describe-package): Update to match new message format.

6 years agoSuppress indent errors during electric indentation (Bug#18764)
Noam Postavsky [Thu, 21 Jun 2018 00:12:23 +0000 (20:12 -0400)]
Suppress indent errors during electric indentation (Bug#18764)

* lisp/electric.el (electric-indent-post-self-insert-function):
Suppress errors from indent code, but don't suppress errors from
elsewhere in this function.  That way, if trouble is encountered with
electric indent "not working", the error should be reproducible by
calling indent directly (as is the case for Bug#18764), or else it's
from the electric indent code and will be reported normally.

6 years ago(format "%d" F) now truncates floating F
Paul Eggert [Mon, 25 Jun 2018 19:21:40 +0000 (12:21 -0700)]
(format "%d" F) now truncates floating F

Problem reported by Paul Pogonyshev (Bug#31938).
* src/editfns.c: Include math.h, for trunc.
(styled_format): For %d, truncate floating-point numbers and
convert -0 to 0, going back to how Emacs 26 did things.
* doc/lispref/strings.texi (Formatting Strings):
Document behavior of %o, %d, %x, %X on floating-point numbers.
* src/floatfns.c (trunc) [!HAVE_TRUNC]: Rename from emacs_trunc
and make it an extern function, so that editfns.c can use it.
All callers changed.
* test/src/editfns-tests.el (format-%d-float): New test.

6 years agoMerge branch 'emacs-26' of git.sv.gnu.org:/srv/git/emacs into emacs-26
Michael Albinus [Mon, 25 Jun 2018 18:40:37 +0000 (20:40 +0200)]
Merge branch 'emacs-26' of git.sv.gnu.org:/srv/git/emacs into emacs-26

6 years agoTighten a cross-reference in documentation
Karl Fogel [Mon, 25 Jun 2018 17:23:23 +0000 (12:23 -0500)]
Tighten a cross-reference in documentation

* doc/lispref/internals.texi (Writing Emacs Primitives): Switch to
  a simple parenthetical cross-reference, following up to my
  commit 9a53b6d426 of 2018-06-24.

See discussion:

  https://lists.gnu.org/archive/html/emacs-devel/2018-06/msg00826.html
  From: Eli Zaretskii
  Subject: Re: [Emacs-diffs] \
           emacs-26 9a53b6d: Say how to override a primitive interactive spec
  To: Karl Fogel
CC: Stefan Monnier, Emacs Devel
  Date: Mon, 25 Jun 2018 17:41:53 +0300
  Message-Id: <83r2kvrkr2.fsf@gnu.org>

6 years agoFix spelling of "intermediate" (it's not "intermediary")
Lars Ingebrigtsen [Mon, 25 Jun 2018 16:56:55 +0000 (18:56 +0200)]
Fix spelling of "intermediate" (it's not "intermediary")

* doc/emacs/misc.texi (Network Security): Ditto.

* lisp/net/nsm.el (network-security-protocol-checks): Fix spelling
on "intermediate".
(nsm-protocol-check--intermediate-sha1): Ditto.

6 years agoClean up redundant code from previous checkins
Lars Ingebrigtsen [Mon, 25 Jun 2018 16:42:26 +0000 (18:42 +0200)]
Clean up redundant code from previous checkins

* src/gnutls.c (gnutls_verify_boot): Remove reduntant setting of
p->gnutls_certificates, which is now performed by
gnutls_deinit_certificates.

6 years agoFix last change in tramp-sh.el
Michael Albinus [Mon, 25 Jun 2018 14:25:41 +0000 (16:25 +0200)]
Fix last change in tramp-sh.el

* lisp/net/tramp-sh.el (tramp-do-copy-or-rename-file-directly):
Use "-R" rather than "-r" for recursive copy of directories.

6 years agoMention use of C-h . (display-local-help) in Flymake manual
João Távora [Mon, 25 Jun 2018 11:27:56 +0000 (12:27 +0100)]
Mention use of C-h . (display-local-help) in Flymake manual

Fixes: Bug#31921
* doc/misc/flymake.texi (Using Flymake): Mention display-local-help.

6 years agoRevert previous patch; comment was OK after all.
Paul Eggert [Mon, 25 Jun 2018 06:46:18 +0000 (23:46 -0700)]
Revert previous patch; comment was OK after all.

6 years agoFix lead comment for count_trailing_zero_bits
Paul Eggert [Mon, 25 Jun 2018 06:21:01 +0000 (23:21 -0700)]
Fix lead comment for count_trailing_zero_bits

* src/data.c (count_trailing_zero_bits): Fix comment to match code.

6 years ago; doc/emacs/misc.texi (Network Security): Fix typo.
Noam Postavsky [Mon, 25 Jun 2018 01:00:32 +0000 (21:00 -0400)]
; doc/emacs/misc.texi (Network Security): Fix typo.

6 years agoMake the intermediary-sha1 check work
Lars Ingebrigtsen [Mon, 25 Jun 2018 00:40:25 +0000 (02:40 +0200)]
Make the intermediary-sha1 check work

* lisp/net/nsm.el (nsm-protocol-check--intermediary-sha1): Make
the "skip the root cert" logic work (suggested by Noam Postavsky).

6 years agoDon't use XCAR in possibly-nil situations
Lars Ingebrigtsen [Mon, 25 Jun 2018 00:34:37 +0000 (02:34 +0200)]
Don't use XCAR in possibly-nil situations

* src/gnutls.c (Fgnutls_peer_status): certs theoretically may be
nil, so don't use XCAR.

6 years ago(Network Security): Fix the description of the 3DES weakness
Noam Postavsky [Sun, 24 Jun 2018 21:57:05 +0000 (23:57 +0200)]
(Network Security): Fix the description of the 3DES weakness

* doc/emacs/misc.texi (Network Security): Fix the description of
the 3DES weakness.

6 years agoMake more TLS checks trigger on the default `medium' level
Lars Ingebrigtsen [Sun, 24 Jun 2018 20:57:27 +0000 (22:57 +0200)]
Make more TLS checks trigger on the default `medium' level

* doc/emacs/misc.texi (Network Security): Update the doc to say
what's on the different levels.

* lisp/net/nsm.el (nsm-protocol-check--intermediary-sha1): Check
intermediary certificates for SHA1.
(nsm-protocol-check--3des): Check for 3DES ciphers.
(network-security-protocol-checks): Put most of the checks on
`medium'.

6 years agoTweak previous gnutls change for efficiency
Lars Ingebrigtsen [Sun, 24 Jun 2018 19:21:56 +0000 (21:21 +0200)]
Tweak previous gnutls change for efficiency

* src/gnutls.c (Fgnutls_peer_status): Minor optimisation to avoid
computing the topmost certificate twice.

6 years agoReturn the entire TLS certificate chain back to the caller
Lars Ingebrigtsen [Sun, 24 Jun 2018 19:17:37 +0000 (21:17 +0200)]
Return the entire TLS certificate chain back to the caller

* src/gnutls.c (gnutls_deinit_certificates): New function.
(Fgnutls_peer_status): Return all certificates in the chain back
to Lisp land.
(gnutls_verify_boot): Compute all the x509 certificates in the
chain.

* src/process.h (struct Lisp_Process): Adjust gnutls fields so
that we can keep tracks of all certificates in the chain instead
of just the host certificate.

6 years agoFix two tcl-mode defun-related bugs
Tom Tromey [Sun, 24 Jun 2018 17:18:19 +0000 (11:18 -0600)]
Fix two tcl-mode defun-related bugs

Fixes bug#23565
* lisp/progmodes/tcl.el (tcl-mode): Set beginning-of-defun-function
and end-of-defun-function.
(tcl-beginning-of-defun-function, tcl-end-of-defun-function): New
defuns.
* test/lisp/progmodes/tcl-tests.el: New file.

6 years ago; * doc/emacs/files.texi (Interlocking): Fix a non-portable @xref.
Eli Zaretskii [Sun, 24 Jun 2018 16:23:13 +0000 (19:23 +0300)]
; * doc/emacs/files.texi (Interlocking): Fix a non-portable @xref.

6 years ago* lisp/emacs-lisp/regexp-opt.el (regexp-opt): Fix docstring quotes.
Noam Postavsky [Sun, 24 Jun 2018 14:57:12 +0000 (10:57 -0400)]
* lisp/emacs-lisp/regexp-opt.el (regexp-opt): Fix docstring quotes.

6 years agoFix reverse test in previous check-in
Lars Ingebrigtsen [Sun, 24 Jun 2018 13:40:43 +0000 (15:40 +0200)]
Fix reverse test in previous check-in

* lisp/net/nsm.el (nsm-check-protocol): Fix reverse test in
previous check-in.

6 years agoRefactor the protocol NSM checks for flexibility
Lars Ingebrigtsen [Sun, 24 Jun 2018 13:36:50 +0000 (15:36 +0200)]
Refactor the protocol NSM checks for flexibility

* doc/emacs/misc.texi (Network Security): Mention
network-security-protocol-checks.

* lisp/net/nsm.el (network-security-protocol-checks): New variable.
(nsm-check-protocol): Refactor the checks into separate functions
for greater flexibility.
(nsm-protocol-check--diffie-hellman-prime-bits)
(nsm-protocol-check--rc4, nsm-protocol-check--ssl)
(nsm-protocol-check--signature-sha1): Refactored out of the big
function.

6 years agoMake a minor update to the CSS mode docstring
Simen Heggestøyl [Sun, 24 Jun 2018 12:23:57 +0000 (14:23 +0200)]
Make a minor update to the CSS mode docstring

* lisp/textmodes/css-mode.el (css-mode): Mention 'fill-paragraph'.

6 years agoSay how to override a primitive interactive spec
Karl Fogel [Sun, 24 Jun 2018 12:10:43 +0000 (07:10 -0500)]
Say how to override a primitive interactive spec

* doc/lispref/internals.texi (Writing Emacs Primitives): Mention that
  the `interactive-form' property can be used to override a primitive
  interactive specification, and refer to the detailed documentation
  for setting that property.

From this thread on Emacs Devel:

  https://lists.gnu.org/archive/html/emacs-devel/2018-03/msg00923.html
  From: Eli Zaretskii
  To: Karl Fogel
CC: Juri Linkov, Emacs Devel
  Subject: Re: [Emacs-diffs] \
           master b88e7c8: Make transpose-regions interactive (Bug#30343)
  Date: Thu, 29 Mar 2018 14:38:15 +0300
  Message-Id: <834lkzdsd4.fsf@gnu.org>

6 years agoFix Bug#31941
Michael Albinus [Sun, 24 Jun 2018 08:24:26 +0000 (10:24 +0200)]
Fix Bug#31941

* lisp/net/tramp-sh.el (tramp-do-copy-or-rename-file): In case of
FILENAME being a directory, check whether `copy-directory' could
be avoided.  Suggested by Stephen Nutt <stnutt@gmail.com>.  (Bug#31941)
(tramp-do-copy-or-rename-file-directly): Call "cp" with "-r".

6 years agoMerge from origin/emacs-26
Glenn Morris [Sat, 23 Jun 2018 14:51:00 +0000 (07:51 -0700)]
Merge from origin/emacs-26

bbc9d37 (origin/emacs-26) Fix previous change in minibuffer-default-a...
7caeef1 * src/editfns.c (Fformat): Make %x easier to spot in doc stri...
ecc29fb Improve responsiveness while in 'replace-buffer-contents'
8182d64 Improve documentation of 'server-start' and friends
decdfed Clarify wording about functions' argument lists
5abac8b * lisp/doc-view.el: Fix typos in the commentary.  (Bug#31937)

6 years ago; Merge from origin/emacs-26
Glenn Morris [Sat, 23 Jun 2018 14:51:00 +0000 (07:51 -0700)]
; Merge from origin/emacs-26

The following commit was skipped:

a37cbbc Merge branch 'emacs-26' of git.savannah.gnu.org:/srv/git/emac...

6 years agoMerge from origin/emacs-26
Glenn Morris [Sat, 23 Jun 2018 14:50:59 +0000 (07:50 -0700)]
Merge from origin/emacs-26

5cb3991 Fix a typo in emacs-lisp-intro.texi
d6aa55e Avoid segfaults in replace-buffer-contents with large buffers
d22b8d1 Adjust for scaling for mode-line popup menus (Bug#31880)
3d2e3dc Change name of `seqp' argument (Bug#26411)
40e1db8 Change index of ";" to better reflect it's usage (Bug#31623)
d289e7e Fix bug of 'mouse-drag-and-drop-region' to detect edges of re...
e292c09 Fix #'fun handling inside `labels' (Bug#31792)

6 years agoFix previous change in minibuffer-default-add-dired-shell-commands
Leo Liu [Tue, 12 Jun 2018 04:24:09 +0000 (12:24 +0800)]
Fix previous change in minibuffer-default-add-dired-shell-commands

The mailcap minibuffer completion used dynamic binding.  Locally set
a dynamic variable.
* lisp/dired-aux.el (minibuffer-default-add-dired-shell-commands):
Store list of files in 'minibuffer-completion-table'.  (Bug#31794)

6 years ago* src/editfns.c (Fformat): Make %x easier to spot in doc string. (Bug#31945)
Eli Zaretskii [Sat, 23 Jun 2018 12:34:14 +0000 (15:34 +0300)]
* src/editfns.c (Fformat): Make %x easier to spot in doc string.  (Bug#31945)

6 years agoImprove responsiveness while in 'replace-buffer-contents'
Eli Zaretskii [Sat, 23 Jun 2018 11:03:10 +0000 (14:03 +0300)]
Improve responsiveness while in 'replace-buffer-contents'

* src/editfns.c (buffer_chars_equal): Avoid calling
buf_charpos_to_bytepos when the buffer is plain-ASCII.
Suggested by Milan Stanojević <mstanojevic@janestreet.com>.
Call maybe_quit to improve responsiveness.
(Freplace_buffer_contents): Call maybe_quit.  Warn in the doc
string that the function could be slow.  (Bug#31888)

6 years ago* lisp/net/tramp-sh.el (tramp-get-ls-command-with): Fix typo.
Michael Albinus [Sat, 23 Jun 2018 08:18:55 +0000 (10:18 +0200)]
* lisp/net/tramp-sh.el (tramp-get-ls-command-with): Fix typo.

6 years agoImprove documentation of 'server-start' and friends
Eli Zaretskii [Sat, 23 Jun 2018 07:50:58 +0000 (10:50 +0300)]
Improve documentation of 'server-start' and friends

* lisp/server.el (server-start, server-running-p): Document how to
reliably check that the current Emacs process started the server.
(Bug#31859)

6 years agoClarify wording about functions' argument lists
Eli Zaretskii [Sat, 23 Jun 2018 07:38:44 +0000 (10:38 +0300)]
Clarify wording about functions' argument lists

* doc/lispref/functions.texi (Argument List): Clarify the
wording.  (Bug#31872)

6 years ago* lisp/doc-view.el: Fix typos in the commentary. (Bug#31937)
Eli Zaretskii [Sat, 23 Jun 2018 07:26:33 +0000 (10:26 +0300)]
* lisp/doc-view.el: Fix typos in the commentary.  (Bug#31937)

6 years agoMerge branch 'emacs-26' of git.savannah.gnu.org:/srv/git/emacs into emacs-26
Eli Zaretskii [Fri, 22 Jun 2018 18:26:45 +0000 (21:26 +0300)]
Merge branch 'emacs-26' of git.savannah.gnu.org:/srv/git/emacs into emacs-26

6 years agoFix a typo in emacs-lisp-intro.texi
Eli Zaretskii [Fri, 22 Jun 2018 18:25:55 +0000 (21:25 +0300)]
Fix a typo in emacs-lisp-intro.texi

* doc/lispintro/emacs-lisp-intro.texi (kill-ring-yank-pointer):
Add a missing quote.  Reported by Jean-Christophe Helary
<brandelune@gmail.com> in emacs-devel.

6 years agoFix doc typo: missing double-quote
Paul Eggert [Fri, 22 Jun 2018 18:13:15 +0000 (11:13 -0700)]
Fix doc typo: missing double-quote

6 years ago* lisp/net/tramp-sh.el (tramp-sh--quoting-style-options): New function
Stefan Monnier [Fri, 22 Jun 2018 15:12:14 +0000 (11:12 -0400)]
* lisp/net/tramp-sh.el (tramp-sh--quoting-style-options): New function

(tramp-do-directory-files-and-attributes-with-stat)
(tramp-do-file-attributes-with-ls): Use it.

6 years agoImprove backward compatibility of Tramp
Michael Albinus [Fri, 22 Jun 2018 14:17:17 +0000 (16:17 +0200)]
Improve backward compatibility of Tramp

* lisp/net/tramp-adb.el (tramp-adb-handle-exec-path):
* lisp/net/tramp-sh.el (tramp-sh-handle-exec-path): Use ´file-remote-p'.
(tramp-get-ls-command-with): Handle busybox specially.

* test/lisp/net/tramp-tests.el (tramp-test34-exec-path): Check for
`fboundp'.  Use `file-remote-p'.  Hide compiler warning for older
Emacsen.

6 years agoAvoid segfaults in replace-buffer-contents with large buffers
Eli Zaretskii [Fri, 22 Jun 2018 12:57:47 +0000 (15:57 +0300)]
Avoid segfaults in replace-buffer-contents with large buffers

* src/editfns.c (Freplace_buffer_contents): Don't release
malloc'ed memory as long as we are using it.  (Bug#31888)

6 years agoDocument 'major-mode-suspend' and 'major-mode-restore'
Eli Zaretskii [Fri, 22 Jun 2018 08:48:38 +0000 (11:48 +0300)]
Document 'major-mode-suspend' and 'major-mode-restore'

* doc/lispref/modes.texi (Major Modes): Document
'major-mode-suspend' and 'major-mode-restore'.  (Bug#31551)

* etc/NEWS: Mark the corresponding entry as documented in
manuals.