]> git.eshelyaron.com Git - emacs.git/log
emacs.git
5 years agoSignal user-error on duplicate package refresh
Stefan Kangas [Wed, 17 Jul 2019 17:55:08 +0000 (19:55 +0200)]
Signal user-error on duplicate package refresh

* lisp/emacs-lisp/package.el (package-menu-refresh): Signal a
user-error if there is already a refresh running in the
background.  Doc fix.  (Bug#36707)

5 years ago* doc/misc/efaq.texi: Note the inclusion year. (Bug#37142)
Stefan Kangas [Thu, 22 Aug 2019 15:01:39 +0000 (17:01 +0200)]
* doc/misc/efaq.texi: Note the inclusion year.  (Bug#37142)

5 years agoImprove documentation of 'ispell-skip-html'
Eli Zaretskii [Thu, 22 Aug 2019 14:49:40 +0000 (17:49 +0300)]
Improve documentation of 'ispell-skip-html'

* lisp/textmodes/ispell.el (ispell-skip-html): Doc fix.
(Bug#37141)

5 years ago* doc/misc/tramp.texi: Use @acronym{GVFS}.
Michael Albinus [Thu, 22 Aug 2019 12:50:38 +0000 (14:50 +0200)]
* doc/misc/tramp.texi: Use @acronym{GVFS}.

5 years agoFix Qunbound-Qnil confusion in clrhash patch
Paul Eggert [Thu, 22 Aug 2019 08:22:10 +0000 (01:22 -0700)]
Fix Qunbound-Qnil confusion in clrhash patch

Problem reported by Stefan Monnier.
* src/fns.c (hash_clear): Fix typo I introduced in my previous
patch here, by setting keys to Qunbound not Qnil.

5 years agoRemove no-longer-needed workaround for GC bug
Paul Eggert [Thu, 22 Aug 2019 05:29:35 +0000 (22:29 -0700)]
Remove no-longer-needed workaround for GC bug

* src/keymap.c (describe_vector): Remove old workaround for GC bug.
This workaround, introduced in 1993-02-19T05:43:54Z!rms@gnu.org,
has not been needed for some time.  Problem reported by Pip Cet in:
https://lists.gnu.org/r/emacs-devel/2019-08/msg00316.html

5 years agoDon’t debug fset by default
Paul Eggert [Thu, 22 Aug 2019 05:19:03 +0000 (22:19 -0700)]
Don’t debug fset by default

This GC bug seems to have been fixed, so the check is no longer
needed in production code.  From a suggestion by Pip Cet in:
https://lists.gnu.org/r/emacs-devel/2019-08/msg00316.html
* src/alloc.c (SUSPICIOUS_OBJECT_CHECKING) [!ENABLE_CHECKING]:
Do not define.
(find_suspicious_object_in_range, detect_suspicious_free):
Expand to proper dummy expressions if !SUSPICIOUS_OBJECT_CHECKING.
* src/data.c (Ffset): Convert test to an eassert.

5 years agoFix clrhash bug when hash table needs rehashing
Paul Eggert [Thu, 22 Aug 2019 01:54:08 +0000 (18:54 -0700)]
Fix clrhash bug when hash table needs rehashing

Problem reported by Pip Cet in:
https://lists.gnu.org/r/emacs-devel/2019-08/msg00316.html
* src/fns.c (maybe_resize_hash_table): Prefer ASET to gc_aset
where either will do.  Simplify appending of Qunbound values.
Put index_size calculation closer to where it’s needed.
(hash_clear): If hash_rehash_needed_p (h), don’t clear the
nonexistent hash vector.  Use memclear to speed up clearing.
* src/lisp.h (HASH_TABLE_SIZE): Check that the size is positive,
and tell that to the compiler.

5 years ago* src/buffer.c: Fix comment typo.
Paul Eggert [Thu, 22 Aug 2019 00:19:53 +0000 (17:19 -0700)]
* src/buffer.c: Fix comment typo.

5 years agoDon’t hard-loop on cycles in ‘read’ etc.
Paul Eggert [Thu, 22 Aug 2019 00:18:33 +0000 (17:18 -0700)]
Don’t hard-loop on cycles in ‘read’ etc.

Problem for ‘read’ reported by Pip Cet in:
https://lists.gnu.org/r/emacs-devel/2019-08/msg00316.html
* src/fns.c (Frequire): Protect against circular current-load-list.
* src/lread.c (Fget_load_suffixes):
Protect against circular load-suffixes or load-file-rep-suffixes.
(Fload): Protect against circular loads-in-progress.
(openp): Protect against circular PATH and SUFFIXES.
(build_load_history): Protect against circular load-history or
current-load-list.
(readevalloop_eager_expand_eval): Protect against circular SUBFORMS.
(read1): Protect against circular data.
* test/src/lread-tests.el (lread-circular-hash): New test.

5 years agoMake hide-ifdef-mode-prefix-key customisable
Lars Ingebrigtsen [Wed, 21 Aug 2019 20:49:57 +0000 (13:49 -0700)]
Make hide-ifdef-mode-prefix-key customisable

* lisp/progmodes/hideif.el (hide-ifdef-mode-prefix-key): Make into
a defcustom since it seems like this is something that should be
user-customisable (bug#8922).

5 years agoUse `quit-window-hook' in Info instead of having its own command
Lars Ingebrigtsen [Wed, 21 Aug 2019 20:36:59 +0000 (13:36 -0700)]
Use `quit-window-hook' in Info instead of having its own command

* doc/misc/info.texi (Help-Q): Info now uses `quit-window'.

* lisp/info.el (info-standalone): Adjust doc string.
(Info-exit): Made into obsolete alias.
(Info-mode-map): Bind "q" to `quit-window'.
(Info-mode-menu): Adjust.
(info-tool-bar-map): Ditto.
(Info-mode): Adjust doc string.
(Info-mode): If Info is standalone, kill Emacs on "q".

5 years agoAdjust quit-window-hook documentation
Lars Ingebrigtsen [Wed, 21 Aug 2019 20:22:56 +0000 (13:22 -0700)]
Adjust quit-window-hook documentation

* doc/lispref/windows.texi (Quitting Windows): Adjust
documentation of quit-window-hook (bug#9867).

5 years agoMention quit-window-hook in "Standard Hooks"
Lars Ingebrigtsen [Wed, 21 Aug 2019 20:21:52 +0000 (13:21 -0700)]
Mention quit-window-hook in "Standard Hooks"

* doc/lispref/hooks.texi (Standard Hooks): Mention
quit-window-hook (bug#9867).

5 years agoCall `quit-window-hook' in the `quit-window' command only
Lars Ingebrigtsen [Wed, 21 Aug 2019 20:18:47 +0000 (13:18 -0700)]
Call `quit-window-hook' in the `quit-window' command only

* lisp/window.el (quit-restore-window): Don't run quit-window-hook
here...
(quit-window): ... but here instead.  Callers that call the former
programmatically can decide themselves whether to call the hook.
(quit-window-hook): Fix doc string.

5 years agoFix the interactive spec for set-frame-width/height
Lars Ingebrigtsen [Wed, 21 Aug 2019 20:05:18 +0000 (13:05 -0700)]
Fix the interactive spec for set-frame-width/height

* src/frame.c (Fset_frame_width):
(Fset_frame_height): Use `prefix-numeric-value' to get the proper
numeric value (bug#9970).

5 years ago* lisp/mail/flow-fill.el: Change todo comment to not mention XEmacs.
Stefan Kangas [Wed, 21 Aug 2019 17:16:20 +0000 (19:16 +0200)]
* lisp/mail/flow-fill.el: Change todo comment to not mention XEmacs.

5 years ago; Fix typo introduced by last autorevert-tests patch
Michael Albinus [Wed, 21 Aug 2019 09:03:34 +0000 (11:03 +0200)]
; Fix typo introduced by last autorevert-tests patch

5 years ago; Fix typos in commentary section of xdisp.c
Martin Rudalics [Wed, 21 Aug 2019 08:24:25 +0000 (10:24 +0200)]
; Fix typos in commentary section of xdisp.c

5 years ago; Add traces to auto-revert-test02-auto-revert-deleted-file
Michael Albinus [Wed, 21 Aug 2019 07:19:28 +0000 (09:19 +0200)]
; Add traces to auto-revert-test02-auto-revert-deleted-file

5 years agoBe more careful about pointers to bignum vals
Paul Eggert [Wed, 21 Aug 2019 07:06:00 +0000 (00:06 -0700)]
Be more careful about pointers to bignum vals

This uses ‘const’ to be better at catching bugs that
mistakenly attempt to modify a bignum value.
Lisp bignums are supposed to be immutable.
* src/alloc.c (make_pure_bignum):
* src/fns.c (sxhash_bignum):
Accept Lisp_Object instead of struct Lisp_Bignum *, as that’s
simpler now.  Caller changed.
* src/bignum.h (bignum_val, xbignum_val): New inline functions.
Prefer them to &i->value and XBIGNUM (i)->value, since they
apply ‘const’ to the result.
* src/timefns.c (lisp_to_timespec): Use mpz_t const *
to point to a bignum value.

5 years agoUpdate mini-gmp
Paul Eggert [Wed, 21 Aug 2019 01:11:16 +0000 (18:11 -0700)]
Update mini-gmp

* src/mini-gmp.c: Sync from upstream.  This incorporates:
2019-08-13 Silence a couple of warnings

5 years agoAvoid some excess precision in time arithmetic
Paul Eggert [Wed, 21 Aug 2019 00:34:03 +0000 (17:34 -0700)]
Avoid some excess precision in time arithmetic

* doc/misc/emacs-mime.texi (time-date):
Adjust example to match new behavior.
* etc/NEWS: Mention this.
* lisp/calendar/time-date.el (decoded-time-add)
(decoded-time--alter-second):
Don’t lose underestimate precision of seconds component.
* src/bignum.c (mpz): Grow by 1.
* src/timefns.c (trillion_factor): New function.
(timeform_sub_ps_p): Remove.
(time_arith): Avoid unnecessarily-large hz, by reducing the hz
to a value no worse than the worse hz of the two arguments.
The result is always exact unless an error is signaled.
* test/src/timefns-tests.el (timefns-tests--decode-time):
New function.
(format-time-string-with-zone): Test (decode-time LOOK ZONE t)
resolution as well as its numeric value.

5 years agoRespect global-eldoc-mode in minibuffers (Bug#36886)
Noam Postavsky [Sun, 4 Aug 2019 00:19:31 +0000 (20:19 -0400)]
Respect global-eldoc-mode in minibuffers (Bug#36886)

* lisp/emacs-lisp/easy-mmode.el (define-globalized-minor-mode): Accept
a BODY parameter.
* doc/lispref/modes.texi (Defining Minor Modes): Document new
parameter.
* etc/NEWS: Announce it.

* lisp/simple.el (read--expression): Move eldoc-mode setup to...
* lisp/emacs-lisp/eldoc.el (eldoc--eval-expression-setup): ... here,
new function.
(global-eldoc-mode): Add or remove it to
eval-expression-minibuffer-setup-hook when enabling or disabling
global-eldoc-mode.  This enables eldoc in the minibuffer (solving
Bug#27202), only when global-eldoc-mode is enabled.

5 years agoSupport larger TIMEs in (time-convert TIME t)
Paul Eggert [Tue, 20 Aug 2019 21:02:30 +0000 (14:02 -0700)]
Support larger TIMEs in (time-convert TIME t)

Also, improve the doc to match current behavior.
* doc/lispref/os.texi (Time Conversion): Document that
time-convert signals an error for infinite or NaN args,
and that (time-convert TIME t) is exact otherwise.
Mention float-time as an alternative to time-convert.
(Time Calculations): Document that time-add and time-subtract
are exact and do not decrease HZ below the minimum of their args.
* src/timefns.c (decode_float_time): Don’t signal an error for
floating-point arguments whose base-FLT_RADIX exponent is not less
than DBL_MANT_DIG.  Instead, convert them to (TICKS . 1) values.
Use two (instead of three) integer exponent comparisons in the
typical case.
* test/src/timefns-tests.el (time-arith-tests):
Add more floating-point tests, including some tests
that the old code fails.

5 years agoDelete built-in ada-mode; Gnu ELPA is a good replacement
Stephen Leake [Tue, 20 Aug 2019 22:36:08 +0000 (15:36 -0700)]
Delete built-in ada-mode; Gnu ELPA is a good replacement

* doc/misc/Makefile.in (INFO_COMMON): Delete ada-mode.

* doc/misc/ada-mode.texi: Delete.

* etc/NEWS: Mention ada-mode deleted.

* lisp/progmodes/ada-mode.el: Delete.

* lisp/progmodes/ada-prj.el: Delete.

* lisp/progmodes/ada-stmt.el: Delete.

* lisp/progmodes/ada-xref.el: Delete.

5 years agoAnother attempt to fix bug#32645
Michael Albinus [Tue, 20 Aug 2019 19:32:34 +0000 (21:32 +0200)]
Another attempt to fix bug#32645

* test/lisp/autorevert-tests.el ()
(auto-revert-test02-auto-revert-deleted-file):
* test/lisp/filenotify-tests.el (file-notify-test04-autorevert):
Check `file-notify-valid-p', not that the descriptor is nil.

5 years ago; * etc/NEWS: Move one incorrectly placed item.
Stefan Kangas [Tue, 20 Aug 2019 16:41:44 +0000 (18:41 +0200)]
; * etc/NEWS: Move one incorrectly placed item.

5 years agoMerge from origin/emacs-26
Glenn Morris [Tue, 20 Aug 2019 16:04:53 +0000 (09:04 -0700)]
Merge from origin/emacs-26

615cff4 (origin/emacs-26) Fix process filter documentation (Bug#13400)
beb1d22 Fix query-replace-regexp undo feature

# Conflicts:
# test/lisp/replace-tests.el

5 years ago; Merge from origin/emacs-26
Glenn Morris [Tue, 20 Aug 2019 16:01:55 +0000 (09:01 -0700)]
; Merge from origin/emacs-26

The following commit was skipped:

190565b Support the new Japanese era name

5 years agoMerge from origin/emacs-26
Glenn Morris [Tue, 20 Aug 2019 16:01:55 +0000 (09:01 -0700)]
Merge from origin/emacs-26

0b810eb Fix a typo in char-width-table
3f00db7 Minor update in admin/notes/unicode
bcd0115 Fix lisp indent infloop on unfinished strings (Bug#37045)
5f992d1 Improve commentary in composite.el
3a04be2 ; Improve commentary in xdisp.c
15de1d1 Fix markup in dired-x.texi
bda7fc7 ; Fix typo in a doc string of speedbar.el
6f57ef9 * src/callproc.c (Fcall_process): Doc fix.

# Conflicts:
# doc/misc/dired-x.texi
# lisp/international/characters.el
# src/callproc.c

5 years ago* configure.ac (HAVE_JPEG): Test for window system. (Bug#36995)
Ulrich Müller [Sun, 11 Aug 2019 09:24:07 +0000 (11:24 +0200)]
* configure.ac (HAVE_JPEG): Test for window system. (Bug#36995)

5 years agoDon't display wrong ElDoc information when inside ELisp strings or comments
Mauro Aranda [Sat, 10 Aug 2019 13:48:24 +0000 (10:48 -0300)]
Don't display wrong ElDoc information when inside ELisp strings or comments

* lisp/progmodes/elisp-mode.el (elisp--fnsym-in-current-sexp): Since
forward-sexp assumes point is not in a string or comment, avoid
calling it and then checking if point is inside a string, since that
sometimes will fail with awkward results.  (Bug#35567)

5 years agoOutput `auto-coding-alist' in `describe-current-coding-system'
Lars Ingebrigtsen [Tue, 20 Aug 2019 02:39:05 +0000 (19:39 -0700)]
Output `auto-coding-alist' in `describe-current-coding-system'

* lisp/international/mule-diag.el
(describe-current-coding-system): Also output the contents of
`auto-coding-alist', which take precedence over
`file-coding-system-alist' (bug#9575).

5 years agoAdd a new hook: `quit-window-hook'
Lars Ingebrigtsen [Tue, 20 Aug 2019 02:21:53 +0000 (19:21 -0700)]
Add a new hook: `quit-window-hook'

* doc/lispref/windows.texi (Quitting Windows): Mention in.

* lisp/window.el (quit-restore-window): Run the new
`quit-window-hook' before doing anything else (bug#9867).
(quit-window): Note that the hook will be run in the doc string.

* lisp/window.el (quit-window-hook): New variable.

5 years agoFix org-table 65536-second bug
Paul Eggert [Tue, 20 Aug 2019 01:04:56 +0000 (18:04 -0700)]
Fix org-table 65536-second bug

* lisp/org/org-table.el (org-table-message-once-per-second):
Fix bug when clock difference goes past a 65536-second boundary.
Don’t assume particular format for current-time result.

5 years agoFix time-add/time-sub validity checking
Paul Eggert [Tue, 20 Aug 2019 01:02:59 +0000 (18:02 -0700)]
Fix time-add/time-sub validity checking

* src/timefns.c (time_arith): Check the first arg for
validity even if the second arg is not finite.
* test/src/timefns-tests.el (time-arith-tests): Test this.

5 years agoFix process filter documentation (Bug#13400)
Noam Postavsky [Sat, 27 Jul 2019 03:20:37 +0000 (23:20 -0400)]
Fix process filter documentation (Bug#13400)

* doc/lispref/processes.texi (Asynchronous Processes): Note that input
may read when sending data as well.
(Output from Processes): Note that functions which send data may also
trigger reading from processes.
(Input to Processes, Filter Functions): Note that filter functions may
be called recursively.

5 years agoFix query-replace-regexp undo feature
Tino Calancha [Mon, 19 Aug 2019 15:32:09 +0000 (17:32 +0200)]
Fix query-replace-regexp undo feature

Ensure that non-regexp strings used with `looking-at' are quoted.
* lisp/replace.el (perform-replace): Quote regexp (Bug#37073).
* test/lisp/replace-tests.el (replace-tests-perform-replace-regexp-flag):
New variable.
(replace-tests-with-undo): Use it.
(query-replace-undo-bug37073): Add tests.

5 years ago* lisp/erc/erc-stamp.el: Fix erc-echo-timestamp (bug#22700)
Stefan Monnier [Mon, 19 Aug 2019 09:44:43 +0000 (05:44 -0400)]
* lisp/erc/erc-stamp.el: Fix erc-echo-timestamp (bug#22700)

Use lexical-binding.
(erc-add-timestamp): Store the timestamp in a closure placed in
cursor-sensor-functions rather than stashing it in an ad-hoc
`timestamp` property.
(erc-echo-timestamp): Simplify accordingly.

5 years agoAllow set-frame-height/set-frame-width to be used interactively
Lars Ingebrigtsen [Sun, 18 Aug 2019 23:50:08 +0000 (16:50 -0700)]
Allow set-frame-height/set-frame-width to be used interactively

* doc/lispref/frames.texi (Frame Size): Document it.

* src/frame.c (Fset_frame_height):
(Fset_frame_width): Make into commands that use the numeric prefix
to set height/width (bug#9970).

5 years agoAdd an advice-add/interactive spec example
Štěpán Němec [Sun, 18 Aug 2019 23:05:48 +0000 (16:05 -0700)]
Add an advice-add/interactive spec example

* doc/lispref/functions.texi (Core Advising Primitives): Add an
advice-add example that extends the `interactive' spec (bug#17871).

5 years agoInvalidate dir-locals-directory-cache when writing dir-local file
Johan Claesson [Sun, 18 Aug 2019 22:49:24 +0000 (15:49 -0700)]
Invalidate dir-locals-directory-cache when writing dir-local file

* lisp/files-x.el (modify-dir-local-variable): Remove file from
the cache when writing to ensure that we load the new version
later (bug#13860).

5 years agoHandle more subprocess chunking in M-x man (Bug#36927)
Noam Postavsky [Sun, 18 Aug 2019 22:10:50 +0000 (18:10 -0400)]
Handle more subprocess chunking in M-x man (Bug#36927)

* lisp/man.el (Man-bgproc-filter): Make sure not to chop man sections
by narrowing.
(Man-highlight-references0): Revert previous fix, as it's no longer
needed.
* test/lisp/man-tests.el (man-tests-filter-strings): New function.
(man-bgproc-filter-buttonize-includes): New test.

5 years agoImprove bignum_integer static checking
Paul Eggert [Sun, 18 Aug 2019 19:11:06 +0000 (12:11 -0700)]
Improve bignum_integer static checking

* src/bignum.h (bignum_integer): Now returns pointer-to-const,
to catch trivial mistakes where the caller might try to modify
a Lisp bignum.  Lisp bignums are supposed to be immutable.
All callers changed.

5 years agoSupport the new Japanese era name
Eli Zaretskii [Sun, 18 Aug 2019 16:36:31 +0000 (19:36 +0300)]
Support the new Japanese era name

* admin/unidata/NormalizationTest.txt:
* admin/unidata/UnicodeData.txt: Add U+32FF SQUARE ERA NAME REIWA.
Do not merge to master.

* test/lisp/international/ucs-normalize-tests.el
(ucs-normalize-tests--failing-lines-part1)
(ucs-normalize-tests--failing-lines-part2): Update.  Do not
merge to master.

* etc/NEWS: Mention the change.

5 years agoFix a typo in char-width-table
Eli Zaretskii [Sun, 18 Aug 2019 15:23:06 +0000 (18:23 +0300)]
Fix a typo in char-width-table

* lisp/international/characters.el (char-width-table): Fix a
typo in zero-width characters.

5 years agoAttempt to fix assertion violation in eval.c
Eli Zaretskii [Sun, 18 Aug 2019 14:46:19 +0000 (17:46 +0300)]
Attempt to fix assertion violation in eval.c

* src/eval.c (Fautoload): Fix an assertion violation in
make_fixnum.  Reported by martin rudalics <rudalics@gmx.at>.

5 years agoMake `browse-url-of-buffer' work from zip files
Lars Ingebrigtsen [Sun, 18 Aug 2019 00:30:42 +0000 (17:30 -0700)]
Make `browse-url-of-buffer' work from zip files

* lisp/net/browse-url.el (browse-url-of-buffer): Make `C-c C-v'
work in HTML buffers visited from zip files and the like
(bug#10318).

5 years agoFix org-timer-show-remaining-time > 1 hour
Paul Eggert [Sun, 18 Aug 2019 00:19:13 +0000 (17:19 -0700)]
Fix org-timer-show-remaining-time > 1 hour

* lisp/org/org-timer.el (org-timer-show-remaining-time):
Don’t assume the remaining time is less than one hour.
Simplify.  The simplification removes the need for a
decode-time, and fixes a typo I introduced recently.

5 years agoMake `describe-function' say that disabled functions are disabled
Lars Ingebrigtsen [Sat, 17 Aug 2019 23:56:13 +0000 (16:56 -0700)]
Make `describe-function' say that disabled functions are disabled

* lisp/help-fns.el (help-fns--disabled): New function (bug#10853).
(help-fns-describe-function-functions): Add it to the list of
function help functions.

5 years agoMake newline-and-indent take a numeric prefix
Lars Ingebrigtsen [Sat, 17 Aug 2019 23:47:16 +0000 (16:47 -0700)]
Make newline-and-indent take a numeric prefix

* lisp/simple.el (newline-and-indent): Take a prefix argument to
say how many times to perform its action (bug#10927).

5 years agoIssue a message on `C-x o' and there's no other window
Lars Ingebrigtsen [Sat, 17 Aug 2019 23:35:54 +0000 (16:35 -0700)]
Issue a message on `C-x o' and there's no other window

* lisp/window.el (other-window): Issue a message when the user
types `C-x o' and there's no other window to select (bug#10999).

5 years agoIssue a message on `C-x 1' when there's nothing to do
Lars Ingebrigtsen [Sat, 17 Aug 2019 23:31:55 +0000 (16:31 -0700)]
Issue a message on `C-x 1' when there's nothing to do

* lisp/window.el (delete-other-windows): Make `C-x 1' issue a
message when there's no other windows to delete (bug#10999).

5 years agoDoc clarification in two comment-* functions
Lars Ingebrigtsen [Sat, 17 Aug 2019 21:52:15 +0000 (14:52 -0700)]
Doc clarification in two comment-* functions

* lisp/newcomment.el (comment-padright, comment-padleft): Note
that `comment-normalize-vars' must be called first (bug#11944).

5 years agoAdd FIXMEs for subsecond support
Paul Eggert [Sat, 17 Aug 2019 22:39:18 +0000 (15:39 -0700)]
Add FIXMEs for subsecond support

This adds FIXMEs to areas where Lisp code should support
subsecond information in broken-down timestamps.
It also fixes some unnecessary truncation of timestamps, and
ports the code to a hypothetical future Emacs version where
(decode-time) returns subsecond timestamps by default.
* lisp/calc/calc-forms.el (calc-time, math-iso-dt-to-date)
(calcFunc-now):
* lisp/calendar/icalendar.el (icalendar--add-decoded-times):
* lisp/calendar/iso8601.el (iso8601-parse-interval):
Truncate seconds to an integer, and add a FIXME about
subseconds support.
* lisp/calendar/icalendar.el (icalendar--decode-isodatetime)
(icalendar--decode-isoduration):
Add a FIXME about subseconds support.
* lisp/gnus/gnus-delay.el (gnus-delay-article):
Don’t truncate seconds to an integer, as there’s no need
to do that here.
* lisp/gnus/gnus-util.el (gnus-seconds-today)
(gnus-seconds-month, gnus-seconds-year):
* lisp/gnus/message.el (message-make-expires-date):
* lisp/org/org-timer.el (org-timer-show-remaining-time):
* lisp/vc/ediff-mult.el (ediff-format-date):
Truncate seconds to an integer, as that’s what’s wanted here.
* lisp/midnight.el (midnight-next):
Ceiling seconds to an integer, as that’s what wanted here.

5 years ago* lisp/frameset.el (frameset-restore): Make sure last-focus frame has focus.
Juri Linkov [Sat, 17 Aug 2019 22:40:32 +0000 (01:40 +0300)]
* lisp/frameset.el (frameset-restore): Make sure last-focus frame has focus.

Call select-frame-set-input-focus to restore focus on the frame
that had last-focus-update frame parameter before saving frameset.
(Bug#36894)

5 years agoDoc clarification for call-interactively
Lars Ingebrigtsen [Sat, 17 Aug 2019 21:17:47 +0000 (14:17 -0700)]
Doc clarification for call-interactively

* src/callint.c (Fcall_interactively): Be explicit about what we
mean by "inquire" in the doc string (bug#15653).

5 years agoPort test harness to Solaris 10
Paul Eggert [Sat, 17 Aug 2019 16:15:32 +0000 (09:15 -0700)]
Port test harness to Solaris 10

* test/Makefile.in (ELFILES): Port to Solaris 10, where
‘find’ does not support ‘-path’.

5 years agoMinor update in admin/notes/unicode
Eli Zaretskii [Sat, 17 Aug 2019 15:13:58 +0000 (18:13 +0300)]
Minor update in admin/notes/unicode

* admin/notes/unicode: Mention changes to be done in
setup-default-fontset in fontset.el.  (Bug#14461)

5 years agoFix lisp indent infloop on unfinished strings (Bug#37045)
Noam Postavsky [Fri, 16 Aug 2019 11:26:40 +0000 (07:26 -0400)]
Fix lisp indent infloop on unfinished strings (Bug#37045)

* lisp/emacs-lisp/lisp-mode.el (lisp-indent-calc-next): Stop trying to
skip over strings if we've hit the end of buffer.
* test/lisp/emacs-lisp/lisp-mode-tests.el
(lisp-indent-unfinished-string): New test.

5 years agoImprove commentary in composite.el
Eli Zaretskii [Sat, 17 Aug 2019 11:21:47 +0000 (14:21 +0300)]
Improve commentary in composite.el

* lisp/composite.el (compose-gstring-for-graphic)
(compose-gstring-for-terminal): Add comments that explain
Unicode General Category mnemonics in human-readable terms.
(Bug#14461)

5 years agoUpdate from Gnulib
Paul Eggert [Sat, 17 Aug 2019 10:27:58 +0000 (03:27 -0700)]
Update from Gnulib

This incorporates:
2019-08-17 intprops: port to Oracle Developer Studio 12.6
2019-08-14 intprops: support uchar, ushort _WRAPV dests
* lib/intprops.h: Copy from Gnulib.

5 years agoImprove support of the ancient Egyptian script
Eli Zaretskii [Sat, 17 Aug 2019 10:02:29 +0000 (13:02 +0300)]
Improve support of the ancient Egyptian script

* lisp/international/fontset.el (script-representative-chars)
(setup-default-fontset): Add Egyptian.  (Bug#15420)

5 years agoMerge branch 'master' of git.savannah.gnu.org:/srv/git/emacs
Eli Zaretskii [Sat, 17 Aug 2019 09:25:32 +0000 (12:25 +0300)]
Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs

5 years agoHave time-add etc. respect CURRENT_TIME_LIST too
Paul Eggert [Sat, 17 Aug 2019 09:21:25 +0000 (02:21 -0700)]
Have time-add etc. respect CURRENT_TIME_LIST too

* src/timefns.c (time_arith) [!CURRENT_TIME_LIST]:
Don’t generate a list, since CURRENT_TIME_LIST is false.

5 years ago; Improve commentary in xdisp.c
Eli Zaretskii [Sat, 17 Aug 2019 08:02:52 +0000 (11:02 +0300)]
; Improve commentary in xdisp.c

* src/xdisp.c: Add to the commentary the description of
stop_charpos, and how it is used during iteration.

5 years agoFix a recent documentation change
Eli Zaretskii [Sat, 17 Aug 2019 06:28:52 +0000 (09:28 +0300)]
Fix a recent documentation change

* doc/emacs/windows.texi (Other Window): Add a cross-reference
to "Rebinding".  (Bug#12431)

5 years agoMore-compatible subsecond calendrical timestamps
Paul Eggert [Sat, 17 Aug 2019 05:09:04 +0000 (22:09 -0700)]
More-compatible subsecond calendrical timestamps

Instead of appending a subseconds member to the result of
‘decode-time’, this keeps the format unchanged unless you give
a new optional argument to ‘decode-time’.  Also, the augmented
format now puts the subsecond info in the SECONDS element, so
the total number of elements is unchanged; this is more
compatible with code that expects the traditional 9 elements,
such as ‘(pcase decoded-time (`(,SEC ,MIN ,HOUR ,DAY ,MON
,YEAR ,DOW ,DST ,ZONE) ...) ...)’.
* doc/lispref/os.texi, doc/misc/emacs-mime.texi, etc/NEWS:
* lisp/net/soap-client.el (soap-decode-date-time):
* lisp/simple.el (decoded-time):
Document the new behavior.
* lisp/calendar/icalendar.el (icalendar--decode-isodatetime):
* lisp/calendar/iso8601.el (iso8601-parse)
(iso8601-parse-time, iso8601-parse-duration)
(iso8601--decoded-time):
* lisp/calendar/parse-time.el (parse-time-string):
* lisp/calendar/time-date.el (decoded-time-add)
(decoded-time--alter-second):
* lisp/org/org.el (org-parse-time-string):
* lisp/simple.el (decoded-time):
* src/timefns.c (Fdecode_time, Fencode_time):
* test/lisp/calendar/icalendar-tests.el:
(icalendar--decode-isodatetime):
* test/lisp/calendar/iso8601-tests.el (test-iso8601-date-years)
(test-iso8601-date-dates, test-iso8601-date-obsolete)
(test-iso8601-date-weeks, test-iso8601-date-ordinals)
(test-iso8601-time, test-iso8601-combined)
(test-iso8601-duration, test-iso8601-intervals)
(standard-test-dates, standard-test-time-of-day-fractions)
(standard-test-time-of-day-beginning-of-day)
(standard-test-time-of-day-utc)
(standard-test-time-of-day-zone)
(standard-test-date-and-time-of-day, standard-test-interval):
* test/lisp/calendar/parse-time-tests.el (parse-time-tests):
* test/src/timefns-tests.el (format-time-string-with-zone)
(encode-time-dst-numeric-zone):
Revert recent changes that added a SUBSECS member to
calendrical timestamps, since that component is no longer
present (the info, if any, is now in the SECONDS member).
* lisp/calendar/time-date.el (decoded-time-add)
(decoded-time--alter-second):
Support fractional seconds in the new form.  Simplify.
* src/timefns.c (Fdecode_time): Support new arg FORM.
(Fencode_time): Support subsecond resolution.
* test/src/timefns-tests.el (format-time-string-with-zone)
(decode-then-encode-time): Test subsecond calendrical timestamps.

5 years agoBroaden format-seconds to Lisp timestamps
Paul Eggert [Sat, 17 Aug 2019 01:10:14 +0000 (18:10 -0700)]
Broaden format-seconds to Lisp timestamps

* lisp/calendar/time-date.el (format-seconds):
Accept any Lisp timestamp instead of insisting on a number.

5 years agoSubtracting “now” from “now” should yield zero
Paul Eggert [Sat, 17 Aug 2019 01:08:23 +0000 (18:08 -0700)]
Subtracting “now” from “now” should yield zero

* src/timefns.c (time_arith): Arrange for (time-subtract nil
nil) to yield 0, to be consistent with (time-equal-p nil nil).
* test/lisp/calendar/time-date-tests.el (test-time-since): New test.

5 years agoFix time-add rounding bug
Paul Eggert [Fri, 16 Aug 2019 23:25:02 +0000 (16:25 -0700)]
Fix time-add rounding bug

Without this fix, time arithmetic yielded results that were not
mathematically accurate, even though the exact results were
representable; for example, (time-add 0 1e-13) yielded a timestamp
equal to 0 instead of to 1e-13.
* lisp/timezone.el (timezone-time-from-absolute):
Let time-add do its thing rather than using floating point
internally, which has rounding errors.  We now have bignums and so
don’t need floating point to avoid overflow issues.
* src/timefns.c (timeform_sub_ps_p): New function.
(time_arith): If either argument is a float, represent the
result exactly instead of discarding sub-ps info.
* test/lisp/timezone-tests.el (timezone-tests-time-from-absolute):
Don’t assume (HI LO US PS) timestamp format.
* test/src/emacs-module-tests.el (mod-test-add-nanosecond/valid):
Don’t assume that time-add discards sub-ns info.
* test/src/timefns-tests.el (time-rounding-tests):
Add regression test to detect time-add rounding bug.

5 years agoMention `next-multiframe-window' when talking about `other-window'
Lars Ingebrigtsen [Fri, 16 Aug 2019 22:30:40 +0000 (15:30 -0700)]
Mention `next-multiframe-window' when talking about `other-window'

* doc/emacs/windows.texi (Other Window): Mention
the `next-multiframe-window' command here (which is otherwise not
documented in the manual) (bug#12431).

5 years agoAdd missing skeleton entries in autotype.texi
Lars Ingebrigtsen [Fri, 16 Aug 2019 21:39:52 +0000 (14:39 -0700)]
Add missing skeleton entries in autotype.texi

* doc/misc/autotype.texi: Add missing entries found in the doc
string to `skeleton-insert' (bug#12563).

5 years agoMake checkdoc check cl-lib function docstrings
Alex Branham [Fri, 16 Aug 2019 21:00:31 +0000 (14:00 -0700)]
Make checkdoc check cl-lib function docstrings

* lisp/emacs-lisp/checkdoc.el (checkdoc-this-string-valid-engine):
Remove calls to delete-region to avoid deleting final " (bug#26328).
* lisp/emacs-lisp/checkdoc.el (checkdoc--next-docstring)
(checkdoc-defun-info): Include cl-defun, cl-defgeneric,
cl-defmethod.
(checkdoc-this-string-valid-engine): Add cl-lib supported
keywords.
(checkdoc-defun-info): Ensure function parameters are a
"flat" list (bug#37034).

5 years agoAvoid deleting closing quotation mark in checkdoc
Alex Branham [Fri, 16 Aug 2019 20:55:27 +0000 (13:55 -0700)]
Avoid deleting closing quotation mark in checkdoc

* lisp/emacs-lisp/checkdoc.el (checkdoc-this-string-valid-engine):
Remove calls to delete-region to avoid deleting final " (bug#26328).

5 years agoRevert "package.el: Allow Package-Requires to span multiple lines (Bug#36301)"
Thomas Fitzsimmons [Fri, 16 Aug 2019 16:17:40 +0000 (12:17 -0400)]
Revert "package.el: Allow Package-Requires to span multiple lines (Bug#36301)"

This reverts commit 19c1e4c81c7442dea48253e5961b6e54d78b6f0a.

This commit broke some package tests, reverting for now.

5 years agoFix markup in dired-x.texi
Eli Zaretskii [Fri, 16 Aug 2019 13:45:57 +0000 (16:45 +0300)]
Fix markup in dired-x.texi

* doc/misc/dired-x.texi (Omitting Variables)
(Local Variables, Shell Command Guessing)
(Advanced Cleaning Variables, Special Marking Function): Fix
markup and indexing.  (Bug#14212)

5 years agoMention that text properties are removed in substitute-command-keys
Lars Ingebrigtsen [Fri, 16 Aug 2019 07:04:13 +0000 (00:04 -0700)]
Mention that text properties are removed in substitute-command-keys

* src/doc.c (Fsubstitute_command_keys): Restore the bit in the doc
string that mentions that text properties is removed (bug#17052).

5 years agoAdd some examples in "Adding Generalized Variables"
Lars Ingebrigtsen [Fri, 16 Aug 2019 06:57:57 +0000 (23:57 -0700)]
Add some examples in "Adding Generalized Variables"

* doc/lispref/variables.texi (Adding Generalized Variables): Add
examples for `gv-define-expander' and `gv-letplace' (bug#13343).

5 years ago; Fix typo in a doc string of speedbar.el
Eli Zaretskii [Fri, 16 Aug 2019 06:39:51 +0000 (09:39 +0300)]
; Fix typo in a doc string of speedbar.el

* lisp/speedbar.el (speedbar-supported-extension-expressions):
Fix a typo in the doc string.  (Bug#37041)

5 years agopackage.el: Allow Package-Requires to span multiple lines (Bug#36301)
Thomas Fitzsimmons [Fri, 16 Aug 2019 03:57:55 +0000 (23:57 -0400)]
package.el: Allow Package-Requires to span multiple lines (Bug#36301)

* lisp/emacs-lisp/package.el (lm-header-multiline): Declare
function.
(package-buffer-info): Parse Package-Requires with
lm-header-multiline instead of lm-header.
(Bug#36301)

5 years agoDo not recreate full URL for proxied HTTPS requests (Bug#35969)
Thomas Fitzsimmons [Fri, 16 Aug 2019 03:12:50 +0000 (23:12 -0400)]
Do not recreate full URL for proxied HTTPS requests (Bug#35969)

* lisp/url/url-http.el (url-http-create-request): Do not recreate
full URL for proxied HTTPS requests.
(url-https-proxy-after-change-function): Do not bind
url-http-proxy to nil before calling url-http-create-request.
(Bug#35969)

5 years agoMake diary-european-date-forms elements mutually exclusive
Andreas Merziger [Fri, 16 Aug 2019 01:39:27 +0000 (18:39 -0700)]
Make diary-european-date-forms elements mutually exclusive

* lisp/calendar/calendar.el (diary-european-date-forms): Make the
elements mutually exclusive (bug#13536).

5 years agoFix up previous cl-def* changes in bovine
Lars Ingebrigtsen [Fri, 16 Aug 2019 01:10:22 +0000 (18:10 -0700)]
Fix up previous cl-def* changes in bovine

* lisp/cedet/semantic/bovine/el.el (lambda): cl-defun* doesn't
exist (bug#17005).
(lambda): Add cl-defstruct.
(semantic-up-context): Add cl- forms.

5 years agoReimplement the `fill-flowed' function to respect space stuffing
Lars Ingebrigtsen [Fri, 16 Aug 2019 01:00:08 +0000 (18:00 -0700)]
Reimplement the `fill-flowed' function to respect space stuffing

* lisp/mail/flow-fill.el (fill-flowed): Reimplement the function
to respect space-stuffing (bug#17190).

* test/lisp/mail/flow-fill-tests.el
(fill-flow-tests-fill-flowed-stuffed): New test.
(fill-flow-tests-fill-flowed-decode): Rename the test so that it
actually runs.

5 years agoFix eshell-mode-map initialization
Alex Branham [Wed, 26 Jun 2019 18:59:06 +0000 (13:59 -0500)]
Fix eshell-mode-map initialization

* lisp/eshell/esh-mode.el (eshell-mode-map, eshell-command-map): Set
up normal keymaps and prefix commands rather than re-initializing them
in each eshell buffer

* lisp/eshell/em-cmpl.el (eshell-cmpl-mode-map, eshell-cmpl-mode)
(eshell-cmpl-initialize):
* lisp/eshell/em-hist.el (eshell-hist-mode-map, eshell-hist-mode)
(eshell-hist-initialize):
* lisp/eshell/em-pred.el (eshell-pred-mode-map, eshell-pred-mode)
(eshell-pred-initialize):
* lisp/eshell/em-prompt.el (eshell-prompt-mode-map, eshell-prompt-mode)
(eshell-prompt-initialize):
* lisp/eshell/em-rebind.el (eshell-rebind-mode-map, eshell-rebind-mode)
(eshell-rebind-initialize):
* lisp/eshell/esh-arg.el (eshell-arg-mode-map, eshell-arg-mode)
(eshell-arg-initialize):
* lisp/eshell/esh-proc.el (eshell-proc-mode-map, eshell-proc-mode)
(eshell-proc-initialize):
* lisp/eshell/esh-var.el (eshell-var-mode-map, eshell-var-mode)
(eshell-var-initialize): Create a new minor mode with a keymap and
call it in the module initialization function.

bug#33808
bug#22792

5 years agoRename variables and functions with "auto-load" in their names
Lars Ingebrigtsen [Thu, 15 Aug 2019 23:02:20 +0000 (16:02 -0700)]
Rename variables and functions with "auto-load" in their names

* doc/emacs/building.texi (Lisp Libraries): Adjust documentation.

* lisp/help-fns.el (help--symbol-completion-table): Adjust usage.

* lisp/help-fns.el (help-enable-completion-autoload): Change name
from auto-load and declare an obsolete alias (bug#13418).

* lisp/help.el (help-enable-autoload): Ditto.

* lisp/progmodes/vhdl-mode.el: Ditto.
(vhdl-create-mode-menu, vhdl-mode): Adjust usage.
(vhdl-autoload-project): Rename from auto-load and declare an
obsolete alias.

5 years agoRemove mentions of XEmacs from the Gnus manual and faq
Lars Ingebrigtsen [Thu, 15 Aug 2019 22:27:01 +0000 (15:27 -0700)]
Remove mentions of XEmacs from the Gnus manual and faq

* doc/misc/gnus-faq.texi:
* doc/misc/gnus.texi: Remove references to XEmacs throughout.

5 years agoMention what effect nil has as the prompt for read-event/char/etc
Lars Ingebrigtsen [Thu, 15 Aug 2019 22:04:30 +0000 (15:04 -0700)]
Mention what effect nil has as the prompt for read-event/char/etc

* doc/lispref/commands.texi (Reading One Event): Mention that ""
has the same effect as nil as a prompt.

* src/lread.c (Fread_event, Fread_char_exclusive, Fread_char):
Mention what happens when PROMPT is nil/"" in the doc string
(bug#15012).

5 years agoetc/NEWS: Note that `list-processes' includes port numbers now.
Lars Ingebrigtsen [Thu, 15 Aug 2019 21:55:26 +0000 (14:55 -0700)]
etc/NEWS: Note that `list-processes' includes port numbers now.

5 years agoFix typeof portability issue with bitfields
Paul Eggert [Thu, 15 Aug 2019 17:51:03 +0000 (10:51 -0700)]
Fix typeof portability issue with bitfields

Problem reported by Glenn Morris in:
https://lists.gnu.org/r/emacs-devel/2019-08/msg00300.html
* src/lisp.h (lisp_h_make_fixnum): Use typeof (+(n)) instead
of typeof (n), so that it works with compilers that do
not allow typeof to be applied to a bitfield.

5 years agoFix rounding errors with float timestamps
Paul Eggert [Thu, 15 Aug 2019 17:40:11 +0000 (10:40 -0700)]
Fix rounding errors with float timestamps

When converting from float to (TICKS . HZ) form, do the
conversion exactly.  When converting from (TICKS . HZ) form to
float, round to even precisely.  This way, successfully
converting a float to (TICKS . HZ) and back yields a value
numerically equal to the original.
* src/timefns.c (flt_radix_power_size): New constant.
(flt_radix_power): New static var.
(decode_float_time): Convert the exact numeric value rather
than guessing TIMESPEC_HZ resolution.
(s_ns_to_double): Remove; no longer needed.
(frac_to_double): New function.
(decode_ticks_hz): It is now the caller’s responsibility to
pass a valid TICKS and HZ.  All callers changed.
Use frac_to_double to round (TICKS . HZ) precisely.
(decode_time_components): When decoding nil, use
decode_ticks_hz since it rounds precisely.
(syms_of_timefns): Initialize flt_radix_power.
* test/src/timefns-tests.el (float-time-precision): New test.

5 years agoGive auto-revert-test02-auto-revert-deleted-file a chance on hydra
Michael Albinus [Thu, 15 Aug 2019 14:40:53 +0000 (16:40 +0200)]
Give auto-revert-test02-auto-revert-deleted-file a chance on hydra

* test/lisp/autorevert-tests.el
(auto-revert-test02-auto-revert-deleted-file): Don't skip on hydra.

5 years agoImprove Tramp manual
Michael Albinus [Thu, 15 Aug 2019 12:35:02 +0000 (14:35 +0200)]
Improve Tramp manual

* doc/misc/tramp.texi (GVFS based methods): Explain using `ftp'
and `smb' methods.

5 years agoDebug out-of-range make_fixnum args
Paul Eggert [Thu, 15 Aug 2019 09:18:06 +0000 (02:18 -0700)]
Debug out-of-range make_fixnum args

With --enable-checking, make_fixnum (N) now checks that N is
in fixnum range.  Suggested by Pip Cet in:
https://lists.gnu.org/r/emacs-devel/2019-07/msg00548.html
A new function make_ufixnum (N) is for the rare cases where N
is intended to be unsigned and is in the range 0..INTMASK.
* configure.ac (AC_C_TYPEOF): Add.
(HAVE_STATEMENT_EXPRESSIONS): Resurrect this macro.
* src/fns.c (Frandom, hashfn_eq, hashfn_equal, hashfn_user_defined):
* src/profiler.c (hashfn_profiler):
Use make_ufixnum rather than make_fixum, since the argument is
an unsigned integer in the range 0..INTMASK rather than a signed
integer in the range MOST_NEGATIVE_FIXNUM..MOST_POSITIVE_FIXNUM.
Typically this is for hashes.
* src/lisp.h (lisp_h_make_fixnum_wrap) [USE_LSB_TAG]:
Rename from lisp_h_make_fixnum.
(lisp_h_make_fixnum): Redefine in terms of lisp_h_make_fixnum_wrap.
Check for fixnum overflow on compilers like GCC that
have statement expressions and typeof.
(FIXNUM_OVERFLOW_P): Move up.
(make_fixnum): Check for fixnum overflow.
(make_ufixnum): New function, which checks that the arg
fits into 0..INTMASK range.

5 years agoFix some fixnum overflow problems in ccl.c
Paul Eggert [Thu, 15 Aug 2019 09:16:26 +0000 (02:16 -0700)]
Fix some fixnum overflow problems in ccl.c

* src/ccl.c (ccl_driver, Fccl_execute, Fccl_execute_on_string):
Don’t assume CCL registers fit into fixnums.

5 years agoPort mod-test-nanoseconds to 32-bit Emacs
Paul Eggert [Thu, 15 Aug 2019 09:06:04 +0000 (02:06 -0700)]
Port mod-test-nanoseconds to 32-bit Emacs

* test/src/emacs-module-tests.el (mod-test-nanoseconds):
Don’t assume -1000000000 is a fixnum.

5 years agoInclude port numbers in `M-x list-processes'
Lars Ingebrigtsen [Thu, 15 Aug 2019 07:16:02 +0000 (00:16 -0700)]
Include port numbers in `M-x list-processes'

* lisp/simple.el (list-processes--refresh): Include the port
numbers in the network connection list (bug#13604).

5 years agoAdd some cl- concept index entries
Lars Ingebrigtsen [Thu, 15 Aug 2019 07:05:33 +0000 (00:05 -0700)]
Add some cl- concept index entries

* doc/misc/cl.texi (Argument Lists): Add a couple of concept index
entried (bug#13606).