]> git.eshelyaron.com Git - emacs.git/log
emacs.git
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 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 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.

6 years agoAdjust for scaling for mode-line popup menus (Bug#31880)
Robert Pluim [Fri, 22 Jun 2018 07:59:47 +0000 (09:59 +0200)]
Adjust for scaling for mode-line popup menus (Bug#31880)

* src/xmenu.c (menu_position_func) [HAVE_GTK3]: Take scaling
into account when calculating screen size.

6 years agoNew functions to switch back and forth to another major mode
Stefan Monnier [Fri, 22 Jun 2018 03:30:11 +0000 (23:30 -0400)]
New functions to switch back and forth to another major mode

* subr.el (major-mode--suspended): New var.
(major-mode-suspend, major-mode-restore): New funs, extracted from doc-view.
* doc-view.el (doc-view--previous-major-mode): Remove.
(doc-view-mode): Use major-mode-suspend.
(doc-view-fallback-mode): Use major-mode-restore.
* hexl-mode.el (hexl-mode--minor-mode-p, hexl-mode--setq-local): Remove.
(hexl-mode): Use major-mode-suspend and hexl-follow-ascii-mode.
(hexl-mode-exit): Use major-mode-restore.
(hexl-activate-ruler, hexl-follow-line): Don't bother trying to preserve
earlier state, now that entering/leaving hexl-mode kills local vars.
(hexl-follow-ascii-mode): New proper local minor mode.
(hexl-follow-ascii): Rewrite, using it.
* image-mode.el (image-mode-previous-major-mode): Remove.
(image-mode): Use major-mode-suspend.
(image-mode-to-text): Use major-mode-restore.

6 years agoChange name of `seqp' argument (Bug#26411)
Simen Heggestøyl [Sun, 9 Apr 2017 09:06:44 +0000 (11:06 +0200)]
Change name of `seqp' argument (Bug#26411)

* lisp/emacs-lisp/seq.el (seqp): Change argument name.

* doc/lispref/sequences.texi: Update the documentation for seqp.

6 years agoRemove broken icon from tooltip (Bug#31884)
memeplex [Tue, 19 Jun 2018 05:12:11 +0000 (02:12 -0300)]
Remove broken icon from tooltip (Bug#31884)

* src/gtkutil.c (xg_show_tooltip): Call gtk_widget_show instead of
gtk_widget_show_all, the latter displays an extra placeholder icon.

6 years agoSet group when installing, too
Paul Eggert [Thu, 21 Jun 2018 20:29:15 +0000 (13:29 -0700)]
Set group when installing, too

From a patch by Ulrich Mueller in:
https://lists.gnu.org/r/emacs-devel/2018-06/msg00687.html
* Makefile.in (set_installuser): Also set the group, in order
to match install(1) behavior.  Also, don’t clutter stderr
with a diagnostic if ‘id’ is missing.

6 years ago; Fix typo
Michael Albinus [Wed, 20 Jun 2018 18:21:48 +0000 (20:21 +0200)]
; Fix typo

6 years agoImprove documentation of a recent change
Eli Zaretskii [Wed, 20 Jun 2018 15:39:41 +0000 (18:39 +0300)]
Improve documentation of a recent change

* doc/lispref/processes.texi (Subprocess Creation): Improve
wording of documentation for the function 'exec-path'.

* etc/NEWS: Improve wording and formatting of recently added
entries.

* lisp/files.el (exec-path): Doc fix.

6 years agoChange index of ";" to better reflect it's usage (Bug#31623)
Noam Postavsky [Wed, 20 Jun 2018 12:40:51 +0000 (08:40 -0400)]
Change index of ";" to better reflect it's usage (Bug#31623)

* doc/lispref/objects.texi (Comments): "; for commenting" fits better
with the following text about how a semicolon begins a comment.  Also
mention that only unescaped semicolons start a comment.

6 years agoImplement command completion in remote shells. (Bug#31704)
Michael Albinus [Wed, 20 Jun 2018 10:13:56 +0000 (12:13 +0200)]
Implement command completion in remote shells.  (Bug#31704)

* doc/lispref/files.texi (Locating Files): Describe optional
argument REMOTE of `executable-find'.
(Magic File Names): Add `exec-path'.

* doc/lispref/processes.texi (Subprocess Creation): Describe
function `exec-path'.

* doc/misc/tramp.texi (Remote programs): Explain refresh of search
paths by `tramp-cleanup-this-connection'.

* etc/NEWS: Mention 'exec-path' and 'executable-find'.

* lisp/files.el (exec-path): New defun.
(executable-find): Add optional argument REMOTE.

* lisp/shell.el (shell-completion-vars): Set `comint-file-name-prefix'.
(shell--command-completion-data): Use `(exec-path)'.  (Bug#31704)

* lisp/net/ange-ftp.el (exec-path):
* lisp/net/tramp.el (tramp-file-name-for-operation):
* lisp/net/tramp-adb.el (tramp-adb-file-name-handler-alist):
* lisp/net/tramp-archive.el (tramp-archive-file-name-handler-alist):
* lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist):
* lisp/net/tramp-sh.el (tramp-sh-file-name-handler-alist):
* lisp/net/tramp-smb.el (tramp-smb-file-name-handler-alist)
<exec-path>: Add handler.

* lisp/net/tramp-adb.el (tramp-adb-handle-exec-path): New defun.
(tramp-adb-maybe-open-connection): Do not set "remote-path"
connection property.

* lisp/net/tramp-compat.el (tramp-compat-exec-path): New defun.

* lisp/net/tramp-sh.el (tramp-sh-handle-exec-path): New defun.

* lisp/net/tramp.el (tramp-eshell-directory-change): Use it.

* test/lisp/net/tramp-archive-tests.el
(tramp-archive-test38-make-nearby-temp-file)
(tramp-archive-test41-file-system-info)
(tramp-archive-test43-auto-load)
(tramp-archive-test43-delay-load): Rename.

* test/lisp/net/tramp-tests.el (tramp-test34-exec-path): New test.
(tramp-test36-make-auto-save-file-name)
(tramp-test37-find-backup-file-name)
(tramp-test38-make-nearby-temp-file)
(tramp-test39-special-characters)
(tramp-test39-special-characters-with-stat)
(tramp-test39-special-characters-with-perl)
(tramp-test39-special-characters-with-ls, tramp-test40-utf8)
(tramp-test40-utf8-with-stat, tramp-test40-utf8-with-perl)
(tramp-test40-utf8-with-ls, tramp-test41-file-system-info)
(tramp-test42-asynchronous-requests, tramp-test43-auto-load)
(tramp-test43-delay-load, tramp-test43-recursive-load)
(tramp-test43-remote-load-path, tramp-test44-unload): Rename.

6 years agoFix bug of 'mouse-drag-and-drop-region' to detect edges of region (Bug#31905)
Tak Kunihiro [Wed, 20 Jun 2018 07:27:50 +0000 (09:27 +0200)]
Fix bug of 'mouse-drag-and-drop-region' to detect edges of region (Bug#31905)

* lisp/mouse.el (mouse-drag-and-drop-region): Detect both the
beginning and the end of character of region during dragging
text.

6 years agoFix #'fun handling inside `labels' (Bug#31792)
Noam Postavsky [Tue, 12 Jun 2018 22:41:46 +0000 (18:41 -0400)]
Fix #'fun handling inside `labels' (Bug#31792)

* lisp/emacs-lisp/cl.el (labels): Apply the equivalent of the
cl-labels change from 2015-01-16 "* lisp/emacs-lisp/cl-macs.el: Fix
last change".
* test/lisp/emacs-lisp/cl-tests.el (labels-function-quoting): New
test.
* lisp/emacs-lisp/cl-macs.el (cl-flet, cl-labels): Improve docstring,
link to relevant manual page.
* doc/misc/cl.texi (Function Bindings): Don't imply that function
cells of symbols are modified by cl-flet.  Don't claim that cl-flet or
cl-labels affect references of the form (quote FUNC).

6 years agoProperly ignore stderr in elisp Flymake backend
João Távora [Tue, 19 Jun 2018 19:59:27 +0000 (20:59 +0100)]
Properly ignore stderr in elisp Flymake backend

Naively passing `null-device' as stderr creates a buffer named
"/dev/null" instead.  Pass a hidden buffer name instead.  (Bug#31902).

* lisp/progmodes/elisp-mode.el (elisp-flymake-byte-compile): Pass
hidden buffer as make-process :stderr instead of null-device.

6 years agoFix theme application
Daniel Colascione [Tue, 19 Jun 2018 14:38:47 +0000 (07:38 -0700)]
Fix theme application

Fix an inverted test.  Patch due to Andy Moreton.

* lisp/cus-face.el (custom-theme-set-faces): Correct sense of
`custom--should-apply-setting' test.

6 years agoUnbreak dabbrev
Daniel Colascione [Tue, 19 Jun 2018 03:41:25 +0000 (20:41 -0700)]
Unbreak dabbrev

This commit partially reverts
edb1f85a27817a3fac38bb85752671414819203b, which results in dabbev
expansion failing due to trying to switch to the null buffer.

* lisp/dabbrev.el (dabbrev--progress-reporter): Restore variable.
(dabbrev--find-expansion): Restore original code.

6 years agolisp/obsolete/*tls.el: Note when obsolescence was decided
Stefan Monnier [Tue, 19 Jun 2018 02:19:57 +0000 (22:19 -0400)]
lisp/obsolete/*tls.el: Note when obsolescence was decided

6 years agoSkip a json.c test unless functions being tested exist
João Távora [Tue, 19 Jun 2018 02:02:09 +0000 (03:02 +0100)]
Skip a json.c test unless functions being tested exist

* test/src/json-tests.el
(json-parse-with-custom-null-and-false-objects): Skip this test
unless functions being tested exist.

6 years agoMark a specific electric-pair-mode test as an expected failure
João Távora [Tue, 19 Jun 2018 01:49:54 +0000 (02:49 +0100)]
Mark a specific electric-pair-mode test as an expected failure

See https://lists.gnu.org/archive/html/emacs-devel/2018-06/msg00535.html

* test/lisp/electric-tests.el
(electric-pair-whitespace-chomping-2-at-point-4-in-c++-mode-in-strings):
Mark as failing.

6 years agoChange errant if to when (Bug#31840)
Mark Oteiza [Tue, 19 Jun 2018 01:27:26 +0000 (21:27 -0400)]
Change errant if to when (Bug#31840)

* lisp/emacs-lisp/subr-x.el: Expand to 'when' instead of 'if'.

6 years agoElectric-pair-mode lets modes choose how to skip whitespace
João Távora [Tue, 19 Jun 2018 01:18:43 +0000 (02:18 +0100)]
Electric-pair-mode lets modes choose how to skip whitespace

cc-mode.el-based major-modes with stricter syntax for invalid
NL-terminated strings might choose to have electric-pair-mode skip
some of whitespace into non-string-syntax regions, for the sake of
letting electric-pair-mode chomp that whitespace and make the string
valid again.

* lisp/elec-pair.el (electric-pair-post-self-insert-function): Call it.
(electric-pair-skip-whitespace-function): New buffer-local variable.

6 years agoStop assuming .git is a directory in gitmerge.el
Noam Postavsky [Tue, 12 Jun 2018 00:41:07 +0000 (20:41 -0400)]
Stop assuming .git is a directory in gitmerge.el

* admin/gitmerge.el (gitmerge-maybe-resume): Use 'git rev-parse
--git-dir' to find the git directory rather than assuming it is
.git/ (that assumption fails for separated worktrees).

6 years agoDefault to splash on current frame, if none visible (Bug#31169)
Noam Postavsky [Wed, 23 May 2018 23:26:49 +0000 (19:26 -0400)]
Default to splash on current frame, if none visible (Bug#31169)

* lisp/startup.el (fancy-splash-frame): Default to current frame.

6 years agoMove tls.el and starttls.el to lisp/obsolete/ (Bug#31457)
Noam Postavsky [Thu, 13 Jul 2017 12:52:39 +0000 (08:52 -0400)]
Move tls.el and starttls.el to lisp/obsolete/ (Bug#31457)

* lisp/obsolete/tls.el: Moved from lisp/net/tls.el.
* lisp/gnus/nnimap.el:
* lisp/url/url-http.el: Don't require tls, since it's obsolete.
* lisp/net/network-stream.el: Only require tls if we actually try to
use it (i.e., when (gnutls-available-p) returns nil).  Declare some
functions to fix compilation warnings.

* lisp/obsolete/starttls.el: Moved from lisp/net/starttls.el.
* lisp/net/sieve-manage.el:
* lisp/net/network-stream.el: Don't require `starttls' at the
top-level, declare the variables and functions used instead.
(network-stream-open-starttls): Only require `starttls' if
needed (i.e., gnutls-available-p fails).

* etc/NEWS: Announce obsoletion.

6 years agoMerge from origin/emacs-26
Glenn Morris [Mon, 18 Jun 2018 19:14:26 +0000 (12:14 -0700)]
Merge from origin/emacs-26

3673770 (origin/emacs-26) Fix vertical-motion with 'visual' line-numb...
d8bff53 ; CONTRIBUTE: Add a couple of nits.

6 years ago; Merge from origin/emacs-26
Glenn Morris [Mon, 18 Jun 2018 19:14:26 +0000 (12:14 -0700)]
; Merge from origin/emacs-26

The following commits were skipped:

48829cb Handle NSAttributedString inputs (bug#29837)
0deab3f Allow inserting non-BMP characters

6 years agoMerge from origin/emacs-26
Glenn Morris [Mon, 18 Jun 2018 19:14:26 +0000 (12:14 -0700)]
Merge from origin/emacs-26

ebe065f Prevent errant scroll on mouse click (Bug#31546)
ffd2018 Minor documentation fix
cf4dc95 * lisp/window.el (window-toggle-side-windows): Doc fix.  (Bug...

6 years ago; Merge from origin/emacs-26
Glenn Morris [Mon, 18 Jun 2018 19:14:26 +0000 (12:14 -0700)]
; Merge from origin/emacs-26

The following commits were skipped:

e128434 Fix byte compilation of (eq foo 'default)
4753d79 Fix Bug#31846.  Do not merge with master

6 years agoMerge from origin/emacs-26
Glenn Morris [Mon, 18 Jun 2018 19:14:25 +0000 (12:14 -0700)]
Merge from origin/emacs-26

63ba73a Fix documentation of ':propertize' in mode-line-format
22aa665 Reject invalid 5-byte sequences when detecting UTF-8 encoding
0d3c358 Fix 'replace-buffer-contents' in multibyte buffers
c79a627 Update etc/NEWS for mail-source-movemail-program change
63f1dc4 Improve movemail default
0b1a2ae Delete description of deleted Customize functions
fcd66d0 Keep vc-print-log from putting point at buffer end (Bug#31764)

Conflicts:
etc/NEWS

6 years ago; Merge from origin/emacs-26
Glenn Morris [Mon, 18 Jun 2018 19:14:24 +0000 (12:14 -0700)]
; Merge from origin/emacs-26

The following commit was skipped:

b635c54 Don’t set EMACS=t if Bash is 4.4 or newer

6 years agoMerge from origin/emacs-26
Glenn Morris [Mon, 18 Jun 2018 19:14:24 +0000 (12:14 -0700)]
Merge from origin/emacs-26

a933ebe Improve commentary in info.el
94e84a9 ; Further wording fix in tramp.texi
a5a0b11 Fix wording in tramp.texi
2933242 * doc/misc/tramp.texi (Remote shell setup): Fix typo.

6 years ago; Merge from origin/emacs-26
Glenn Morris [Mon, 18 Jun 2018 19:14:24 +0000 (12:14 -0700)]
; Merge from origin/emacs-26

The following commits were skipped:

6d4cbe8 Finish the Bug#11728 work: hg & git
66a491f Fix Bug#11728: show files updated by git

6 years agoMerge from origin/emacs-26
Glenn Morris [Mon, 18 Jun 2018 19:14:24 +0000 (12:14 -0700)]
Merge from origin/emacs-26

5bdc344 ; Reduce quoting for SELECTOR in 'make -C test' (Bug#31744)
b6b793b ; test/Makefile.in: Add TEST_INTERACTIVE option (Bug#31744).
1aa906f Make 'tags' targets respect --with-silent-rules (Bug#31744)

Conflicts:
test/Makefile.in
test/README

6 years ago; Merge from origin/emacs-26
Glenn Morris [Mon, 18 Jun 2018 19:13:51 +0000 (12:13 -0700)]
; Merge from origin/emacs-26

The following commit was skipped:

642c11f soap-client: Add byte-code compatibility function (Bug#31742)

6 years agoMerge from origin/emacs-26
Glenn Morris [Mon, 18 Jun 2018 19:13:51 +0000 (12:13 -0700)]
Merge from origin/emacs-26

9c6f35a * doc/lispref/files.texi (Unique File Names): Fix a typo.  (B...

6 years agoFix vertical-motion with 'visual' line-number display
Eli Zaretskii [Mon, 18 Jun 2018 16:39:16 +0000 (19:39 +0300)]
Fix vertical-motion with 'visual' line-number display

* src/indent.c (Fvertical_motion): Don't exempt 'visual' sty;e of
line-number display from X coordinate adjustments.  (Bug#31875)

6 years ago; CONTRIBUTE: Add a couple of nits.
Eli Zaretskii [Mon, 18 Jun 2018 16:34:55 +0000 (19:34 +0300)]
; CONTRIBUTE: Add a couple of nits.

6 years agoImprove documentation of recent changes in Comint
Eli Zaretskii [Mon, 18 Jun 2018 16:21:09 +0000 (19:21 +0300)]
Improve documentation of recent changes in Comint

* lisp/comint.el (comint-insert-previous-argument)
(comint-arguments, comint-insert-previous-argument-from-end):
Doc fixes.
(comint-insert-previous-argument-from-end): Add :version.

* doc/emacs/misc.texi (Shell Ring): Fix a typo in the name of
'comint-insert-previous-argument'.  Document
'comint-insert-previous-argument-from-end'.  (Bug#25271)

* etc/NEWS: Reformat and rephrase the entry for recent Comint
changes.

6 years agormail-summary-by-senders defaults to sender
Richard Stallman [Mon, 18 Jun 2018 07:20:45 +0000 (00:20 -0700)]
rmail-summary-by-senders defaults to sender

* etc/NEWS: Mention this.
* lisp/mail/rmailsum.el (rmail-summary-by-senders):
Offer From field of current message as a default argument.

6 years agocomint-insert-previous-argument doesn't detect and ignore trailing &
Dima Kogan [Sun, 25 Dec 2016 19:49:44 +0000 (11:49 -0800)]
comint-insert-previous-argument doesn't detect and ignore trailing &

This function is invoked in shell-mode by the user, and is meant to
emulate what M-. does in zsh and bash: it inserts an argument from a
previous command.  Neither zsh nor bash treat a trailing & specially:
M-. simply inserts it if it is encountered.  Emacs DID have extra
logic to detect and discard trailing &, but this logic was buggy, and
a && anywhere in the sequence would confuse it.  This patch simply
removes that logic to fix the bug and to emulate zsh and bash more
closely

* lisp/comint.el (comint-insert-previous-argument): don't detect and
  ignore trailing &
  (Bug#25271)
* etc/NEWS: Document this.

6 years agocomint-insert-previous-argument counts args from start or from end
Dima Kogan [Sun, 25 Dec 2016 19:35:26 +0000 (11:35 -0800)]
comint-insert-previous-argument counts args from start or from end

This function is invoked in shell-mode by the user, and is meant to
emulate what M-. does in zsh and bash: it inserts an argument from a
previous command.  Without a prefix argument, it inserts the last arg
from the previous command; with an argument INDEX, it inserts the
INDEX-th argument.  bash counts from the start, while zsh counts from
the end.  This patch adds a variable
`comint-insert-previous-argument-from-end' that emulates the zsh
behavior if non-nil.

* lisp/comint.el (comint-arguments): can take in negative arguments to count
  from the end, same as indexing in python.
  (comint-insert-previous-argument): if
  comint-insert-previous-argument-from-end is non-nil, INDEX counts
  arguments from the end; if nil, from the beginning
  (Bug#25271)
* etc/NEWS: Document this.

6 years ago* test/lisp/simple-tests.el (simple-tests-async-shell-command-30280):
Glenn Morris [Sun, 17 Jun 2018 17:22:28 +0000 (10:22 -0700)]
* test/lisp/simple-tests.el (simple-tests-async-shell-command-30280):
Use the correct emacs executable, not first in PATH.

6 years agoAllow floats as 'pcase' QPATS
Michael Heerdegen [Wed, 13 Jun 2018 02:37:38 +0000 (04:37 +0200)]
Allow floats as 'pcase' QPATS

* lisp/emacs-lisp/pcase.el (\`): Extend semantics of QPATS to all
numbers.  Add a comment explaining why we disallow some atoms as
QPATS.
* doc/lispref/control.texi (Backquote Patterns): Update the paragraph
explaining QPATS.  Remove a sentence suggesting an analogy between
QPATS to self-quoting objects.

6 years agoMinor Flymake docstring fixes
João Távora [Sun, 17 Jun 2018 11:41:24 +0000 (12:41 +0100)]
Minor Flymake docstring fixes

* lisp/progmodes/flymake.el (flymake-diagnostic-functions):
Clarify meaning of :region in docstring.
(flymake-start): Fix broken docstring.

6 years agoHandle NSAttributedString inputs (bug#29837)
Alan Third [Sun, 24 Dec 2017 15:40:03 +0000 (15:40 +0000)]
Handle NSAttributedString inputs (bug#29837)

; Do not merge to master.

* src/nsterm.m (EmacsView::insertText): Handle NSAttributedString.

6 years agoAllow inserting non-BMP characters
Philipp Stephani [Mon, 25 Dec 2017 21:00:00 +0000 (22:00 +0100)]
Allow inserting non-BMP characters

* src/coding.h (UTF_16_HIGH_SURROGATE_P, UTF_16_LOW_SURROGATE_P): Move
from coding.c and document.
(surrogates_to_codepoint): New function.

* src/nsterm.m (insertText:): Properly handle surrogate pairs.

(cherry picked from commit 703ac3ea1c1ce381f385469a0e88bc29d3fe83c2)

6 years agoPrevent errant scroll on mouse click (Bug#31546)
Aaron Jensen [Thu, 24 May 2018 10:45:03 +0000 (03:45 -0700)]
Prevent errant scroll on mouse click (Bug#31546)

* src/nsterm.m (ns_mouse_position): Use correct frame when determining
  mouse position.
* lisp/mouse.el (mouse-drag-track): Only account for mode-line height
  if `mode-line-format' is non-nil.

6 years agoFix last change
Eli Zaretskii [Sun, 17 Jun 2018 10:13:52 +0000 (13:13 +0300)]
Fix last change

* etc/NEWS: Fix last added entry.

* lisp/subr.el (dotimes-with-progress-reporter)
(dolist-with-progress-reporter): Fix the advertised signature.

* doc/lispref/display.texi (Progress): Fix last change.
(Bug#31696)  (Bug#31697)

6 years agoAdd new macro dolist-with-progress-reporter
Tino Calancha [Sun, 17 Jun 2018 09:28:34 +0000 (18:28 +0900)]
Add new macro dolist-with-progress-reporter

* lisp/subr.el (dolist-with-progress-reporter): New macro (Bug#31697).
* lisp/cus-edit.el (custom-group-value-create): Use it.
* lisp/dabbrev.el (dabbrev--progress-reporter): Delete variable.
(dabbrev--find-expansion): Use dotimes-with-progress-reporter.

* doc/lispref/display.texi: Document the macro.
; * etc/NEWS: Announce it.

6 years agodotimes-with-progress-reporter: Polymorphic 2nd argument
Tino Calancha [Sun, 17 Jun 2018 09:28:34 +0000 (18:28 +0900)]
dotimes-with-progress-reporter: Polymorphic 2nd argument

* lisp/subr.el (dotimes-with-progress-reporter): Allow 2nd arg to be
a string or a progress reporter (Bug#31696).
* doc/lispref/display.texi (node Progress): Update manual.

6 years agoCleanup secrets-tests
Michael Albinus [Sun, 17 Jun 2018 09:19:16 +0000 (11:19 +0200)]
Cleanup secrets-tests

* test/lisp/net/secrets-tests.el (secrets-test03-items)
(secrets-test04-search): Cleanup "session" collection initially.

6 years agoMinor documentation fix
Eli Zaretskii [Sun, 17 Jun 2018 08:19:59 +0000 (11:19 +0300)]
Minor documentation fix

* doc/lispref/windows.texi (Window Start and End): Improve
documentation and indexing of window-end.

6 years agoWhen possible, prefer UTF-8 as the safe encoding for saving
Eli Zaretskii [Sun, 17 Jun 2018 07:40:29 +0000 (10:40 +0300)]
When possible, prefer UTF-8 as the safe encoding for saving

* lisp/international/mule-cmds.el (select-safe-coding-system):
If possible, offer UTF-8 as the default encoding.  (Bug#31807)

6 years ago* lisp/window.el (window-toggle-side-windows): Doc fix. (Bug#31858)
Eli Zaretskii [Sun, 17 Jun 2018 05:42:11 +0000 (08:42 +0300)]
* lisp/window.el (window-toggle-side-windows): Doc fix.  (Bug#31858)

6 years ago; * etc/NEWS: Tweak a recently-added NEWS entry.
Eli Zaretskii [Sun, 17 Jun 2018 05:22:23 +0000 (08:22 +0300)]
; * etc/NEWS: Tweak a recently-added NEWS entry.

6 years agoApply non-user themes only when asked
Daniel Colascione [Sat, 16 Jun 2018 22:42:56 +0000 (15:42 -0700)]
Apply non-user themes only when asked

Theme settings now generally aren't actually applied until a call to
`enable-theme-, either one made explicitly or implicitly through
`load-theme' with NO-ENABLE nil.  This change has the effect of not
applying theme changes just because we load a lisp file containing a
theme specification.  The previous behavior is preserved for the
special case of the `user' theme, which is frequently used for
ad-hoc customization.

* lisp/cus-face.el (custom-theme-set-faces): Call
`custom--should-apply-setting' to decide whether to apply
a setting.

* lisp/custom.el (custom--should-apply-setting): New function.
(custom--inhibit-theme-enable): Add `apply-only-user' option;
default to it.
(custom-push-theme, custom-theme-set-variables): Call
`custom--should-apply-setting' to decide whether to apply
a setting.

6 years agoDon't forget to analyze args of lambda lifted functions (Bug#30872)
Noam Postavsky [Thu, 7 Jun 2018 23:58:47 +0000 (19:58 -0400)]
Don't forget to analyze args of lambda lifted functions (Bug#30872)

* lisp/emacs-lisp/cconv.el (cconv--convert-funcbody): New function.
(cconv--convert-function): Extracted from here.
(cconv-convert): Also use it here, in the lambda lifted case, so that
mutated args are properly accounted for.
* test/lisp/emacs-lisp/cconv-tests.el: New test.

6 years agoFix off by one error in python-mode assertion (Bug#30964)
Noam Postavsky [Sat, 2 Jun 2018 20:22:17 +0000 (16:22 -0400)]
Fix off by one error in python-mode assertion (Bug#30964)

* lisp/progmodes/python.el (python-nav-end-of-statement): Don't assert
that string-start is strictly greater than last-string-end, because
the string end is a position outside of the string and may therefore
be the same as the following string's start.
* test/lisp/progmodes/python-tests.el (python-nav-end-of-statement-2):
New test.

6 years agoRestore old echo_truncate condition
Daniel Colascione [Sat, 16 Jun 2018 21:21:54 +0000 (14:21 -0700)]
Restore old echo_truncate condition

* src/keyboard.c (read_key_sequence): Restore old
echo_truncate condition.

6 years agoMake regex matching reentrant; update syntax during match
Daniel Colascione [Sat, 16 Jun 2018 20:46:10 +0000 (13:46 -0700)]
Make regex matching reentrant; update syntax during match

* src/lisp.h (compile_pattern): Remove prototype of
now-internal function.

* src/regex.c (POS_AS_IN_BUFFER): Consult gl_state instead of
re_match_object: the latter can change in Lisp.
(re_match_2_internal): Switch back to UPDATE_SYNTAX_* FROM
UPDATE_SYNTAX_FAST*, allowing calls into Lisp.

* src/regex.h (re_match_object): Uncomment declaration.

* src/search.c (struct regexp_cache): Add `busy' field.
(thaw_buffer_relocation): Delete; rely on unbind.
(compile_pattern_1): Assert pattern isn't busy.
(shrink_regexp_cache): Don't shrink busy patterns.
(clear_regexp_cache): Don't nuke busy patterns.
(unfreeze_pattern, freeze_pattern): New functions.
(compile_pattern): Return a regexp_cache pointer instead of the
re_pattern_buffer, allowing callers to use `freeze_pattern' if
needed.  Do not consider busy patterns as cache hit candidates;
error if we run out of non-busy cache entries.
(looking_at_1, fast_looking_at): Snapshot
Vinhibit_changing_match_data; mark pattern busy while we're
matching it; unbind.
(string_match_1, fast_string_match_internal)
(fast_c_string_match_ignore_case): Adjust for compile_pattern
return type.
(search_buffer_re): Regex code from old search_buffer moved here;
snapshot Vinhibit_changing_match_data; mark pattern busy while
we're matching it; unbind.
(search_buffer_non_re): Non-regex code from old search_buffer
moved here.
(search_buffer): Split into search_buffer_re,
search_buffer_non_re.
(syms_of_search): Staticpro re_match_object, even though we really
shouldn't have to.

* src/syntax.h (UPDATE_SYNTAX_TABLE_FORWARD_FAST):
(UPDATE_SYNTAX_TABLE_FAST): Remove.

* src/thread.h (struct thread_state): Remove m_re_match_object,
which is global again.  (It never needs to be preserved across
thread switch.)

6 years agoDecouple dired from regex internals
Daniel Colascione [Sat, 16 Jun 2018 19:43:56 +0000 (12:43 -0700)]
Decouple dired from regex internals

* src/dired.c: Remove use of regex.h
(directory_files_internal): Use higher-level regular
expression functions.

6 years agoRemove commented-out code in compile_pattern_1
Daniel Colascione [Sat, 16 Jun 2018 06:53:36 +0000 (23:53 -0700)]
Remove commented-out code in compile_pattern_1

* src/search.c (compile_pattern_1): Remove commented-out code.

6 years agoTweak field ordering in re_pattern_buffer
Daniel Colascione [Sat, 16 Jun 2018 06:48:26 +0000 (23:48 -0700)]
Tweak field ordering in re_pattern_buffer

* src/regex.h (struct re_pattern_buffer): Reorder charset_unibyte
field to keep bitfields together.

6 years agoFix a docstring
Bozhidar Batsov [Sat, 16 Jun 2018 20:00:50 +0000 (23:00 +0300)]
Fix a docstring

6 years agoFix references to RuboCop in ruby-mode.el
Bozhidar Batsov [Sat, 16 Jun 2018 19:58:33 +0000 (22:58 +0300)]
Fix references to RuboCop in ruby-mode.el

6 years agoFix bug in elisp-flymake-byte-compile
João Távora [Sat, 16 Jun 2018 17:08:09 +0000 (18:08 +0100)]
Fix bug in elisp-flymake-byte-compile

* lisp/progmodes/elisp-mode.el (elisp-flymake-byte-compile): Pass
keyword args to make-process.

6 years agoFix byte compilation of (eq foo 'default)
Paul Eggert [Sat, 16 Jun 2018 14:44:58 +0000 (07:44 -0700)]
Fix byte compilation of (eq foo 'default)

Backport from master.
Do not use the symbol ‘default’ as a special marker.
Instead, use a value that cannot appear in the program,
improving on a patch proposed by Robert Cochran (Bug#31718#14).
* lisp/emacs-lisp/bytecomp.el (byte-compile--default-val):
New constant.
(byte-compile-cond-jump-table-info)
(byte-compile-cond-jump-table): Use it instead of 'default.
* test/lisp/emacs-lisp/bytecomp-tests.el:
(byte-opt-testsuite-arith-data): Add a test for the bug.

6 years agoRewrite memory-limit in Lisp
Paul Eggert [Sat, 16 Jun 2018 15:11:37 +0000 (08:11 -0700)]
Rewrite memory-limit in Lisp

Have it return Emacs virtual memory size, not the sbrk value
which is often useless newadays.
* doc/lispref/internals.texi (Garbage Collection):
* etc/NEWS: Document this.
* lisp/subr.el (memory-limit): New implementation in Lisp,
written in terms of process-attributes, and which returns
virtual memory size.
* src/alloc.c (Fmemory_limit): Remove C implementation.

6 years agoFix byte compilation of (eq foo 'default)
Paul Eggert [Sat, 16 Jun 2018 14:44:58 +0000 (07:44 -0700)]
Fix byte compilation of (eq foo 'default)

Do not use the symbol ‘default’ as a special marker.
Instead, use a value that cannot appear in the program,
improving on a patch proposed by Robert Cochran (Bug#31718#14).
* lisp/emacs-lisp/bytecomp.el (byte-compile--default-val):
New constant.
(byte-compile-cond-jump-table-info)
(byte-compile-cond-jump-table): Use it instead of 'default.
* test/lisp/emacs-lisp/bytecomp-tests.el:
(byte-opt-testsuite-arith-data): Add a test for the bug.

6 years agoFix Bug#31846. Do not merge with master
Michael Albinus [Sat, 16 Jun 2018 14:05:07 +0000 (16:05 +0200)]
Fix Bug#31846.  Do not merge with master

* lisp/net/secrets.el (secrets-search-items)
(secrets-create-item): Fix format of :dict-entry values.  (Bug#31846)

6 years agoUse mint_ptr in w32notify.c
Eli Zaretskii [Sat, 16 Jun 2018 11:16:53 +0000 (14:16 +0300)]
Use mint_ptr in w32notify.c

* src/w32notify.c (Fw32notify_add_watch, Fw32notify_rm_watch)
(Fw32notify_valid_p, w32_get_watch_object): Use make_mint_ptr and
xmint_pointer.

6 years agoFix documentation of ':propertize' in mode-line-format
Eli Zaretskii [Sat, 16 Jun 2018 11:00:47 +0000 (14:00 +0300)]
Fix documentation of ':propertize' in mode-line-format

* doc/lispref/modes.texi (Mode Line Data): Make the description of
':propertize' more accurate.  (Bug#26291)

6 years ago* doc/lispref/text.texi (Parsing JSON): Minor formatting changes.
Eli Zaretskii [Sat, 16 Jun 2018 10:49:36 +0000 (13:49 +0300)]
* doc/lispref/text.texi (Parsing JSON): Minor formatting changes.

6 years agoMinor doc string fixes in json.c
Eli Zaretskii [Sat, 16 Jun 2018 10:40:38 +0000 (13:40 +0300)]
Minor doc string fixes in json.c

* src/json.c (Fjson_serialize, Fjson_insert): Fix 'usage'.

6 years agoFormatting and doc fixes in recent changes
Eli Zaretskii [Sat, 16 Jun 2018 10:27:24 +0000 (13:27 +0300)]
Formatting and doc fixes in recent changes

* src/xfaces.c (evaluate_face_filter): Explain the inner braces.
(merge_face_ref): Fix whitespace.
(syms_of_xfaces) <face-filters-always-match>: Doc fix.
* src/xdisp.c (extend_face_to_end_of_line): Fix whitespace.

6 years agoImprove documentation of several recent changes
Eli Zaretskii [Sat, 16 Jun 2018 10:10:52 +0000 (13:10 +0300)]
Improve documentation of several recent changes

* src/xfaces.c (merge_face_ref): Fix a typo in the commentary.
(evaluate_face_filter, filter_face_ref): Minor copyedits in
the commentary.
* doc/lispref/display.texi (Face Remapping):
* doc/lispref/text.texi (Special Properties): Document the
':filter' face specs and their effects.  Document
'face-filters-always-match'.

* doc/emacs/files.texi (Visiting): Document the new
possibility to visit large files literally in response to
question asked by Emacs.
* etc/NEWS: Mention the new possibility to visit large files
literally.
* lisp/files.el (files--ask-user-about-large-file): Use
"literally" instead of "raw", for consistency with
find-file-literally.

* doc/lispref/frames.texi (Input Focus): Tell explicitly that
focus-change events are sometimes supported on TTY frames.