]> git.eshelyaron.com Git - emacs.git/log
emacs.git
4 years agoMerge from origin/emacs-27
Paul Eggert [Sun, 8 Mar 2020 08:20:57 +0000 (00:20 -0800)]
Merge from origin/emacs-27

0a3682a566 * src/timefns.c: Add comments.
b16ba4041d ; lisp/emacs-lisp/seq.el: Explain why we don't use cl-lib ...
3cbf4cb796 Eliminate use of cl-concatenate in 'seq' package
363d927086 Fix bug with JIT stealth timers
818333c85a * doc/lispref/os.texi (time-subtract): Doc fix.

4 years ago* src/timefns.c: Add comments.
Paul Eggert [Sun, 8 Mar 2020 08:16:17 +0000 (00:16 -0800)]
* src/timefns.c: Add comments.

4 years ago* lisp/emacs-lisp/bytecomp.el: Drop warning for loading into Emacs<23
Stefan Monnier [Sun, 8 Mar 2020 04:28:12 +0000 (23:28 -0500)]
* lisp/emacs-lisp/bytecomp.el: Drop warning for loading into Emacs<23

Stash the major version of the compiling Emacs such that the loading
Emacs can later detect when loading a file compiled by a too-new Emacs.

(byte-compile-fix-header): Remove.
(byte-compile-from-buffer): Don't call it any more.
(byte-compile-insert-header): Stash the emacs-major-version in it.
Don't leave space for `byte-compile-fix-header`.

4 years ago; lisp/emacs-lisp/seq.el: Explain why we don't use cl-lib here
Noam Postavsky [Sat, 7 Mar 2020 23:45:23 +0000 (18:45 -0500)]
; lisp/emacs-lisp/seq.el: Explain why we don't use cl-lib here

4 years agoEliminate use of cl-concatenate in 'seq' package
Andrew Eggenberger [Fri, 28 Feb 2020 03:43:47 +0000 (21:43 -0600)]
Eliminate use of cl-concatenate in 'seq' package

Fixes (Bug#39761) by making cl-extra dependent on seq rather than
vice versa.
* lisp/emacs-lisp/seq.el (seq-concatenate): Move cl-concatenate's
code here instead of calling it.
* lisp/emacs-lisp/cl-extra.el (cl-concatenate): Use cl-concatenate.

Copyright-paperwork-exempt: yes

4 years agoSkip filenotify tests on hydra.nixos.org
Glenn Morris [Sat, 7 Mar 2020 20:16:44 +0000 (12:16 -0800)]
Skip filenotify tests on hydra.nixos.org

They frequently hang for hours.
* test/lisp/filenotify-tests.el
(file-notify--test-remote-enabled-checked): Default to off on hydra.

4 years agoAdd ‘nofollow’ flag to set-file-times
Paul Eggert [Sat, 7 Mar 2020 20:04:05 +0000 (12:04 -0800)]
Add ‘nofollow’ flag to set-file-times

This is a companion to the recent set-file-modes patch.
It adds support for a ‘nofollow’ flag to set-file-times (Bug#39773).
Like the set-file-modes patch, it needs work in the w32 port.
* admin/merge-gnulib (GNULIB_MODULES): Add futimens, utimensat.
Remove utimens.
* doc/lispref/files.texi (Changing Files):
* etc/NEWS: Mention the change.
* lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
* lisp/files.el (copy-directory):
* lisp/gnus/gnus-cloud.el (gnus-cloud-replace-file):
* lisp/net/tramp-adb.el (tramp-adb-handle-copy-file):
* lisp/net/tramp-smb.el (tramp-smb-handle-copy-file):
* lisp/tar-mode.el (tar-copy):
* test/lisp/filenotify-tests.el (file-notify-test03-events):
* test/lisp/files-tests.el:
(files-tests-file-name-non-special-set-file-times):
* test/lisp/net/tramp-tests.el (tramp-test22-file-times):
When setting file times, avoid following symbolic links
when the file is not supposed to be a symbolic link.
* lib/futimens.c, lib/utimensat.c, m4/futimens.m4, m4/utimensat.m4:
New files, copied from Gnulib.
* lisp/gnus/gnus-cloud.el (gnus-cloud-replace-file):
When creating a file that is not supposed to exist already,
use the excl flag to check this.
* lisp/net/tramp-adb.el (tramp-adb-handle-set-file-times):
* lisp/net/tramp-sh.el (tramp-sh-handle-set-file-times):
* lisp/net/tramp-sudoedit.el (tramp-sudoedit-handle-set-file-times):
Accept an optional FLAG arg that is currently ignored,
and add a FIXME comment for it.
* lisp/net/tramp-gvfs.el (tramp-gvfs-handle-set-file-times):
* src/fileio.c (Fset_file_times):
Support an optional FLAG arg.
* src/fileio.c (Fcopy_file): Use futimens instead of set_file_times,
as it’s simpler and is a POSIX API.
* src/sysdep.c (set_file_times): Move from here ...
* src/w32.c (set_file_times): ... to here, and make it static,
since it is now used only in w32.c.  Presumably w32.c should also
add support for futimens and utimensat (the POSIX APIs, which
Emacs now uses) and it can remove fdutimens (the Gnulib API,
which Emacs no longer uses).

4 years agoUpdate from Gnulib
Paul Eggert [Sat, 7 Mar 2020 19:58:20 +0000 (11:58 -0800)]
Update from Gnulib

This incorporates:
2020-03-07 open, openat: port to (O_RDWR | O_RDONLY) != 0
* lib/open.c: Copy from Gnulib.

4 years agoFix bug with JIT stealth timers
Paul Eggert [Sat, 7 Mar 2020 17:47:03 +0000 (09:47 -0800)]
Fix bug with JIT stealth timers

* lisp/emacs-lisp/timer.el (run-at-time): Don’t assume that Lisp
time values must be conses (Bug#39944).

4 years ago* doc/lispref/os.texi (time-subtract): Doc fix.
Paul Eggert [Sat, 7 Mar 2020 17:30:19 +0000 (09:30 -0800)]
* doc/lispref/os.texi (time-subtract): Doc fix.

4 years agoMerge from origin/emacs-27
Glenn Morris [Sat, 7 Mar 2020 15:50:28 +0000 (07:50 -0800)]
Merge from origin/emacs-27

72f87f8873 (origin/emacs-27) NS port documentation updates
5b19db98ad ; * etc/NEWS: correctly describe what fido-mode is
fc47e3ad99 Let fido-mode users force a minibuffer-exit
e734961d4c icomplete-fido-exit: New command for the M-j binding
335a9bd215 minibuffer-force-complete-and-exit: Allow input with no ma...
34132d4bf6 ; * etc/NEWS: Mark 2 entries as fully documented.
d28b73841b ; * etc/NEWS: Fix the 'mml-secure-openpgp-sign-with-sender...
d1d56a9fd9 ; * etc/NEWS: 'thunk-let' and 'thunk-let*' are fully docum...
fc4f4efabf ; * etc/NEWS: No need to document vc-hg and mergebase chan...
9e8456cf0f ; * etc/NEWS: No need to document changes in Octave mode.
25b4d6fa28 ; * etc/NEWS: No need to document changes in map.el and se...
fc4d0f86da ; * etc/NEWS: No need to document Ido news.
d4ac478cb3 ; * etc/NEWS: No need to document news of doc-view.el.
08c042bd26 Document that 'byte-compile-dynamic' is obsolete
512b66abd7 ; * etc/NEWS: No need to document 'goto-address-uri-scheme...
3103c01c3e ; * etc/NEWS: Formatting fixes.
98306fdfb8 ; * etc/NEWS: No need to document deprecation of 'cl'.
6281ed58be ; * etc/NEWS: No need to document the change in 'list-proc...
e252341e11 ; * etc/NEWS: 'backup-by-copying-when-privileged-mismatch'...
ec5a267ddc ; * etc/NEWS: Mark 'byte-count-to-string-function' as undo...
89307ebccd ; * etc/NEWS: Mark 'completion-common-part' face entry as ...
fdbe7cacfb Document the changes in 'read-answer'
10c58356e4 Document changes in lexical-binding
5cb312b5b9 Update ERC mailing list address
cb1877321b Use regexp-opt to define bibtex-autokey-transcriptions.  (...
3f9c340de0 Improve documentation of 'table-generate-source'
33b31dc314 Attempt to avoid rare segfaults in show_mouse_face
88c6db9196 Avoid crashes when a fontset has strange entries
1814c7e158 Fix rx error with ? and ??
40fb20061e * lisp/emacs-lisp/rx.el (rx--string-to-intervals): Fix err...
08d7d28d35 Fix args in 'window-text-pixel-size' call in 'fit-window-t...
cb1e30910e Have pulse.el preserve existing overlay priorities

# Conflicts:
# etc/NEWS

4 years agoNS port documentation updates
Alan Third [Sat, 7 Mar 2020 14:39:05 +0000 (14:39 +0000)]
NS port documentation updates

* doc/emacs/macos.texi (Mac / GNUstep Customization): Document some
more of the ns- variables and remove incorrect font back-end
information.
* etc/NEWS: Update the documentation status of macOS news entries.

4 years ago; * etc/NEWS: correctly describe what fido-mode is
João Távora [Sat, 7 Mar 2020 13:47:07 +0000 (13:47 +0000)]
; * etc/NEWS: correctly describe what fido-mode is

4 years agoLet fido-mode users force a minibuffer-exit
João Távora [Sat, 7 Mar 2020 13:10:07 +0000 (13:10 +0000)]
Let fido-mode users force a minibuffer-exit

* lisp/icomplete.el (icomplete-fido-exit):
Add FORCE arg.  Rewrite docstring. (bug#38992)

4 years agoicomplete-fido-exit: New command for the M-j binding
Dmitry Gutov [Wed, 4 Mar 2020 23:58:32 +0000 (01:58 +0200)]
icomplete-fido-exit: New command for the M-j binding

* lisp/icomplete.el (icomplete-fido-exit): New command.
(icomplete-fido-mode-map): Use it (bug#38992).

4 years agominibuffer-force-complete-and-exit: Allow input with no matches
Dmitry Gutov [Wed, 4 Mar 2020 23:52:58 +0000 (01:52 +0200)]
minibuffer-force-complete-and-exit: Allow input with no matches

* lisp/minibuffer.el (minibuffer--require-match): New variable.
(completing-read-default): Bind it to the REQUIRE-MATCH value.
(minibuffer-force-complete-and-exit): Consult it to allow input
with no matches when a match is not required (bug#38992).

* lisp/icomplete.el (icomplete-exhibit): Use it to render the
correct parens around matches.

4 years ago; * etc/NEWS: Mark 2 entries as fully documented.
Eli Zaretskii [Sat, 7 Mar 2020 12:55:43 +0000 (14:55 +0200)]
; * etc/NEWS: Mark 2 entries as fully documented.

4 years ago; * etc/NEWS: Fix the 'mml-secure-openpgp-sign-with-sender' entry.
Eli Zaretskii [Sat, 7 Mar 2020 12:50:50 +0000 (14:50 +0200)]
; * etc/NEWS: Fix the 'mml-secure-openpgp-sign-with-sender' entry.

4 years ago; * etc/NEWS: 'thunk-let' and 'thunk-let*' are fully documented.
Eli Zaretskii [Sat, 7 Mar 2020 12:48:33 +0000 (14:48 +0200)]
; * etc/NEWS: 'thunk-let' and 'thunk-let*' are fully documented.

4 years ago; * etc/NEWS: No need to document vc-hg and mergebase changes.
Eli Zaretskii [Sat, 7 Mar 2020 12:42:19 +0000 (14:42 +0200)]
; * etc/NEWS: No need to document vc-hg and mergebase changes.

4 years ago; * etc/NEWS: No need to document changes in Octave mode.
Eli Zaretskii [Sat, 7 Mar 2020 12:39:29 +0000 (14:39 +0200)]
; * etc/NEWS: No need to document changes in Octave mode.

4 years ago; * etc/NEWS: No need to document changes in map.el and seq.el.
Eli Zaretskii [Sat, 7 Mar 2020 12:38:07 +0000 (14:38 +0200)]
; * etc/NEWS: No need to document changes in map.el and seq.el.

4 years ago; * etc/NEWS: No need to document Ido news.
Eli Zaretskii [Sat, 7 Mar 2020 12:33:16 +0000 (14:33 +0200)]
; * etc/NEWS: No need to document Ido news.

4 years ago; * etc/NEWS: No need to document news of doc-view.el.
Eli Zaretskii [Sat, 7 Mar 2020 12:32:06 +0000 (14:32 +0200)]
; * etc/NEWS: No need to document news of doc-view.el.

4 years agoDocument that 'byte-compile-dynamic' is obsolete
Eli Zaretskii [Sat, 7 Mar 2020 12:23:23 +0000 (14:23 +0200)]
Document that 'byte-compile-dynamic' is obsolete

* doc/lispref/compile.texi (Dynamic Loading): Document that this
is deprecated.

* etc/NEWS: mark the 'byte-compile-dynamic' entry as documented.

4 years ago; * etc/NEWS: No need to document 'goto-address-uri-schemes-ignored'.
Eli Zaretskii [Sat, 7 Mar 2020 12:10:14 +0000 (14:10 +0200)]
; * etc/NEWS: No need to document 'goto-address-uri-schemes-ignored'.

4 years ago; * etc/NEWS: Formatting fixes.
Eli Zaretskii [Sat, 7 Mar 2020 12:05:52 +0000 (14:05 +0200)]
; * etc/NEWS: Formatting fixes.

4 years ago; * etc/NEWS: No need to document deprecation of 'cl'.
Eli Zaretskii [Sat, 7 Mar 2020 11:55:37 +0000 (13:55 +0200)]
; * etc/NEWS: No need to document deprecation of 'cl'.

4 years ago; * etc/NEWS: No need to document the change in 'list-processes'.
Eli Zaretskii [Sat, 7 Mar 2020 11:54:03 +0000 (13:54 +0200)]
; * etc/NEWS: No need to document the change in 'list-processes'.

4 years ago; * etc/NEWS: 'backup-by-copying-when-privileged-mismatch' is documented.
Eli Zaretskii [Sat, 7 Mar 2020 11:48:06 +0000 (13:48 +0200)]
; * etc/NEWS: 'backup-by-copying-when-privileged-mismatch' is documented.

4 years ago; * etc/NEWS: Mark 'byte-count-to-string-function' as undocumented.
Eli Zaretskii [Sat, 7 Mar 2020 11:46:06 +0000 (13:46 +0200)]
; * etc/NEWS: Mark 'byte-count-to-string-function' as undocumented.

4 years ago; * etc/NEWS: Mark 'completion-common-part' face entry as not documented.
Eli Zaretskii [Sat, 7 Mar 2020 11:42:35 +0000 (13:42 +0200)]
; * etc/NEWS: Mark 'completion-common-part' face entry as not documented.

4 years agoDocument the changes in 'read-answer'
Eli Zaretskii [Sat, 7 Mar 2020 11:40:10 +0000 (13:40 +0200)]
Document the changes in 'read-answer'

* doc/lispref/minibuf.texi (Multiple Queries): Document the
fact that 'read-answer' can now accept non-character input
events.

4 years agoDocument changes in lexical-binding
Eli Zaretskii [Sat, 7 Mar 2020 11:32:52 +0000 (13:32 +0200)]
Document changes in lexical-binding

* doc/lispref/variables.texi (Using Lexical Binding): Document
that lexical-binding is now turned on by default in more cases.

* etc/NEWS: Fix wording of the NEWS entry about the above, and mark it
as fully documented.

4 years agoUpdate ERC mailing list address
Amin Bandali [Fri, 6 Mar 2020 17:54:23 +0000 (12:54 -0500)]
Update ERC mailing list address

* lisp/erc/erc.el (erc-official-location): As part of bringing ERC
under the Emacs umbrella, erc-discuss has been renamed to emacs-erc,
and will be *the* mailing list for discussions and announcements about
ERC going forward.  The other two lists, erc-announce and erc-commit,
are now retired.  For more details, see the announcement at
<https://lists.gnu.org/archive/html/emacs-erc/2020-03/msg00001.html>.

4 years agoUse regexp-opt to define bibtex-autokey-transcriptions. (Bug#39686)
Roland Winkler [Fri, 6 Mar 2020 08:37:55 +0000 (09:37 +0100)]
Use regexp-opt to define bibtex-autokey-transcriptions.  (Bug#39686)

4 years agoImprove documentation of 'table-generate-source'
Eli Zaretskii [Fri, 6 Mar 2020 08:14:42 +0000 (10:14 +0200)]
Improve documentation of 'table-generate-source'

* lisp/textmodes/table.el (table-generate-source): Doc fix.
(Bug#39935)

* etc/NEWS: Fix wording of the 'table-generate-source' entry and
mark it as documented.

4 years agoAttempt to avoid rare segfaults in show_mouse_face
Eli Zaretskii [Fri, 6 Mar 2020 07:48:10 +0000 (09:48 +0200)]
Attempt to avoid rare segfaults in show_mouse_face

* src/xdisp.c (show_mouse_face): Don't display the active region
if called on a frame different from the one recorded in HLINFO.
(Bug#37671)

4 years agoRemove ancient OS X process-connection-type handling
Glenn Morris [Fri, 6 Mar 2020 01:11:51 +0000 (17:11 -0800)]
Remove ancient OS X process-connection-type handling

* src/process.c (init_process_emacs) [DARWIN_OS]:
Remove process-connection-type special-casing
for OS X < 10.3 (ie pre-2003).
Ref https://lists.gnu.org/r/emacs-devel/2005-01/msg00741.html

4 years agoFix handling of empty input in describe-variable and describe-symbol
Juri Linkov [Fri, 6 Mar 2020 00:27:32 +0000 (02:27 +0200)]
Fix handling of empty input in describe-variable and describe-symbol

* lisp/help-fns.el (describe-variable): Use 'user-error' like in
'describe-function'.
(describe-symbol): Use empty string for arg SYMBOL when input is empty
and there is no default value.
This allows to signal the error "You didn't specify a function or variable"
instead of displaying help about the symbol 'nil' on empty input.
OTOH, still allows to see help about 'nil' when the input is "nil".

4 years agoNew command make-frame-on-current-monitor to use in windmove (bug#39875)
Juri Linkov [Fri, 6 Mar 2020 00:19:00 +0000 (02:19 +0200)]
New command make-frame-on-current-monitor to use in windmove (bug#39875)

* lisp/frame.el (make-frame-on-current-monitor): New command.

* lisp/windmove.el (windmove-display-in-direction):
Use make-frame-on-current-monitor for 'new-frame'.
(windmove-display-new-frame): New command.
(windmove-display-default-keybindings): Bind
windmove-display-new-frame to 'f' key.

* lisp/window.el (display-buffer-in-direction): Fix quotes in docstring.

4 years agoAvoid crashes when a fontset has strange entries
Eli Zaretskii [Thu, 5 Mar 2020 15:57:21 +0000 (17:57 +0200)]
Avoid crashes when a fontset has strange entries

* src/fontset.c (reorder_font_vector): Skip nil entries in the
loop that assigns scores to rfont_def's.
(fontset_compare_rfontdef): Cope with nil.  This has the effect of
moving any nil entries to the end of the font-group, and avoids
crashing if an element other than the last in the font-group is
nil.  (Bug#39892)

4 years agoFix rx error with ? and ??
Mattias Engdegård [Thu, 5 Mar 2020 11:49:26 +0000 (12:49 +0100)]
Fix rx error with ? and ??

The ? and ?? rx operators are special in that they can be written as
characters (space and '?' respectively).  This confused the definition
look-up mechanism in rare cases.

* lisp/emacs-lisp/rx.el (rx--expand-def): Don't look up non-symbols.
* test/lisp/emacs-lisp/rx-tests.el (rx-charset-or): Test.

4 years ago* lisp/emacs-lisp/rx.el (rx--string-to-intervals): Fix error string.
Mattias Engdegård [Thu, 5 Mar 2020 11:10:51 +0000 (12:10 +0100)]
* lisp/emacs-lisp/rx.el (rx--string-to-intervals): Fix error string.

4 years agoFix args in 'window-text-pixel-size' call in 'fit-window-to-buffer'
Justin Burkett [Thu, 5 Mar 2020 08:10:03 +0000 (09:10 +0100)]
Fix args in 'window-text-pixel-size' call in 'fit-window-to-buffer'

* lisp/window.el (fit-window-to-buffer): Fix arguments in
'window-text-pixel-size' call.

Copyright-paperwork-exempt: yes

4 years agoHave pulse.el preserve existing overlay priorities
João Távora [Fri, 28 Feb 2020 13:30:48 +0000 (13:30 +0000)]
Have pulse.el preserve existing overlay priorities

Fixes: bug#39821
* lisp/cedet/pulse.el (pulse-momentary-highlight-overlay): Save
overlay priority.
(pulse-momentary-unhighlight): Restore.

4 years agoMerge from origin/emacs-27
Glenn Morris [Wed, 4 Mar 2020 21:57:58 +0000 (13:57 -0800)]
Merge from origin/emacs-27

a3c2d186eb (origin/emacs-27) CC Mode: Fix the handling of two adjacen...
a1abf73c76 Fix combine-change-calls-1 for when buffer-undo-list is t
db37dd2e84 Don't misinterpret doc string as initial value
40b217c2bf Bump checkdoc-version to match library header
60418a1ab2 Explain how to unset mode bindings (Bug#39802)
7cafbbe964 Fix describe-variable on values with circular syntax (Bug#...
592b1cfee9 Improve documentation of next-error-highlight-no-select (b...

4 years ago; Merge from origin/emacs-27
Glenn Morris [Wed, 4 Mar 2020 21:57:58 +0000 (13:57 -0800)]
; Merge from origin/emacs-27

The following commit was skipped:

add0610ec9 Fix implicit declaration of getenv and atol

4 years agoMerge from origin/emacs-27
Glenn Morris [Wed, 4 Mar 2020 21:57:58 +0000 (13:57 -0800)]
Merge from origin/emacs-27

a4e4510ccd Fix handling MS-Windows keyboard input above the BMP
a38bebb0c1 * etc/NEWS: More complete description of rx 'not' changes.
d373647e8f ; * doc/emacs/mini.texi (Yes or No Prompts): Fix last change.
1ca6d15656 * doc/emacs/mini.texi (Yes or No Prompts): 'y-or-n-p' now ...
fe1a447d52 Don't attempt to cache glyph metrics for FONT_INVALID_CODE
b42b894d1d Fix fit-frame-to-buffer for multi-monitor setup
366fd4fd07 (emacs-27) ; * etc/NEWS: Fix typo.
49d3cd90bd rx: Improve 'or' compositionality (bug#37659)
6b48aedb6b * lisp/tab-line.el: Fix auto-hscrolling (bug#39649)
c5f255d681 (tag: emacs-27.0.90) ; Update lisp/ldefs-boot.el
60c84ad992 ; * etc/TODO: Fix last change.
5af9e5baad ; Add an entry to TODO
d424195905 Fix rx charset generation
9908b5a614 Merge branch 'emacs-27' of git.savannah.gnu.org:/srv/git/e...
6dc2ebe00e Fix overquoting in mule.el
5cca73dd82 * src/timefns.c (time_arith): Omit incorrect comment.
d767c357ca Merge branch 'emacs-27' of git.savannah.gnu.org:/srv/git/e...
4dec693f70 * lisp/vc/vc-cvs.el (vc-cvs-ignore): Copy-edit doc string
ff729e3f97 ; bug#39779: Fix some typos in documentation.
696ee02c3a checkdoc: Don't mistake "cf." for sentence end

# Conflicts:
# etc/NEWS

4 years ago; Merge from origin/emacs-27
Glenn Morris [Wed, 4 Mar 2020 21:57:57 +0000 (13:57 -0800)]
; Merge from origin/emacs-27

The following commit was skipped:

d096bab787 Bump Emacs version to 27.0.90

4 years agoMerge from origin/emacs-27
Glenn Morris [Wed, 4 Mar 2020 21:57:56 +0000 (13:57 -0800)]
Merge from origin/emacs-27

5b7d226779 * etc/AUTHORS: Update.
4aa758e53d ; ChangeLog.3 update
9261b1ed49 * admin/authors.el (authors-ignored-files): Fix entries.
86e4da6eaf ; ChangeLog.3 update
009c6a1767 ; ChangeLog.3 fixes
f9e53947c7 Fix documented slot name of eieio-instance-tracker class
999d75c0c1 Range-check width passed to define-fringe-bitmap
29e415d6b0 ; ChangeLog.3 fixes
4653baa6a5 ; ChangeLog.3 update & fixes.
a95ec6e060 * admin/authors.el: Add missing entries
af519a6348 Define libgnutls-version properly
9ec6eb1065 vc-dir-ignore: More accurately choose base directory
e74fb4688b * lisp/emacs-lisp/cursor-sensor.el (cursor-sensor--detect)...
3bce7ec382 CC Mode: Protect against consecutive calls to before-chang...

4 years agoPacify GCC 9.2.1 20190927 -O3
Paul Eggert [Wed, 4 Mar 2020 21:48:26 +0000 (13:48 -0800)]
Pacify GCC 9.2.1 20190927 -O3

Original problem report by N. Jackson in:
https://lists.gnu.org/r/emacs-devel/2020-03/msg00047.html
I found some other warnings when I used gcc, and fixed them
with this patch.
* lib-src/etags.c: Include verify.h.
(xnmalloc, xnrealloc): Tell the compiler that NITEMS is
nononnegative and ITEM_SIZE is positive.
* src/conf_post.h (__has_attribute_returns_nonnull)
(ATTRIBUTE_RETURNS_NONNULL): New macros.
* src/editfns.c (Fuser_full_name): Don’t assume Fuser_login_name
returns non-nil.
* src/intervals.c (rotate_right, rotate_left, update_interval):
* src/intervals.h (LENGTH, LEFT_TOTAL_LENGTH, RIGHT_TOTAL_LENGTH):
Use TOTAL_LENGTH0 or equivalent on intervals that might be null.
* src/intervals.h (TOTAL_LENGTH): Assume arg is nonnull.
(TOTAL_LENGTH0): New macro, with the old TOTAL_LENGTH meaning.
(make_interval, split_interval_right): Add ATTRIBUTE_RETURNS_NONNULL.
* src/pdumper.c (dump_check_dump_off): Now returns void, since
no caller uses the return value.  Redo assert to pacify GCC.
(decode_emacs_reloc): Add a seemingly-random eassume to pacify GCC.
Ugly, and I suspect due to a bug in GCC.

4 years agoCC Mode: Fix the handling of two adjacent after-change-functionses.
Alan Mackenzie [Wed, 4 Mar 2020 21:17:04 +0000 (21:17 +0000)]
CC Mode: Fix the handling of two adjacent after-change-functionses.

The bug involved failing to set c-new-END correctly, which lead to an
args-out-of-range error when after-change-functions was invoked twice without
an intervening invocation of before-change-functions.

* lisp/progmodes/cc-mode.el (c-after-change): Correct a coding error in the
handling of c-just-done-before-change.

4 years agoFix more NS_DRAW_TO_BUFFER #ifdefs (bug#39883)
Alan Third [Wed, 4 Mar 2020 20:51:40 +0000 (20:51 +0000)]
Fix more NS_DRAW_TO_BUFFER #ifdefs (bug#39883)

* src/nsterm.m (ns_update_end): Make sure the frame is updated after
drawing.
(ns_focus):
(ns_unfocus): Should be checking on NS_DRAW_TO_BUFFER rather than if
it's Cocoa or GNUstep.

4 years agoFix combine-change-calls-1 for when buffer-undo-list is t
Alan Mackenzie [Wed, 4 Mar 2020 19:50:38 +0000 (19:50 +0000)]
Fix combine-change-calls-1 for when buffer-undo-list is t

* lisp/subr.c (combine-change-calls-1): Bind before/after-change-functions to
nil also when buffer-undo-list is t.

4 years agoDon't misinterpret doc string as initial value
Mattias Engdegård [Wed, 4 Mar 2020 13:46:46 +0000 (14:46 +0100)]
Don't misinterpret doc string as initial value

* lisp/loadhist.el (loadhist--restore-autoload):
* lisp/progmodes/vhdl-mode.el (vhdl-font-lock-keywords-0):
Prevent the doc string from being used as initial value.

4 years agoDeclare speedbar-incompatible-version obsolete
Stefan Kangas [Wed, 4 Mar 2020 03:37:38 +0000 (04:37 +0100)]
Declare speedbar-incompatible-version obsolete

This variable refers to a now ancient version of speedbar, and is no
longer useful.

* lisp/speedbar.el (speedbar-incompatible-version): Declare obsolete.

4 years agoBump checkdoc-version to match library header
Stefan Kangas [Wed, 4 Mar 2020 03:41:45 +0000 (04:41 +0100)]
Bump checkdoc-version to match library header

* lisp/emacs-lisp/checkdoc.el (checkdoc-version): Bump version.

4 years agoExplain how to unset mode bindings (Bug#39802)
Noam Postavsky [Thu, 27 Feb 2020 13:09:44 +0000 (08:09 -0500)]
Explain how to unset mode bindings (Bug#39802)

* doc/emacs/custom.texi (Init Rebinding): Explain that passing nil to
define-key will unbind keys, and extend the example accordingly.

4 years agoFix describe-variable on values with circular syntax (Bug#39805)
Noam Postavsky [Fri, 28 Feb 2020 02:09:59 +0000 (21:09 -0500)]
Fix describe-variable on values with circular syntax (Bug#39805)

* lisp/help-fns.el (describe-variable): Set syntax tables before
calling pp-buffer.

4 years agoIgnore spurious focus events
Daniel Colascione [Wed, 4 Mar 2020 02:27:51 +0000 (18:27 -0800)]
Ignore spurious focus events

* src/xterm.c (x_detect_focus_change): Ignore FocusIn and FocusOut
events from grabs

4 years agoUpdate default-directory in occur buffer (bug#39608)
Stéphane Boucher [Wed, 4 Mar 2020 00:05:55 +0000 (02:05 +0200)]
Update default-directory in occur buffer (bug#39608)

* lisp/replace.el (occur-1): Update default-directory in occur buffer.

Copyright-paperwork-exempt: yes

4 years agoImprove documentation of next-error-highlight-no-select (bug#38778)
Juri Linkov [Tue, 3 Mar 2020 23:48:03 +0000 (01:48 +0200)]
Improve documentation of next-error-highlight-no-select (bug#38778)

* doc/emacs/building.texi (Compilation Mode):
Mention next-error-highlight-no-select.

* lisp/simple.el (next-error-highlight): Add reference to
next-error-highlight-no-select.
(next-error-highlight-no-select): Add reference to
next-error-highlight.

4 years agoFix implicit declaration of getenv and atol
Andreas Schwab [Wed, 15 Jan 2020 09:02:10 +0000 (10:02 +0100)]
Fix implicit declaration of getenv and atol

* src/gtkutil.c: Include <stdlib.h>.

4 years agoTime division speedups
Paul Eggert [Tue, 3 Mar 2020 18:17:34 +0000 (10:17 -0800)]
Time division speedups

* src/timefns.c (frac_to_double) [FASTER_TIMEFNS]: Prefer intmax_t
division or double division to mpz division if they also yield the
correctly rounded result.

4 years agoFix rounding errors in time conversion
Paul Eggert [Tue, 3 Mar 2020 18:17:34 +0000 (10:17 -0800)]
Fix rounding errors in time conversion

* src/timefns.c (frac_to_double): Pass FLT_RADIX to mpz_sizeinbase
instead of doing the radix calculation ourselves, not always
correctly.  Fix off-by-one error in scale, which caused
double-rounding.
(decode_time_components): Use frac_to_double (via decode_ticks_hz)
to fix double-rounding error that can occur even though
intermediate results are long double.
* test/src/timefns-tests.el (float-time-precision):
Test the above fixes.

4 years ago* etc/NEWS: Add entry missed in previous commit
Stefan Monnier [Tue, 3 Mar 2020 16:42:01 +0000 (11:42 -0500)]
* etc/NEWS: Add entry missed in previous commit

4 years agoFix handling MS-Windows keyboard input above the BMP
Eli Zaretskii [Tue, 3 Mar 2020 16:40:28 +0000 (18:40 +0200)]
Fix handling MS-Windows keyboard input above the BMP

* src/w32term.c (w32_read_socket): If we get a WM_UNICHAR message
with a surrogate codepoint, assemble the corresponding character
code above the BMP from its UTF-16 encoding, communicated in two
consecutive WM_UNICHAR messages.

4 years ago* etc/NEWS: More complete description of rx 'not' changes.
Mattias Engdegård [Tue, 3 Mar 2020 16:36:29 +0000 (17:36 +0100)]
* etc/NEWS: More complete description of rx 'not' changes.

4 years ago* lisp/progmodes/elisp-mode.el (elisp-enable-lexical-binding): New command
Stefan Monnier [Tue, 3 Mar 2020 16:34:49 +0000 (11:34 -0500)]
* lisp/progmodes/elisp-mode.el (elisp-enable-lexical-binding): New command

(emacs-lisp-mode): Indicate lex/dyn binding mode in the mode line.
(elisp--dynlex-modeline-map): New var.

4 years ago; * doc/emacs/mini.texi (Yes or No Prompts): Fix last change.
Eli Zaretskii [Tue, 3 Mar 2020 16:23:40 +0000 (18:23 +0200)]
; * doc/emacs/mini.texi (Yes or No Prompts): Fix last change.

4 years agoUse help-fns-short-filename in other describe- commands
Štěpán Němec [Sat, 29 Feb 2020 18:43:53 +0000 (19:43 +0100)]
Use help-fns-short-filename in other describe- commands

The commit

2015-01-16T22:52:15-05:00!monnier@iro.umontreal.ca
24b7f77581
(Improve handling of doc-strings and describe-function for cl-generic)

added 'help-fns-short-filename', which provides file name shortening
smarter than a simple 'file-name-nondirectory' call, but besides the
generic/eieio functions ('cl--generic-describe', 'cl--describe-class',
'eieio-help-constructor'), it is currently only used by
'describe-function' (via 'help-fns-function-description-header').

Make the other help commands use it, too.

(Other than the obvious consistency/maintenance argument, my immediate
motivation for this change is the possibility to customize the file
name abbreviation by advising the function.)

* lisp/help.el (describe-mode): Move to help-fns.el.  The command was
already depending on 'find-lisp-object-file-name' defined there.
* lisp/help-fns.el (describe-variable) (describe-face) (describe-keymap)
(describe-mode): Use 'help-fns-short-filename'.

4 years ago* doc/emacs/mini.texi (Yes or No Prompts): 'y-or-n-p' now uses the minibuffer.
Juri Linkov [Mon, 2 Mar 2020 22:33:30 +0000 (00:33 +0200)]
* doc/emacs/mini.texi (Yes or No Prompts): 'y-or-n-p' now uses the minibuffer.

4 years agoTweak GMP usage for (HI LO US PS) timestamps
Paul Eggert [Mon, 2 Mar 2020 20:40:32 +0000 (12:40 -0800)]
Tweak GMP usage for (HI LO US PS) timestamps

* src/timefns.c (decode_time_components): Cut down on the number
of calls to GMP functions when generating old-style (HI LO US PS)
timestamps.

4 years agoFix macOS/GNUstep compilation warnings
Alan Third [Mon, 2 Mar 2020 17:54:32 +0000 (17:54 +0000)]
Fix macOS/GNUstep compilation warnings

* src/nsfns.m (handlePanelKeys): Unused function.
* src/nsterm.m (ns_set_appearance):
([EmacsView initFrameFromEmacs:]): Use EmacsWindow type instead of
NSWindow.
(ns_clip_to_row): Unused function.
(ns_dumpglyphs_stretch): Remove unused variable.
(ns_term_init):
([EmacsWindow setAppearance]): Only compile on macOS.
(ns_mouse_position): Make sure f is initialised on GNUstep.
* src/emacs.c (main): Move allocation of autorelease pool to before
first use.

4 years agoFix #defines controlling when NS port draws to offscreen buffer
Alan Third [Mon, 2 Mar 2020 17:44:38 +0000 (17:44 +0000)]
Fix #defines controlling when NS port draws to offscreen buffer

* src/nsterm.h (NS_DRAW_TO_BUFFER): New definition.
* src/nsterm.m (ns_update_begin):
(ns_update_end):
(ns_focus):
([EmacsView updateFrameSize:]):
([EmacsView initFrameFromEmacs:]):
([EmacsView copyRect:to:]): Use new #define.

4 years agoDon't attempt to cache glyph metrics for FONT_INVALID_CODE
Robert Pluim [Fri, 24 Jan 2020 13:11:44 +0000 (14:11 +0100)]
Don't attempt to cache glyph metrics for FONT_INVALID_CODE

This was causing massive slowdown in redisplay when eg #xfe0f
(VARIATION SELECTOR-16) was present, as the cache ended up very large,
unused, and being recreated on every call to font_fill_lglyph_metrics
(Bug#39133).

* src/composite.c (fill_gstring_body): Hoist FONT_OBJECT_P check out
of loop.  Calculate glyph code and check for FONT_INVALID_CODE before
calling font_fill_lglyph_metrics.  Pass glyph code to it.

* src/font.c (font_fill_lglyph_metrics): Add code parameter, move
glyph code calculation up the call stack into fill_gstring_body.

* src/font.h: Adjust font_fill_lglyph_metrics prototype.

4 years agowhitespace: Turn long lines regexp into a function (bug#36837)
Štěpán Němec [Thu, 29 Aug 2019 17:32:08 +0000 (19:32 +0200)]
whitespace: Turn long lines regexp into a function (bug#36837)

* lisp/whitespace.el (whitespace-color-on): Turn long lines regexp
into a function to ensure it uses current 'whitespace-line-column'
and 'fill-column' values.  (Bug#36837)
(whitespace-lines-regexp): New function.

4 years agoFix fit-frame-to-buffer for multi-monitor setup
Sergey Trofimov [Sun, 1 Mar 2020 18:49:18 +0000 (19:49 +0100)]
Fix fit-frame-to-buffer for multi-monitor setup

* lisp/window.el (fit-frame-to-buffer): Call
'frame-monitor-attributes' instead of
'display-monitor-attributes-list'.  Fix geometry calculations for
multiple monitors.

Copyright-paperwork-exempt: yes

4 years ago; Auto-commit of loaddefs files.
Glenn Morris [Sun, 1 Mar 2020 18:04:27 +0000 (10:04 -0800)]
; Auto-commit of loaddefs files.

4 years ago; * etc/NEWS: Fix typo.
Michael Albinus [Sun, 1 Mar 2020 17:58:16 +0000 (18:58 +0100)]
; * etc/NEWS: Fix typo.

4 years agorx: Improve 'or' compositionality (bug#37659)
Mattias Engdegård [Tue, 11 Feb 2020 19:04:42 +0000 (20:04 +0100)]
rx: Improve 'or' compositionality (bug#37659)

Perform 'regexp-opt' on nested 'or' forms, and after expansion of
user-defined and 'eval' forms.  Characters are now turned into strings
for wider 'regexp-opt' scope.  This preserves the longest-match
semantics for string in 'or' forms over composition.

* doc/lispref/searching.texi (Rx Constructs): Document.
* lisp/emacs-lisp/rx.el (rx--normalise-or-arg)
(rx--all-string-or-args): New.
(rx--translate-or): Normalise arguments first, and check for strings
in subforms.
(rx--expand-eval): Extracted from rx--translate-eval.
(rx--translate-eval): Call rx--expand-eval.
* test/lisp/emacs-lisp/rx-tests.el (rx-or, rx-def-in-or): Add tests.
* etc/NEWS: Announce.

4 years ago* lisp/progmodes/cperl-mode.el: Clarify comment.
Stefan Kangas [Sun, 1 Mar 2020 00:56:42 +0000 (01:56 +0100)]
* lisp/progmodes/cperl-mode.el: Clarify comment.

4 years agoRemove more XEmacs compat code from viper
Stefan Kangas [Sun, 1 Mar 2020 00:42:36 +0000 (01:42 +0100)]
Remove more XEmacs compat code from viper

* lisp/emulation/viper-mous.el (viper-multiclick-timeout)
(viper-current-click-count, viper-last-click-event-timestamp)
(viper-mouse-click-insert-word)
(viper-mouse-click-search-word): Remove XEmacs compat code.
(viper-event-click-count): Redefine as obsolete function alias
for 'event-click-count'.
* lisp/emulation/viper-util.el (viper-check-version): Declare
obsolete.

4 years agoMake 'load-dangerous-libraries' obsolete (Bug#37819)
Stefan Kangas [Sun, 1 Mar 2020 00:19:23 +0000 (01:19 +0100)]
Make 'load-dangerous-libraries' obsolete (Bug#37819)

When 'load-dangerous-libraries' was t, Emacs allowed loading .elc
files compiled by XEmacs.  This patch removes the support for that use
case, and declares the variable obsolete.

* lisp/subr.el (load-dangerous-libraries): Declare obsolete.
* src/lread.c (Fload): Ignore its value, and thereby refuse to load
files byte compiled by XEmacs.
(syms_of_lread): Update doc string of 'bytecomp-version-regexp' to not
refer to it.
* doc/emacs/building.texi (Lisp Libraries): Remove its documentation.

4 years agoFix XEmacs-specific clause in definition of pascal-outline-map.
Noah Friedman [Sat, 29 Feb 2020 22:50:51 +0000 (14:50 -0800)]
Fix XEmacs-specific clause in definition of pascal-outline-map.

* lisp/progmodes/pascal.el (pascal-outline-map): Call set-keymap-name
on map, not pascal-outline-map, as the latter is not yet defined.

4 years ago* lisp/tab-line.el: Fix auto-hscrolling (bug#39649)
Juri Linkov [Sat, 29 Feb 2020 21:49:17 +0000 (23:49 +0200)]
* lisp/tab-line.el: Fix auto-hscrolling (bug#39649)

Distinguish offsets between manual-vs-automatic scrolling
as integers-vs-floats instead of positive-vs-negative integers.

* lisp/tab-line.el (tab-line-format-template): Use 'numberp'
instead of 'integerp', and 'truncate' instead of 'abs'.
(tab-line-format): When the window-buffer was updated, set window-parameter
to float to enable auto-hscroll after it was disabled on manual scrolling.
(tab-line-auto-hscroll-buffer): New variable with internal buffer.
(tab-line-auto-hscroll): Erase in tab-line-auto-hscroll-buffer.
Use 'numberp' instead of 'integerp', 'truncate' instead of 'abs',
and 'float' instead of '-'.
(tab-line-hscroll): Use 'numberp' instead of 'integerp',
and 'truncate' instead of 'abs'.

4 years ago; Update lisp/ldefs-boot.el emacs-27.0.90
Nicolas Petton [Sat, 29 Feb 2020 21:25:38 +0000 (22:25 +0100)]
; Update lisp/ldefs-boot.el

4 years agoUnbreak build with CHECK_STRUCTS
Philipp Stephani [Sat, 29 Feb 2020 20:12:18 +0000 (21:12 +0100)]
Unbreak build with CHECK_STRUCTS

* src/pdumper.c (dump_object): Fix hash for Lisp_Type after commit
202c3319a28c029d6971dccea92f92425c5e8067.

4 years ago; * etc/TODO: Fix last change.
Eli Zaretskii [Sat, 29 Feb 2020 17:30:27 +0000 (19:30 +0200)]
; * etc/TODO: Fix last change.

4 years ago; Add an entry to TODO
Eli Zaretskii [Sat, 29 Feb 2020 13:10:09 +0000 (15:10 +0200)]
; Add an entry to TODO

* etc/TODO: Expand the ligature support entry.  Add a new entry
about better support of Emoji.

4 years agoFix rx charset generation
Mattias Engdegård [Sat, 29 Feb 2020 09:12:10 +0000 (10:12 +0100)]
Fix rx charset generation

* lisp/emacs-lisp/rx.el (rx--charset-p): Don't overquote.
(rx--generate-alt): Generate '.' for negated newline.
* test/lisp/emacs-lisp/rx-tests.el (rx-any, rx-charset-or): Test.

4 years agoMerge branch 'emacs-27' of git.savannah.gnu.org:/srv/git/emacs into emacs-27
Eli Zaretskii [Sat, 29 Feb 2020 07:51:43 +0000 (09:51 +0200)]
Merge branch 'emacs-27' of git.savannah.gnu.org:/srv/git/emacs into emacs-27

4 years agoFix overquoting in mule.el
Mattias Engdegård [Fri, 28 Feb 2020 21:13:45 +0000 (22:13 +0100)]
Fix overquoting in mule.el

* lisp/international/mule.el (sgml-xml-auto-coding-function):
Remove accidental quote.

4 years ago* src/timefns.c (time_arith): Omit incorrect comment.
Paul Eggert [Fri, 28 Feb 2020 20:58:28 +0000 (12:58 -0800)]
* src/timefns.c (time_arith): Omit incorrect comment.

4 years agoMerge branch 'emacs-27' of git.savannah.gnu.org:/srv/git/emacs into emacs-27
Eli Zaretskii [Fri, 28 Feb 2020 16:23:22 +0000 (18:23 +0200)]
Merge branch 'emacs-27' of git.savannah.gnu.org:/srv/git/emacs into emacs-27

4 years ago* lisp/vc/vc-cvs.el (vc-cvs-ignore): Copy-edit doc string
Mattias Engdegård [Fri, 28 Feb 2020 16:02:00 +0000 (17:02 +0100)]
* lisp/vc/vc-cvs.el (vc-cvs-ignore): Copy-edit doc string

4 years ago; bug#39779: Fix some typos in documentation.
Štěpán Němec [Tue, 25 Feb 2020 12:53:14 +0000 (13:53 +0100)]
; bug#39779: Fix some typos in documentation.

4 years agocheckdoc: Don't mistake "cf." for sentence end
Štěpán Němec [Thu, 29 Aug 2019 17:42:21 +0000 (19:42 +0200)]
checkdoc: Don't mistake "cf." for sentence end

* lisp/emacs-lisp/checkdoc.el (checkdoc-sentencespace-region-engine):
Recognize "cf." as an abbreviation, not a sentence end.

4 years agoPort timestamp tests to odd timezones, (TICKS . HZ)
Paul Eggert [Fri, 28 Feb 2020 07:16:44 +0000 (23:16 -0800)]
Port timestamp tests to odd timezones, (TICKS . HZ)

* test/src/timefns-tests.el:
(format-time-string-padding-minimal-deletes-unneeded-zeros)
(format-time-string-padding-minimal-retains-needed-zeros)
(format-time-string-padding-spaces)
(format-time-string-padding-zeros-adds-on-insignificant-side):
Don't assume local time can represent 2000-02-15 00:00:00,
as there might be a DST jump over midnight.
Work even when timestamps are of (TICKS . HZ) form.
Simplify by avoiding need to call time-add.