]> git.eshelyaron.com Git - emacs.git/log
emacs.git
4 years agoImprove indexing of ELisp manual
Stefan Kangas [Fri, 24 Apr 2020 05:58:17 +0000 (07:58 +0200)]
Improve indexing of ELisp manual

* doc/lispref/tips.texi (Tips): Add index entry 'best practices'.

4 years ago* lisp/image-mode.el (image-transform-resize): Remove FIXME comment.
Juri Linkov [Thu, 23 Apr 2020 22:50:48 +0000 (01:50 +0300)]
* lisp/image-mode.el (image-transform-resize): Remove FIXME comment.

The user customizable variable 'image-auto-resize' is documented now
in the manual.

4 years agoImprove the default value of 'doc-view-ghostscript-program'.
Tassilo Horn [Thu, 23 Apr 2020 16:25:07 +0000 (18:25 +0200)]
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)

4 years agoChange doc-view-mode-map prefix key 's' to 'c'.
Juri Linkov [Wed, 22 Apr 2020 23:14:42 +0000 (02:14 +0300)]
Change doc-view-mode-map prefix key 's' to 'c'.

* doc/emacs/misc.texi (DocView Slicing): Change prefix key 's' to 'c'.

* lisp/doc-view.el (doc-view-mode-map): Change prefix key 's' to 'c'.

* lisp/image-mode.el (image-mode-map): Add image-transform-set-scale to menu.

* doc/emacs/files.texi (Image Mode): Describe commands
image-transform-fit-both, image-transform-set-scale, image-transform-reset.

* etc/NEWS: Rearrange image sections.

https://lists.gnu.org/archive/html/emacs-devel/2020-04/msg01315.html

4 years agoImprove wording about constants
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.

4 years agoImprove the default value of 'doc-view-ghostscript-program'.
Tassilo Horn [Wed, 22 Apr 2020 17:23:23 +0000 (19:23 +0200)]
Improve the default value of 'doc-view-ghostscript-program'.

* lisp/doc-view.el (doc-view-ghostscript-program): On Windows, try
gswin64c, gswin32c, rungs, and mgs.  (Bug#36357)

4 years agoMinor improvements in documentation of the last change
Eli Zaretskii [Tue, 21 Apr 2020 13:50:13 +0000 (16:50 +0300)]
Minor improvements in documentation of the last change

* etc/NEWS:
* doc/emacs/files.texi (Image Mode): Minor copyedits of last change.

4 years agoAdd image-auto-resize defcustoms to image-mode.el
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.

https://lists.gnu.org/archive/html/emacs-devel/2020-04/msg01160.html

4 years agoImprove the documentation of tab-bar and tab-line
Juri Linkov [Mon, 20 Apr 2020 23:23:35 +0000 (02:23 +0300)]
Improve the documentation of tab-bar and tab-line

* doc/emacs/frames.texi (Tab Bars): Add xref to "Tab Line".
Document more commands.

* doc/emacs/windows.texi (Windows):
* doc/emacs/emacs.texi (Top): Add "Tab Line" menu.

* doc/emacs/windows.texi (Window Convenience):
Move tab-line documentation to new node "Tab Line".
(Tab Line): New node.

* doc/emacs/glossary.texi (Glossary):
* doc/emacs/modes.texi (Minor Modes):
* doc/emacs/display.texi (Standard Faces): Add xref to "Tab Line".

4 years agoTweak wording re constant variables
Paul Eggert [Mon, 20 Apr 2020 02:52:53 +0000 (19:52 -0700)]
Tweak wording re constant variables

* doc/lispref/objects.texi (Constants and Mutability): Tweak.
Problem reported by Michael Heerdegen (Bug#40693#44).

4 years agoTweak setcar-related wording
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

4 years ago* lisp/image-mode.el: Add prefix key 's' and reduce dependency on ImageMagick.
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.

4 years ago* doc/emacs/windows.texi (Window Convenience): Decribe more windmove features.
Juri Linkov [Sun, 19 Apr 2020 22:57:32 +0000 (01:57 +0300)]
* doc/emacs/windows.texi (Window Convenience): Decribe more windmove features.

* doc/emacs/windows.texi (Window Convenience): Add descriptions of
windmove-display-default-keybindings,
windmove-delete-default-keybindings,
windmove-swap-states-in-direction.

* etc/NEWS: Regroup to move some parts closer to related sections.

4 years agoFix mutability glitches reported by Drew Adams
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.

4 years agoImprove mutability doc
Paul Eggert [Sun, 19 Apr 2020 20:22:10 +0000 (13:22 -0700)]
Improve mutability doc

See Eli Zaretskii’s suggestions (Bug#40671#33).
* doc/lispref/lists.texi (Setcar, Setcdr, Rearrangement):
* doc/lispref/sequences.texi (Sequence Functions)
(Array Functions):
Add commentary to examples.
* doc/lispref/lists.texi (Sets And Lists):
Revert change to delq example.

4 years agoImprove mutability documentation
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.

4 years agoDocument that quoting yields constants
Paul Eggert [Sun, 19 Apr 2020 16:37:51 +0000 (09:37 -0700)]
Document that quoting yields constants

* doc/lispref/eval.texi (Quoting, Backquote):
Mention that quoted expressions yield a constant (Bug#40693).

4 years ago* doc/lispref/keymaps.texi (Extended Menu Items, Easy Menu) <:key-sequence>:
Stefan Monnier [Sun, 19 Apr 2020 15:19:03 +0000 (11:19 -0400)]
* doc/lispref/keymaps.texi (Extended Menu Items, Easy Menu) <:key-sequence>:

Clarify the documentation further

4 years agoRemove #' and function quoting from lambda forms in manual
Mattias Engdegård [Sun, 19 Apr 2020 10:40:43 +0000 (12:40 +0200)]
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.

4 years ago* src/regex-emacs.c (re_match_2_internal): Rework comment in last change
Stefan Monnier [Sun, 19 Apr 2020 03:01:43 +0000 (23:01 -0400)]
* src/regex-emacs.c (re_match_2_internal): Rework comment in last change

Explain why we don't need to worry about Lisp modifying the buffer.

* src/syntax.c (parse_sexp_propertize): Fix name in error message.

4 years agoAdd new node "Image Mode" to Emacs Manual.
Juri Linkov [Sat, 18 Apr 2020 23:43:06 +0000 (02:43 +0300)]
Add new node "Image Mode" to Emacs Manual.

* doc/emacs/dired.texi (Image-Dired): Add xref to "Image Mode".

* doc/emacs/emacs.texi (Top): Add new node "Image Mode" to menu.

* doc/emacs/files.texi (Files): Add new node "Image Mode" to menu.
(File Conveniences): Split part of node to new node "Image Mode".

* doc/emacs/frames.texi (Mouse Commands): Add xref to "Image Mode".

* doc/emacs/misc.texi (Embedded WebKit Widgets): Rename xref from
"File Conveniences" to "Image Mode".

4 years ago; Fix a typo in cmdargs.texi (bug#40701)
Štěpán Němec [Sat, 18 Apr 2020 21:28:40 +0000 (23:28 +0200)]
; Fix a typo in cmdargs.texi (bug#40701)

4 years ago* doc/lispref/display.texi (Customizing Bitmaps): Fix typo.
Paul Eggert [Sat, 18 Apr 2020 19:59:50 +0000 (12:59 -0700)]
* doc/lispref/display.texi (Customizing Bitmaps): Fix typo.

4 years agoDocument constant vs mutable objects better
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.

4 years agoImprove documentation of 'sort-lines'
Eli Zaretskii [Sat, 18 Apr 2020 16:26:30 +0000 (19:26 +0300)]
Improve documentation of 'sort-lines'

* lisp/sort.el (sort-lines): Clarify the interactive invocation.
(Bug#40697)

4 years agoMention 'spam-stat-process-directory-age' in the documentation
Štěpán Němec [Wed, 31 Jul 2019 07:51:09 +0000 (09:51 +0200)]
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)

4 years ago; Fix some typos and doc issues (bug#40695)
Štěpán Němec [Sun, 1 Mar 2020 17:50:14 +0000 (18:50 +0100)]
; Fix some typos and doc issues (bug#40695)

4 years agoAvoid crashes in regex-emacs.c due to GC
Eli Zaretskii [Sat, 18 Apr 2020 11:53:13 +0000 (14:53 +0300)]
Avoid crashes in regex-emacs.c due to GC

* src/regex-emacs.c (re_match_2_internal): Prevent GC from
invalidating C pointers to buffer text.  (Bug#40661)

4 years agoFix "C-u M-!" when 'shell-command-dont-erase-buffer' is non-nil
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'.

4 years agoFix cl-most-positive-float doc typo
Paul Eggert [Fri, 17 Apr 2020 16:38:04 +0000 (09:38 -0700)]
Fix cl-most-positive-float doc typo

* doc/misc/cl.texi (Implementation Parameters):
Fix typo in documentation of cl-most-positive-float.

4 years ago; lisp/ldefs-boot.el: Update. emacs-27.0.91
Nicolas Petton [Fri, 17 Apr 2020 10:21:36 +0000 (12:21 +0200)]
; lisp/ldefs-boot.el: Update.

4 years agoFix a typo in calculator.el
jakub-w [Thu, 16 Apr 2020 20:48:03 +0000 (13:48 -0700)]
Fix a typo in calculator.el

* 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

4 years ago* lisp/erc/erc.el: Add URL to the new ERC page on the Emacs site
Amin Bandali [Thu, 16 Apr 2020 19:11:11 +0000 (15:11 -0400)]
* lisp/erc/erc.el: Add URL to the new ERC page on the Emacs site

4 years agoBump Emacs version to 27.0.91
Nicolas Petton [Thu, 16 Apr 2020 09:06:14 +0000 (11:06 +0200)]
Bump Emacs version to 27.0.91

* README:
* configure.ac:
* msdos/sed2v2.inp:
* nt/README.W32: Bump Emacs version.

4 years agoCorrect Fido-mode's backspacing of directories with spaces
João Távora [Thu, 16 Apr 2020 08:33:37 +0000 (09:33 +0100)]
Correct Fido-mode's backspacing of directories with spaces

Fixes: bug#40625
* lisp/icomplete.el (icomplete-fido-backward-updir): Use
zap-up-to-char.

4 years agoDefault completion-flex-nospace to nil
João Távora [Wed, 15 Apr 2020 17:41:53 +0000 (18:41 +0100)]
Default completion-flex-nospace to nil

By default, the flex completion style _does_ match spaces.

Fixes: bug#40625
* lisp/icomplete.el (icomplete--fido-mode-setup): Force
completion-flex-nospace to nil.

* lisp/minibuffer.el (completion-flex-nospace): Default to nil.

4 years agoImprove an example in w32 FAQ
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>.

4 years ago* lisp/htmlfontify.el (hfy-force-fontification): Fix bug#40642
Stefan Monnier [Wed, 15 Apr 2020 16:17:14 +0000 (12:17 -0400)]
* lisp/htmlfontify.el (hfy-force-fontification): Fix bug#40642

Don't presume that `jit-lock-mode` is enabled.
Do not merge to `master`.

4 years ago* admin/authors.el: Add an author alias.
Nicolas Petton [Wed, 15 Apr 2020 11:20:48 +0000 (13:20 +0200)]
* admin/authors.el: Add an author alias.

4 years agoLimit RLIMIT_NOFILE to FD_SETSIZE on macOS
YAMAMOTO Mitsuharu [Wed, 15 Apr 2020 08:04:21 +0000 (10:04 +0200)]
Limit RLIMIT_NOFILE to FD_SETSIZE on macOS

* 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).

4 years agoFix Elisp manual entry on 'set-window-configuration'
Martin Rudalics [Wed, 15 Apr 2020 08:18:15 +0000 (10:18 +0200)]
Fix Elisp manual entry on 'set-window-configuration'

* doc/lispref/windows.texi (Window Configurations): Fix
description of 'set-window-configuration'.

4 years ago; Update ChangeLog.3
Nicolas Petton [Tue, 14 Apr 2020 16:34:30 +0000 (18:34 +0200)]
; Update ChangeLog.3

4 years ago; Update etc/AUTHORS
Nicolas Petton [Tue, 14 Apr 2020 16:33:50 +0000 (18:33 +0200)]
; Update etc/AUTHORS

4 years ago* admin/authors.el: Add missing author aliases.
Nicolas Petton [Tue, 14 Apr 2020 16:33:28 +0000 (18:33 +0200)]
* admin/authors.el: Add missing author aliases.

4 years agoFix edge case errors in filename-matching regexps
Mattias Engdegård [Tue, 14 Apr 2020 10:17:40 +0000 (12:17 +0200)]
Fix edge case errors in filename-matching regexps

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

* admin/authors.el (authors-obsolete-files-regexps)
(authors-renamed-files-regexps):
* lisp/auth-source-pass.el (auth-source-pass-entries):
* lisp/calendar/todo-mode.el (todo-show, todo-find-filtered-items-file)
(todo-filter-items, todo-reset-nondiary-marker, todo-reset-done-string)
(todo-reset-comment-string, todo-reset-highlight-item):
* lisp/cedet/semantic/db-ebrowse.el (semanticdb-load-ebrowse-caches):
* lisp/cedet/semantic/texi.el (semantic-texi-associated-files):
* lisp/cedet/srecode/map.el (srecode-map-update-map):
* lisp/dired.el (dired-re-no-dot):
* lisp/emacs-lisp/autoload.el (update-directory-autoloads):
* lisp/emacs-lisp/shadow.el (load-path-shadows-find):
* lisp/files.el (auto-mode-alist, directory-files-no-dot-files-regexp):
* lisp/finder.el (finder-compile-keywords):
* lisp/generic-x.el (inetd-conf-generic-mode, named-boot-generic-mode)
(resolve-conf-generic-mode, etc-modules-conf-generic-mode):
* lisp/gnus/gnus-agent.el (gnus-agent-read-agentview)
(gnus-agent-regenerate-group, gnus-agent-update-files-total-fetched-for):
* lisp/gnus/gnus-cache.el (gnus-cache-articles-in-group):
* lisp/gnus/gnus-score.el (gnus-score-search-global-directories):
* lisp/gnus/gnus-util.el (gnus-delete-directory):
* lisp/gnus/gnus-uu.el (gnus-uu-dir-files):
* lisp/gnus/nndraft.el (nndraft-request-group):
* lisp/gnus/nnmh.el (nnmh-request-group, nnmh-request-create-group):
(nnmh-request-delete-group, nnmh-active-number, nnmh-update-gnus-unreads):
* lisp/gnus/nnspool.el (nnspool-request-group):
* lisp/gnus/spam-stat.el (spam-stat-process-directory)
(spam-stat-test-directory):
* lisp/help-fns.el (help-fns--first-release):
* lisp/help.el (view-emacs-news):
* lisp/international/quail.el (quail-update-leim-list-file):
* lisp/international/titdic-cnv.el (batch-titdic-convert):
* lisp/mail/mspools.el (mspools-set-vm-spool-files)
(mspools-get-spool-files):
* lisp/mail/rmail.el (rmail-secondary-file-regexp)
(rmail-speedbar-match-folder-regexp):
* lisp/net/ange-ftp.el (ange-ftp-delete-directory):
* lisp/net/tramp.el (tramp-use-absolute-autoload-file-names):
* lisp/obsolete/gulp.el (gulp-send-requests):
* lisp/obsolete/vc-arch.el (vc-arch-trim-revlib):
* lisp/org/ob-core.el (org-babel-remove-temporary-directory):
* lisp/progmodes/ebnf2ps.el (ebnf-file-suffix-regexp, ebnf-style-database):
* lisp/progmodes/executable.el (executable-command-find-posix-p):
* lisp/startup.el (command-line):
* lisp/textmodes/refer.el (refer-get-bib-files):
* lisp/url/url-about.el (url-probe-protocols):
* lisp/vc/vc-rcs.el (vc-rcs-register, vc-rcs-unregister):
* test/lisp/net/tramp-archive-tests.el
(tramp-archive-test19-directory-files-and-attributes):
* test/lisp/net/tramp-tests.el (tramp-test19-directory-files-and-attributes):
Replace ^ and $ with \` and \', respectively.
Use (rx (or (not ".") "...")), translated into "[^.]\\|\\.\\.\\.",
to match anything but "." and "..", instead of several incorrect
regexps.

4 years agoClarify the doc string of 'yank'
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)

4 years agoNew function erc-track-switch-buffer-other-window
Amin Bandali [Tue, 14 Apr 2020 04:23:56 +0000 (00:23 -0400)]
New function erc-track-switch-buffer-other-window

* 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.

4 years agoNew function erc-switch-to-buffer-other-window
Amin Bandali [Tue, 14 Apr 2020 03:21:34 +0000 (23:21 -0400)]
New function erc-switch-to-buffer-other-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.

4 years agoClarify documentation on inhibit-modification-hooks intended usage
Štěpán Němec [Tue, 31 Mar 2020 03:38:50 +0000 (05:38 +0200)]
Clarify documentation on inhibit-modification-hooks intended usage

Cf. bug#40332 and the discussion at
https://lists.gnu.org/archive/html/emacs-devel/2020-03/msg00921.html

* doc/lispref/text.texi (Change Hooks):
* src/insdel.c (syms_of_insdel): Clarify the intended usage of
'inhibit-modification-hooks'.

4 years agognus-shorten-url: Improve and avoid args-out-of-range error
Štěpán Němec [Sun, 12 Apr 2020 17:57:59 +0000 (19:57 +0200)]
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.:

  (gnus-shorten-url "https://some.url.with/path/and#also_a_long_target" 40)
  ;; => Lisp error: (args-out-of-range "/path/and" -18 nil)

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.

4 years agoMinor wording change in Introduction to Programming in Emacs Lisp
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)

4 years agoFix 'flymake-show-diagnostics-buffer' when line numbers are displayed
Eli Zaretskii [Mon, 13 Apr 2020 05:00:14 +0000 (08:00 +0300)]
Fix 'flymake-show-diagnostics-buffer' when line numbers are displayed

* lisp/progmodes/flymake.el (flymake--diagnostics-buffer-entries):
Do nothing if 'flymake--diagnostics-buffer-source' is not a
buffer.  (Bug#40529)

4 years agoFix last changes describing mail commands
Eli Zaretskii [Sun, 12 Apr 2020 18:47:52 +0000 (21:47 +0300)]
Fix last changes describing mail commands

* doc/emacs/sending.texi (Sending Mail): Fix the description of
the behavior of 'C-x m' without prefix argument.  (Bug#40561)

4 years agoDo setup Flymake in file-less Elisp buffers
João Távora [Sun, 12 Apr 2020 14:17:15 +0000 (15:17 +0100)]
Do setup Flymake in file-less Elisp buffers

Fixes: bug#40573
* lisp/progmodes/elisp-mode.el (emacs-lisp-mode): Change
condition for setting flymake-diagnostic-functions.

4 years agoFix error message for ‘cl-struct-unknown-slot’ (bug#39995)
Philipp Stephani [Sun, 12 Apr 2020 13:11:22 +0000 (15:11 +0200)]
Fix error message for ‘cl-struct-unknown-slot’ (bug#39995)

* lisp/emacs-lisp/cl-macs.el (cl-struct-unknown-slot): Remove spurious
format specifiers.

4 years agoFix and improve documentation of mail-related features
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.

(Bug#40561)

4 years agoFix build failure with Fx_gtk_debug
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>.

4 years agoMention jit-lock deferred as an alternative to fast-but-imprecise-scrolling
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.

4 years ago; * doc/lispref/keymaps.texi (Extended Menu Items): Fix last change.
Eli Zaretskii [Sat, 11 Apr 2020 06:40:37 +0000 (09:40 +0300)]
; * doc/lispref/keymaps.texi (Extended Menu Items): Fix last change.

4 years ago* doc/lispref/keymaps.texi (Extended Menu Items): Tweak :key-sequence
Stefan Monnier [Fri, 10 Apr 2020 21:04:19 +0000 (17:04 -0400)]
* doc/lispref/keymaps.texi (Extended Menu Items): Tweak :key-sequence

Don't make it sound like `:key-sequence nil` is any different than the
absence of `:key-sequence`.  And the performance advantage of
`:key-sequence` disappeared long ago.

4 years agoFix redisplay when scrolling under redisplay-dont-pause
Eli Zaretskii [Fri, 10 Apr 2020 15:30:21 +0000 (18:30 +0300)]
Fix redisplay when scrolling under redisplay-dont-pause

* src/dispnew.c (update_window): Reset the window's
'must_be_updated_p' flag if the window's update was completed
without interruption.  This fixes redisplay glitches when
'redisplay-dont-pause' is nil, at least on MS-Windows, because
'expose_window' doesn't redraw the exposed rectangle when the
window's 'must_be_updated_p' flag is set.

4 years agoFix face extension in pulse.el
Eli Zaretskii [Thu, 9 Apr 2020 16:44:55 +0000 (19:44 +0300)]
Fix face extension in pulse.el

* lisp/cedet/pulse.el (pulse-reset-face): Propagate the :extend
attribute of FACE to the face used for displaying the pulse.
Reported by Adam Porter <adam@alphapapa.net>.

4 years ago* doc/misc/tramp.texi (Bug Reports): Avoid line breaks in traces.
Michael Albinus [Thu, 9 Apr 2020 13:55:32 +0000 (15:55 +0200)]
* doc/misc/tramp.texi (Bug Reports): Avoid line breaks in traces.

4 years agoAvoid assertion violation in intervals.c
Eli Zaretskii [Thu, 9 Apr 2020 08:21:18 +0000 (11:21 +0300)]
Avoid assertion violation in intervals.c

* src/intervals.c (delete_interval): Allow negative values of
LENGTH (i).  This happens when delete_interval is called from
set_intervals_multibyte_1, because the caller zeroes out the
total_length field of the interval to be deleted.  See
https://lists.gnu.org/archive/html/emacs-devel/2020-04/msg00131.html
for more details.  See also a related old discussion at
https://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00399.html.

4 years agoImprove documentation of 'jit-lock-contextually'
Eli Zaretskii [Wed, 8 Apr 2020 15:33:52 +0000 (18:33 +0300)]
Improve documentation of 'jit-lock-contextually'

* lisp/jit-lock.el (jit-lock-contextually): Clarify the jit-lock
operation when 'jit-lock-contextually' is non-nil and non-t.

* doc/lispref/modes.texi (Syntactic Font Lock)
(Other Font Lock Variables): Document the relation between
'jit-lock-register', 'font-lock-keywords-only', and syntactic
refontification.

4 years agoSpeed up 'resize-mode' child frames a little
Dmitry Gutov [Wed, 8 Apr 2020 10:52:40 +0000 (13:52 +0300)]
Speed up 'resize-mode' child frames a little

* src/gtkutil.c (xg_frame_set_char_size): Skip resizing if the
target dimensions are unchanged for child frames with
'resize-mode' resize policy as well.

4 years ago; * etc/NEWS: Mention 'executing-macro' in removed vars.
Eli Zaretskii [Mon, 6 Apr 2020 18:12:09 +0000 (21:12 +0300)]
; * etc/NEWS: Mention 'executing-macro' in removed vars.

4 years agoFix some problems with moving and resizing child frames
Martin Rudalics [Mon, 6 Apr 2020 07:22:36 +0000 (09:22 +0200)]
Fix some problems with moving and resizing child frames

(1) Provide new option 'x-gtk-resize-child-frames' which allows
to either hide a child frame during resizing or asks GTK to
resize it "immediately".  This is needed because desktops like
GNOME shell otherwise won't allow resizing child frames at all.
(2) Do not try to synchronize the position of a child frame
after moving it.  Needed because the present implementation
introduces a 0.5 secs delay which makes dragging child frames
virtually impossible with Lucid and Motif toolkits on desktops
like GNOME shell that use invisible outer frame borders.

For further information see the thread starting with
https://lists.gnu.org/archive/html/emacs-devel/2020-01/msg00343.html

* src/frame.c (syms_of_frame): New symbol Qxg_frame_set_char_size_4.
* src/gtkutil.c (xg_frame_set_char_size): Hide child frame
during resizing when 'x-gtk-resize-child-frames' equals 'hide'.
* src/xfns.c (x_set_parent_frame, Fx_create_frame): Set
gtk_container_resize_mode to GTK_RESIZE_IMMEDIATE for child
frames when'x-gtk-resize-child-frames' equals 'resize-mode'.
(Fx_gtk_debug): New function to toggle interactive GTK debugging
from within Emacs.
(syms_of_xfns): New symbols Qhide and Qresize_mode.
(x-gtk-resize-child-frames): New option that allows to resize
child frames on desktops like GNOME shell (with the mutter WM)
that otherwise refuse to resize them.
* src/xterm.c (x_set_offset): Don't x_sync_with_move for child
frames, it makes moving child frames virtually impossible with
the Lucid and Motif toolkits.

4 years agoFix syntax error in man page.
Philipp Stephani [Sun, 5 Apr 2020 08:19:31 +0000 (10:19 +0200)]
Fix syntax error in man page.

* doc/man/emacs.1.in: Fix syntax of --script argument.  The Info
manual states that --script has to be followed by a space, and the
syntax with the equals sign doesn't actually work.

4 years agoHandle filling of indented ChangeLog function entries
Noam Postavsky [Sat, 4 Apr 2020 16:28:23 +0000 (12:28 -0400)]
Handle filling of indented ChangeLog function entries

* lisp/vc/log-edit.el (log-edit-fill-entry): Relax regexp a bit to
recognize function entries with leading blanks.
* test/lisp/vc/log-edit-tests.el: New test.

4 years agoFix void-variable n-reb in re-builder (Bug#40409)
Noam Postavsky [Sat, 4 Apr 2020 16:00:41 +0000 (12:00 -0400)]
Fix void-variable n-reb in re-builder (Bug#40409)

* lisp/emacs-lisp/re-builder.el (reb-while): Take the current value of
the counter instead of its name.
(reb-mark-non-matching-parenthesis): Bind n-reb to 0 at the start and
don't wrongly treat it as dynamicly bound.

4 years agoFix small bug in copy_string_contents.
Philipp Stephani [Fri, 3 Apr 2020 19:49:59 +0000 (21:49 +0200)]
Fix small bug in copy_string_contents.

* src/emacs-module.c (module_copy_string_contents): Fix incorrect
variable use.  In this branch 'lisp_str_utf8' is always nil, so it
makes little sense to add it as error data.

4 years agoFix invocations of gpg from Gnus
Eli Zaretskii [Fri, 3 Apr 2020 11:29:49 +0000 (14:29 +0300)]
Fix invocations of gpg from Gnus

* lisp/epg-config.el (epg-config--make-gpg-configuration): Bind
coding-system-for-read/write to 'undecided', to countermand
possible values of 'no-conversion' or somesuch by the callers.
(Bug#40248)

4 years agoDon't draw GTK's internal border and tab bar on top of each other
Martin Rudalics [Fri, 3 Apr 2020 08:31:35 +0000 (10:31 +0200)]
Don't draw GTK's internal border and tab bar on top of each other

* src/xterm.c (x_clear_under_internal_border): For GTK builds
have 'margin' count in the height of the tab bar to avoid that
tab bar and internal border are drawn on top of each other.

4 years ago; * src/buffer.c (syms_of_buffer) <inhibit-read-only>: Doc fix.
Eli Zaretskii [Fri, 3 Apr 2020 06:58:20 +0000 (09:58 +0300)]
; * src/buffer.c (syms_of_buffer) <inhibit-read-only>: Doc fix.

4 years agoTweak htmlfontify's generated output
Amin Bandali [Thu, 2 Apr 2020 22:42:41 +0000 (18:42 -0400)]
Tweak htmlfontify's generated output

* lisp/htmlfontify.el (hfy-default-header): declare the character
encoding for the generated HTML file.  This helps browsers display
UTF-8 characters like the copyright symbol correctly.
(hfy-sprintf-stylesheet): apply the default style to all of the text
consistently, so that unstyled bits (which are not wrapped in span
tags and are directly part of the surrounding pre tag's "innerHTML")
have a look consistent with the rest of the document.

4 years ago; Auto-commit of loaddefs files.
Glenn Morris [Wed, 1 Apr 2020 13:12:36 +0000 (06:12 -0700)]
; Auto-commit of loaddefs files.

4 years agoHandle project--files-in-directory finding no files better
Dmitry Gutov [Mon, 30 Mar 2020 20:16:03 +0000 (23:16 +0300)]
Handle project--files-in-directory finding no files better

* lisp/progmodes/project.el (project--find-regexp-in-files):
Signal user-error when passed an empty list of files.

* lisp/progmodes/xref.el (xref-matches-in-files):
Make sure FILES is not empty.

4 years agoLet imenu to work on the menu bar when its list is a single non-nested member.
Alan Mackenzie [Mon, 30 Mar 2020 19:25:40 +0000 (19:25 +0000)]
Let imenu to work on the menu bar when its list is a single non-nested member.

* lisp/imenu.el (imenu-update-menubar): No longer accept a list of length 1 as
being sufficient evidence for a nested list structure.  Instead, additionally
check whether or not certain elements are atoms.

4 years ago* lisp/image/image-converter.el: Fix customization of image-converter.
Juri Linkov [Sun, 29 Mar 2020 23:16:12 +0000 (02:16 +0300)]
* lisp/image/image-converter.el: Fix customization of image-converter.

* lisp/image/image-converter.el (image-convert-p): Update
image-converter-regexp when image-converter was customized (bug#39994).

4 years agoFix url-cookie.el for lexical binding
Andreas Schwab [Sun, 29 Mar 2020 19:56:05 +0000 (21:56 +0200)]
Fix url-cookie.el for lexical binding

* lisp/url/url-cookie.el (url-cookie-handle-set-cookie): Use setq
instead of set to modify lexical binding.

4 years ago; * src/decompress.c: Fix comment style.
Eli Zaretskii [Sun, 29 Mar 2020 16:14:13 +0000 (19:14 +0300)]
; * src/decompress.c: Fix comment style.

4 years ago; * src/xfaces.c (syms_of_xfaces): Fix wording and typo.
Eli Zaretskii [Sun, 29 Mar 2020 13:14:34 +0000 (16:14 +0300)]
; * src/xfaces.c (syms_of_xfaces): Fix wording and typo.

4 years ago; * test/lisp/calc/calc-tests.el: Fix mistake in last commit
Mattias Engdegård [Sun, 29 Mar 2020 09:12:36 +0000 (11:12 +0200)]
; * test/lisp/calc/calc-tests.el: Fix mistake in last commit

4 years agoDon't suggest setting face-remapping-alist to a literal (Bug#39812)
Noam Postavsky [Sun, 29 Mar 2020 01:20:02 +0000 (21:20 -0400)]
Don't suggest setting face-remapping-alist to a literal (Bug#39812)

* src/xfaces.c (syms_of_xfaces) <face-remapping-alist>: Use copy-tree
in the costring example code, and note why.

4 years agoCalc: don't treat nil as an integer (bug#40155)
Mattias Engdegård [Fri, 27 Mar 2020 17:11:18 +0000 (18:11 +0100)]
Calc: don't treat nil as an integer (bug#40155)

Make Math-num-integerp return false for nil, following Math-integerp
which was changed in the bignum reform.  This fixes a crash in
calc-graph-fast.

Reported by Narendra Joshi.

* lisp/calc/calc-macs.el (Math-num-integerp): Not true for nil.
* test/lisp/calc/calc-tests.el (calc-Math-integerp): New tests.

4 years ago* lisp/files.el (directory-files-recursively): Doc fix. (Bug#40202)
Eli Zaretskii [Wed, 25 Mar 2020 19:54:21 +0000 (21:54 +0200)]
* lisp/files.el (directory-files-recursively): Doc fix.  (Bug#40202)

4 years agoDocument how to disable Tramp file archives
Michael Albinus [Wed, 25 Mar 2020 18:24:06 +0000 (19:24 +0100)]
Document how to disable Tramp file archives

* doc/misc/tramp.texi (Archive file names): Explain how to disable
file archives.

4 years agoDon't add repeated xlmns:xlink declarations in svg-create
Lars Ingebrigtsen [Tue, 24 Mar 2020 04:30:49 +0000 (05:30 +0100)]
Don't add repeated xlmns:xlink declarations in svg-create

* lisp/svg.el (svg-create): Fix previous unconditional addition of
the xmlns:xlink declaration -- callers may already add one, and
having it twice is something most svg libraries doesn't like.

4 years agoCalc: Declare dynamic variable bound in lexbind code (bug#40185)
Mattias Engdegård [Mon, 23 Mar 2020 20:34:22 +0000 (21:34 +0100)]
Calc: Declare dynamic variable bound in lexbind code (bug#40185)

* lisp/calc/calc.el: Declare math-comp-selected as dynamic.

4 years agoDon't build the Gnulib 'utimens' module on MinGW
Eli Zaretskii [Mon, 23 Mar 2020 14:37:27 +0000 (16:37 +0200)]
Don't build the Gnulib 'utimens' module on MinGW

* nt/gnulib-cfg.mk (OMIT_GNULIB_MODULE_utimens): Omit the
'utimens' module in the MinGW build: 'utimens' is not used by
Emacs, and 'fdutimens' is implemented in w32.c.

4 years agoAdd Harfbuzz dependency
Phillip Lord [Mon, 23 Mar 2020 09:38:36 +0000 (09:38 +0000)]
Add Harfbuzz dependency

* admin/nt/dist-build/build-dep-zips.py: Add harfbuzz as a dependency.

4 years agoDon't signal during backtrace unrewind (Bug#40088)
Noam Postavsky [Fri, 20 Mar 2020 08:07:39 +0000 (04:07 -0400)]
Don't signal during backtrace unrewind (Bug#40088)

backtrace_eval_unrewind is used to temporarily reverse
let-bindings (it's called with a positive argument to reverse
bindings, and then a negative argument to re-apply them) by
backtrace--locals and backtrace-eval.  For the SPECPDL_LET_DEFAULT and
SPECPDL_LET_LOCAL cases (which occur for let-bindings on buffer-local
variables), the code calls Fdefault_value and Fbuffer_local_value on
the symbol.

For symbols which are unbound at top-level, the first (with positive
argument) call to backtrace_eval_unrewind will set the symbol's value
to unbound (putting the current value in the specpdl's "old value"
slot).  On the second (with negative argument) call,
backtrace_eval_unrewind attempts to retrieve the symbol's value with
Fdefault_value or Fbuffer_local_value, but that raises a void-variable
signal.  This interrupts the restoration of the let-bindings, so any
other variables more recent on the stack will now have the wrong
value.

* src/data.c (default_value): Make non-static.
* src/lisp.h: Declare it.
* src/eval.c (backtrace_eval_unrewind): Replace the calls to
Fdefault_value and Fbuffer_local_value with default_value and
buffer_local_value, respectively.  The latter do exactly the same as
the former, except if the symbol's value is Qunbound they just return
it instead of signaling void-variable.

4 years agoFix a couple of problems in changelog generating functions
Noam Postavsky [Fri, 20 Mar 2020 10:00:11 +0000 (06:00 -0400)]
Fix a couple of problems in changelog generating functions

* lisp/vc/diff-mode.el (diff-add-log-current-defuns): If there is a
scan-error when calling end-of-defun, go to end of hunk.  This can
easily happen since we are calling end-of-defun on a partial code
fragment from a diff.
* lisp/vc/log-edit.el (log-edit-generate-changelog-from-diff): Bind
display-buffer-overriding-action around the log-edit-show-diff call
only.  Otherwise, it can affect, for example, debugger windows
triggered by the diff-add-log-current-defuns call.

4 years agoFix cl-concatenate (Bug#40180)
Noam Postavsky [Sun, 22 Mar 2020 11:48:14 +0000 (07:48 -0400)]
Fix cl-concatenate (Bug#40180)

* lisp/emacs-lisp/cl-extra.el (cl-concatenate): Use apply, to avoid
adding extra nesting of args.
* test/lisp/emacs-lisp/cl-extra-tests.el (cl-concatenate): New test.

4 years agoImprove documentation of project.el commands
Eli Zaretskii [Sat, 21 Mar 2020 11:26:19 +0000 (13:26 +0200)]
Improve documentation of project.el commands

* lisp/progmodes/project.el (project-find-regexp): Require 'grep'
to be able to call 'grep-read-files'.
(project-search, project-query-replace-regexp): Doc fixes.

* doc/emacs/maintaining.texi (Projects): New section.
* doc/emacs/emacs.texi (Top): Add "Projects" to the detailed menu.

4 years agoMake svg images with links valid
Zhu Zihao [Fri, 20 Mar 2020 15:35:31 +0000 (16:35 +0100)]
Make svg images with links valid

* lisp/svg.el (svg-create): Specify xlink namespace for svg images
(bug#40010).

Copyright-paperwork-exempt: yes

4 years ago* lisp/tab-line.el (tab-line-new-button-show): New defcustom.
Juri Linkov [Thu, 19 Mar 2020 23:21:57 +0000 (01:21 +0200)]
* lisp/tab-line.el (tab-line-new-button-show): New defcustom.

* lisp/tab-line.el (tab-line-format-template): Use tab-line-new-button-show.
(tab-line-new-tab-choice): Remove choice 'nil' with "No button".
(tab-line-separator): Add docstring.

4 years agoDon't have exif bugging out on short strings
Lars Ingebrigtsen [Thu, 19 Mar 2020 15:15:04 +0000 (16:15 +0100)]
Don't have exif bugging out on short strings

* lisp/image/exif.el (exif--direct-ascii-value): New function
(bug#40127).
(exif--parse-directory): Use it to get the correct values for
in-directory (i.e., shorter than 4 octets) strings.

4 years agoUse correct registry name for windows-1251 charset
Robert Pluim [Wed, 18 Mar 2020 20:37:55 +0000 (21:37 +0100)]
Use correct registry name for windows-1251 charset

* src/ftfont.c (fc_charset_table): The registry to use to lookup
windows-1251 charset is microsoft-cp1251, not windows-1251.
(Bug#40097)