1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-22 18:35:09 +00:00
Commit Graph

140315 Commits

Author SHA1 Message Date
Yuan Fu
07e1852c9b Enhance memory address evaluation in gdb-mi
Before, the memory buffer evaluated the expression as address and used
the fixed result in each stop.  This change store the expression
itself and reevaluates it in each stop to yield an address.
We also add a warning (a red bold exclamation mark) on the header line
when the content of the page doesn't represent the memory location
user requested for.  That happends when some error occurs in
evaluating the address, and we display the last successfully displayed
memory page.
* lisp/progmodes/gdb-mi.el (gdb-memory-address-expression)
(gdb--memory-display-warning): New variables.
(gdb-memory-address): Change default value to nil; add docstring.
(def-gdb-trigger-and-handler, gdb-invalidate-memory)
(gdb-memory-set-address): Replace 'gdb-memory-address' with
'gdb-memory-address-expression'.
(gdb-memory-header): Add code to display
'gdb-memory-address-expression' on header line.  Move the mouse event
from address to expression.  Add code to display the warning.
(gdb-memory-header): Fix the error from
'propertize' when 'gdb-memory-address-expression' or
'gdb-memory-address' is nil.
(gdb-read-memory-custom): Change 'error' to 'user-error'.  Add code to
display the warning.  (Bug#39180)
2020-02-08 11:46:54 +02:00
Michael Albinus
30abcda54e Some Tramp fixes
* lisp/net/tramp.el (tramp-connectable-p):
* lisp/net/tramp-cache.el (tramp-list-connections):
* lisp/net/tramp-gvfs.el (tramp-gvfs-enabled):
Bind `tramp-verbose' to 0.

* lisp/net/tramp-sh.el (tramp-remote-path, tramp-find-executable):
Fix docstring.
(tramp-open-shell): Read prompt when moving "~/.editrc".
2020-02-07 11:56:13 +01:00
Eli Zaretskii
ac6ba689d1 Minor fixes of the last commit
* src/xdisp.c (get_window_cursor_type): Fix indentation and
line-filling.
* doc/lispref/frames.texi (Cursor Parameters):
* doc/emacs/display.texi (Cursor Display):
* etc/NEWS: Fix wording and capitalization of the last change.
2020-02-07 12:10:43 +02:00
Zajcev Evgeny
63fd6c9ef0 Support for (box . SIZE) 'cursor-type'
This allows control of the minimum size of a masked image under
which the box cursor becomes hollow.
* buffer.c (cursor-type): Add commentary about (box . SIZE)
'cursor-type'.
* xdisp.c (get_specified_cursor_type): Check for 'cursor-type'
of the form (box . SIZE).
(get_window_cursor_type): Check masked image size for
(box . SIZE) 'cursor-type'.

* doc/emacs/display.texi (Cursor Display):
* doc/emacs/display.texi (Cursor Parameters): Add description
of (box . SIZE) 'cursor-type'.

* etc/NEWS: Mention the new (box . SIZE) 'cursor-type'.
2020-02-07 12:00:14 +02:00
Richard Stallman
c4be801125 Merge 2020-02-06 18:30:47 -05:00
Richard Stallman
53f0de5d77 Lispref: Explain avoiding lambdas on hooks.
(lispref/modes.texi): Explain avoiding lambdas on hooks.
2020-02-06 18:28:49 -05:00
Glenn Morris
15814d0ccd ; Merge from origin/emacs-27
The following commit was skipped:

b2e27d8617 (origin/emacs-27) Revert "Signal user-error on duplicate p...
2020-02-06 07:50:29 -08:00
Glenn Morris
68d43392a6 Merge from origin/emacs-27
09eed01afb Wrap some set-auto-mode calls with delay-mode-hooks (bug#3...
4a0a114505 Support ido-vertical-mode better
ef5fba9f40 Fix faces tab-bar and tab-line.
831508422e Cater for 3-argument version of pthread_setname_np
f27187f963 Clarify lexvar restrictions for add-to-ordered-list, add-t...
32763dac46 Replace add-to-list to lexical variable with push (bug#39373)
d07f177382 Clarify add-to-list documentation (bug#39373)
d3d2ea927c MH-E: alter content in mh-display-msg, not mh-show-mode
db7fa2546f Update documentation for mh-show-mode-hook
d10be6bf28 Example goto-addr hook: MH-E already uses goto-address

# Conflicts:
#	etc/NEWS
2020-02-06 07:50:29 -08:00
Stefan Monnier
cf14fa0427 * lisp/battery.el: Use lexical-binding. Drop Redundant :groups. 2020-02-06 10:41:26 -05:00
Zajcev Evgeny
d8f4317f03 Make 'M-x battery RET' work out-of-box for UPower users.
* battery.el (battery-upower-prop): Removed in favor for
  'battery-upower-device-property'.
  (battery-upower-device): Can be nil, meaning autodetect the battery
  device.
  (battery-upower-line-power-device): New.  line-power device.  Can be
  nil, meaning autodetect line-power device.
  (battery-status-function): Check UPower service is available to use
  'battery-upower' as status function.
  (battery-upower): Speedup.  Request D-Bus only once, fetching all
  the properties at once.  Provide string for "%b" format spec.
  (battery-upower-device-list, battery-upower-device-all-properties,
  battery-upower-device-property): New functions to work with UPower
  devices.
  (battery-upower-dbus-service, battery-upower-dbus-interface,
  battery-upower-dbus-path, battery-upower-dbus-device-interface,
  battery-upower-dbus-device-path): New constants describing UPower
  D-Bus service.
2020-02-06 09:13:19 -05:00
Stefan Kangas
b2e27d8617 Revert "Signal user-error on duplicate package refresh"
That commit caused errors when the connection was dropped in the
middle of a package refresh.  To avoid any further issues this close
to the pretest, we simply remove this feature.  (Bug#39187)

Don't merge to master, where we will instead try to fix the bug.
2020-02-06 13:37:38 +01:00
Juri Linkov
09eed01afb Wrap some set-auto-mode calls with delay-mode-hooks (bug#39190)
* lisp/gnus/mm-view.el (mm-display-inline-fontify):
* lisp/vc/diff-mode.el (diff-syntax-fontify-props):
* lisp/vc/vc.el (vc-find-revision-no-save):
Add delay-mode-hooks around set-auto-mode calls
to not run hooks that might assume buffer-file-name
really associates buffer with a file.
2020-02-06 00:38:53 +02:00
Juri Linkov
7e0a4b7ca5 * lisp/wid-edit.el (widget-choose): Use read-char-from-minibuffer (bug#17272) 2020-02-06 00:27:37 +02:00
Tino Calancha
ebff24c0b8 Eval macro arg just once
* lisp/emacs-lisp/cl-macs.el (cl--push-clause-loop-body):
Use `macroexp-let2' (Bug#39428).
2020-02-05 19:05:23 +01:00
Tassilo Horn
0609dd481a Add ':extend t' to mm-uu-extract face
* lisp/gnus/mm-uu.el (mm-uu-extract): Add ':extend t' to mm-uu-extract
face.
2020-02-05 18:09:09 +01:00
Stefan Kangas
feb681dc36 Silence byte-compiler warning
* lisp/emacs-lisp/bytecomp.el (byte-compile-insert-header): Silence
byte-compiler warning about "Unused lexical variable".
2020-02-05 13:28:31 +01:00
Stefan Kangas
bb9723b0e2 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'.
2020-02-05 13:22:56 +01:00
Stefan Kangas
aea12d4903 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.
2020-02-05 13:18:12 +01:00
Michael Albinus
196da3017b Minor fix in tramp-test32-shell-command
* test/lisp/net/tramp-tests.el (tramp-test32-shell-command):
Set `default-directory'.
2020-02-05 11:41:14 +01:00
Michael Albinus
6b00600647 Handle problem with *BSD libedit in Tramp
* lisp/net/tramp-sh.el (tramp-sh-extra-args): Add "-noediting" as
bash arg.
(tramp-open-shell):  Provide proper "~/.editrc" if needed.  (Bug#39399)
2020-02-05 11:40:52 +01:00
Michael Albinus
1759b7d06a * lisp/net/tramp-gvfs.el (tramp-gvfs-handle-file-system-info): Fix error. 2020-02-05 11:40:06 +01:00
Stefan Monnier
5006816368 * lisp/gnus/gnus-sum.el (gnus-read-move-group-name): Use user-error 2020-02-04 22:32:39 -05:00
Dmitry Gutov
4a0a114505 Support ido-vertical-mode better
* lisp/ido.el (ido-exhibit):
Prepend a space to INF if it starts with a newline (bug#39379).
2020-02-05 02:50:26 +03:00
Juri Linkov
ef5fba9f40 Fix faces tab-bar and tab-line.
* lisp/tab-bar.el (tab-bar) <defface>:
* lisp/tab-line.el (tab-line) <defface>:
Check for min-colors 88 instead of type x.
2020-02-05 01:27:30 +02:00
Adam Porter
e287da5a81 * lisp/emacs-lisp/map.el: Add keyword-only pattern abbreviation
* lisp/emacs-lisp/map.el: Update version to 2.1.
((pcase-defmacro map)): Update docstring.
(map--make-pcase-bindings): Match keyword pattern.

* test/lisp/emacs-lisp/map-tests.el (test-map-plist-pcase): Add test.
2020-02-04 12:30:31 -05:00
Stefan Kangas
b641c178ce Silence byte-compiler warning
* lisp/dired.el (grep-read-files-function): Add defvar to silence
byte-compiler warning.
2020-02-04 02:26:35 +01:00
Stefan Kangas
330228d5c7 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.
2020-02-04 02:04:20 +01:00
Stefan Kangas
557b790e0a 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.

Co-authored-by: Drew Adams <drew.adams@oracle.com>
2020-02-04 02:04:20 +01:00
Stefan Monnier
f9504ffba2 * lisp/progmodes/sh-script.el: Remove old non-SMIE indentation code
(sh-learn-basic-offset, sh-blink, sh-use-smie): Remove config vars.
(sh-kw-alist, sh-learned-buffer-hook): Remove var.
(sh-must-support-indent, sh-mark-init, sh-mark-line): Remove function.
(sh-kw, sh-special-keywords): Remove constant.
(sh-help-string-for-variable, sh-read-variable, sh-goto-matching-if)
(sh-handle-prev-if, sh-handle-this-else, sh-handle-prev-else)
(sh-handle-this-fi, sh-handle-prev-fi, sh-handle-this-then)
(sh-handle-prev-then, sh-handle-prev-open, sh-handle-this-close)
(sh-goto-matching-case, sh-handle-prev-case, sh-handle-this-esac)
(sh-handle-prev-esac, sh-handle-after-case-label)
(sh-handle-prev-case-alt-end, sh-safe-forward-sexp)
(sh-goto-match-for-done, sh-handle-this-done, sh-handle-prev-done)
(sh-handle-this-do, sh-handle-prev-do, sh-find-prev-switch)
(sh-handle-this-rc-case, sh-handle-prev-rc-case, sh-check-rule)
(sh-get-indent-info, sh-get-indent-var-for-line, sh-prev-line)
(sh-prev-stmt, sh-get-word, sh-prev-thing, sh-this-is-a-continuation)
(sh-get-kw, sh-find-prev-matching, sh-set-var-value)
(sh-calculate-indent, sh-indent-line, sh-blink, sh-guess-basic-offset):
Remove functions.
(sh-show-indent, sh-set-indent, sh-learn-line-indent)
(sh-learn-buffer-indent): Redefine as obsolete aliases.
2020-02-03 15:26:59 -05:00
Robert Pluim
831508422e Cater for 3-argument version of pthread_setname_np
Fixes Bug#39363.

* configure.ac: Add check for 3-argument version of
pthread_setname_np.
* src/systhread.c (sys_thread_set_name)
[HAVE_PTHREAD_SETNAME_NP_3ARG]: Call pthread_setname_np with
3 arguments.
2020-02-03 16:40:25 +01:00
Mattias Engdegård
f27187f963 Clarify lexvar restrictions for add-to-ordered-list, add-to-history
* lisp/subr.el (add-to-ordered-list, add-to-history):
* doc/lispref/lists.texi (List Variables):
* doc/lispref/minibuf.texi (Minibuffer History):
Note in the doc string and manual that the variable arguments to
add-to-ordered-list and add-to-history cannot refer to a lexical
variable (bug#39373).
2020-02-02 12:52:44 +01:00
Michael Albinus
45fd45a283 ; Fix docstring in Tramp
* test/lisp/net/tramp-tests.el
(tramp-test32-shell-command-dont-erase-buffer): Fix docstring.
2020-02-02 11:26:09 +01:00
Mattias Engdegård
32763dac46 Replace add-to-list to lexical variable with push (bug#39373)
Since 'add-to-list', being a plain function, cannot access lexical
variables, such use must be rewritten for correctness.
(Some instances actually do work thanks to a compiler macro,
but it's not something code should rely on.)

* lisp/autoinsert.el (auto-insert-alist):
* lisp/cedet/mode-local.el (mode-local-print-bindings):
* lisp/net/tramp-cache.el (tramp-flush-connection-properties)
(tramp-list-connections):
* lisp/net/zeroconf.el (zeroconf-list-service-names)
(zeroconf-list-service-types, zeroconf-list-services):
* lisp/org/org.el (org-reload):
* lisp/whitespace.el (whitespace-report-region):
* test/lisp/emacs-lisp/map-tests.el (test-map-do):
Replace add-to-list with push.
2020-02-01 22:27:23 +01:00
Mattias Engdegård
d07f177382 Clarify add-to-list documentation (bug#39373)
While add-to-list often works with lexical variables, this is a hack
that isn't always effective; better tell the user not to try.

* doc/lispref/lists.texi (List Variables): Add a note about lexical
variables to the add-to-list description.  Fix the equivalent code.
* lisp/subr.el (add-to-list): Amend doc string.
2020-02-01 22:26:57 +01:00
Stephen Gildea
d3d2ea927c MH-E: alter content in mh-display-msg, not mh-show-mode
* lisp/mh-e/mh-show.el (mh-display-msg, mh-show-mode):  buffer-altering
code formerly in mh-show-mode is moved to the location in mh-display-msg
where mh-show-mode used to be called before the fix to MH-E bug #470
moved the call earlier.
2020-02-01 09:28:30 -08:00
Stephen Gildea
db7fa2546f Update documentation for mh-show-mode-hook
* lisp/mh-e/mh-e.el, doc/misc/mh-e.texi (mh-show-mode-hook): Now that
the fix for MH-E bug #470 calls mh-show-mode-hook earlier, update the
documentation to no longer say that the message contents are available.
2020-02-01 09:18:46 -08:00
Stephen Gildea
d10be6bf28 Example goto-addr hook: MH-E already uses goto-address
* lisp/net/goto-addr.el, doc/emacs/misc.texi: Do not use MH-E as the
example of how to add a hook to goto-address, because MH-E calls
goto-address internally.
2020-02-01 09:06:34 -08:00
Glenn Morris
39f723b293 ; Merge from origin/emacs-27
The following commit was skipped:

42c1e60657 (origin/emacs-27, emacs-27) ; Auto-commit of loaddefs files.
2020-02-01 07:50:10 -08:00
Glenn Morris
1083e5243f Merge from origin/emacs-27
cdf8c31844 Extend workaround for Cygwin O_PATH bug
2020-02-01 07:50:10 -08:00
Glenn Morris
0e9a14beee ; Merge from origin/emacs-27
The following commit was skipped:

0223a1577c * lisp/emacs-lisp/debug.el (debug): Merge the non-interact...
2020-02-01 07:50:10 -08:00
Glenn Morris
0ceb5d0b23 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.
2020-02-01 07:50:10 -08:00
Glenn Morris
fcac8fcf17 ; Auto-commit of loaddefs files. 2020-02-01 06:26:07 -08:00
Glenn Morris
42c1e60657 ; Auto-commit of loaddefs files. 2020-02-01 06:11:46 -08:00
Michael Albinus
bb1d42b955 Implement `shell-command-dont-erase-buffer' in Tramp. (Bug#39067)
* lisp/net/tramp.el (tramp-handle-shell-command):
Handle `shell-command-dont-erase-buffer'.  (Bug#39067)

* 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.
2020-02-01 14:29:45 +01:00
Ken Brown
cdf8c31844 Extend workaround for Cygwin O_PATH bug
* configure.ac (HAVE_CYGWIN_O_PATH_BUG): Extend to Cygwin versions
3.1.0 through 3.1.2.  (Bug#39371)
2020-01-31 11:28:56 -05:00
Paul Pogonyshev
0223a1577c * lisp/emacs-lisp/debug.el (debug): Merge the non-interactive cases
bug#38927

(cherry picked from commit 502059433c)
2020-01-31 16:09:42 +02:00
Ansgar Burchardt
5bf2ef3871 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.

Reference: https://en.wikipedia.org/wiki/Blackboard_bold

* lisp/leim/quail/latin-ltx.el (latin-ltx--define-rules): Add all
the blackboard bold commands from AMSTeX.  (Bug#21103)
2020-01-31 12:20:39 +02:00
Eli Zaretskii
c362a624d8 ; * lisp/progmodes/gdb-mi.el (gdb-handle-reply): Fix commentary. 2020-01-31 11:41:14 +02:00
Yuan Fu
2b1e18ae85 Protect against errors in gdb-mi.el handlers
* lisp/progmodes/gdb-mi.el (gdb-handle-reply): Handle errors
in 'handler-function' so the cleanup code after it runs
safely.  (Bug#39178)
2020-01-31 11:39:12 +02:00
Eli Zaretskii
baceb8e84d 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)
2020-01-31 11:34:50 +02:00