]> git.eshelyaron.com Git - emacs.git/log
emacs.git
4 years agoAdd unattended spell-checking to checkdoc
Damien Cassou [Fri, 27 Dec 2019 14:35:52 +0000 (15:35 +0100)]
Add unattended spell-checking to checkdoc

This commit makes checkdoc capable of spell-checking even when the
user isn't using it interactively.  When TAKE-NOTES is non-nil,
checkdoc will run spell-checking (with ispell) and report spelling
mistakes.

Fixes: (bug#38583).
* lisp/textmodes/ispell.el (ispell-word): Extract part of it to
`ispell--run-on-word`.
(ispell--run-on-word): New function, extracted from `ispell-word`.
(ispell-error-checking-word): New function.
(ispell-correct-p): New function.  Use `ispell--run-on-word` and
`ispell-error-checking-word`.
* lisp/emacs-lisp/checkdoc.el (checkdoc-current-buffer): Pass
TAKE-NOTES to `checkdoc-start`.
(checkdoc-continue): Pass TAKE-NOTES to `checkdoc-this-string-valid`.
(checkdoc-this-string-valid): Add optional argument TAKE-NOTES and
pass it to `checkdoc-this-string-valid-engine`.
(checkdoc-this-string-valid-engine): Add optional argument TAKE-NOTES
and pass it to `checkdoc-ispell-docstring-engine`.
(checkdoc-ispell-init): Call `ispell-set-spellchecker-params` and
`ispell-accept-buffer-local-defs`.  These calls are required to
properly use ispell.  The problem went unnoticed until now because
checkdoc was only using ispell through the high-level command
`ispell-word` which takes care of all the initialization for the user.
(checkdoc-ispell-docstring-engine): Add optional argument TAKE-NOTES
to force reporting of spell-checking errors.  Throw error
when (checkdoc-ispell-init) fails configuring ispell.  Replace a
few (if cond nil body) with (unless cond body). Replace (let ((var
nil))) with (let (var)).  Replace (if (not (eq checkdoc-autofix-flag
'never)) body) with just body because `checkdoc-autofix-flag` is
checked at the beginning of the function.

(cherry picked from commit 25adbc4a5ecc3e16625c0171607e3153bbdf7ab1)

4 years agoFix the error message from makefile-move-to-macro
Lin Sun [Fri, 17 Jan 2020 00:08:54 +0000 (16:08 -0800)]
Fix the error message from makefile-move-to-macro

* lisp/cedet/ede/makefile-edit.el (makefile-macro-file-list):
regexp-quote the param in makefile-move-to-macro (Bug#39094).

(cherry picked from commit a36495da1ec1419998c17fd64fb7439eaf940f36)

4 years ago; Fix recent markup change
Robert Pluim [Fri, 17 Jan 2020 07:53:29 +0000 (08:53 +0100)]
; Fix recent markup change

* doc/emacs/custom.texi (Find Init): Fix variable markup.

4 years ago; * lisp/obsolete/vc-arch.el: Add missing "Obsolete-since" tag.
Stefan Kangas [Fri, 17 Jan 2020 06:03:41 +0000 (07:03 +0100)]
; * lisp/obsolete/vc-arch.el: Add missing "Obsolete-since" tag.

4 years ago; * lisp/ezimage.el: Fix typo.
Stefan Kangas [Fri, 17 Jan 2020 05:34:00 +0000 (06:34 +0100)]
; * lisp/ezimage.el: Fix typo.

4 years agoDocument feature requests in the Emacs manual
Stefan Kangas [Thu, 16 Jan 2020 20:35:07 +0000 (21:35 +0100)]
Document feature requests in the Emacs manual

* doc/emacs/trouble.texi (Contributing): Document how to send feature
requests.  (Bug20697)

4 years ago* lisp/minibuffer.el (read-file-name-default): Fix bug#39057
Stefan Monnier [Thu, 16 Jan 2020 15:18:15 +0000 (10:18 -0500)]
* lisp/minibuffer.el (read-file-name-default): Fix bug#39057

4 years ago; * etc/NEWS: Fix some file name quotations.
Michael Albinus [Thu, 16 Jan 2020 15:17:26 +0000 (16:17 +0100)]
; * etc/NEWS: Fix some file name quotations.

4 years agoMake emacs prefer an existing ~/.emacs.d to an existing XDG location
Robert Pluim [Wed, 15 Jan 2020 11:24:43 +0000 (12:24 +0100)]
Make emacs prefer an existing ~/.emacs.d to an existing XDG location

* doc/emacs/custom.texi (Find Init): Update description of how Emacs
finds its init file directory and the interaction with
$XDG_CONFIG_HOME
(Early Init File): Correct XDG location of early-init.el

* etc/NEWS: Update description to make it clear the ~/.emacs.d is
preferred, even if the XDG location exists.

* lisp/startup.el: Prefer ~/.emacs.d even if the XDG location exists.

* lib-src/emacsclient.c (open_config): Prefer home directory the XDG
location.

4 years ago; etc/NEWS minor edits
Robert Pluim [Thu, 16 Jan 2020 09:39:40 +0000 (10:39 +0100)]
; etc/NEWS minor edits

4 years agoDescribe --with-cairo non-support for bitmapped fonts.
Robert Pluim [Thu, 16 Jan 2020 09:34:37 +0000 (10:34 +0100)]
Describe --with-cairo non-support for bitmapped fonts.

* etc/NEWS: Mention Pango's removal of support for bitmapped fonts.

4 years agoMention GTK font chooser changes in NEWS
Robert Pluim [Thu, 16 Jan 2020 09:33:01 +0000 (10:33 +0100)]
Mention GTK font chooser changes in NEWS

* etc/NEWS: Mention GTK font chooser changes.

4 years ago; Unmaintain fortran elisp
Glenn Morris [Thu, 16 Jan 2020 02:49:21 +0000 (18:49 -0800)]
; Unmaintain fortran elisp

4 years agof90: handle F2008 module function
Glenn Morris [Thu, 16 Jan 2020 02:47:51 +0000 (18:47 -0800)]
f90: handle F2008 module function

* lisp/progmodes/f90.el (f90-font-lock-keywords-1)
(f90-looking-at-program-block-start):
Handle F2008 "module function" and subroutine.  (Bug#38415)
* test/lisp/progmodes/f90-tests.el (f90-test-bug38415): New test.

4 years agoMove shell-related menu items to "Shell Commands" submenu (bug#37594)
Juri Linkov [Wed, 15 Jan 2020 23:30:33 +0000 (01:30 +0200)]
Move shell-related menu items to "Shell Commands" submenu (bug#37594)

* lisp/menu-bar.el (menu-bar-shell-commands-menu): New variable.
(menu-bar-tools-menu): Move shell-related menu items to
'menu-bar-shell-commands-menu' and add menu items for
'async-shell-command' and 'shell'.

4 years ago* admin/notes/font-backend: Remove outdated file. (Bug#34663)
Stefan Kangas [Wed, 15 Jan 2020 19:01:25 +0000 (20:01 +0100)]
* admin/notes/font-backend: Remove outdated file. (Bug#34663)

4 years agoDeclare the ftx font backend driver obsolete
Stefan Kangas [Wed, 15 Jan 2020 18:20:38 +0000 (19:20 +0100)]
Declare the ftx font backend driver obsolete

* etc/NEWS: Document that the ftx font driver is now
obsolete and will be removed in Emacs 28.  (Bug#34663)

4 years ago; Fix wording of a comment.
Eli Zaretskii [Wed, 15 Jan 2020 16:28:44 +0000 (18:28 +0200)]
; Fix wording of a comment.

* nt/inc/ms-w32.h (BROKEN_DATAGRAM_SOCKETS): Fix wording of
commentary.

4 years agoFix build failure with --with-cairo --without-png
YAMAMOTO Mitsuharu [Wed, 15 Jan 2020 08:10:30 +0000 (17:10 +0900)]
Fix build failure with --with-cairo --without-png

* src/image.c: Don't enable PNG section only by USE_CAIRO.

4 years agoAdd new node "Package Statuses" to manual
Stefan Kangas [Wed, 15 Jan 2020 01:20:01 +0000 (02:20 +0100)]
Add new node "Package Statuses" to manual

* doc/emacs/emacs.texi (Top):
* doc/emacs/package.texi (Package Menu): New node "Package
Statuses".  (Bug#29420)

4 years ago* lisp/isearch.el: Fix corner cases of isearch-lazy-count.
Juri Linkov [Wed, 15 Jan 2020 00:02:53 +0000 (02:02 +0200)]
* lisp/isearch.el: Fix corner cases of isearch-lazy-count.

* lisp/isearch.el (isearch-mode): Reset isearch-lazy-count-current
and isearch-lazy-count-total to nil, so when isearch-mode is started,
there should be no counts from previous Isearch.
(isearch-lazy-highlight-new-loop): Call isearch-message after resetting
lazy-count variables only when isearch-mode is started.  This avoids
the problem of inappropriate calls of isearch-message-function
when query-replace in the minibuffer performs lazy-highlighting that
used to call minibuffer-history-isearch-message unnecessarily.

4 years ago; * lisp/simple.el (messages-buffer): Doc fix. (Bug#39124)
Eli Zaretskii [Tue, 14 Jan 2020 15:46:39 +0000 (17:46 +0200)]
; * lisp/simple.el (messages-buffer): Doc fix.  (Bug#39124)

4 years agoDocument spacing issues with Xft for some fonts
Robert Pluim [Tue, 14 Jan 2020 09:49:28 +0000 (10:49 +0100)]
Document spacing issues with Xft for some fonts

* etc/PROBLEMS: Document issues with Xft and some recent fonts (Bug#39082).

4 years ago; * etc/NEWS: Fix typo.
Michael Albinus [Mon, 13 Jan 2020 20:11:46 +0000 (21:11 +0100)]
; * etc/NEWS: Fix typo.

4 years agoAlways use lexical-binding in lisp-interaction-mode (bug#38835)
Mattias Engdegård [Mon, 13 Jan 2020 13:53:11 +0000 (14:53 +0100)]
Always use lexical-binding in lisp-interaction-mode (bug#38835)

* lisp/progmodes/elisp-mode.el (lisp-interaction-mode):
Set lexical-binding.
* lisp/startup.el (command-line, startup--get-buffer-create-scratch):
Don't set lexical-binding here.
* doc/lispref/variables.texi:
* etc/NEWS:
Make it clear that lisp-interaction-mode uses lexical-binding.

4 years ago; *etc/NEWS: Fix typo.
Michael Albinus [Mon, 13 Jan 2020 15:03:15 +0000 (16:03 +0100)]
; *etc/NEWS: Fix typo.

4 years agovc-dir: ensure we don't use a pager with git
Robert Pluim [Fri, 10 Jan 2020 15:36:57 +0000 (16:36 +0100)]
vc-dir: ensure we don't use a pager with git

* lisp/vc/vc-git.el (vc-git--call): Call git with '--no-pager' to
avoid hangs caused by remote pager settings (Bug#38688).

4 years agoImprove ERC's matching of nicks and URLs (bug#38257)
Amin Bandali [Mon, 18 Nov 2019 15:24:48 +0000 (10:24 -0500)]
Improve ERC's matching of nicks and URLs (bug#38257)

* lisp/erc/erc-{button,match}.el (erc-{button,match}-syntax-table):
Omit (, ), and '; as they're not valid nick characters, per RFC 2812
section 2.3.1.  This enables correct matching/highlighting of nicks
when they're surrounded by parens, like (nick), and when adjacent to
an apostrophe, like nick's.
* lisp/erc/erc-button.el (erc-button-url-regexp): Use the regexp from
browse-url-button-regexp, which among other things, seems to handle
surrounding pair of parens better.

4 years agoHandle tab-bar clicks on a GPM-capable console.
Juri Linkov [Sun, 12 Jan 2020 23:23:12 +0000 (01:23 +0200)]
Handle tab-bar clicks on a GPM-capable console.

* src/term.c (handle_one_term_event): Call tty_handle_tab_bar_click.

* src/xdisp.c (tty_handle_tab_bar_click): Force reset of up_modifier bit
from the event modifiers.

* lisp/tab-line.el (tab-line-tab-current): No need to use inverse-video
on console/xterm because the selected tab already uses inverse-video.

4 years ago;* etc/TODO: Update.
Alan Third [Sun, 12 Jan 2020 14:54:44 +0000 (14:54 +0000)]
;* etc/TODO: Update.

4 years ago; * doc/lispref/anti.texi (Antinews): Fix typo.
Michael Albinus [Sat, 11 Jan 2020 13:14:11 +0000 (14:14 +0100)]
; * doc/lispref/anti.texi (Antinews): Fix typo.

4 years agoUpdate Acknowledgments sections
Eli Zaretskii [Sat, 11 Jan 2020 12:06:19 +0000 (14:06 +0200)]
Update Acknowledgments sections

* doc/emacs/ack.texi (Acknowledgments):
* doc/emacs/emacs.texi (Acknowledgments): Update for Emacs 27.

4 years agoUpdate Antinews in ELisp manual
Eli Zaretskii [Sat, 11 Jan 2020 11:36:07 +0000 (13:36 +0200)]
Update Antinews in ELisp manual

* doc/lispref/anti.texi (Antinews): Rewrite for Emacs 27.
* doc/lispref/elisp.texi (Top): Update the top-level menu item for
Antinews.

4 years ago; Move the description of define-inline to a different node in functions.texi
Richard Stallman [Sun, 5 Jan 2020 22:21:41 +0000 (17:21 -0500)]
; Move the description of define-inline to a different node in functions.texi

4 years agoImprove wording in the ELisp manual
Richard Stallman [Wed, 1 Jan 2020 23:18:44 +0000 (18:18 -0500)]
Improve wording in the ELisp manual

* doc/lispref/modes.texi (Setting Hooks): Improve and clarify
wording.  (Bug#38818)

4 years agoReset to the standard value when reverting session's customizations
Mauro Aranda [Mon, 30 Dec 2019 21:10:28 +0000 (18:10 -0300)]
Reset to the standard value when reverting session's customizations

* lisp/cus-edit.el (custom-variable-reset-saved): When there is no
previous saved value, reset to the standard value.  (Bug#15214)

4 years agoFix saving multiple themes
Mauro Aranda [Mon, 6 Jan 2020 14:04:29 +0000 (11:04 -0300)]
Fix saving multiple themes

* lisp/custom.el (enable-theme): Be side-effect free when modifying
custom-enabled-themes.  (Bug#19999)

4 years agoCalc: fix interval entry (bug#39040)
Mattias Engdegård [Fri, 10 Jan 2020 18:49:56 +0000 (19:49 +0100)]
Calc: fix interval entry (bug#39040)

* lisp/calc/calc.el (calcDigit-start): Initialise calc-prev-char to
something more reasonable, so that non-algebraic entry of intervals
whose start is a single digit, like (1..10), works properly.
Reported by Michel Schinz.

4 years agoFix horizontal line display in Custom buffers
Eli Zaretskii [Fri, 10 Jan 2020 19:02:52 +0000 (21:02 +0200)]
Fix horizontal line display in Custom buffers

* lisp/cus-edit.el (custom-group-value-create): Insert a newline
before calling 'custom-group--draw-horizontal-line'.  (Bug#39074)

4 years ago; * etc/NEWS: Fix a typo.
Eli Zaretskii [Fri, 10 Jan 2020 18:44:56 +0000 (20:44 +0200)]
; * etc/NEWS: Fix a typo.

4 years agoflymake: fix typo in variable binding (bug#38752)
Mattias Engdegård [Fri, 10 Jan 2020 17:12:32 +0000 (18:12 +0100)]
flymake: fix typo in variable binding (bug#38752)

This mistake was found by an experimental elisp optimiser.

* lisp/progmodes/flymake-proc.el (flymake-proc-stop-all-syntax-checks):
Add missing brackets.

4 years ago; Minor spelling fixes
Robert Pluim [Fri, 10 Jan 2020 15:42:10 +0000 (16:42 +0100)]
; Minor spelling fixes

* doc/emacs/anti.texi (Antinews): Minor spelling fixes.

4 years agoUpdate Antinews in the Emacs manual
Eli Zaretskii [Fri, 10 Jan 2020 10:28:06 +0000 (12:28 +0200)]
Update Antinews in the Emacs manual

* doc/emacs/anti.texi (Antinews): Rewrite for Emacs 27.
* doc/emacs/emacs.texi (Top): Update the "Antiniews" item of the
top-level menu.

4 years agoUse NSNumber instead of BOOL (bug#39047)
Väinö Järvelä [Thu, 9 Jan 2020 06:01:59 +0000 (08:01 +0200)]
Use NSNumber instead of BOOL (bug#39047)

* src/nsfns.m (ns_set_represented_filename): Use correct type.

Copyright-paperwork-exempt: yes

4 years agoAdd comment on fido-mode's file-sorting semantics
João Távora [Thu, 9 Jan 2020 10:07:45 +0000 (10:07 +0000)]
Add comment on fido-mode's file-sorting semantics

* lisp/icomplete.el (icomplete--sorted-completions): Add comment.

4 years agoConsider non-string minibuffer-default in icomplete
João Távora [Thu, 9 Jan 2020 10:01:16 +0000 (10:01 +0000)]
Consider non-string minibuffer-default in icomplete

Fixes: bug#38992
* lisp/icomplete.el (icomplete--sorted-completions): Consider
non-string minibuffer-default.

4 years agoFix another compilation problem in a build without threads
Eli Zaretskii [Wed, 8 Jan 2020 20:00:36 +0000 (22:00 +0200)]
Fix another compilation problem in a build without threads

* src/systhread.c (sys_thread_set_name) [!THREADS_ENABLED]: Add
a trivial implementation.

4 years agoFix build without threads
Eli Zaretskii [Wed, 8 Jan 2020 18:53:00 +0000 (20:53 +0200)]
Fix build without threads

* src/systhread.c (sys_thread_create) [!THREADS_ENABLED]: Update
the function's signature to match prototype.  Reported by Glenn
Morris <rgm@gnu.org>.  (Bug#38632)

4 years agoFix compression of directories in Dired
Eli Zaretskii [Wed, 8 Jan 2020 16:21:53 +0000 (18:21 +0200)]
Fix compression of directories in Dired

This fixes comporession and uncompression of directories on
MS-Windows, but also on other systems.  The original code used
":" as the REGEXP of the directory entry in
dired-compress-file-suffixes, which on Windows always matched any
absolute file name, and can also match unusual file names on Posix
hosts.  This false match would cause dired-compress-file to act as
if we are decompressing a directory, but use a command suitable
for compression, which would fail in interesting ways.
We now use a REGEXP that can never match any valid file name.

* lisp/dired-aux.el (dired-compress-file-suffixes): Make the
"compress directory" entry's REGEXP really fail to match any valid
file name.
(dired-compress-file): Adapt to the change in
dired-compress-file-suffixes.  (Bug#39024)
(dired-compress): If the current file is a directory, or if the
uncompressed file is a directory, don't remove the original from
the listing, since it is left in the filesystem.

4 years ago; * etc/NEWS: Review of the whole text.
Michael Albinus [Wed, 8 Jan 2020 13:44:18 +0000 (14:44 +0100)]
; * etc/NEWS: Review of the whole text.

4 years agoFurther enhancement on `tramp-file-local-name'
Michael Albinus [Wed, 8 Jan 2020 08:54:04 +0000 (09:54 +0100)]
Further enhancement on `tramp-file-local-name'

* lisp/net/tramp.el (tramp-file-local-name): Call `file-local-name'
if NAME is not a Tramp file name.

4 years agoObjective C Mode imenu: cease recognizing "functions" within comments, etc.
Alan Mackenzie [Tue, 7 Jan 2020 20:07:24 +0000 (20:07 +0000)]
Objective C Mode imenu: cease recognizing "functions" within comments, etc.

This fixes bug #38749.

* lisp/progmodes/cc-menus.el (cc-imenu-objc-function): Put a c-literal-limits
test around the innards of the main re-search-backward loop.

4 years ago; * etc/NEWS: Update the text about the XDG_CONFIG_HOME/emacs behavior.
Eli Zaretskii [Tue, 7 Jan 2020 17:41:02 +0000 (19:41 +0200)]
; * etc/NEWS: Update the text about the XDG_CONFIG_HOME/emacs behavior.

4 years agoFix BSD and macOS builds w.r.t. pthread_setname_np (bug#38632)
Mattias Engdegård [Tue, 7 Jan 2020 16:08:25 +0000 (17:08 +0100)]
Fix BSD and macOS builds w.r.t. pthread_setname_np (bug#38632)

pthread_setname_np takes only a single argument on BSD and macOS,
and affects the current thread only.

* configure.ac: Add check for single-argument pthread_setname_np
* src/systhread.c (sys_thread_set_name): New (w32 and pthread versions).
(sys_thread_create): Remove name argument and name-setting.
(w32_beginthread_wrapper): Remove name-setting.
* src/systhread.h (sys_thread_create, sys_thread_set_name):
Update prototypes.
* src/thread.c (run_thread): Call sys_thread_set_name.
(Fmake_thread): Adapt call to sys_thread_create.
* src/thread.h (struct thread_state): Adjust comment.

4 years agoScale top-left coordinates in display-monitor-attributes-list
Robert Pluim [Tue, 7 Jan 2020 13:41:52 +0000 (14:41 +0100)]
Scale top-left coordinates in display-monitor-attributes-list

When using multiple monitors, and HiDPI, the top-left coordinates of
the monitors need to be adjusted, not just the width and height
(Bug#31223).

* xfns.c (Fx_display_monitor_attributes_list): Scale top-left
coordinates.

4 years agoxref-matches-in-files: Big Tramp speed-up
Dmitry Gutov [Tue, 7 Jan 2020 13:30:25 +0000 (16:30 +0300)]
xref-matches-in-files: Big Tramp speed-up

* lisp/progmodes/xref.el (xref-matches-in-files):
Greatly improve performance with remote files using Tramp
(bug#34343).

4 years ago* lisp/net/tramp.el (tramp-file-local-name): Remove `save-match-data'.
Michael Albinus [Tue, 7 Jan 2020 12:10:35 +0000 (13:10 +0100)]
* lisp/net/tramp.el (tramp-file-local-name): Remove `save-match-data'.

4 years agoFix rendering bug due to unsynchronized cairo surface size (Bug#38497)
YAMAMOTO Mitsuharu [Tue, 7 Jan 2020 03:42:19 +0000 (12:42 +0900)]
Fix rendering bug due to unsynchronized cairo surface size (Bug#38497)

* src/xterm.c (handle_one_xevent) <ConfigureNotify> [USE_CAIRO && !USE_GTK]:
Call x_cr_update_surface_desired_size for a related frame as a fallback.

4 years agoAvoid crash by access to cleared img->pixmap->data/img->mask->data (Bug#38774)
YAMAMOTO Mitsuharu [Tue, 7 Jan 2020 03:32:42 +0000 (12:32 +0900)]
Avoid crash by access to cleared img->pixmap->data/img->mask->data (Bug#38774)

* src/image.c (prepare_image_for_display) [USE_CAIRO]: Call IMAGE_BACKGROUND
and IMAGE_BACKGROUND_TRANSPARENT.

4 years agoAvoid assertion violations in very small-height windows
Eli Zaretskii [Mon, 6 Jan 2020 19:49:24 +0000 (21:49 +0200)]
Avoid assertion violations in very small-height windows

* src/xdisp.c (try_cursor_movement, redisplay_window)
(row_containing_pos): Skip tab-line glyph rows in addition to
header-line rows, when working on the top-most glyph row of a
window.  This avoids assertion violations in set_cursor_from_row.
(Bug#38966)

4 years agoUse pthread_setname_np to set thread name
Robert Pluim [Thu, 19 Dec 2019 16:33:16 +0000 (17:33 +0100)]
Use pthread_setname_np to set thread name

* configure.ac: Remove check for sys/prctl.h and prctl, check for
pthread_setname_np instead.

* systhread.c: Remove sys/prctl.h include.
(sys_thread_create) [HAVE_PTHREAD_SETNAME_NP]: Use pthread_setname_np
to set the name of the newly created thread (Bug#38632).

* thread.c (Fmake_thread): Use ENCODE_SYSTEM instead of
ENCODE_UTF_8 on the thread name.

4 years agoMove “Fix some broken conditional forms” to master
Paul Eggert [Sun, 5 Jan 2020 19:48:59 +0000 (11:48 -0800)]
Move “Fix some broken conditional forms” to master

Revert 2020-01-04T19:17:12Z!eggert@cs.ucla.edu
which recently I installed into the emacs-27 branch by mistake.
These patches are now on master instead (via merging).
Do not merge to master.

4 years agoImprove doc-strings of 'quit-window' and 'quit-restore-window' (Bug#38819)
Martin Rudalics [Sun, 5 Jan 2020 08:59:01 +0000 (09:59 +0100)]
Improve doc-strings of 'quit-window' and 'quit-restore-window' (Bug#38819)

* lisp/window.el (quit-restore-window, quit-window): Make
doc-strings more consistent; add references to corresponding
section of the Elisp manual (Bug#38819).

4 years agoFix MH-E bug #470: Show buffer discards text properties
Stephen Gildea [Sat, 4 Jan 2020 23:28:07 +0000 (15:28 -0800)]
Fix MH-E bug #470: Show buffer discards text properties

* lisp/mh-e/mh-show.el (mh-display-msg): reset font lock and set
major mode *before* formatting message content.  This changes lets
fonts work when the Show buffer is reused for a new message.
(mh-show-mode): no longer set buffer-read-only; that is better done
by mh-display-msg after setting all content.

4 years agoFix some broken conditional forms
Paul Eggert [Sat, 4 Jan 2020 19:17:12 +0000 (11:17 -0800)]
Fix some broken conditional forms

Problem reported by Mattias Engdegård in:
https://lists.gnu.org/r/emacs-devel/2020-01/msg00088.html
* lisp/cedet/ede/cpp-root.el (ede-create-lots-of-projects-under-dir):
Remove this quick hack, which didn’t do anything anyway.
* lisp/cedet/ede/pconf.el (ede-proj-configure-test-required-file):
* lisp/emacs-lisp/tabulated-list.el (tabulated-list-print-col):
* lisp/net/nsm.el (nsm-check-tls-connection):
Use ‘when’ rather than bypassing it.  This doesn’t affect behavior
and is better style.
* lisp/cedet/srecode/semantic.el (srecode-semantic-handle-:tag):
Fix typo that suppressed an error.
* lisp/filesets.el (filesets-run-cmd): Fix typo that mishandled spacing.
* lisp/gnus/gnus-cloud.el (gnus-cloud-update-newsrc-data):
Fix typo that caused “GROUP has older different info in the cloud
as of DATE, update it here?” prompt result to always be treated as
“yes”.
* lisp/gnus/mml-smime.el (mml-smime-openssl-encrypt): Simplify,
since smime-encrypt-buffer signals error on failure.
* lisp/international/titdic-cnv.el (tsang-quick-converter): Simplify.
The conversion of this file to utf-8-emacs in
2019-01-08T02:18:40Z!monnier@iro.umontreal.ca removed the
distinction between Big5 and CNS fulltitles in the generated docstring.
* lisp/org/org-agenda.el (org-agenda-show-and-scroll-up):
* lisp/textmodes/table.el (table--generate-source-cell-contents):
Simplify by removing useless code.
* lisp/org/ox-odt.el (org-odt--format-timestamp): Fix typo that
always output time-of-day even when the timestamp lacked it.

4 years agoFix a scoping error in tramp-sudoedit.el
Michael Albinus [Sat, 4 Jan 2020 13:00:39 +0000 (14:00 +0100)]
Fix a scoping error in tramp-sudoedit.el

* lisp/net/tramp-sudoedit.el (tramp-sudoedit-handle-file-system-info):
Fix a scoping error.

4 years ago* lisp/autorevert.el (auto-revert-notify-handler): Fix bracketing.
Mattias Engdegård [Fri, 3 Jan 2020 23:01:42 +0000 (00:01 +0100)]
* lisp/autorevert.el (auto-revert-notify-handler): Fix bracketing.

4 years agoFix typo in 'window_box_height'
Martin Rudalics [Sat, 4 Jan 2020 08:43:13 +0000 (09:43 +0100)]
Fix typo in 'window_box_height'

* src/xdisp.c (window_box_height): Add missing 'else'.

4 years agoInstall g++ for CEDET tests
Mattias Engdegård [Fri, 3 Jan 2020 13:08:23 +0000 (14:08 +0100)]
Install g++ for CEDET tests

* .gitlab-ci.yml (before_script): Add g++.
Backport from master.

4 years ago* lisp/net/tramp.el: Fix typos.
Michael Albinus [Fri, 3 Jan 2020 18:33:10 +0000 (19:33 +0100)]
* lisp/net/tramp.el: Fix typos.

4 years ago* lisp/net/tramp.el (tramp-file-local-name): New defun. (Bug#34343)
Michael Albinus [Fri, 3 Jan 2020 12:20:32 +0000 (13:20 +0100)]
* lisp/net/tramp.el (tramp-file-local-name): New defun.  (Bug#34343)

4 years agoAdapt commentary in Tramp persistency file
Michael Albinus [Fri, 3 Jan 2020 12:19:24 +0000 (13:19 +0100)]
Adapt commentary in Tramp persistency file

* lisp/net/tramp-cache.el (tramp-dump-connection-properties):
Adapt commentary in `tramp-persistency-file-name'.

4 years agoChange Tramp version to 2.4.3.27.1
Michael Albinus [Fri, 3 Jan 2020 12:18:52 +0000 (13:18 +0100)]
Change Tramp version to 2.4.3.27.1

* doc/misc/trampver.texi:
* lisp/net/trampver.el: Change version to "2.4.3.27.1".
(customize-package-emacs-version-alist): Add Tramp version
integrated in Emacs 27.1.

4 years ago; * src/dispnew.c (adjust_glyph_matrix): Fix last change.
Eli Zaretskii [Fri, 3 Jan 2020 08:19:23 +0000 (10:19 +0200)]
; * src/dispnew.c (adjust_glyph_matrix): Fix last change.

4 years agoFix redisplay when mode-line-format changes mode-line's height
Eli Zaretskii [Fri, 3 Jan 2020 07:28:35 +0000 (09:28 +0200)]
Fix redisplay when mode-line-format changes mode-line's height

* lisp/frame.el (top-level): Add mode-line-format,
tab-line-format, and header-line-format to the list of variables
that should trigger an immediate redisplay of the buffer's
window.  This fixes redisplay of windows when the mode line
changes its height.

* src/xdisp.c (window_box_height): Use the window's
mode_line_height, tab_line_height, and header_line_height fields
in preference to CURRENT_MODE_LINE_HEIGHT,
CURRENT_TAB_LINE_HEIGHT, and CURRENT_HEADER_LINE_HEIGHT,
respectively.  This fixes display of vertical scroll bar when the
height of the window's mode line changes.
* src/dispnew.c (adjust_glyph_matrix): When resizing a window's
matrix, reset the mode_line_p flag of the previous mode-line row,
so that the window_box_height, CURRENT_MODE_LINE_HEIGHT, and their
ilk won't use stale info.  (Bug#38828)

4 years ago* src/fileio.c (Fwrite_region): Improve the doc string.
Eli Zaretskii [Thu, 2 Jan 2020 17:34:30 +0000 (19:34 +0200)]
* src/fileio.c (Fwrite_region): Improve the doc string.

4 years agoFix removal of frame decorations on Windows (Bug#38705)
Martin Rudalics [Thu, 2 Jan 2020 08:35:49 +0000 (09:35 +0100)]
Fix removal of frame decorations on Windows (Bug#38705)

* src/w32fns.c (w32_set_undecorated): Actualize
f->output_data.w32->dwStyle for subsequent calls of
AdjustWindowRect (Bug#38705).
* src/w32term.h (struct w32_output): Add comment for
dwstyle slot.

4 years agoFix compilation with GTK versions older than 3
Eli Zaretskii [Wed, 1 Jan 2020 17:55:35 +0000 (19:55 +0200)]
Fix compilation with GTK versions older than 3

* src/xfns.c (x_get_net_workarea): Change a recently moved #ifndef
so that GTK builds which need this function will compile it.
Reported by John <jpff@codemist.co.uk>.

(cherry picked from commit d36adb544d984b91c70f6194da01344e4b2b6fc9)

4 years agoFix reverting customizations
Eli Zaretskii [Wed, 1 Jan 2020 17:49:57 +0000 (19:49 +0200)]
Fix reverting customizations

* lisp/custom.el (custom-push-theme): Don't use setcar to modify
the recorded value of PROP; instead, cons a new property list by
deleting the old value and adding the new one.  (Bug#38812)

4 years ago* lisp/loadup.el: Set max-specpdl-size to 1800 when loading cl-generic.el.
Mattias Engdegård [Wed, 1 Jan 2020 16:35:01 +0000 (17:35 +0100)]
* lisp/loadup.el: Set max-specpdl-size to 1800 when loading cl-generic.el.

4 years agoRevert "Raise default max-specpdl-size value"
Mattias Engdegård [Wed, 1 Jan 2020 16:22:35 +0000 (17:22 +0100)]
Revert "Raise default max-specpdl-size value"

This reverts commit bb9402e6e9c12938aee31b81e25511eb1f6335d2.

4 years ago; Fix NEWS.24
Eli Zaretskii [Wed, 1 Jan 2020 16:30:58 +0000 (18:30 +0200)]
; Fix NEWS.24

* etc/NEWS.24: Minor retroactive wording changes and additions to
fix the version shown by Help commands.  (Bug#38844)

4 years agoRaise default max-specpdl-size value
Mattias Engdegård [Wed, 1 Jan 2020 15:35:54 +0000 (16:35 +0100)]
Raise default max-specpdl-size value

Occasionally, loading cl-generic.el from source requires
max_specpdl_size > 1600 when bootstrapping, and thus fails.
In any case we are very close to the limit.

* src/eval.c (init_eval_once): Raise max_specpdl_size to 1800.
* doc/lispref/variables.texi (Local Variables): Update docs.

4 years ago; Auto-commit of loaddefs files.
Glenn Morris [Wed, 1 Jan 2020 14:14:47 +0000 (06:14 -0800)]
; Auto-commit of loaddefs files.

4 years agoUpdate distribution documentation
Phillip Lord [Wed, 1 Jan 2020 10:50:14 +0000 (11:50 +0100)]
Update distribution documentation

* admin/nt/README-ftp-server: Remove as obsolete
* admin/nt/dist-build/README-windows-binaries: Add information
  about installer

4 years agoPacify gcc -Wunused-function on Ubuntu 18.04.3
Paul Eggert [Wed, 1 Jan 2020 01:03:14 +0000 (01:03 +0000)]
Pacify gcc -Wunused-function on Ubuntu 18.04.3

This improves on 2019-12-25T20:01:07Z!eggert@cs.ucla.edu,
by fixing a GCC warning on Ubuntu 18.04.3
“‘x_get_net_workarea’ defined but not used”.
* src/xfns.c (x_get_net_workarea) [!USE_GTK]: Do not define.

4 years agoFix copyright years by hand
Paul Eggert [Wed, 1 Jan 2020 01:01:53 +0000 (01:01 +0000)]
Fix copyright years by hand

These are dates that admin/update-copyright did not update.

4 years agoUpdate copyright year to 2020
Paul Eggert [Wed, 1 Jan 2020 00:19:43 +0000 (00:19 +0000)]
Update copyright year to 2020

Run "TZ=UTC0 admin/update-copyright $(git ls-files)".

4 years ago; * etc/NEWS: Make the description of XDG fallback more accurate.
Eli Zaretskii [Tue, 31 Dec 2019 19:28:54 +0000 (21:28 +0200)]
; * etc/NEWS: Make the description of XDG fallback more accurate.

4 years agoDon't always resort in recently introduced icomplete--sorted-completions
João Távora [Wed, 25 Dec 2019 19:18:17 +0000 (19:18 +0000)]
Don't always resort in recently introduced icomplete--sorted-completions

Doing so breaks icomplete-forward-completions and
icomplete-backward-completions.

* lisp/icomplete.el (icomplete--sorted-completions): Don't always
resort.

(cherry picked from commit 639fb50ed4c622f99dfbde32fbdbca42ce36d385)

4 years agoDon't force completion recalculation in icomplete-fido-ret
João Távora [Wed, 25 Dec 2019 17:57:20 +0000 (17:57 +0000)]
Don't force completion recalculation in icomplete-fido-ret

Besides the adverse effect of delaying completions, it tripped up the
useful logic of icomplete-force-complete-and-exit in the case where a
default was available, but no completions calculated yet.

* lisp/icomplete.el (icomplete-fido-ret): Don't force calculation
of completions.

(cherry picked from commit 13778aa5be7bf028893672d84c2a291f491d8216)

4 years agoCorrectly cache sorted completions in icomplete--sorted-completions
João Távora [Wed, 25 Dec 2019 17:54:00 +0000 (17:54 +0000)]
Correctly cache sorted completions in icomplete--sorted-completions

* lisp/icomplete.el (icomplete--sorted-completions): Use
completion--cache-all-sorted-completions.

(cherry picked from commit 83587bb68830bd91124f99ddf8590d1d5f63869f)

4 years agoMove flex style's minibuffer-default-aware sorting to lisp/icomplete.el
João Távora [Tue, 24 Dec 2019 10:40:39 +0000 (10:40 +0000)]
Move flex style's minibuffer-default-aware sorting to lisp/icomplete.el

This moves the logic from the series of commits starting in the commit named:

  Improve sorting of flex completion style with non-nil minibuffer-default

to lisp/icomplete.el, so far the only confirmed beneficiary of that
functionality.

* lisp/icomplete.el (icomplete--sorted-completions): Consider
minibuffer-default here.

* lisp/minibuffer.el (completion--flex-adjust-metadata): Simplify.

(cherry picked from commit 0d2a711dc9a65dc8eb6e995369e70cddbcd7d9a4)

4 years agoMake fido-mode behave more like ido-mode when finding directories
João Távora [Mon, 23 Dec 2019 23:43:30 +0000 (23:43 +0000)]
Make fido-mode behave more like ido-mode when finding directories

Notably C-x d (M-x dired) and C-x v d (M-x vc-dir) behaved quite
differently, having regular files as the default instead of ido's
usual "./".

* lisp/icomplete.el (icomplete--sorted-completions): New helper.
(icomplete-completions): Use it.

(cherry picked from commit ee914051fbb4fbff9073a23b5ea7668bf48b5c6a)

4 years agoSlightly simplify lisp/icomplete.el with new icomplete--category helper
João Távora [Mon, 23 Dec 2019 23:19:01 +0000 (23:19 +0000)]
Slightly simplify lisp/icomplete.el with new icomplete--category helper

* lisp/icomplete.el (icomplete-fido-kill)
(icomplete-fido-delete-char, icomplete-fido-ret)
(icomplete-fido-backward-updir, icomplete-exhibit): Use
icomplete--category.
(icomplete--category): New helper.

(cherry picked from commit 24a1f520f91c278cb8cc57325ea80285a3b252cf)

4 years agoAnother adjustment to flex completion style's sorting function
João Távora [Mon, 23 Dec 2019 23:11:59 +0000 (23:11 +0000)]
Another adjustment to flex completion style's sorting function

* lisp/minibuffer.el (completion--flex-adjust-metadata): Adjust
case when minibuffer-default is non-nil.

(cherry picked from commit 9c912049927cfb18b9c8b37039b38ddf51f2fe81)

4 years ago; * test/lisp/calc/calc-tests.el: Fix warnings
Mattias Engdegård [Mon, 30 Dec 2019 14:24:13 +0000 (15:24 +0100)]
; * test/lisp/calc/calc-tests.el: Fix warnings

4 years agoMake minibuffer-tests work in out-of-tree builds (bug#38816)
Mattias Engdegård [Mon, 30 Dec 2019 14:40:13 +0000 (15:40 +0100)]
Make minibuffer-tests work in out-of-tree builds (bug#38816)

* test/lisp/minibuffer-tests.el (completion-table-test-quoting):
Set default-directory.

4 years agoMake comint-tests more robust (bug#38813)
Mattias Engdegård [Mon, 30 Dec 2019 13:10:02 +0000 (14:10 +0100)]
Make comint-tests more robust (bug#38813)

* test/lisp/comint-tests.el (comint-test-no-password-function)
(comint-test-password-function-with-value)
(comint-test-password-function-with-nil):
Call accept-process-output as many times as needed, with a slightly
more generous timeout (100 ms), after sending the Password: prompt to
the process, since there must be time for some back-and-forth
communication.  Also clear the process-query-on-exit flag, since it
doesn't go well with noninteractive tests.

4 years agoFix tar-mode reading the oldgnu Tar format
Eli Zaretskii [Mon, 30 Dec 2019 16:17:03 +0000 (18:17 +0200)]
Fix tar-mode reading the oldgnu Tar format

This makes sure an entry for a long file name will not
accidentally appear as a directory, and thus its size will be
disregarded, causing corrupted file headers for all the subsequent
entries.  The original problem happened because the long file name
truncated to 99 bytes happened to end in a slash, which tar-mode
takes to be the indication of a directory.
* lisp/tar-mode.el (tar-header-block-tokenize): Accept an
additional argument DISABLE-SLASH; if non-nil, don't set the
link-type field of the descriptor to 5 (meaning a directory) just
because the name ends in a slash.  Use this argument when calling
itself recursively, to read the entry of the file with a long
name.  Set the link-type to 5 if the long name ends in a slash.
(Bug#38777)