Stefan Kangas [Wed, 5 Feb 2020 12:22:56 +0000 (13:22 +0100)]
Don't use obsolete function in package-tests.el
* test/lisp/emacs-lisp/package-tests.el
(package-test-update-archives, package-test-signed): Use
'revert-buffer' instead of obsolete 'package-menu-refresh'.
Stefan Kangas [Wed, 5 Feb 2020 12:12:01 +0000 (13:12 +0100)]
Add new filter commands to Package Menu (Bug#38424)
* lisp/emacs-lisp/package.el (package-menu-filter-by-version)
(package-menu-filter-by-status, package-menu-filter-by-archive):
New filter commands.
(package-menu--filter-by): New helper function.
(package-menu-filter-by-keyword, package-menu-filter-by-name): Use
the above helper function.
(package-menu-mode-menu):
(package-menu-mode-map): Update menu to include new filter commands.
* doc/emacs/package.texi (Package Menu): Document the new commands and
re-arrange the sort order of commands to be closer to the one in
describe-major-mode.
* etc/NEWS: Announce the new commands.
* lisp/emacs-lisp/package.el (package-menu--display): New function
extracted from....
(package-menu--generate): ...here.
* test/lisp/emacs-lisp/package-tests.el (with-package-menu-test):
New macro.
(package-test-update-listing, package-test-list-filter-by-name)
(package-test-list-filter-clear): Use above macro.
(package-test-list-filter-by-archive)
(package-test-list-filter-by-keyword)
(package-test-list-filter-by-status)
(package-test-list-filter-by-version-=)
(package-test-list-filter-by-version-<)
(package-test-list-filter-by-version->): New tests.
(package-test-filter-by-version): New helper function.
Stefan Kangas [Sat, 18 Jan 2020 23:17:42 +0000 (00:17 +0100)]
Provide default for describe-keymap prompt
* lisp/help-fns.el (describe-keymap): Provide a reasonable
default for prompt. (Bug#30660)
(help-fns-find-keymap-name)
(help-fns--most-relevant-active-keymap): New functions.
* test/lisp/help-fns-tests.el
(help-fns-test-find-keymap-name): New test.
Stefan Kangas [Fri, 23 Aug 2019 23:02:04 +0000 (01:02 +0200)]
Add new help command describe-keymap
* lisp/help-fns.el (describe-keymap): New command to show key bindings
for a given keymap. (Bug#30660)
* doc/emacs/help.texi (Misc Help): Document the new command.
* doc/lispref/keymaps.texi (Scanning Keymaps): Add a cross-reference
to the above documentation.
* etc/NEWS: Announce the new command.
* test/lisp/help-fns-tests.el (help-fns-test-describe-keymap/symbol)
(help-fns-test-describe-keymap/value)
(help-fns-test-describe-keymap/not-keymap)
(help-fns-test-describe-keymap/let-bound)
(help-fns-test-describe-keymap/dynamically-bound-no-file): New tests.
Glenn Morris [Sat, 1 Feb 2020 15:50:10 +0000 (07:50 -0800)]
Merge from origin/emacs-27
5bf2ef3871 Add more blackboard bold characters to TeX input method c362a624d8 ; * lisp/progmodes/gdb-mi.el (gdb-handle-reply): Fix comme... 2b1e18ae85 Protect against errors in gdb-mi.el handlers baceb8e84d Allow exiting the Python interpreter of a GDB session 2e66013dcf Ensure minibuffer input is added to history in read_minibuf de41161534 Tab-bar related fixes. 247f2cfa02 ; ChangeLog.3 fixes. e1a712bb3f * admin/authors.el: Add missing entries.
* test/lisp/net/tramp-tests.el (shell-command-dont-erase-buffer):
Declare.
(tramp-test10-write-region, tramp-test21-file-links): Use function
symbols.
(tramp--test-async-shell-command): Don't assume that
`async-shell-command' returns the process object.
(tramp-test32-shell-command): Rework `async-shell-command-width' test.
(tramp-test32-shell-command-dont-erase-buffer): New test.
Add more blackboard bold characters to TeX input method
This patch adds all capital blackboard bold letters and those for "1"
and "2". Most characters are in common use in mathematics, but it does
not seem useful to exclude the few not widely used.
Eli Zaretskii [Fri, 31 Jan 2020 09:34:50 +0000 (11:34 +0200)]
Allow exiting the Python interpreter of a GDB session
* lisp/progmodes/gdb-mi.el (gdb-delchar-or-quit): Send EOF to GDB
if we are in an embedded interpreter. This allows to exit from
"pi" cleanly. (Bug#39140)
Federico Tedin [Wed, 29 Jan 2020 21:24:40 +0000 (22:24 +0100)]
Ensure minibuffer input is added to history in read_minibuf
* src/minibuf.c (read_minibuf): Parse input string after saving
the string to the history list instead of before, in case parsing
signals an error or is interrupted by C-g. (Bug#39291)
Glenn Morris [Tue, 28 Jan 2020 15:50:22 +0000 (07:50 -0800)]
Merge from origin/emacs-27
1bcac29b2f (origin/emacs-27) dns-mode-soa-auto-increment-serial: safe... abf0f8666d * lisp/wdired.el: Clean out isearch-filter-predicate (bug#... c31c31e57f ; Spelling and URL fixes 066aad7b9d Finish the documentation for c-noise-macro-{,with-parens-}... c8fcabf245 Correct regexp for flags in `format' doc string 2e9a153b26 Moderate recommendation to escape '(' in doc strings d7cd4ab7d9 Objective C Mode: Make c-forward-type work with "unsigned ... 1705e32ebc Fix help text about configure module support baca81e641 * doc/lispref/streams.texi (Output Functions): Improve ind... 568a560fce Improve doc string of 'newline' 7f50698505 Improve doc of eq on bignums etc. e5327a569c Do not refer to obsolete alias fd09196781 ; Clarify what time-stamp-active enables
Paul Eggert [Tue, 28 Jan 2020 07:27:46 +0000 (23:27 -0800)]
Update from Gnulib
This incorporates:
2020-01-27 regex: port to non-GCC pre-IEC-60559
2020-01-24 regex: port to Gawk on nonstandard platforms
2020-01-21 regex: fix bug with >=16 subexpressions
2020-01-21 regex: simplify definition of BITSET_WORD_BITS
* lib/regex.c, lib/regex_internal.h: Copy from Gnulib.
Paul Eggert [Tue, 28 Jan 2020 07:04:20 +0000 (23:04 -0800)]
Revert the --with-install-srcdir patch
Also, update description of debuginfo and sources to match
Debian and Red Hat more accurately, and move this sad tale
from INSTALL to etc/PROBLEMS which is a better home for it.
* Makefile.in (emacs_srcdir, install-c-src):
* configure.ac (emacs_srcdir, --with-install-srcdir):
* src/epaths.in (PATH_EMACS_SOURCE):
* src/lread.c (emacs-source-directory):
Remove. All uses removed.
* lisp/emacs-lisp/find-func.el (find-function-C-source):
Do not worry about compressed C sources.
* src/lread.c: Do not include <dosname.h>.
Juri Linkov [Tue, 28 Jan 2020 00:11:59 +0000 (02:11 +0200)]
* lisp/wdired.el: Clean out isearch-filter-predicate (bug#37496)
* lisp/wdired.el (wdired-change-to-dired-mode): Use remove-function to
remove wdired-isearch-filter-read-only (whose value was added in
wdired-change-to-wdired-mode) from local value of isearch-filter-predicate.
* lisp/net/tramp.el (tramp-parse-file):
Use `insert-file-contents-literally'.
(tramp-handle-shell-command): Reorganize error-buffer handling.
(tramp-handle-start-file-process): Use `consp' instead of `listp'.
* test/lisp/net/tramp-tests.el (tramp-test31-interrupt-process):
Bind `delete-exited-processes'.
(tramp--test-async-shell-command): Bind `delete-exited-processes'.
Add additional `accept-process-output'. Move cleanup of output
buffer ...
(tramp-test32-shell-command): ... here. Test error buffer also
for `async-shell-command'.
Paul Eggert [Sun, 26 Jan 2020 20:52:56 +0000 (12:52 -0800)]
Update mini-gmp
* src/mini-gmp.c, src/mini-gmp.h: Copy from GMP 6.2.0.
This incorporates:
2019-12-05 remove some sizeof(mp_limb_t)
2019-12-04 (mpn_invert_3by2): Remove special code for limb sizes
2019-12-04 (mpn_invert_3by2): Limit size of an intermediate
2019-11-20 (mpn_invert_3by2): Use xor instead of negation
2019-11-19 (mpn_invert_3by2): Move an assert earlier
2019-11-19 (mpn_invert_3by2): Add a new shortcut
2019-11-17 Prepend "unsigned" to MINI_GMP_LIMB_TYPE
2019-11-17 Enable testing with different limb sizes (types)
2019-11-20 Use already defined constants
2019-11-09 Avoid undefined behaviour with small limb sizes
(bookmark-test-bmenu-edit-annotation/show-annotation): Rename from
'bookmark-bmenu-edit-annotation/show-annotation'.
(bookmark-test-bmenu-send-edited-annotation): Rename from
'bookmark-bmenu-send-edited-annotation'.
(bookmark-test-bmenu-send-edited-annotation/restore-focus): Rename
from 'bookmark-bmenu-send-edited-annotation/restore-focus'.
Stefan Kangas [Sat, 25 Jan 2020 15:21:06 +0000 (16:21 +0100)]
Improve doc string of 'newline'
* lisp/simple.el (newline): Doc fix. Move 'use-hard-newlines' down,
since it's less important than the meaning of the prefix argument, and
is less frequently used than 'electric-indent-mode' and
'auto-fill-mode'. Change the wording to no longer call it an
option.
Paul Eggert [Sat, 25 Jan 2020 00:57:31 +0000 (16:57 -0800)]
Improve doc of eq on bignums etc.
* doc/lispref/numbers.texi (Integer Basics):
* doc/lispref/objects.texi (Integer Type, Equality Predicates):
Be clearer about eq vs eql vs = on bignums, floats, and strings.
Paul Eggert [Sat, 25 Jan 2020 00:41:38 +0000 (16:41 -0800)]
Install C source code for C-h f etc.
Without this change, on typical GNU/Linux distributions
like Debian, the first button of ‘C-h f car RET’ does not work
because the source code for ‘car’ is not installed (Bug#37527).
Fix this by installing the (compressed) C source code alongside
the (compressed) Lisp source code that is already installed.
This adds about 3 MB (about 2%) to the size of the installed files
on my platform.
* Makefile.in (emacs_srcdir): New macro.
(epaths-force): Substitute PATH_EMACS_SOURCE.
(install-c-src): New rule, that installs a copy of the C source
code if emacs_srcdir says to.
(install-arch-indep): Depend on it.
* configure.ac (emacs_srcdir): New var.
Add support for --disable-install-srcdir.
* lisp/emacs-lisp/find-func.el (find-function-C-source-directory):
Look in emacs-source-directory first.
(find-function-C-source): Also look for gzipped source files.
* lisp/startup.el (normal-top-level):
Also recode emacs-source-directory.
* src/epaths.in (PATH_EMACS_SOURCE): New macro.
* src/lread.c: Include dosname.h, for IS_ABSOLUTE_FILE_NAME.
(syms_of_lread): New var emacs-source-directory.
Paul Eggert [Fri, 24 Jan 2020 21:36:56 +0000 (13:36 -0800)]
Fix iso8601-parse so unknown DST is -1, not nil
The convention in a decoded time’s dst flag is that t means DST,
nil means standard time, and -1 means unknown. This differs from
the convention for other components of a decoded time, where nil
means unknown. Fix some places where iso8601-parse mistakenly
treated nil as meaning that the dst flag was unknown.
* doc/lispref/os.texi (Time Parsing):
Adjust to match parse-time-string’s doc string.
* lisp/calendar/iso8601.el (iso8601-parse):
Set dst flag to nil if a numeric time zone or "Z" is given.
(iso8601--decoded-time): Default dst flag to -1 if no dst
flag or zone is given.
* lisp/calendar/time-date.el (decoded-time-set-defaults):
When we don’t have a time zone, set the dst flag consistently
with DEFAULT-ZONE.
* 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-local-time)
(standard-test-time-of-day-fractions)
(nonstandard-test-time-of-day-decimals)
(standard-test-time-of-day-beginning-of-day)
(standard-test-date-and-time-of-day, standard-test-interval):
Adjust tests to match fixed behavior.
Stephen Gildea [Fri, 24 Jan 2020 17:15:44 +0000 (09:15 -0800)]
; Clarify what time-stamp-active enables
Fix documentation strings and comments for time-stamp. Most notably:
* lisp/time-stamp.el (time-stamp-active): in the doc string, clarify
that time-stamp-active does not add time-stamp to any hook.
Alan Third [Sun, 10 Feb 2019 10:59:29 +0000 (10:59 +0000)]
Draw to offscreen buffer on macOS
* src/nsfns.m (x_set_background_color): Clear the frame after changing
the background color, not before.
* src/nsterm.h (drawingBuffer): New variable.
([EmacsView focusOnDrawingBuffer]):
([EmacsView copyRect:to:]):
([EmacsView createDrawingBufferWithRect:]): New methods.
* src/nsterm.m (ns_update_begin):
(ns_update_end):
(ns_focus):
(ns_unfocus): Handle drawing to offscreen buffer.
(ns_clip_to_row): Use ns_row_rect.
(ns_copy_bits): Remove unused function.
(ns_scroll_run):
(ns_shift_glyphs_for_insert): Use new scrolling method.
(ns_draw_fringe_bitmap):
(ns_dumpglyphs_image): When drawing to the offscreen buffer, flip
images so they appear the right way up.
(ns_dumpglyphs_stretch): Remove unnecessary code.
(ns_draw_window_cursor): Don't disable screen updates.
([EmacsView updateFrameSize:]): Update the size of the offscreen
buffer.
([EmacsView initFrameFromEmacs:]): Create offscreen buffer.
([EmacsView windowDidChangeBackingProperties:]):
([EmacsView createDrawingBufferWithRect:]):
([EmacsView focusOnDrawingBuffer]):
([EmacsView copyRect]): New methods.
([EmacsView viewWillDraw]): Remove method as it no longer does
anything useful.
([EmacsView drawRect:]): Handle drawing from offscreen buffer.
Glenn Morris [Fri, 24 Jan 2020 15:50:22 +0000 (07:50 -0800)]
Merge from origin/emacs-27
92f080dda8 Tab-bar related finishing touches. 224e8d1464 Make call_process call signal_after_change. This fixes bu... d02f2a793e * lisp/simple.el: Minor fixes to commentary. 196c42b8bf Fix a few typos 4f2b967795 Fix doc strings for image-dired rotation commands
Michael Albinus [Fri, 24 Jan 2020 13:41:22 +0000 (14:41 +0100)]
Support (un)mount of Tramp media devices
* lisp/net/tramp-gvfs.el (tramp-gvfs-gio-mapping): Add "gvfs-rename".
(tramp-gvfs-do-copy-or-rename-file): Use it.
(tramp-gvfs-activation-uri): Handle "media" method.
(tramp-gvfs-url-host): New defun.
(tramp-gvfs-handler-mounted-unmounted)
(tramp-gvfs-connection-mounted-p)
(tramp-gvfs-handler-volumeadded-volumeremoved)
(tramp-get-media-devices): Use it.
Paul Eggert [Fri, 24 Jan 2020 07:06:27 +0000 (23:06 -0800)]
Simplify locale setup
Stop exporting Vprevious_system_time_locale and
Vprevious_system_messages_locale to Elisp. I did that export by
mistake in 1999, and the Elisp variables have never been used.
Simplifying this cruft should make it easier to fix Bug#39248.
* etc/NEWS: Mention this.
* src/emacs.c (main): Simplify locale initialization.
(synchronize_locale): Simplify.
(Vprevious_system_time_locale, Vprevious_system_messages_locale):
Now static variables not visible to Lisp, and defined only if
HAVE_SETLOCALE.
(Vprevious_system_messages_locale): Define only if LC_MESSAGES.
* lisp/net/tramp-cache.el (tramp-get-file-property)
(tramp-set-file-property): Check, whether
`tramp-cache-{g,s}et-count-*' objects are numbers.
* lisp/net/tramp-gvfs.el (top): Don't set global default for
"media" in `tramp-default-host-alist'.
(tramp-gvfs-handler-volumeadded-volumeremoved): New defun.
(top): Register "org.gtk.Private.RemoteVolumeMonitor.VolumeAdded"
and "org.gtk.Private.RemoteVolumeMonitor.VolumeRemoved" signals.
(tramp-get-media-devices): Set defaults for "media" in
`tramp-default-host-alist'.