* 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.
Eli Zaretskii [Fri, 2 Mar 2018 08:44:44 +0000 (10:44 +0200)]
Fix downloading non-text files in EWW
* lisp/net/eww.el (eww-download-callback): Bind
coding-system-for-read to 'no-conversion', to avoid any code- or
EOL-conversions in downloaded files. (Bug#30664)
Noam Postavsky [Fri, 2 Mar 2018 02:52:27 +0000 (21:52 -0500)]
Fix issues turned up by previous python.el change
See [1] for more discussion.
* lisp/progmodes/python.el (python--prettify-symbols-alist): Define
the obsolete alias before the variable proper, so that we correctly
get the user's settings regardless of which name they set.
(python-nav-end-of-statement): Add missing backslash.
(python-shell-send-file): Call `expand-file-name' before
`file-local-name', the expansion of "~" could be different on remote
filenames.
(python-mode): Declare prettify-symbols-alist instead of checking if
it's bound. Use the non-obsolete python-prettify-symbols-alist name,
rather than checking if the obsolete name is bound (it always is too,
but the Emacs 24 byte compiler doesn't recognize that
define-obsolete-variable-alias defines a variable).
Paul Eggert [Fri, 2 Mar 2018 01:58:26 +0000 (17:58 -0800)]
Arrange for loaddefs files to be greppable
Without this change, ldefs-boot.el contains a couple of stray NUL
bytes, which cause it to be considered to be a non-text file by
tools like GNU grep.
* lisp/emacs-lisp/autoload.el (autoload-print-form):
Set print-escape-control-characters to t.
Paul Eggert [Fri, 2 Mar 2018 01:58:26 +0000 (17:58 -0800)]
Improve octal-escape output in bool vectors and strings
* src/print.c (octalout): New function.
(print_vectorlike): When printing bool vectors, use
octal escapes for control characters when
print-escape-control-characters is non-nil, so that
the printed representation avoids encoding issues.
Rename locals to avoid byte-vs-char confusion.
(print_object): Don't output unnecessary zeros when
printing octal escapes. Simplify by using octalout.
Paul Eggert [Fri, 2 Mar 2018 00:24:41 +0000 (16:24 -0800)]
make-docfile: minor fixes and cleanups
* lib-src/make-docfile.c: Include c-ctype.h.
(read_c_string_or_comment, write_c_args, scan_c_stream, skip_white)
(read_lisp_symbol, scan_lisp_file):
Prefer c_isspace etc. to listing characters by hand.
(read_c_string_or_comment): Simplify.
(scan_c_stream, read_lisp_symbol): Use true for boolean 1.
(scan_c_stream): Fix typo (c >= 'Z' && c <= 'Z').
Minor rewrites to avoid duplicate code.
(scan_c_stream, read_lisp_symbol, scan_lisp_file):
Avoid infloop if at EOF.
(skip_white, read_lisp_symbol): Don’t stuff getc result into
‘char’, as this mishandles EOF.