]> git.eshelyaron.com Git - emacs.git/log
emacs.git
4 years agoRestore point after sending a message
Lars Ingebrigtsen [Thu, 21 Nov 2019 13:32:56 +0000 (14:32 +0100)]
Restore point after sending a message

* lisp/gnus/message.el (message-send-and-exit): Restore point
after sending (bug#38303).

4 years agoMake pp-buffer into a command
Lars Ingebrigtsen [Thu, 21 Nov 2019 13:09:32 +0000 (14:09 +0100)]
Make pp-buffer into a command

* lisp/emacs-lisp/pp.el (pp-buffer): Make into a command (bug#38306).

4 years agoFix loading image-converter in the case where the type is passed in
Lars Ingebrigtsen [Thu, 21 Nov 2019 13:02:00 +0000 (14:02 +0100)]
Fix loading image-converter in the case where the type is passed in

* lisp/image.el (create-image): Load image-converter when
converting images (bug#38310).

4 years agoRewrite the image-convert doc string
Lars Ingebrigtsen [Thu, 21 Nov 2019 12:59:37 +0000 (13:59 +0100)]
Rewrite the image-convert doc string

* lisp/image/image-converter.el (image-convert): Clarify the
calling convention (bug#38310).

4 years agoHide quoted passwords with spaces in Authinfo
Dario Gjorgjevski [Thu, 21 Nov 2019 12:51:55 +0000 (13:51 +0100)]
Hide quoted passwords with spaces in Authinfo

* lisp/auth-source.el (auth-source-netrc-looking-at-one): New
function, extracted from auth-source-netrc-parse-one.
(auth-source-netrc-parse-one, authinfo--hide-passwords): Use
auth-source-netrc-looking-at-one (bug#38311).

4 years ago* lisp/net/tramp.el (tramp-unload-tramp): Do not enable ange-ftp. (Bug#38025)
Michael Albinus [Thu, 21 Nov 2019 09:35:14 +0000 (10:35 +0100)]
* lisp/net/tramp.el (tramp-unload-tramp): Do not enable ange-ftp.  (Bug#38025)

4 years ago* lisp/image.el: Mouse-wheel scaling on images (bug#38187)
Juri Linkov [Wed, 20 Nov 2019 22:59:49 +0000 (00:59 +0200)]
* lisp/image.el: Mouse-wheel scaling on images (bug#38187)

* lisp/image.el (image-mouse-increase-size)
(image-mouse-decrease-size): New commands.
(image-map): Bind C-wheel-down and C-mouse-5 to
image-mouse-decrease-size, C-wheel-up and C-mouse-4 to
image-mouse-increase-size.

4 years ago* src/sysdep.c: Improve comment wording.
Paul Eggert [Wed, 20 Nov 2019 19:57:17 +0000 (11:57 -0800)]
* src/sysdep.c: Improve comment wording.

4 years ago* etc/NEWS: Improve XDG_RUNTIME_DIR doc.
Paul Eggert [Wed, 20 Nov 2019 19:28:32 +0000 (11:28 -0800)]
* etc/NEWS: Improve XDG_RUNTIME_DIR doc.

4 years agoAdd renaming of remote buffer file names to Tramp
Michael Albinus [Wed, 20 Nov 2019 12:45:30 +0000 (13:45 +0100)]
Add renaming of remote buffer file names to Tramp

* doc/misc/tramp.texi (Default User): Fix typo.
(Cleanup remote connections): Adapt arguments of
`tramp-cleanup-connection'.
(Renaming remote files): New node.
(Frequently Asked Questions): New item "How to save files when a
remote host isn't reachable anymore?".

* etc/NEWS: Add `tramp-rename-files' and `tramp-rename-these-files'.

* lisp/net/tramp-cmds.el (tramp-default-rename-alist)
(tramp-confirm-rename-file-names): New defcustoms.
(tramp-rename-read-file-name-dir)
(tramp-rename-read-file-name-init): New defsubsts.
(tramp-default-rename-file, tramp-rename-files)
(tramp-rename-these-files): New defuns.

* lisp/net/tramp-integration.el (ido, ivy): Integrate with them.

4 years agoMake with-suppressed-warnings work for macros, too
Lars Ingebrigtsen [Wed, 20 Nov 2019 11:28:37 +0000 (12:28 +0100)]
Make with-suppressed-warnings work for macros, too

* lisp/emacs-lisp/macroexp.el (macroexp-macroexpand): Pass the
macro/alias symbol on to byte-compile-warning-enabled-p so that
with-suppressed-warnings works for macros, too.

4 years agoRemove info references to gmane web search
Robert Pluim [Wed, 20 Nov 2019 10:55:42 +0000 (11:55 +0100)]
Remove info references to gmane web search

* doc/misc/gnus.texi (Foreign Groups, Web Searches, What is nnir?):
(Setting up nnir, Associating Engines, The imap Engine):
(Customizations): Remove references to gmane web search.

4 years agoExpand coverage of unit tests for time-stamp
Stephen Gildea [Wed, 20 Nov 2019 05:26:09 +0000 (21:26 -0800)]
Expand coverage of unit tests for time-stamp

* test/lisp/time-stamp-tests.el: Remove redundant word "test"
from the names of all the tests.
(time-stamp-custom-time-zone, time-stamp-custom-pattern,
time-stamp-custom-inserts-lines, time-stamp-custom-count,
time-stamp-helper-safe-locals): New tests

4 years agoMake .pdmp file more reproducible
Paul Eggert [Wed, 20 Nov 2019 02:23:01 +0000 (18:23 -0800)]
Make .pdmp file more reproducible

Problem reported by Ulrich Müller
<https://lists.gnu.org/r/emacs-devel/2019-11/msg00757.html>
and diagnosed by Andreas Schwab
<https://lists.gnu.org/r/emacs-devel/2019-11/msg00774.html>.
* src/sysdep.c (maybe_disable_address_randomization):
Disable ASLR if any kind of dumping, instead of merely if
unexec dumping.  Omit first arg for simplicity; all uses changed.

4 years ago* lisp/icomplete.el (icomplete-fido-kill): Unbreak yes-or-no-p usage
João Távora [Tue, 19 Nov 2019 23:53:10 +0000 (23:53 +0000)]
* lisp/icomplete.el (icomplete-fido-kill): Unbreak yes-or-no-p usage

Discussed in the context of bug#19064, bug#17272.

4 years agoEnsure Rmail summary is updated after editing a message
Eli Zaretskii [Tue, 19 Nov 2019 15:59:02 +0000 (17:59 +0200)]
Ensure Rmail summary is updated after editing a message

* lisp/mail/rmailedit.el (rmail-cease-edit): If this mbox file
has a summary, update the summary after editing.  (Bug#38193)

4 years agoFix updating members of zip archives
Eli Zaretskii [Tue, 19 Nov 2019 15:48:55 +0000 (17:48 +0200)]
Fix updating members of zip archives

* lisp/arc-mode.el (archive-zip-case-fiddle): Change the
default to nil except on MS-DOS.  Update the doc string to
make clear that a non-nil value also affects updating the
archive.  (Bug#38260)

4 years ago; Fix NEWS entry for network-lookup-address-info
Robert Pluim [Tue, 19 Nov 2019 14:28:36 +0000 (15:28 +0100)]
; Fix NEWS entry for network-lookup-address-info

4 years agoRemember the full GTK font description
Robert Pluim [Mon, 18 Nov 2019 09:18:25 +0000 (10:18 +0100)]
Remember the full GTK font description

Remember the full font description instead of just the family so that
size/style/weight settings are preserved.

* gtkutil.c (xg_get_font) [HAVE_GTK3]: Use the pango font
description to set/get the current font (Bug#28901).

4 years agoDon't error when comparing IPv4 and IPv6 addresses
Robert Pluim [Mon, 18 Nov 2019 09:57:55 +0000 (10:57 +0100)]
Don't error when comparing IPv4 and IPv6 addresses

* lisp/net/nsm.el (nsm-network-same-subnet): Compare lengths of
local-ip and ip; different lengths can never match.
(nsm-should-check): Chop port off end of address.

4 years agoAllow eww to display exotic images like webp
Lars Ingebrigtsen [Tue, 19 Nov 2019 10:47:19 +0000 (11:47 +0100)]
Allow eww to display exotic images like webp

* lisp/image.el (image-type): Allow passing in the image type.
(create-image): Make conversion work with data in addition to files.

* lisp/image/image-converter.el (image-convert-p): Allow taking
working on data in addition to files (bug#38036).
(image-convert): Ditto.
(image-converter--convert): Extend signature to say whether we're
getting a file or data.
(image-converter--convert-magick): Convert data.
(image-converter--convert): Ditto.

4 years agoStrip "(fn...)" from output of `describe-mode' (bug#38222)
Juanma Barranquero [Tue, 19 Nov 2019 10:18:48 +0000 (11:18 +0100)]
Strip "(fn...)" from output of `describe-mode' (bug#38222)

* lisp/help.el (help--doc-without-fn): New function.
(describe-mode): Use it.

4 years agoMerge branch 'master' of git.sv.gnu.org:/srv/git/emacs
Michael Albinus [Tue, 19 Nov 2019 07:19:00 +0000 (08:19 +0100)]
Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs

4 years ago* lisp/org/org.el (org-mode): Add pcomplete-completions-at-point to capf.
Stefan Monnier [Mon, 18 Nov 2019 22:47:06 +0000 (17:47 -0500)]
* lisp/org/org.el (org-mode): Add pcomplete-completions-at-point to capf.

This lets the normal `completion-at-point` and `complete-symbol`
use `pcomplete` for completion.

(org-mode-map): Leave M-TAB bound to the global default since
`pcomplete` is now obsolete.

4 years ago* lisp/tab-line.el (tab-line-auto-hscroll): New defcustom (bug#37667)
Juri Linkov [Mon, 18 Nov 2019 21:57:16 +0000 (23:57 +0200)]
* lisp/tab-line.el (tab-line-auto-hscroll): New defcustom (bug#37667)

(tab-line-auto-hscroll): Use this option in the function.

4 years ago* lisp/vc/ediff-util.el: Set this-command to ediff-quit (bug#38219)
Juri Linkov [Mon, 18 Nov 2019 21:53:11 +0000 (23:53 +0200)]
* lisp/vc/ediff-util.el: Set this-command to ediff-quit (bug#38219)

* lisp/vc/ediff-util.el (ediff-toggle-read-only, ediff-quit):
Set this-command to the same command after using y-or-n-p
that doesn't guarantee to keep this-command unchanged
to check it later for some contrived logic.

4 years ago; Fix previous commit
Robert Pluim [Mon, 18 Nov 2019 15:35:51 +0000 (16:35 +0100)]
; Fix previous commit

4 years agoCheck for HAVE_GTK3 instead of a specific version
Robert Pluim [Mon, 18 Nov 2019 14:39:54 +0000 (15:39 +0100)]
Check for HAVE_GTK3 instead of a specific version

Our minimum GTK3 version is 3.10, the font filter functions appeared
in 3.2.

* gtkutil.c (xg_font_filter) [HAVE_GTK3]: Just check for HAVE_GTK3.
(xg_get_font) [HAVE_GTK3]: Same here.

4 years ago* lisp/net/tramp.el (tramp-handle-file-regular-p): Improve error handling.
Michael Albinus [Mon, 18 Nov 2019 14:33:21 +0000 (15:33 +0100)]
* lisp/net/tramp.el (tramp-handle-file-regular-p): Improve error handling.

4 years agoFix cl-prettyexpand in the non-FULL case
Lars Ingebrigtsen [Mon, 18 Nov 2019 10:02:27 +0000 (11:02 +0100)]
Fix cl-prettyexpand in the non-FULL case

* lisp/emacs-lisp/cl-extra.el (cl-prettyexpand): This function has
apparently not worked for at least a couple of decades
(bug#38206) unless supplied with a FULL parameter.  Make the FULL
parameter obsolete and make the function always work as it did
with a non-nil FULL.

4 years agoMerge branch 'scratch/so-long-updates'
Phil Sainty [Mon, 18 Nov 2019 08:27:13 +0000 (21:27 +1300)]
Merge branch 'scratch/so-long-updates'

4 years agolisp/so-long.el: Refactor menu action commands
Phil Sainty [Sat, 16 Nov 2019 02:48:44 +0000 (15:48 +1300)]
lisp/so-long.el: Refactor menu action commands

* lisp/so-long.el (so-long-menu): Call `so-long' with an ACTION
argument instead of using `so-long-menu-item-replace-action'.
(so-long-menu-item-replace-action): Remove the deprecated function.

* test/lisp/so-long-tests/so-long-tests.el
(so-long-tests-so-long-menu-item-replace-action): Update the test.

4 years ago* lisp/so-long.el (so-long): Firstly revert the existing action, if any
Phil Sainty [Sat, 16 Nov 2019 13:11:20 +0000 (02:11 +1300)]
* lisp/so-long.el (so-long): Firstly revert the existing action, if any

This makes `so-long' consistent with the action commands in the menu.

If multiple actions were to be layered on top of one another, we would
lose the ability to revert to the normal state.  Custom actions
combining multiple other actions can be defined if necessary.

4 years agolisp/so-long.el: Use (interactive "@") for menu commands
Stefan Monnier [Sat, 16 Nov 2019 01:39:00 +0000 (14:39 +1300)]
lisp/so-long.el: Use (interactive "@") for menu commands

* lisp/so-long.el (so-long-menu, so-long-menu-item-replace-action)
(so-long-revert): Use interactive code "@", replacing all uses of
`so-long-menu-click-window'.  This approach leaves the window selected
afterwards, whereas the old code did not; but that is not a problem.
(so-long-menu-click-window, so-long-menu-item-revert): Remove the
deprecated functions.

* test/lisp/so-long-tests/so-long-tests.el
(so-long-tests-so-long-menu-item-replace-action): Update the test.

Co-authored-by: Phil Sainty <psainty@orcon.net.nz>
4 years ago; * lisp/so-long.el: Use declare-function nearer the code that needs it
Stefan Monnier [Sat, 16 Nov 2019 01:35:36 +0000 (14:35 +1300)]
; * lisp/so-long.el: Use declare-function nearer the code that needs it

4 years ago; * lisp/so-long.el: Use function quoting in example configuration
Stefan Monnier [Sat, 16 Nov 2019 01:35:07 +0000 (14:35 +1300)]
; * lisp/so-long.el: Use function quoting in example configuration

4 years ago; * lisp/so-long.el: Delete redundant :group declarations
Stefan Monnier [Sat, 16 Nov 2019 01:32:09 +0000 (14:32 +1300)]
; * lisp/so-long.el: Delete redundant :group declarations

Refer to (elisp) Common Keywords:

> If this keyword is missing from a customization item, it’ll be
> placed in the same group that was last defined (in the current file).

4 years agoRemove the error-out test for with_harfbuzz
Lars Ingebrigtsen [Mon, 18 Nov 2019 07:24:52 +0000 (08:24 +0100)]
Remove the error-out test for with_harfbuzz

* configure.ac (HAVE_HARFBUZZ): Remove the check for explicit
harfbuzz -- have_harfbuzz defaults to "yes", so we have no way of
checking whether the user really asked for it, apparently.

4 years ago* lisp/simple.el (process-file): Clarify doc string.
Paul Eggert [Sun, 17 Nov 2019 23:26:55 +0000 (15:26 -0800)]
* lisp/simple.el (process-file): Clarify doc string.

4 years ago* lisp/tmm.el (tmm-add-one-shortcut): Use dolist
Stefan Monnier [Sun, 17 Nov 2019 22:34:50 +0000 (17:34 -0500)]
* lisp/tmm.el (tmm-add-one-shortcut): Use dolist

4 years ago* lisp/subr.el (read-char-from-minibuffer, y-or-n-p): Remove discard-input.
Juri Linkov [Sun, 17 Nov 2019 21:51:55 +0000 (23:51 +0200)]
* lisp/subr.el (read-char-from-minibuffer, y-or-n-p): Remove discard-input.

(do-after-load-evaluation): Replace run-with-timer with run-with-idle-timer
to give a chance for the minibuffer to handle initial events before sit-for.
https://lists.gnu.org/archive/html/emacs-devel/2019-11/msg00581.html

4 years agoAuto-scrolling in tab-line (bug#37667)
Juri Linkov [Sun, 17 Nov 2019 21:43:28 +0000 (23:43 +0200)]
Auto-scrolling in tab-line (bug#37667)

* lisp/tab-line.el (tab-line-auto-hscroll): New function.
(tab-line-format): Use tab-line-auto-hscroll.

4 years agoError out on --with-harfbuzz without HarfBuzz support
Lars Ingebrigtsen [Sun, 17 Nov 2019 18:02:54 +0000 (19:02 +0100)]
Error out on --with-harfbuzz without HarfBuzz support

* configure.ac: Error out if the user says --with-harfbuzz, but
HarfBuzz isn't available.

4 years agoHandle FC_CHARCELL in xftfont_open
Lars Ingebrigtsen [Sun, 17 Nov 2019 16:32:37 +0000 (17:32 +0100)]
Handle FC_CHARCELL in xftfont_open

* src/xftfont.c (xftfont_open): FC_CHARCELL is apparently an alias
for FC_DUAL used in some east Asian fonts (bug#35079).  Modelled
after a patch suggested by Kenichi Handa.

4 years agoSupport more font weight values on MS-Windows
Eli Zaretskii [Sun, 17 Nov 2019 16:19:18 +0000 (18:19 +0200)]
Support more font weight values on MS-Windows

* src/w32font.c (w32_to_fc_weight): Support a few more weight
values, for compatibility with the GTK font selection widget
(see gtkutil.c:XG_WEIGHT_TO_SYMBOL).  (Bug#24226)

4 years agoCompilation Mode: Fix arrow handling when compilation-context-lines is t
Alan Mackenzie [Sun, 17 Nov 2019 14:59:42 +0000 (14:59 +0000)]
Compilation Mode: Fix arrow handling when compilation-context-lines is t

In particular, fix some exception occurrences, fix handling of a Compilation
Mode buffer being displayed in several windows, and fix the margin when
temporarily displaying a different buffer in a window, then returning to the
compilation mode buffer.  The fix is relevant for frames without fringes,
e.g. tty frames.

* lisp/progmodes/compile.el: (compilation-set-window): Always set point to
(parameter) MK.
(compilation--set-up-margin, compilation--tear-down-margin): New functions.
(compilation--set-up-arrow-spec-in-margins)
(compilation--tear-down-arrow-spec-in-margins): Renamed by introducing -- and
pluralising margin to margins.  Handle the margins in _all_ windows displaying
the pertinent buffer by using get-buffer-window-list.  In ...--set-up-... add
compilation--set-up-margin to window-buffer-change-functions.  In
...--tear-down-... remove the hook functions added in ...--set-up-....

4 years agoMake ido-read-file-name respect ido-read-file-name-non-ido more
Lars Ingebrigtsen [Sun, 17 Nov 2019 09:40:11 +0000 (10:40 +0100)]
Make ido-read-file-name respect ido-read-file-name-non-ido more

* lisp/ido.el (ido-read-file-name): Respect
ido-read-file-name-non-ido in the file-directory-p case, too
(bug#38231).

4 years agoMake tables more resistant to major mode changes
Lars Ingebrigtsen [Sun, 17 Nov 2019 09:06:28 +0000 (10:06 +0100)]
Make tables more resistant to major mode changes

* lisp/textmodes/table.el (table--put-cell-face-property)
(table--remove-cell-properties): Ensure that we don't lose the
table face when switching from buffers with font locking to ones
without (or vice versa) (bug#35481).

4 years agoMake bibtex-parse-keys more robust
Lars Ingebrigtsen [Sun, 17 Nov 2019 08:15:20 +0000 (09:15 +0100)]
Make bibtex-parse-keys more robust

* lisp/textmodes/bibtex.el (bibtex-parse-keys): Protect against
bugging out just when starting almost-empty bibtex files
(bug#30112).

4 years ago; Grammar in simple.el doc strings and comments
Stephen Gildea [Sun, 17 Nov 2019 05:17:02 +0000 (21:17 -0800)]
; Grammar in simple.el doc strings and comments

* lisp/simple.el: Improve the English grammar in some doc strings
and comments.

4 years ago* lisp/tab-bar.el: Add missing arg.
Juri Linkov [Sat, 16 Nov 2019 22:19:42 +0000 (00:19 +0200)]
* lisp/tab-bar.el: Add missing arg.

* lisp/tab-bar.el (tab-bar-list-next-line)
(tab-bar-list-prev-line): Add missing interactive spec for prefix arg.

* lisp/mouse.el (mouse-buffer-menu-mode-groups): Add "Git" regexp
to match "Git-Region-History" mode name for "Version Control" group.

4 years ago* lisp/simple.el (eval-expression-print-maximum-character): Use choice type.
Juri Linkov [Sat, 16 Nov 2019 22:10:19 +0000 (00:10 +0200)]
* lisp/simple.el (eval-expression-print-maximum-character): Use choice type.

https://lists.gnu.org/archive/html/emacs-devel/2019-11/msg00433.html

4 years ago* lisp/dired.el (dired-dwim-target): Add choice dired-dwim-target-next-visible
Juri Linkov [Sat, 16 Nov 2019 22:06:16 +0000 (00:06 +0200)]
* lisp/dired.el (dired-dwim-target): Add choice dired-dwim-target-next-visible

* lisp/dired-aux.el (dired-dwim-target-next): Add arg ALL-FRAMES.
(dired-dwim-target-next-visible): New function.

* doc/emacs/dired.texi (Operating on Files): Describe function value
of dired-dwim-target.  (Bug#35385)

4 years agoFix display of R2L text
Eli Zaretskii [Sat, 16 Nov 2019 19:37:41 +0000 (21:37 +0200)]
Fix display of R2L text

* src/xdisp.c (extend_face_to_end_of_line): Fix padding of R2L
screen lines with stretch glyph on the left.  (Bug#38233)

4 years agoFix moving files with duplicate names to trash-can
Shingo Tanaka [Fri, 25 Oct 2019 13:59:28 +0000 (22:59 +0900)]
Fix moving files with duplicate names to trash-can

* lisp/files.el (move-file-to-trash): Fix file name in
trash-can when another deleted file under the same name is
already stored there.  (Bug#37922)

Copyright-paperwork-exempt: yes.

4 years agoDo not report move frame events for tooltip frames (Bug#38213)
Martin Rudalics [Sat, 16 Nov 2019 08:04:53 +0000 (09:04 +0100)]
Do not report move frame events for tooltip frames (Bug#38213)

* src/w32term.c (w32_read_socket):
* src/xterm.c (handle_one_xevent): Do not report move frame events
for tooltip frames (Bug#38213).

4 years agotex-mode: paragraph separator groups text and comments
Michael Orlitzky [Sat, 16 Nov 2019 07:15:48 +0000 (08:15 +0100)]
tex-mode: paragraph separator groups text and comments

* lisp/textmodes/tex-mode.el (latex-mode): Don't wrap text with
leading spaces into preceding comments (bug#38152).

Copyright-paperwork-exempt: yes

4 years agoDon't move point on undefined keystrokes in the article buffer
Lars Ingebrigtsen [Sat, 16 Nov 2019 05:11:56 +0000 (06:11 +0100)]
Don't move point on undefined keystrokes in the article buffer

* lisp/gnus/gnus-art.el (gnus-article-read-summary-keys): Don't
move point on undefined commands (bug#38227).

4 years agoMake button-1 work on all Gnus buttons
Lars Ingebrigtsen [Sat, 16 Nov 2019 04:33:17 +0000 (05:33 +0100)]
Make button-1 work on all Gnus buttons

* lisp/gnus/gnus-icalendar.el (gnus-icalendar-insert-button):
* lisp/gnus/gnus-art.el (gnus-insert-mime-button)
(gnus-mime-display-alternative, gnus-insert-prev-page-button)
(gnus-insert-next-page-button)
(gnus-insert-mime-security-button): Make button-1 work on all the
Gnus buttons (bug#38144).

4 years agoMake it clear what edebug-remove-instrumentation offers
Lars Ingebrigtsen [Sat, 16 Nov 2019 04:27:33 +0000 (05:27 +0100)]
Make it clear what edebug-remove-instrumentation offers

* doc/lispref/edebug.texi (Instrumenting): Reword the description
of the edebug-remove-instrumentation command.

4 years agoPort new float-scaling code to Solaris
Paul Eggert [Sat, 16 Nov 2019 02:40:45 +0000 (18:40 -0800)]
Port new float-scaling code to Solaris

* src/floatfns.c (double_integer_scale): Simplify, so that the
function works when (FP_ILOGBNAN == INT_MAX && FP_ILOGB0 == INT_MIN),
as on Solaris.

4 years ago; * lisp/so-long.el: Silence byte-compiler warnings
Phil Sainty [Fri, 15 Nov 2019 23:12:36 +0000 (12:12 +1300)]
; * lisp/so-long.el: Silence byte-compiler warnings

4 years agoMake icomplete-tidy-shadowed-file-names less aggressive
João Távora [Fri, 15 Nov 2019 20:27:18 +0000 (20:27 +0000)]
Make icomplete-tidy-shadowed-file-names less aggressive

When using this option and editing input, some transient situations
may arise that lead to file-name shadowing, but that shouldn't
necessarily lead to auto-delete behaviour, which will be suprising.

In '/foo/x/bar', if the user deletes the 'x', shadowing occurs, but
probably shouldn't.  So, somewhat like ido-mode, only auto-tidy
shadowed file names if the user is inserting text at end of input.

* lisp/icomplete.el (icomplete-exhibit): Check this-command.
(icomplete-tidy-shadowed-file-names): Tweak docstring.

4 years ago* lisp/progmodes/perl-mode.el (perl-calculate-indent): Indent qw(...)
Stefan Monnier [Fri, 15 Nov 2019 18:19:21 +0000 (13:19 -0500)]
* lisp/progmodes/perl-mode.el (perl-calculate-indent): Indent qw(...)

Fix initialization of `state`.
Special-case `qw(...)` because we do want to indent its contents.

4 years agoUsed magic-fallback-mode-alist to detect .doc files (Bug#20891)
Robert Pluim [Fri, 15 Nov 2019 10:23:20 +0000 (11:23 +0100)]
Used magic-fallback-mode-alist to detect .doc files (Bug#20891)

This avoids running doc-view-mode on files that are actually text
files.

* lisp/files.el (auto-mode-alist): Don't use doc-view-mode-maybe
for .doc (but continue to do so for .docx).
(magic-fallback-mode-alist): Add signature for .doc files.

4 years agoImprove indexing of function doc string conventions
Eli Zaretskii [Fri, 15 Nov 2019 09:42:11 +0000 (11:42 +0200)]
Improve indexing of function doc string conventions

* doc/lispref/functions.texi (Function Documentation): Improve
indexing (bug#38158).

4 years agoPort hexdigit init to non-GCC + pdumper
Paul Eggert [Fri, 15 Nov 2019 09:28:33 +0000 (01:28 -0800)]
Port hexdigit init to non-GCC + pdumper

The old code assumed that hexdigit initialization (needed by
non-GCC) could be done in syms_of_character, but that is no longer
true with pdumper.  Instead, simplify hexdigit init so that it can
be done statically on all C99 platforms.  Problem discovered on
Solaris 10 sparc + Oracle Solaris Studio 12.6.
* src/character.c (hexdigit): Add 1 to every value; all uses
changed.  This simplifies the initialization so that it can be
done statically on any C99 compiler.  hexdigit is now always const.
(syms_of_character): Omit no-longer-necessary initialization.
* src/character.h (HEXDIGIT_CONST, HEXDIGIT_IS_CONST):
Remove.  All uses removed.

4 years agoImprove documentation of 'add-variable-watcher'
Eli Zaretskii [Fri, 15 Nov 2019 09:16:09 +0000 (11:16 +0200)]
Improve documentation of 'add-variable-watcher'

* doc/lispref/variables.texi (Watching Variables): Clarify the
documentation of 'add-variable-watcher' and fix markup.

* src/data.c (Fadd_variable_watcher): Clarify the doc string.
(Bug#38205)

4 years agoAvoid using subr-x function
Lars Ingebrigtsen [Fri, 15 Nov 2019 09:04:23 +0000 (10:04 +0100)]
Avoid using subr-x function

* lisp/vc/vc-hg.el (vc-hg-retrieve-tag): Avoid using subr-x
function (bug#38216).

4 years agoIn 'dframe-frame-mode' avoid 'switch-to-buffer' (Bug#37840)
Martin Rudalics [Fri, 15 Nov 2019 08:43:02 +0000 (09:43 +0100)]
In 'dframe-frame-mode' avoid 'switch-to-buffer' (Bug#37840)

* lisp/dframe.el (dframe-frame-mode): Use 'set-window-buffer'
instead of 'switch-to-buffer’ to avoid that
'switch-to-buffer-obey-display-actions' butts in (Bug#37840).

4 years agolisp/vc/vc-hg.el: Don't pass empty string to hg update
Andrii Kolomoiets [Fri, 15 Nov 2019 08:13:55 +0000 (09:13 +0100)]
lisp/vc/vc-hg.el: Don't pass empty string to hg update

* lisp/vc/vc-hg.el (vc-hg-retrieve-tag): Don't pass empty name to
`hg update` (bug#38216).

4 years agoFix minor formatting issue in isearch-forward documentation
Lele Gaifax [Fri, 15 Nov 2019 08:10:24 +0000 (09:10 +0100)]
Fix minor formatting issue in isearch-forward documentation

* lisp/isearch.el (isearch-forward): Doc string formatting fix
(bug#38207).

4 years agoMake edebug-remove-instrumentation remove macro instrumentation
Lars Ingebrigtsen [Fri, 15 Nov 2019 08:00:49 +0000 (09:00 +0100)]
Make edebug-remove-instrumentation remove macro instrumentation

* lisp/emacs-lisp/edebug.el (edebug-remove-instrumentation):
Macros can also have edebug instrumentation, so remove that as
well (bug#38195).

4 years agoUpdate nnir-method-default-engines version tag
Robert Pluim [Fri, 15 Nov 2019 07:56:08 +0000 (08:56 +0100)]
Update nnir-method-default-engines version tag

* lisp/gnus/nnir.el (nnir-method-default-engines): Update version tag.

4 years agoFix a recent change in xdisp.c
Eli Zaretskii [Fri, 15 Nov 2019 07:54:43 +0000 (09:54 +0200)]
Fix a recent change in xdisp.c

* src/xdisp.c (tty_handle_tab_bar_click): Revert the last
change which made this work only in the HAVE_NTGUI build.
This function is needed by any build which supports a  mouse
on TTY frames.

4 years agoHandle weird cases like (ceil 0 0.0)
Paul Eggert [Fri, 15 Nov 2019 02:51:17 +0000 (18:51 -0800)]
Handle weird cases like (ceil 0 0.0)

* src/floatfns.c (double_integer_scale): Distinguish Inf from NaN.
(rounding_driver): Handle (ceil 0 0.0) and (ceil 0 1.0e+INF).
* test/src/floatfns-tests.el (special-round): Add tests for
weird cases like this.

Avoid crash with (floor 0 0.0)
* src/floatfns.c (rounding_driver): Signal an arithmetic
error if divisor is 0.0 or -0.0, instead of crashing.

4 years ago* lisp/cedet/semantic/db.el: Use lexical-binding
Stefan Monnier [Thu, 14 Nov 2019 23:55:18 +0000 (18:55 -0500)]
* lisp/cedet/semantic/db.el: Use lexical-binding

Also prefer setf over oset.
(semanticdb-abstract-table-list): Always define.
(semanticdb--inhibit-make-directory): Fix name of declaration to match
name of variable actually used.
(semanticdb-with-match-any-mode): Use `declare`.  Add Edebug spec.
(semanticdb-project-roots): Remove redundant :group.

4 years agoFix byte-counting error in ‘format’
Paul Eggert [Thu, 14 Nov 2019 22:42:39 +0000 (14:42 -0800)]
Fix byte-counting error in ‘format’

Problem reported by Paul Pogonyshev (Bug#38191).
* src/editfns.c (styled_format): When checking for adjacent
%-sequences, use byte position rather than character position.
* test/src/editfns-tests.el (format-properties): Test for fix.

4 years agoIn Cairo builds, omit some unnecessary functions
Paul Eggert [Thu, 14 Nov 2019 22:00:07 +0000 (14:00 -0800)]
In Cairo builds, omit some unnecessary functions

* src/font.c (fset_font_data, font_put_frame_data)
(font_get_frame_data):
* src/ftfont.c (ftfont_open, ftfont_close)
(ftfont_encode_char, ftfont_glyph_metrics)
(ftfont_text_extents, ftfont_driver):
Define only if USE_CAIRO.
* src/xdisp.c (tty_handle_tab_bar_click):
Define only if HAVE_NTGUI && !CYGWIN.

4 years ago(repos-count-screen-lines): Narrow without changing point-min
Dmitry Gutov [Thu, 14 Nov 2019 21:41:07 +0000 (23:41 +0200)]
(repos-count-screen-lines): Narrow without changing point-min

* lisp/reposition.el (repos-count-screen-lines): Narrow without
changing point-min.  It wasn't necessary for vertical-motion to
work, and it had some adverse effects on how font-lock rules were
applied
(https://lists.gnu.org/archive/html/emacs-devel/2019-11/msg00522.html).
This can also be an alternative fix for bug#38049.

4 years agoCC Mode: Fix two bugs in the "state cache".
Alan Mackenzie [Thu, 14 Nov 2019 19:51:01 +0000 (19:51 +0000)]
CC Mode: Fix two bugs in the "state cache".

This (along with a suggestion to the OP to set
open-paren-in-column-0-is-defun-start to nil) fixes bug #37910.  It may also
have fixed bug #5490 and bug #18072.

* lisp/progmodes/cc-engine.el (c-state-cache-non-literal-place): Remove thi
non-sensical function, replacing it with ....
(c-state-cache-lower-good-pos): New function.
(c-renarrow-state-cache, c-append-lower-brace-pair-to-state-cache)
(c-remove-stale-state-cache, c-remove-stale-state-cache-backwards): Instead of
altering the state-cache list structure with setcar and setcdr, use setq and
consing.
(c-parse-state-1): Call c-state-cache-lower-good-pos rather than
c-state-cache-non-literal-place.

4 years agoRemove unneeded font_is_ignored prototype
Robert Pluim [Thu, 14 Nov 2019 14:40:12 +0000 (15:40 +0100)]
Remove unneeded font_is_ignored prototype

* src/gtkutil.h: Remove unneeded prototype for font_is_ignored,
it's in font.h now.

4 years ago; Add explanation for face-ignored-fonts defaults
Robert Pluim [Thu, 14 Nov 2019 12:18:58 +0000 (13:18 +0100)]
; Add explanation for face-ignored-fonts defaults

4 years agoMerge branch 'master' of git.savannah.gnu.org:/srv/git/emacs
Eli Zaretskii [Thu, 14 Nov 2019 11:51:38 +0000 (13:51 +0200)]
Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs

4 years ago; * src/font.h (font_is_ignored): Add prototype to avoid warnings.
Eli Zaretskii [Thu, 14 Nov 2019 11:50:45 +0000 (13:50 +0200)]
; * src/font.h (font_is_ignored): Add prototype to avoid warnings.

4 years agoMerge branch 'scratch/so-long-updates'
Phil Sainty [Thu, 14 Nov 2019 11:43:46 +0000 (00:43 +1300)]
Merge branch 'scratch/so-long-updates'

4 years agoMake so-long disable flymake, flyspell, flycheck
Phil Sainty [Sat, 9 Nov 2019 06:52:06 +0000 (19:52 +1300)]
Make so-long disable flymake, flyspell, flycheck

* so-long.el (so-long-minor-modes): Add flymake-mode, flyspell-mode,
and flycheck-mode.

4 years agoSupport loading so-long.el on top of an earlier version
Phil Sainty [Mon, 21 Oct 2019 11:05:50 +0000 (00:05 +1300)]
Support loading so-long.el on top of an earlier version

* so-long.el (so-long-version, so-long--latest-version): New variables.

This enables users to safely load version 1.0 of so-long.el on top of
an earlier version, as well as making provisions for doing likewise
following any incompatible changes arising in future versions.

4 years agoBackwards-compatibility function definitions for so-long.el
Phil Sainty [Mon, 21 Oct 2019 11:01:59 +0000 (00:01 +1300)]
Backwards-compatibility function definitions for so-long.el

* so-long.el (so-long-inhibit-whitespace-mode)
(so-long-make-buffer-read-only, so-long-revert-buffer-read-only)
(so-long-inhibit-global-hl-line-mode): Restore dummy definitions of
now-obsolete hook functions used by earlier versions of so-long.el,
to support users who have saved these symbols in their customized
values for the hooks in question.

4 years ago* lisp/so-long.el (so-long-unload-function): Improved feature unload
Phil Sainty [Mon, 21 Oct 2019 11:00:16 +0000 (00:00 +1300)]
* lisp/so-long.el (so-long-unload-function): Improved feature unload

4 years ago; * lisp/so-long.el (so-long-predicate): Custom type consistency
Phil Sainty [Mon, 21 Oct 2019 10:57:55 +0000 (23:57 +1300)]
; * lisp/so-long.el (so-long-predicate): Custom type consistency

This is for consistency with the other function options, which all
used the 'radio' custom type.

4 years agoDefer triggering `so-long' until the buffer is displayed
Phil Sainty [Mon, 21 Oct 2019 10:52:29 +0000 (23:52 +1300)]
Defer triggering `so-long' until the buffer is displayed

* lisp/so-long.el (so-long-invisible-buffer-function): New user option.
(so-long--set-auto-mode): Use so-long-invisible-buffer-function.
(so-long-deferred): New function/value for so-long-invisible-buffer-function.
(so-long, so-long--disable): Support for so-long-deferred.

* test/lisp/so-long-tests/autoload-longlines-mode-tests.el
* test/lisp/so-long-tests/autoload-major-mode-tests.el
* test/lisp/so-long-tests/autoload-minor-mode-tests.el
* test/lisp/so-long-tests/so-long-tests.el:
Support for so-long-deferred.

Pre-existing tests have been updated to ensure the buffer is already
displayed in cases where a call to `normal-mode' is the (potential)
trigger for `so-long'.

4 years ago; Documentation and spelling
Phil Sainty [Mon, 21 Oct 2019 12:01:28 +0000 (01:01 +1300)]
; Documentation and spelling

* lisp/so-long.el: Documentation fixes.  For the purposes of
consistency, this reverts some of the changes made in commit
41ba8231ef072571e1a6feabc15d113e5cf57556, including one which
had introduced inconsistent spelling.

ispell configuration and LocalWords have been added such that
`ispell-buffer' should find no misspellings for this library.

* test/lisp/so-long-tests/spelling-tests.el (so-long-spelling):
New test to check the spelling using `ispell-buffer'.

4 years agoFix recent documentation changes
Eli Zaretskii [Thu, 14 Nov 2019 10:25:10 +0000 (12:25 +0200)]
Fix recent documentation changes

* doc/lispref/minibuf.texi (Multiple Queries): Move the
reference to 'read-char-from-minibuffer' from here...
* doc/lispref/commands.texi (Reading One Event): ...to here.
Fix the wording of the description of
'read-char-from-minibuffer'.

4 years agoMake GTK font chooser respect face-ignored-fonts
Robert Pluim [Wed, 13 Nov 2019 14:19:04 +0000 (15:19 +0100)]
Make GTK font chooser respect face-ignored-fonts

* src/font.c (font_delete_unmatched): Move Vface_ignored_fonts
matching to...
(font_is_ignored): ..Here.  New function.
* src/gtkutil.c (xg_font_filter): New function, uses font_is_ignored
to filter fonts.
(xg_get_font): Set GTK font chooser filter to xg_font_filter.
* src/gtkutil.h: Add prototype for font_is_ignored.

4 years agoObsolete rfc2047-quote-special-characters-in-quoted-strings (bug#38200)
Katsumi Yamaoka [Thu, 14 Nov 2019 08:27:58 +0000 (08:27 +0000)]
Obsolete rfc2047-quote-special-characters-in-quoted-strings (bug#38200)

* lisp/mail/rfc2047.el
(rfc2047-quote-special-characters-in-quoted-strings): Make obsolete
instead of removing it.

4 years agoRemove rfc2047-quote-special-characters-in-quoted-strings (bug#38200)
Katsumi Yamaoka [Thu, 14 Nov 2019 08:05:05 +0000 (08:05 +0000)]
Remove rfc2047-quote-special-characters-in-quoted-strings (bug#38200)

* lisp/mail/rfc2047.el
(rfc2047-quote-special-characters-in-quoted-strings): Remove function.
(rfc2047-encode-message-header, rfc2047-encode-region): Don't use it.

4 years ago(vc-default-update-on-retrieve-tag): Accept backend argument
Andrii Kolomoiets [Thu, 14 Nov 2019 07:18:22 +0000 (08:18 +0100)]
(vc-default-update-on-retrieve-tag): Accept backend argument

* lisp/vc/vc.el (vc-default-update-on-retrieve-tag): Accept
backend argument (bug#38156).  This fixes a bug introduced in the
previous patch.

4 years agoFix mouse-1 on Gnus article buffer buttons
Lars Ingebrigtsen [Thu, 14 Nov 2019 06:48:41 +0000 (07:48 +0100)]
Fix mouse-1 on Gnus article buffer buttons

* lisp/gnus/gnus-art.el (gnus-article-add-button): Make mouse-1
work as required by mouse-1-click-follows-link (bug#38144).

4 years agoVC: ability to skip update buffers prompt
Andrii Kolomoiets [Thu, 14 Nov 2019 05:55:28 +0000 (06:55 +0100)]
VC: ability to skip update buffers prompt

* lisp/vc/vc.el (vc-default-update-on-retrieve-tag): New function.
(vc-retrieve-tag): Call `update-on-retrieve-tag' backend function
to determine if prompt for update buffers is needed; Include tag
name into the "Retrieving tag" message.
* lisp/vc/vc-git.el (vc-git-update-on-retrieve-tag):
* lisp/vc/vc-hg.el (vc-hg-update-on-retrieve-tag):
* lisp/vc/vc-svn.el (vc-svn-udate-on-retrieve-tag): New functions.
Buffers update prompt on `vc-retrieve-tag' is omitted (bug#38156).