Glenn Morris [Mon, 12 Mar 2018 18:25:40 +0000 (11:25 -0700)]
Replace use of the obsolete write-contents-hooks
* lisp/play/gametree.el (gametree-mode):
Replace write-contents-hooks, obsolete since 22.1,
with write-contents-functions.
; * lisp/files.el: Related comment.
Paul Eggert [Mon, 12 Mar 2018 17:35:25 +0000 (10:35 -0700)]
Revert overenthusiastic procfs fixup
Also, be more systematic in calls to string_to_number.
* src/sysdep.c (list_system_processes) [HAVE_PROCFS]: Allow pids
to be floating-point if they exceed fixnum range. This partially
reverts my patch 2018-03-09T20:06:05Z!eggert@cs.ucla.edu, which
went too far in fixing string-to-number mishandling.
Allow toggling Grep command abbreviation, and rename related symbols
* lisp/progmodes/grep.el (grep-find-hide): Rename 'grep-find-hide'
to 'grep-find-abbreviate'.
(grep-find-hide-properties): Rename to
'grep-find-abbreviate-properties'.
(grep-mode-font-lock-keywords): Even when 'grep-find-abbreviate'
is nil, fontify the verbose command options with property
'abbreviated-command', so that the toggling command can later find
these parts without refontifying.
(grep-find-show): Rename to 'grep-find-toggle-abbreviation',
simplify the code, and permit toggling the hidden command options.
(grep-mode-map): Add a menu-bar item and new separator for
'grep-find-toggle-abbreviation', and fix the incumbent separators
in the "Grep" menu-bar, of which only one was showing before this
commit, even though two were specified.
* etc/NEWS (grep):
* doc/emacs/building.texi (Grep Searching): Document these
changes, and mention 'grep-find-toggle-abbreviation'.
* doc/emacs/fixit.texi (Transpose): Mention and explain the new
command.
* editfns.c (Ftranspose_regions): Add an interactive calling
specification, and add documentation for it.
* lisp/image.el (image--get-image): Add documentation, and
check overlays for images too (since function 'put-image' from
the same library uses overlays to insert images).
(image-save): Use 'image--get-image'.
Paul Eggert [Sun, 11 Mar 2018 08:18:34 +0000 (00:18 -0800)]
Port to NetBSD tzalloc
Problem reported by Valery Ushakov (Bug#30738).
* src/editfns.c (xtzalloc): Remove.
(invalid_time_zone_specification): New function.
(tzlookup): Port to NetBSD, where tzalloc can fail when the TZ
string has an invalid value.
* doc/lispref/display.texi (ImageMagick Images): Remove an
outdated comment that references a fixed bug.
(SVG Images): Fix grammar, and call functions functions (there are
no commands in lisp/svg.el).
Eli Zaretskii [Sat, 10 Mar 2018 11:48:49 +0000 (13:48 +0200)]
Improve support for desktop restoration in daemon mode
* lisp/server.el (server-after-make-frame-hook): New hook.
(server-execute): Call it after creating a new frame or before
switching to a buffer shown in a client frame. (Bug#30421)
* doc/emacs/misc.texi (Saving Emacs Sessions): Adjust advice for
restoring desktop in daemon mode to the new hook.
* doc/lispref/frames.texi (Creating Frames, Standard Hooks):
Document server-after-make-frame-hook.
Paul Eggert [Fri, 9 Mar 2018 20:06:05 +0000 (12:06 -0800)]
Fix string-to-number C-level mishandling
* src/sysdep.c (list_system_processes):
* src/xfaces.c (Finternal_set_lisp_face_attribute_from_resource):
Defend against Fstring_to_number returning a float or a nonsense
integer.
Paul Eggert [Fri, 9 Mar 2018 04:55:55 +0000 (20:55 -0800)]
Avoid losing info when formatting integers
* doc/lispref/numbers.texi (Integer Basics): Clarify that
out-of-range integers are treated as floating point only when the
integers are decimal.
* etc/NEWS: Mention changes.
* src/editfns.c (styled_format): Use %.0f when formatting %d or %i
values outside machine integer range, to avoid losing info.
Signal an error for %o or %x values that are too large to be
formatted, to avoid losing info.
* doc/emacs/mini.texi (Completion Commands): Mention other keys
for 'next-completion' and 'previous-completion', and explain 'q'
and 'z' which are relatively new additions.
Eli Zaretskii [Thu, 8 Mar 2018 15:53:09 +0000 (17:53 +0200)]
More minor changes in the manual
* doc/emacs/display.texi (Useless Whitespace): Don't upcase "TAB"
and "SPC" when alluding to characters. Suggested by Richard
Stallman <rms@gnu.org>.
* doc/emacs/buffers.texi (Misc Buffer): Clarify what "read-only"
means for buffers.
(Buffers): Define and describe "buffer contents". Suggested by
Richard Stallman <rms@gnu.org>. (Bug#30685)
Eli Zaretskii [Thu, 8 Mar 2018 13:32:23 +0000 (15:32 +0200)]
Fix 'window-text-pixel-size' when display properties are around
* src/xdisp.c (Fwindow_text_pixel_size): Correct the result when
there's a display property at the TO position, and the call to
move_it_to overshoots. (Bug#30746)
Eli Zaretskii [Wed, 7 Mar 2018 19:51:59 +0000 (21:51 +0200)]
Minor improvements in manuals
* doc/lispref/variables.texi (Local Variables): Make more clear
that local bindings of 'let' are in effect only within the body.
Suggested by Marcin Borkowski <mbork@mbork.pl>, see
https://lists.gnu.org/archive/html/emacs-devel/2018-03/msg00217.html
for the details.
* doc/emacs/programs.texi (Matching): Fix a typo. Reported by
Alex Branham <alex.branham@gmail.com> in emacs-manual-bugs@gnu.org.
Improve indexing.
Eli Zaretskii [Wed, 7 Mar 2018 19:02:24 +0000 (21:02 +0200)]
Minor copyedits in display.texi
* doc/emacs/display.texi (Highlight Interactively)
(Useless Whitespace, Line Truncation, Visual Line Mode): Minor
changes of wording and typo corrections. Suggested by Michael
Albinus <michael.albinus@gmx.de> in emacs-manual-bugs@gnu.org.
Eli Zaretskii [Wed, 7 Mar 2018 18:40:44 +0000 (20:40 +0200)]
Fix display of TABs in hscrolled windows with line numbers
* src/dispextern.h (struct it): New members tab_offset and
line_number_produced_p.
* src/xdisp.c (display_line): Don't set row->x to a negative value
if line numbers are being displayed. (Bug#30582)
Reset the line_number_produced_p flag before laying out the glyph
row.
(x_produce_glyphs): Use the line_number_produced_p flag to decide
whether to offset the X coordinate due to line-number display.
Use the tab_offset member to restore the original TAB width for
alignment purposes.
(move_it_in_display_line_to): Don't produce line numbers when moving
in hscrolled window to the left of first_visible_x.
(maybe_produce_line_number): Set the line_number_produced_p flag.
(Bug#30584)
* src/term.c (produce_glyphs): Correct TAB width only when
line_number_produced_p flag is set.
Glenn Morris [Wed, 7 Mar 2018 01:18:54 +0000 (20:18 -0500)]
Remove some unused spam.el variables
* lisp/gnus/spam.el (spam-ifile-path, spam-ifile-database-path)
(spam-bogofilter-path, spam-bsfilter-path)
(spam-spamassassin-path, spam-sa-learn-path):
Remove variables that are described as obsolete, but are
really completely unused, and have been for years.
Define if-let* and derivatives as aliases for if-let etc
This commit reverts declaring `if-let' and `when-let' obsolete in
favor of the new `if-let*' and `when-let*' versions because of the
compiler warning mess (Bug#30039). Instead we make foo-let* aliases
for foo-let. The old single-tuple variable spec case is still
supported for backward compatibility.
* lisp/emacs-lisp/subr-x.el (if-let, when-let): Don't declare
obsolete. Tweak edebug specs.
(and-let): Renamed from `and-let*' for compatibility with the names
`if-let' and `when-let'.
(if-let*, when-let*, and-let*): Define as aliases for `if-let',
`when-let' and `and-let'.
* test/lisp/emacs-lisp/subr-x-tests.el (if-let-single-tuple-case-test)
(when-let-single-tuple-case-test): New tests for the single-binding
tuple case.
In the whole file, prefer the names without "*".
Eli Zaretskii [Mon, 5 Mar 2018 18:37:34 +0000 (20:37 +0200)]
Minor fix in Emacs manual's Glossary
* doc/emacs/glossary.texi (Glossary): Fix outdated text about
primary selection. Reported by Gijs Hillenius
<gijs@hillenius.net> in emacs-manual-bugs@gnu.org.
Andrew G Cohen [Sun, 18 Mar 2018 01:11:04 +0000 (09:11 +0800)]
Remove nnselect-artlist variable in nnselect
This fixes a bug which causes the group info to get out of sync.
* lisp/gnus/nnselect.el (nnselect-add-prefix): New macro.
(nnselect-get-artlist): New macro.
(nnselect-possibly-change-group): Delete.
(nnselect-request-group, nnselect-retrieve-headers,
nnselect-request-update-info, nnselect-close-group): Remove
nnselect-artlist variable and update with new macros.
(nnselect-request-update-info): Use memq instead of member for speed.
Andrew G Cohen [Mon, 5 Mar 2018 20:57:22 +0000 (04:57 +0800)]
Allow automatic scanning of nnselect groups
* lisp/gnus/gnus-start.el (gnus-read-active-for-groups): Scan when
activating virtual groups.
* lisp/gnus/nnselect.el (nnselect-request-group): Rescan only if no
artlist is present.
(nnselect-request-group-scan): New function to rescan a group.
(nnselect-request-scan): If called with a group arg rescan that
group.
Paul Eggert [Mon, 5 Mar 2018 01:53:07 +0000 (17:53 -0800)]
uniqify -> uniquify
The latter spelling is more common both within Emacs and in
English-language sources in general (Bug#10048).
* lisp/eshell/esh-util.el (eshell-uniquify-list):
Rename from eshell-uniqify-list. All callers changed.
* lisp/pcomplete.el (pcomplete-uniquify-list):
Rename from pcomplete-uniqify-list. All callers changed.
Paul Eggert [Mon, 5 Mar 2018 01:38:43 +0000 (17:38 -0800)]
Spelling fixes (Bug#10068)
* lisp/gnus/gnus-score.el (gnus-score-find-favorite-words):
Rename from gnus-score-find-favourite-words.
* lisp/hfy-cmap.el (hfy-fallback-color-map)
(hfy-rgb-txt-color-map, hfy-fallback-color-values):
* lisp/htmlfontify.el (hfy-color-vals, hfy-color):
Rename from names that used 'colour' instead of 'color'.
Paul Eggert [Mon, 5 Mar 2018 01:16:39 +0000 (17:16 -0800)]
Merge from origin/emacs-26
f2caf08ca6 ; Spelling fixes f0e5f220b6 * lisp/progmodes/grep.el (zrgrep): a0f71260f8 Minor copyedits in doc/emacs/text.texi adfe2f580f Remove outdated comment in syntax.el b80e15b6a6 Prevent Flyspell from changing unrelated words e385599457 Avoid errors in flymake in builds --without-x d691e30cb0 More improvements of the Emacs manual
Juri Linkov [Sat, 3 Mar 2018 22:33:30 +0000 (00:33 +0200)]
* lisp/isearch.el (search-exit-option): Add options ‘shift-move’ and ‘move’.
Change type from ‘boolean’ to ‘choice’. Extend docstring.
(isearch-pre-move-point): New variable.
(isearch-pre-command-hook, isearch-post-command-hook):
Handle search-exit-option for values ‘move’ and ‘shift-move’.
* doc/emacs/search.texi (Not Exiting Isearch): Document new
values ‘shift-move’ and ‘move’ of search-exit-option.
Eli Zaretskii [Sat, 3 Mar 2018 09:50:24 +0000 (11:50 +0200)]
More improvements of the Emacs manual
* doc/emacs/rmail.texi (Rmail Reply, Rmail Sorting): Improve
wording. Suggested by Daniel Chakraborty
<danielmchakraborty@gmail.com>.
* doc/emacs/glossary.texi (Glossary): Add cross-references.
Improve and clarify wording. Suggested by Gijs Hillenius
<gijs@hillenius.net> in emacs-manual-bugs@gnu.org.
* doc/emacs/text.texi (Org Authoring): Add more supported formats
to the list.
(TeX Print): Improve wording. Slightly rearrange stuff.
(TeX Misc): Mention doctex-mode-hook.
(Two-Column): Minor rearrangement of text. Suggested by Michael
Albinus <michael.albinus@gmx.de> in emacs-manual-bugs@gnu.org.
* doc/emacs/misc.texi (Saving Emacs Sessions):
* doc/emacs/programs.texi (Program Modes): Remove redundant text
and index entries.
Dmitry Gutov [Wed, 28 Feb 2018 02:03:16 +0000 (04:03 +0200)]
Backport: xref--next-error-function: Move xref's window point
* lisp/progmodes/xref.el (xref--next-error-function): Move
xref's window point if it's visible. When we don't do that,
navigation can start looping after a while.