Alan Mackenzie [Mon, 4 May 2020 18:26:38 +0000 (18:26 +0000)]
Remove calls to non-existent functions from edebug.el.
Do not merge to master.
*lisp/emacs-lisp/edebug.el (edebug--display-1)
(edebug-toggle-disable-breakpoint): Remove calls to
edebug--overlay-breakpoints and edebug--overlay-breakpoints-removed which had
been overlooked in a recent changed to edebug.
Dmitry Gutov [Sun, 3 May 2020 23:56:10 +0000 (02:56 +0300)]
Honor search-upper-case
* lisp/fileloop.el (fileloop--case-fold):
Extract from existing code. Honor search-upper-case (bug#40940).
(fileloop-initialize-replace, fileloop-initialize-search): Use it.
Update the docstring.
Juri Linkov [Sun, 3 May 2020 22:31:44 +0000 (01:31 +0300)]
Revert part of recent commit 85544f8ef5 (bug#40808)
* lisp/isearch.el (isearch-lazy-highlight-search): Remove recent fix of
lazy-highlighting of hidden matches. In emacs-27 leave only the fix for
lazy-counting of hidden matches when isearch-lazy-count is non-nil.
Paul Eggert [Sat, 2 May 2020 20:48:21 +0000 (13:48 -0700)]
Make memq etc. examples more like they were
Problem reported by Štěpán Němec in:
https://lists.gnu.org/r/emacs-devel/2020-05/msg00130.html
* doc/lispref/lists.texi (Sets And Lists, Association Lists):
Revert examples to be more like the way they were, using
self-evaluating expressions. Be more consistent about listing
unspecified results.
Eli Zaretskii [Sat, 2 May 2020 07:54:01 +0000 (10:54 +0300)]
Document effect of 'search-upper-case' on replacement commands
* doc/emacs/search.texi (Replacement and Lax Matches): Document
the role of 'search-upper-case' in replacement commands.
(Lax Search): Document the value 'not-yanks' of
'search-upper-case' where the variable itself is documented.
* lisp/replace.el (query-replace-regexp, query-replace): Mention
'search-upper-case' and its effect in doc strings. (Bug#40940)
* lisp/calculator.el (calculator-string-to-number): Convert decimal
numbers input to float, fixing a regression introduced in f248292ede.
Reported by Aitor Soroa.
Eli Zaretskii [Wed, 29 Apr 2020 15:58:42 +0000 (18:58 +0300)]
Fix project.el commands in "transient" projects
* lisp/progmodes/project.el (project--files-in-directory): Run
local DIR directory names through 'expand-file-name', so that "~/"
is expanded, in case the shell doesn't or the shell's notion of
the home directory is different from that of Emacs. (Bug#40940)
Juri Linkov [Tue, 28 Apr 2020 23:49:44 +0000 (02:49 +0300)]
* lisp/isearch.el: Fix lazy-highlighting and lazy-counting of hidden matches
* lisp/isearch.el (isearch-lazy-highlight-search): Let-bind
search-invisible to t when search-invisible is 'open' or when both
isearch-lazy-count and search-invisible are non-nil. (Bug#40808)
Eli Zaretskii [Tue, 28 Apr 2020 08:57:16 +0000 (11:57 +0300)]
Avoid crashes on TTY frames with over-long compositions
* src/term.c (encode_terminal_code): Each character from an
automatic composition is a multibyte character, so its multibyte
representation can take up to MAX_MULTIBYTE_LENGTH bytes.
Account for that when allocating storage for characters to be
encoded. (Bug#40913)
Michael Albinus [Sun, 26 Apr 2020 09:39:40 +0000 (11:39 +0200)]
Make shell-command tests fit for tcsh.
* test/lisp/simple-tests.el (with-shell-command-dont-erase-buffer):
Fix debug spec. Format command to run also under tcsh.
(simple-tests-shell-command-39067)
(simple-tests-shell-command-dont-erase-buffer): Quote newline in string.
* lisp/calc/calc-ext.el (calc-init-extensions):
Remove calc-kbd-report key binding and autoload; it was removed in 2005.
calc-keypad-x-{left,right,middle}-click were renamed to
calc-keypad-{left,right,middle}-click in 2001; fix the autoloads.
calc-twos-complement-mode is a variable, not a function; remove the
autoload.
* lisp/calc/calc-prog.el: Remove commented-out calc-kbd-report.
Improve the default value of 'doc-view-ghostscript-program'.
* lisp/doc-view.el (doc-view-ghostscript-program): Use plain command
name instead of qualified name returned by executable-find (as
suggested by Stefan Monnier). (Bug#36357)
Paul Eggert [Wed, 22 Apr 2020 17:42:09 +0000 (10:42 -0700)]
Improve wording about constants
Thanks to Štěpán Němec and Drew Adams for reviews of recent changes.
* doc/lispref/eval.texi (Quoting): Give an example.
* doc/lispref/lists.texi (Association Lists): Simplify example code.
* doc/lispref/objects.texi (Lisp Data Types)
(Constants and Mutability): Clarify wording.
Juri Linkov [Mon, 20 Apr 2020 23:42:16 +0000 (02:42 +0300)]
Add image-auto-resize defcustoms to image-mode.el
* lisp/image-mode.el (image-auto-resize)
(image-auto-resize-on-window-resize): New defcustoms.
(image-mode-map): Bind "sb" to image-transform-fit-both.
(image-mode): Set image-transform-resize to image-auto-resize initially.
(image-mode--setup-mode): Add hook on image-auto-resize-on-window-resize.
(image-toggle-display-image): Check if image-transform-resize is t.
(image-transform-properties): Check image-transform-resize for nil and t.
(image-transform-fit-both): New command.
(image-transform-reset): Reset image-transform-resize to image-auto-resize.
* doc/emacs/files.texi (Image Mode): Mention image-auto-resize and
image-auto-resize-on-window-resize.
Paul Eggert [Sun, 19 Apr 2020 23:46:47 +0000 (16:46 -0700)]
Tweak setcar-related wording
* doc/lispref/eval.texi (Self-Evaluating Forms):
Change “primitives” to “operations”.
Problem reported by Štěpán Němec in:
https://lists.gnu.org/r/emacs-devel/2020-04/msg01146.html
Juri Linkov [Sun, 19 Apr 2020 23:07:43 +0000 (02:07 +0300)]
* lisp/image-mode.el: Add prefix key 's' and reduce dependency on ImageMagick.
* lisp/image-mode.el (image-mode-map): Regroup existing keybindings and
add new ones with the prefix key 's'.
Remove condition ":visible (eq image-type 'imagemagick)" from menu.
(image-toggle-display-image): Don't rotate again after user rotated manually.
(image-transform-check-size): Remove check for imagemagick.
(image-transform-properties, image-transform-set-scale)
(image-transform-fit-to-height, image-transform-fit-to-width)
(image-transform-set-rotation, image-transform-reset):
Remove mentions of ImageMagick from docstrings since these commands
now work without ImageMagick.
Paul Eggert [Sun, 19 Apr 2020 22:09:02 +0000 (15:09 -0700)]
Fix mutability glitches reported by Drew Adams
See Bug#40693#32.
* doc/lispref/eval.texi (Self-Evaluating Forms, Backquote):
Say that these yield constant conses, vectors and strings,
not constant symbols.
* doc/lispref/objects.texi (Constants and Mutability): Say that an
attempt to modify a constant variable signals an error, instead of
saying that it has undefined behavior.
Paul Eggert [Sun, 19 Apr 2020 19:00:49 +0000 (12:00 -0700)]
Improve mutability documentation
This change was inspired by comments from Štěpán Němec in:
https://lists.gnu.org/r/emacs-devel/2020-04/msg01063.html
* doc/lispref/objects.texi (Lisp Data Types): Mention mutability.
(Constants and mutability): New section.
* doc/lispintro/emacs-lisp-intro.texi (Lists diagrammed)
(Indent Tabs Mode): Improve wording.
* doc/lispref/eval.texi (Self-Evaluating Forms):
Say that they return constants.
* doc/lispref/lists.texi (Sets And Lists):
Fix memql mistake/confusion that I recently introduced.
Remove #' and function quoting from lambda forms in manual
* doc/lispref/abbrevs.texi (Abbrev Expansion):
* doc/lispref/backups.texi (Reverting):
* doc/lispref/functions.texi (Mapping Functions):
* doc/lispref/help.texi (Accessing Documentation):
* doc/lispref/sequences.texi (Char-Tables):
* doc/lispref/syntax.texi (Categories):
* doc/lispref/text.texi (Sorting):
Remove function quoting from lambda in examples where it still occurs,
since examples should follow our best style and be consistent.
Paul Eggert [Sat, 18 Apr 2020 19:59:17 +0000 (12:59 -0700)]
Document constant vs mutable objects better
This patch builds on a suggested patch by Mattias Engdegård
and on further comments by Eli Zaretskii.
Original bug report by Kevin Vigouroux (Bug#40671).
* doc/lispintro/emacs-lisp-intro.texi (set & setq, Review)
(setcar, Lists diagrammed, Mail Aliases, Indent Tabs Mode):
setq is a special form, not a function or command.
* doc/lispintro/emacs-lisp-intro.texi (setcar):
* doc/lispref/lists.texi (Modifying Lists, Rearrangement):
* doc/lispref/sequences.texi (Sequence Functions)
(Array Functions, Vectors):
* doc/lispref/strings.texi (String Basics, Modifying Strings):
Mention mutable vs constant objects.
* doc/lispintro/emacs-lisp-intro.texi (setcar, setcdr)
(kill-new function, cons & search-fwd Review):
* doc/lispref/edebug.texi (Printing in Edebug):
* doc/lispref/keymaps.texi (Changing Key Bindings):
* doc/lispref/lists.texi (Setcar, Setcdr, Rearrangement)
(Sets And Lists, Association Lists, Plist Access):
* doc/lispref/sequences.texi (Sequence Functions)
(Array Functions):
* doc/lispref/strings.texi (Text Comparison):
Fix examples so that they do not try to change constants.
Mention 'spam-stat-process-directory-age' in the documentation
I was at a loss as to why my attempt to set up spam-stat seemed to
have no effect, only to find (digging in the code) that it was
ignoring most of the sample files due to this undocumented variable.
* doc/misc/gnus.texi (Creating a spam-stat dictionary): Document
the variable 'spam-stat-process-directory-age'. (bug#39780)
Eli Zaretskii [Sat, 18 Apr 2020 09:01:26 +0000 (12:01 +0300)]
Fix "C-u M-!" when 'shell-command-dont-erase-buffer' is non-nil
* lisp/simple.el (shell-command-dont-erase-buffer): Clarify the
effect of the various values in the doc string.
(shell-command-save-pos-or-erase, shell-command): Don't move or
push point if the output will go to the current buffer.
(Bug#40690)
(shell-command): Mention 'shell-command-dont-erase-buffer' in the
doc string.
* test/lisp/simple-tests.el
(with-shell-command-dont-erase-buffer): Don't is shell quoting
'like this', as it doesn't work on MS-Windows; quote "like this"
instead.
(simple-tests-shell-command-dont-erase-buffer): Adapt the test to
the new modus operandi.
* doc/emacs/misc.texi (Single Shell): Document the effect of the
various values of 'shell-command-dont-erase-buffer'.
* etc/NEWS: Expand and reword the entry regarding changes in
'shell-command-dont-erase-buffer'.
* lisp/calculator.el (calculator-expt): Overflowing exponentiation
caused the function to return -1.0e+INF if the base was an odd,
negative number, no matter what the exponent was.
Copyright-paperwork-exempt: yes
Eli Zaretskii [Wed, 15 Apr 2020 17:27:12 +0000 (20:27 +0300)]
Improve an example in w32 FAQ
* doc/misc/efaq-w32.texi (Font names): Modify the expression to
insert a lits of all installed fonts so as to avoid producing too
long lines. Suggested by ndame <ndame@protonmail.com>.
* src/nsterm.m ([EmacsApp applicationDidFinishLaunching:]): Call
CoreFoundation functions that increase RLIMIT_NOFILE behind our back
during startup, and then set RLIMIT_NOFILE back to FD_SETSIZE to avoid
crashes in setup_process_coding_system (Bug#39164).
These changes fix actual or latent bugs in regexps that match
file names, such as PATTERN arguments to 'directory-files'. See
https://lists.gnu.org/archive/html/emacs-devel/2020-04/msg00265.html
Eli Zaretskii [Tue, 14 Apr 2020 05:38:00 +0000 (08:38 +0300)]
Clarify the doc string of 'yank'
* lisp/simple.el (yank): Mention 'current-kill' in the doc string,
so that people could find all the gory details of what is "the most
recent kill" for this purpose. (Bug#40375)
* lisp/erc/erc-track.el (erc-track-switch-buffer): Factor out the
implementation from here ...
(erc-track--switch-buffer): ... to here.
(erc-track-switch-buffer-other-window): New function, like
`erc-track-switch-buffer', but uses `switch-to-buffer-other-window'
instead, to open the buffer in another window.
* lisp/erc/erc.el (erc-switch-to-buffer): Factor out the buffer choice
implementation from here ...
(erc--switch-to-buffer): ... to here.
(erc-switch-to-buffer-other-window): New function, like
`erc-switch-to-buffer', but uses `switch-to-buffer-other-window'
instead, to open the buffer in another window.
gnus-shorten-url: Improve and avoid args-out-of-range error
'gnus-shorten-url' (used by 'gnus-summary-browse-url') ignored
fragment identifiers and didn't check substring bounds, in some cases
leading to runtime errors, e.g.:
This commit makes it account for #fragments and fixes faulty string
computation. (bug#39980)
Do not merge to master, where the helper is put to subr-x.el.
* lisp/gnus/gnus-sum.el (gnus--string-truncate-left): New helper
function (copied from 'ediff-truncate-string-left').
(gnus-shorten-url): Use it and don't drop #fragments.
Eli Zaretskii [Mon, 13 Apr 2020 08:53:47 +0000 (11:53 +0300)]
Minor wording change in Introduction to Programming in Emacs Lisp
* doc/lispintro/emacs-lisp-intro.texi (Prevent confusion): Mention
that dynamic scoping is only the default in Emacs Lisp, not the
only scoping rule. (Bug#40594)
Eli Zaretskii [Sun, 12 Apr 2020 08:31:29 +0000 (11:31 +0300)]
Fix and improve documentation of mail-related features
* lisp/simple.el (compose-mail): Clarify the effect of the
CONTINUE argument.
* lisp/mail/sendmail.el (mail-from-style): Update the RFC value in
the obsolescence warning text.
* doc/emacs/sending.texi (Sending Mail): Fix the description of
the behavior of 'C-x m' wrt prefix argument.
(Mail Headers): Remove the description of 'mail-from-style'.
* etc/NEWS: Mention that 'mail-from-style' is obsolete.
Martin Rudalics [Sun, 12 Apr 2020 08:00:28 +0000 (10:00 +0200)]
Fix build failure with Fx_gtk_debug
* src/xfns.c (Fx_gtk_debug, Sx_gtk_debug): Define only for GTK
versions >= 3.14.0 so gtk_window_set_interactive_debugging is
defined. Reported by Andreas Schwab <schwab@linux-m68k.org>.
Alan Mackenzie [Sat, 11 Apr 2020 21:04:50 +0000 (21:04 +0000)]
Mention jit-lock deferred as an alternative to fast-but-imprecise-scrolling
* doc/emacs/display.texi (Scrolling): Add a paragraph on using jit-lock
deferred fontification as a way of obviating Emacs hanging after
auto-repeated scrolling.