Juri Linkov [Mon, 5 Nov 2018 21:11:30 +0000 (23:11 +0200)]
Support lazy-highlight-buffer in Info (bug#29321, bug#29360).
* lisp/isearch.el (isearch-lazy-highlight-point-min)
(isearch-lazy-highlight-point-max): New variables.
(isearch-lazy-highlight-new-loop): When lazy-highlight-buffer is
non-nil, compare (point-min) with isearch-lazy-highlight-point-min,
and (point-max) with isearch-lazy-highlight-point-max, for buffers
like Info where narrowing changes the values point-min and point-max.
Glenn Morris [Sun, 4 Nov 2018 17:37:03 +0000 (09:37 -0800)]
Merge from origin/emacs-26
bd1d617 Avoid race in rcirc process filter (bug#33145) 88ef31a Avoid file-name errors when viewing PDF from Gnus c939042 Avoid crashes with remapped default face in Org mode 97660fa Doc fix for checkdoc-continue 96f055b Fix a typo in autoload.el
Michael Albinus [Sun, 4 Nov 2018 11:51:39 +0000 (12:51 +0100)]
Fix Bug#33194
* lisp/autorevert.el (auto-revert-notify-add-watch):
Handle buffers with same descriptor properly.
(auto-revert-notify-handler): Handle all buffers with same
descriptor. (Bug#33194)
Martin Rudalics [Sun, 4 Nov 2018 08:15:13 +0000 (09:15 +0100)]
Rewrite documentation of buffer display
* doc/emacs/windows.texi (Window Choice): Rewrite, replacing
references to older buffer display options with references to
and examples of buffer display actions.
(Temporary Displays): Rewrite display of *Completions*
example.
* doc/lispref/elisp.texi (Top): New Windows section
'Displaying Buffers'.
* doc/lispref/frames.texi (Child Frames): Adjust cross
reference.
* doc/lispref/windows.texi (Windows): New section 'Displaying
Buffers'. Move sections 'Choosing Window', 'Display Action
Functions' and 'Choosing Window Options' there and adjust
namings. Preferably write 'Buffer Display Action' instead of
'Display Action'. More consistently use @w{} to make key
binding specifications unsplittable.
(Displaying Buffers): New section.
(Choosing Window): Make it a subsection of 'Displaying
Buffers'. More explicitly describe how 'display-buffer'
compiles its list of action functions and the action alist.
(Buffer Display Action Functions): Rename from 'Display Action
Functions', make it a subsection of 'Displaying Buffers' and
rewrite it. Elide more detailed descriptions of action alist
entries; these are now in the new section 'Buffer Display
Action Functions'. Remove example.
(Buffer Display Action Alists): New subsection of 'Displaying
Buffers' giving a comprehensive description of recognized
action alist entries with appropriate indexing. Contents were
partially moved here from the old 'Display Action Functions'
section.
(Choosing Window Options): Make it a subsection of 'Displaying
Buffers'. Add examples of how to rewrite old buffer display
options with the help of buffer display actions.
(Precedence of Action Functions): New subsection of
'Displaying Buffers' explaining the execution order of action
functions with the help of a detailed example.
(The Zen of Buffer Display): New subsection of 'Displaying
Buffers' supplying guidelines on how to write and use buffer
display actions with examples.
(Side Windows, Displaying Buffers in Side Windows)
(Frame Layouts with Side Windows, Atomic Windows): Update
references to the 'Displaying Buffers' subsections.
Paul Eggert [Sat, 3 Nov 2018 20:11:26 +0000 (13:11 -0700)]
Improve time error reporting
* src/timefns.c (emacs_mktime_z): Remove; no longer needed.
(time_error): New function, replacing invalid_time.
All callers changed.
(decode_float_time, decode_ticks_hz, decode_time_components):
Return an error number instead of merely a boolean.
All callers changed.
(decode_lisp_time): Signal an error based on the error number,
instead of merely returning a boolean to the caller.
All callers changed.
(format_time_string, Fdecode_time, Fencode_time)
(Fcurrent_time_string):
Do not assume that a failure of a system time function
must be due to time overflow.
(Fencode_time): Don't report an error merely because mktime
returned ((time_t) -1), as that may be a valid time_t value.
Use a simpler error check. See:
https://www.sourceware.org/ml/libc-alpha/2018-11/msg00062.html
Eli Zaretskii [Sat, 3 Nov 2018 13:11:33 +0000 (15:11 +0200)]
Improve documentation of destructuring-binding macros
* lisp/emacs-lisp/pcase.el (pcase-dolist, pcase-let)
(pcase-let*): Improve the doc strings.
* doc/lispref/sequences.texi (Sequence Functions): Improve
wording and rename arguments of seq-let to be more
descriptive. Add a cross-reference to "Destructuring with
pcase Patterns".
* doc/lispref/control.texi (Pattern-Matching Conditional):
Improve wording and the menu.
(pcase Macro): Incorporate patch suggested by Paul Eggert
<eggert@cs.ucla.edu>. Reformat text.
(Destructuring with pcase Patterns): Rename from
"Destructuring patterns", and improve wording and indexing.
Eli Zaretskii [Sat, 3 Nov 2018 10:39:59 +0000 (12:39 +0200)]
Allow the fringe face to be remapped locally in a buffer
* src/fringe.c (draw_window_fringes): Switch to window's
buffer to get the local value of face-remapping-alist, if
necessary. (Bug#33244)
* src/xfaces.c (syms_of_xfaces) <Qface_remapping_alist>: New
DEFSYM.
David Edmondson [Sun, 28 Oct 2018 03:11:21 +0000 (03:11 +0000)]
Add URL truncation support to rcirc (bug#33043)
Suggested by David Edmondson <dme@dme.org>.
* lisp/net/rcirc.el (rcirc-url-max-length): New user option
controlling extent of URL truncation, defaulting to none.
(rcirc-markup-urls): Use it.
* etc/NEWS: Announce it.
'minor-mode-menu-from-indicator' now display full minor mode.
When there is no menu for a mode, display the mode name after the
indicator instead of just the indicator (which is sometime cryptic).
Ex:
before : SP
now : SP - Smartparens Mode
* etc/NEWS: Add en entry for this new feature.
* lisp/mouse.el (minor-mode-menu-from-indicator): Append the mode name
after the indicator when there is no menu defined by the mode.
* lisp/net/rcirc.el (rcirc-filter): Clear rcirc-process-output
before processing its constituent lines. Otherwise, if rcirc-filter
runs again before the last rcirc-process-server-response is
finished, the contents of rcirc-process-output could be duplicated.
Eric Abrahamsen [Tue, 23 Oct 2018 02:51:37 +0000 (10:51 +0800)]
Allow use of Gnus search groups as notmuch path: search term
* lisp/gnus/nnir.el (nnir-notmuch-filter-group-names-function): New
option governing whether and how to use Gnus' search groups as path:
search terms to notmuch.
(nnir-run-notmuch): Check and possibly use above variable.
(Bug#33122)
Daniel Pittman [Tue, 23 Oct 2018 15:24:04 +0000 (11:24 -0400)]
Fix interaction between vc-hg find-file-hook and vc state caching
Bad assumptions in the `vc-hg-find-file-hook' prevented it from
working. This correctly them. (Bug#33129).
2018-10-23 Daniel Pittman <slippycheeze@google.com>
* lisp/vc/vc-hg.el (vc-hg-find-file-hook): This function made two
assumptions about conflicted files that were not accurate,
preventing conflicts in files ever being detected.
The first was that the `vc-state' was cache by the time this was
invoked, which it is not - at least when visiting the file, or
using `vc-refresh-state'.
The second was that a file with the ".orig" extension would be
present, next to the file being visited. This is the default
behavior of Mercurial, but can be overridden by the user.
Since the VC mode-line code will shortly calculate the state for
display, the optimization of testing for the ".orig" file only
delayed this work by a few moments.
Jordan Wilson [Wed, 10 Oct 2018 10:45:57 +0000 (11:45 +0100)]
Avoid file-name errors when viewing PDF from Gnus
* lisp/doc-view.el (doc-view-mode): Run the output file name
through 'convert-standard-filename', to avoid problems with
characters that are not allowed in file names on some
systems. (Bug#32989)
Eli Zaretskii [Fri, 2 Nov 2018 10:07:47 +0000 (12:07 +0200)]
Avoid crashes with remapped default face in Org mode
* src/xfaces.c (face_at_buffer_position): Look up BASE_FACE_ID
anew if it is not in the frame's face cache. This avoids
crashes when Org mode sets up for a new major mode in embedded
code fragment, and the default face is remapped. (Bug#33222)
Michael Albinus [Wed, 31 Oct 2018 19:04:04 +0000 (20:04 +0100)]
Remote file name completion is also performed by auth-sources search
* doc/misc/tramp.texi (File name completion): User and host name
completion is also performed by auth-sources search.
* etc/NEWS: Document remote file name completion using auth-sources.
* lisp/net/tramp.el (tramp-completion-use-auth-sources):
New user option.
(tramp-parse-auth-sources): New defun.
(tramp-get-completion-function): Call it.
Gemini Lasswell [Wed, 31 Oct 2018 04:15:51 +0000 (21:15 -0700)]
Add regression test for Bug#33014
Backport from master.
* test/src/eval-tests.el:
(eval-tests-byte-code-being-evaluated-is-protected-from-gc): New test.
(eval-tests-33014-var): New variable.
(eval-tests-33014-func, eval-tests-33014-redefine): New functions.
Paul Eggert [Wed, 31 Oct 2018 04:14:10 +0000 (21:14 -0700)]
Refer to bytecode constant vectors (Bug#33014)
Backport from master.
* src/bytecode.c (exec_byte_code): Save VECTOR into stack slot
so that it survives GC. The stack slot was otherwise unused,
so this doesn’t cost us memory, only a store insn.
Paul Eggert [Wed, 31 Oct 2018 03:57:46 +0000 (20:57 -0700)]
Improve fix for Bug#33014
Although the previously-applied fix worked for its platform,
it doesn’t suffice in general.
* src/bytecode.c (exec_byte_code): Save VECTOR into stack slot
so that it survives GC. The stack slot was otherwise unused,
so this doesn’t cost us memory, only a store insn.
* src/eval.c (Ffuncall): Do not make FUN volatile, reverting
2018-10-14T19:12:04Z!gazally@runbox.com. Adding ‘volatile’
does not suffice, since storage for a volatile local can be
reclaimed after its last access (e.g., by tail recursion
elimination), which would make VECTOR invisible to GC.
Alan Mackenzie [Tue, 30 Oct 2018 11:43:13 +0000 (11:43 +0000)]
Fix C++ Mode dynamic error with string delimiters.
Fixes bug #33163
* lisp/progmodes/cc-mode.el (c-before-change-check-unbalanced-strings):
Use the correct variable `end' in place of the wrong `c-new-END'.
(c-after-change-re-mark-unbalanced-strings): Correct a logic error whilst
skipping over comments.
Gemini Lasswell [Sun, 14 Oct 2018 19:12:04 +0000 (12:12 -0700)]
Keep a stack reference to bytecode objects being executed (Bug#33014)
* src/eval.c (Ffuncall): Make local variable 'fun' volatile.
* test/src/eval-tests.el
(eval-tests-byte-code-being-evaluated-is-protected-from-gc):
Add regression test for Bug#33014.
(eval-tests-33014-var): New variable.
(eval-tests-33014-func, eval-tests-33014-redefine): New functions.
Add index entries for more isearch commands/bindings (Bug#32990)
* doc/emacs/search.texi (Basic Isearch): Index isearch-exit,
isearch-abort, isearch-cancel, isearch-repeat-forward,
isearch-repeat-backward and their bindings.
(Repeat Isearch): Index isearch-ring-advance,
isearch-ring-retreat and isearch-edit-string.
(Special Isearch): Index isearch-quote-char,
isearch-char-by-name and their bindings. Index
isearch-query-replace and isearch-query-replace-regexp, and
the latter's binding. Explain what
isearch-query-replace-regexp does. Index isearch-complete.
(Word Search): Index isearch-toggle-word.
Juri Linkov [Sat, 27 Oct 2018 20:27:54 +0000 (23:27 +0300)]
* lisp/isearch.el (lazy-highlight-buffer): New defcustom. (Bug#29360)
(lazy-highlight-buffer-max-at-a-time): New defcustom.
(isearch-lazy-highlight-buffer): New defvar.
(isearch-lazy-highlight-new-loop): Don't check changes in window
boundaries when lazy-highlight-buffer is non-nil.
Move code that extends start/end to match whole string at point
here from isearch-lazy-highlight-search.
(isearch-lazy-highlight-search): Add args string and bound
like in other search functions. Move calculation of bound
to isearch-lazy-highlight-update.
(isearch-lazy-highlight-match): New function with code extracted from
isearch-lazy-highlight-update to be called also from
isearch-lazy-highlight-buffer-update.
(isearch-lazy-highlight-update): Reuse the values returned from
window-group-start and window-group-end. At the end schedule the
timer to call isearch-lazy-highlight-buffer-update when
isearch-lazy-highlight-buffer is non-nil.
(isearch-lazy-highlight-buffer-update): New function.
Eli Zaretskii [Sat, 27 Oct 2018 10:18:33 +0000 (13:18 +0300)]
Improve documentation of 'process-connection-type'
* doc/lispref/processes.texi (Asynchronous Processes): Clarify
better when it is advisable to use pipes for communicating
with subprocesses. (Bug#33050)
Unify prompt for gnupg passphrase between GNU/Linux and MS-Windows.
* lisp/epg.el (epg--start): Use 'raw-text' for coding system instead
of 'binary', in order to avoid spurious carriage return on Microsoft
Windows and MS-DOS when prompting for a password. (Bug#33040)
Daniel Pittman [Wed, 5 Sep 2018 13:44:58 +0000 (09:44 -0400)]
Add support in emacsclient for EMACS_SOCKET_NAME
If the '--socket-name' argument is unspecified, the environment
variable 'EMACS_SOCKET_NAME' is now consulted with the same
semantics. This mirrors the behavior of the '--server-file' argument,
and allows for easier configuration of emacsclient when the socket is
in a location other than 'TMPDIR' or '/tmp'.
* emacsclient.c (set_socket): Add support for the
EMACS_SOCKET_NAME environment variable. (Bug#33095)
Eli Zaretskii [Sat, 27 Oct 2018 09:14:35 +0000 (12:14 +0300)]
Doc fix of 'gnus-fetch-old-headers'
* lisp/gnus/gnus-sum.el (gnus-fetch-old-headers): Avoid
treating 'some' and 'invisible' as symbols that need to be
hyperlinked. Reported by Robert Pluim <rpluim@gmail.com>.
(Bug#33090)
Eli Zaretskii [Sat, 27 Oct 2018 08:24:53 +0000 (11:24 +0300)]
Improve documentation of X resource loading
* doc/emacs/cmdargs.texi (Initial Options):
* doc/emacs/frames.texi (Frame Parameters):
* doc/emacs/xresources.texi (Resources): Document the
'--no-x-resources' command-line option and the fact that X
resources override .emacs settings of frame parameters.
(Bug#32975)
Federico Tedin [Fri, 26 Oct 2018 17:16:50 +0000 (13:16 -0400)]
Subject: (mouse-drag-and-drop-region): Simplify and remove assumptions
* lisp/mouse.el (mouse-drag-and-drop-region): Use insert-for-yank for
insertion, remove rectangular-region-specific variables.
Use text-property-not-all.
* lisp/rect.el (rectangle-dimensions): New function.
(rectangle-position-as-coordinates): Use the usual 1-origin for lines.
* doc/emacs/search.texi (Basic Isearch): Index
'isearch-delete-char', its keybinding and the isearch "input
item" concept, and define the latter.
(Error in Isearch): Clarify the different uses of DEL and
C-M-w during isearch.
* lisp/isearch.el (isearch-delete-char): Correct its
documentation and link to the Info node '(emacs)Basic Isearch'
which explains less technically how this function works in
everyday usage.
Alan Third [Sun, 14 Oct 2018 18:12:00 +0000 (19:12 +0100)]
Fix some NS drawing issues (bug#32932)
* src/nsterm.m (ns_clip_to_rect):
(ns_reset_clipping): Remove gsaved variable and associated code.
(ns_flush_display): Remove function.
(ns_copy_bits): use translateRectsNeedingDisplayInRect:by: to copy any
pending drawing actions along with the image.
([EmacsView windowWillResize:toSize:]): Remove unneeded call.
([EmacsView drawRect:]): Remove redundant call to ns_clear_frame_area,
and optimize the exposed rectangles.
(ns_draw_window_cursor): Remove unneeded disabling of screen updates.
Robert Pluim [Tue, 23 Oct 2018 10:19:19 +0000 (12:19 +0200)]
Correct typo in GNU ELPA url
* doc/misc/efaq.texi (Packages that do not come with Emacs):
Correct typo in GNU ELPA url (Bug#33072). Change other url
references to use https scheme.