1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-02 11:21:42 +00:00
Commit Graph

133680 Commits

Author SHA1 Message Date
Paul Eggert
b2c854a0e1 * src/lisp.h: Add comment (Bug#31996#25). 2018-06-29 00:29:41 -07:00
Noam Postavsky
591bb3d900 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.
2018-06-28 22:09:04 -04:00
Paul Eggert
ddc4371a89 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.
2018-06-28 13:51:09 -07:00
Paul Eggert
76eda952b0 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.
2018-06-28 00:42:46 -07:00
Dmitry Gutov
93c41ce6aa Remove extra process call from vc-git-find-file-hook
* lisp/vc/vc-git.el (vc-git-find-file-hook): Resolve FIXMEs.
2018-06-28 03:14:56 +03:00
Dmitry Gutov
7ea0873b4f ; 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.
2018-06-28 03:05:19 +03:00
Dmitry Gutov
4a7f4232ed 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).
2018-06-28 03:03:36 +03:00
Eli Zaretskii
79f6911bf1 ; * etc/NEWS: Fix recently added entries. 2018-06-27 21:08:28 +03:00
Eli Zaretskii
9134c841f1 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.
2018-06-27 18:02:45 +03:00
João Távora
ce54573dac 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.
2018-06-27 14:19:38 +01:00
Vincent Belaïche
5924259f15 Allow 'file:' protocol for Info-follow-nearest-node. 2018-06-27 15:18:52 +02:00
Michael Albinus
1f5037925b 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.
2018-06-27 13:08:18 +02:00
Martin Rudalics
d008ef3d0b * src/xdisp.c (Vmouse_autoselect_window): Clarify doc-string (Bug#31975) 2018-06-27 09:07:59 +02:00
Noam Postavsky
6f6d525683 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.
2018-06-26 19:56:04 -04:00
Glenn Morris
513b97c0e9 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
2018-06-26 07:51:01 -07:00
Christophe Junke
12c77f6918 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
2018-06-25 20:05:53 -04:00
Jean-Christophe Helary
61f73703c7 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.
2018-06-25 19:18:55 -04:00
Noam Postavsky
c71fb6b0cd 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.
2018-06-25 19:18:55 -04:00
Paul Eggert
d0e2a341dd (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.
2018-06-25 12:23:08 -07:00
Michael Albinus
826e8d1f12 Merge branch 'emacs-26' of git.sv.gnu.org:/srv/git/emacs into emacs-26 2018-06-25 20:40:37 +02:00
Karl Fogel
c7848767c9 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>
2018-06-25 12:23:23 -05:00
Lars Ingebrigtsen
27a21970f6 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.
2018-06-25 18:56:55 +02:00
Lars Ingebrigtsen
71e4a4b7e5 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.
2018-06-25 18:42:48 +02:00
Michael Albinus
517dc0b135 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.
2018-06-25 16:25:41 +02:00
João Távora
15f4cdd873 Mention use of C-h . (display-local-help) in Flymake manual
Fixes: Bug#31921

* doc/misc/flymake.texi (Using Flymake): Mention display-local-help.
2018-06-25 12:29:04 +01:00
Paul Eggert
f43186fe28 Revert previous patch; comment was OK after all. 2018-06-24 23:46:18 -07:00
Paul Eggert
4c3306e12f Fix lead comment for count_trailing_zero_bits
* src/data.c (count_trailing_zero_bits): Fix comment to match code.
2018-06-24 23:21:23 -07:00
Noam Postavsky
79c247700f ; doc/emacs/misc.texi (Network Security): Fix typo. 2018-06-24 21:00:32 -04:00
Lars Ingebrigtsen
3e7692f07d 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).
2018-06-25 02:40:25 +02:00
Lars Ingebrigtsen
cf36693bd4 Don't use XCAR in possibly-nil situations
* src/gnutls.c (Fgnutls_peer_status): certs theoretically may be
nil, so don't use XCAR.
2018-06-25 02:34:37 +02:00
Noam Postavsky
190a45f201 (Network Security): Fix the description of the 3DES weakness
* doc/emacs/misc.texi (Network Security): Fix the description of
the 3DES weakness.
2018-06-24 23:57:05 +02:00
Lars Ingebrigtsen
5a285a4db9 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'.
2018-06-24 22:57:27 +02:00
Lars Ingebrigtsen
fea8c7d181 Tweak previous gnutls change for efficiency
* src/gnutls.c (Fgnutls_peer_status): Minor optimisation to avoid
computing the topmost certificate twice.
2018-06-24 21:21:56 +02:00
Lars Ingebrigtsen
c8745d95cf 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.
2018-06-24 21:17:46 +02:00
Tom Tromey
cd5bb4bf3d 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.
2018-06-24 11:33:02 -06:00
Eli Zaretskii
b419f27a43 ; * doc/emacs/files.texi (Interlocking): Fix a non-portable @xref. 2018-06-24 19:23:13 +03:00
Noam Postavsky
7488de4f27 * lisp/emacs-lisp/regexp-opt.el (regexp-opt): Fix docstring quotes. 2018-06-24 10:57:54 -04:00
Lars Ingebrigtsen
eaa054a94b Fix reverse test in previous check-in
* lisp/net/nsm.el (nsm-check-protocol): Fix reverse test in
previous check-in.
2018-06-24 15:40:43 +02:00
Lars Ingebrigtsen
6584bc6720 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.
2018-06-24 15:37:00 +02:00
Simen Heggestøyl
0b69807015 Make a minor update to the CSS mode docstring
* lisp/textmodes/css-mode.el (css-mode): Mention 'fill-paragraph'.
2018-06-24 14:31:43 +02:00
Karl Fogel
9a53b6d426 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>
2018-06-24 07:10:43 -05:00
Michael Albinus
1d7707886d 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".
2018-06-24 10:24:26 +02:00
Glenn Morris
16c2f03c15 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)
2018-06-23 07:51:00 -07:00
Glenn Morris
de05ecd116 ; Merge from origin/emacs-26
The following commit was skipped:

a37cbbc Merge branch 'emacs-26' of git.savannah.gnu.org:/srv/git/emac...
2018-06-23 07:51:00 -07:00
Glenn Morris
b81e193ac0 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)
2018-06-23 07:50:59 -07:00
Leo Liu
bbc9d3793d 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)
2018-06-23 16:45:58 +03:00
Eli Zaretskii
7caeef1622 * src/editfns.c (Fformat): Make %x easier to spot in doc string. (Bug#31945) 2018-06-23 15:34:14 +03:00
Eli Zaretskii
ecc29fbd5a 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)
2018-06-23 14:03:10 +03:00
Michael Albinus
4df361557c * lisp/net/tramp-sh.el (tramp-get-ls-command-with): Fix typo. 2018-06-23 10:18:55 +02:00
Eli Zaretskii
8182d648cb 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)
2018-06-23 10:50:58 +03:00