1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-23 07:19:15 +00:00
Commit Graph

146372 Commits

Author SHA1 Message Date
Stefan Monnier
556c23cd17 * lisp/emacs-lisp/easy-mmode.el (define-minor-mode): Tweak further
Suggested by Lars Ingebrigtsen <larsi@gnus.org>.
2021-04-17 09:57:01 -04:00
Alan Third
c7555f037a Fix :scale's affect on :width and :height (bug#47819)
* src/image.c (compute_image_size): Multiply width and height values
by scale.
2021-04-17 09:41:37 +01:00
Martin Rudalics
cbf5bdd253 Don't allow quitting while rebuilding Vwindow_list (Bug#47244)
* src/window.c (window_list, next_window, window_list_1): Don't
allow quitting in Fnconc and Fmemq (Bug#47244).
2021-04-17 09:50:01 +02:00
Stefan Monnier
d262138383 * lisp/emacs-lisp/easy-mmode.el (define-minor-mode): Improve C-h f output
Suggested by Michael Heerdegen <michael_heerdegen@web.de>.
2021-04-16 23:40:51 -04:00
Stefan Kangas
740dbf2295 Cleanup in em-extra.el
* lisp/eshell/em-xtra.el (cl-lib): Require.
(pcomplete, compile): Remove unnecessary requires.
(eshell/substitute, eshell/count, eshell/mismatch, eshell/union)
(eshell/intersection, eshell/set-difference)
(eshell/set-exclusive-or): Use cl-lib.  Doc fixes.
(eshell/ff, eshell/gf, eshell/expr): Quote function symbols as such.
(eshell/expr): Assume 'calc-eval' is always available.
2021-04-17 02:25:42 +02:00
Alan Mackenzie
610099d641 Check minibuffer windows are live windows, rather than assuming it
This partly fixes bug #47207.

* src/minibuf.c (choose_minibuf_frame, move_minibuffers_onto_frame)
(read_minibuf (twice), read_minibuf_unwind): Before using a frame's
->minibuffer_window field, check it is valid with WINDOW_LIVE_P.
(choose_minibuf_frame): Remove the emacs_abort for a null minibuffer.
2021-04-16 19:34:00 +00:00
Glenn Morris
629e5f8026 Merge from origin/emacs-27
eedad01b4b (origin/emacs-27) Fix typos in manuals
24d214652e Fix description of momentary message display
2021-04-16 07:50:20 -07:00
Stefan Kangas
fb9f5501d8 ; Fix typos: emacs lisp -> Emacs Lisp 2021-04-16 14:54:02 +02:00
Stefan Kangas
289ec2d911 ; Remove some useless comments 2021-04-16 14:54:02 +02:00
Robert Pluim
fcd1943bfe ; Grammar fixes
* doc/lispref/display.texi (Size of Displayed Text): Grammar fix.

* etc/NEWS: Grammar fix.
2021-04-16 09:56:41 +02:00
Robert Pluim
2448fb2f25 ; Fix typos
* doc/lispref/display.texi (SVG Images): Fix typos.
2021-04-16 09:51:59 +02:00
Robert Pluim
ef6df9ec8f Improve docstring of 'frame-scale-factor'
* src/frame.c (Fframe_scale_factor): Explain what happens when the
FRAME argument is nil.
2021-04-16 09:51:59 +02:00
Dmitry Gutov
f955df1788 Improve quoting of directory names in project/xref
* lisp/progmodes/project.el (project--files-in-directory):
Quote LOCALDIR a bit earlier, to affect
xref--find-ignores-arguments as well (bug#47799).

* lisp/progmodes/xref.el (xref-matches-in-directory):
Quote the dir passed to xref--rgrep-command.
2021-04-16 03:52:44 +03:00
Dmitry Gutov
4180429d5d project--files-in-directory: Handle errors reported by 'find'
* lisp/progmodes/project.el (project--files-in-directory):
Handle errors reported by 'find' (bug#47799).
2021-04-16 03:38:23 +03:00
Eli Zaretskii
3b84f8f47c Fix 'garbage-collect-maybe'
* src/alloc.c (Fgarbage_collect_maybe): No longer interactive.
(Bug#47805)
2021-04-15 22:00:19 +03:00
Alan Third
c237209643 Allow use of em in image spec sizes
* src/image.c (image_get_dimension): New function.
(compute_image_size): Use image_get_dimension to set the sizes, and
pass in the image struct instead of just the spec.
(image_set_transform):
(imagemagick_load_image):
(svg_load_image): Use the image instead of the spec in compute_image_size.
(syms_of_image): Add 'em' as a symbol.
2021-04-15 17:56:23 +01:00
Philipp Stephani
157bfc1812 Improve project support for quoted directory names (Bug#47799)
* lisp/progmodes/project.el (project--files-in-directory): Unquote
directory name before passing it to 'find'.
(project--remote-file-names): Requote local filenames if the original
directory is quoted.
* test/lisp/progmodes/project-tests.el (project/quoted-directory): New
unit test.
2021-04-15 18:41:04 +02:00
Stefan Monnier
0c3ce42c8f * lisp/emacs-lisp/bindat.el: Allow non-fixed size of strz
(bindat--unpack-strz): Allow `len` to be nil.
(bindat--pack-strz): New function.
(bindat--type) <strz>: Make `len` arg optional.
(bindat-type): Adjust debug spec and docstring accordingly.

* doc/lispref/processes.texi (Bindat Types): Adjust accordingly.
2021-04-15 11:28:06 -04:00
Mattias Engdegård
7893945cc8 Add condition-case success handler (bug#47677)
Allow a condition-case handler on the form (:success BODY) to be
specified as the success continuation of the protected form, with
the specified variable bound to its result.

* src/eval.c (Fcondition_case): Update the doc string.
(internal_lisp_condition_case): Implement in interpreter.
(syms_of_eval): Defsym :success.
* lisp/emacs-lisp/bytecomp.el (byte-compile-condition-case):
Implement in byte-compiler.
* lisp/emacs-lisp/cl-macs.el (cl--self-tco): Allow self-TCO
from success handler.
* doc/lispref/control.texi (Handling Errors): Update manual.
* etc/NEWS: Announce.
* test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp-tests--test-cases)
(bytecomp-condition-case-success):
* test/lisp/emacs-lisp/cl-macs-tests.el (cl-macs--labels):
Add test cases.
2021-04-15 15:41:13 +02:00
Alan Mackenzie
31f8ae53be CC Mode: Put debug specs inside declare forms. Add missing debug specs.
* lisp/progmodes/cc-bytecomp.el, lisp/progmodes/cc-cmds.el,
lisp/progmodes/cc-defs.el, lisp/progmodes/cc-engine.el,
lisp/progmodes/cc-fonts.el, lisp/progmodes/cc-langs.el,
lisp/progmodes/cc-mode.el: Change the explicit def-edebug-spec for many macros
into a (declare (debug ...) ..) form.  Add such forms to macros which were
previously lacking def-edebug-spec forms.
2021-04-15 10:11:20 +00:00
Juri Linkov
4ddad8f1db repeat-echo-mode-line-string doesn't need risky-local-variable to keep props
(bug#47566)
2021-04-14 23:05:43 +03:00
Filipp Gunbin
57347554a1 Java Mode: Change the syntax of character @ to prefix syntax
lisp/progmodes/cc-langs.el (c-make-mode-syntax-table): Change the syntax of @
as indicated.
2021-04-14 19:27:00 +00:00
Juri Linkov
c2fc0c7029 * lisp/isearch.el (isearch-mouse-2): Let-bind isearch-mode to nil (bug#47755) 2021-04-14 21:35:06 +03:00
Juri Linkov
9b8a5070e5 Don't error out when selection data is unavailable (bug#47642)
* src/xselect.c (x_get_window_property_as_lisp_data):
Display a message and return nil when data is not available.
2021-04-14 21:22:55 +03:00
Juri Linkov
94586ba26f * lisp/progmodes/gud.el (gud-repeat-map): New variable (bug#47688).
(gud-gdb): Populate gud-repeat-map with repeating keys.
2021-04-14 21:11:45 +03:00
Juri Linkov
8205108217 * lisp/repeat.el: Add option to indicate repeat-mode in mode-line (bug#47566)
* lisp/repeat.el (repeat-echo-function): Rename from repeat-mode-echo.
Add choice repeat-echo-mode-line.
(repeat-in-progress): New variable.
(repeat-post-hook): Call repeat-echo-function with nil arg
at the end of repeating sequence.
(repeat-echo-message-string): New function with body from repeat-post-hook.
(repeat-echo-message): Rename from repeat-mode-message.
(repeat-echo-mode-line-string): New variable.
(repeat-echo-mode-line): New function.
2021-04-14 21:10:00 +03:00
Basil L. Contovounesios
8ec1391ace ; Fix a couple of recent typos. 2021-04-14 12:41:49 +01:00
Michael Albinus
8aaf13eae6 Rearrange argument handling in Tramp scp calls.
* lisp/net/tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band):
Use `start-process' instead of `start-process-shell-command'.
(tramp-make-copy-program-file-name): Do not quote `localname'.

* test/lisp/net/tramp-tests.el (tramp-method-out-of-band-p): Declare.
(tramp--test-windows-nt-and-batch-p)
(tramp--test-windows-nt-and-pscp-psftp-p): Remove, and also all callees.
(tramp--test-windows-nt-and-out-of-band-p)
(tramp--test-windows-nt-and-scp-p): New defuns.
(tramp-test17-dired-with-wildcards)
(tramp-test40-special-characters)
(tramp-test40-special-characters-with-stat)
(tramp-test40-special-characters-with-perl)
(tramp-test40-special-characters-with-ls, tramp-test41-utf8)
(tramp-test41-utf8-with-stat, tramp-test41-utf8-with-perl)
(tramp-test41-utf8-with-ls): Use them.
2021-04-14 13:25:36 +02:00
Eli Zaretskii
d1559ede54 Add two optional arguments to 'string-width'
* src/character.c (Fstring_width, lisp_string_width): Accept two
optional arguments FROM and TO, to indicate the substring to be
considered.
(Fstring_width): Add caveats in the doc string about display
features ignored by the function.  (Bug#47712)
* src/character.h (lisp_string_width): Update prototype.
* src/editfns.c (styled_format): Adjust call of lisp_string_width
to its changed signature.

* test/src/character-tests.el (character-test-string-width): New
file with tests for 'string-width'.

* doc/lispref/display.texi (Size of Displayed Text): Document
caveats of using 'string-width'.

* etc/NEWS: Announce the change.
2021-04-14 11:47:55 +03:00
Stefan Monnier
844b8949a7 * src/xdisp.c (wset_update_mode_line): Move from src/window.c
Move that function next to its siblings.  Also simplify it, since
after careful analysis it is now clear that the frame's title's update
is already handled elsewhere (in `prepare_menu_bars` and `redisplay_window`)
so we just need to make sure the `redisplay` bit is set.

* src/window.c (wset_update_mode_line): Move to `src/xdisp.c`.
* src/window.h (wset_update_mode_line): Declare.
2021-04-13 23:55:47 -04:00
Stefan Monnier
839a9e74e0 * lisp/nxml/xmltok.el (xmltok-defregexp): Don't quote lambda 2021-04-13 23:34:35 -04:00
Stefan Monnier
86daa721bb * lisp/emacs-lisp/eieio-core.el (list-of): Don't quote lambda 2021-04-13 23:28:04 -04:00
Filipp Gunbin
468a00f380 * doc/lispref/keymaps.texi (Translation Keymaps): Fix small misprint 2021-04-13 20:07:20 +03:00
Filipp Gunbin
9738b5b93b * doc/lispref/processes.texi: Fix small misprint 2021-04-13 19:54:39 +03:00
Eric Abrahamsen
17ff8c3e5a Improvements to message-syntax-checks docs and options
* doc/misc/message.texi: Move the manual entry from the "News Headers"
section to the "Message Headers" section, as it is generally
applicable, not just to News.
* lisp/gnus/message.el (message-syntax-checks): Add an explicit alist
type specifying the valid options; point to the manual for more
information.
2021-04-13 08:45:07 -07:00
Stefan Monnier
1db460784e * lisp/textmodes/two-column.el: Address FIXME
(2C-associate-buffer): Move minibuffer interactive to the `interactive` spec.
2021-04-13 09:59:23 -04:00
Stefan Monnier
cf605d56f9 * lisp/textmodes/paragraphs.el (multiple-lines): Remove mistaken declaration
(forward-paragraph): Remove unused var `multiple-lines`.
2021-04-13 09:47:46 -04:00
Eli Zaretskii
1667253fec Resurrect mouse-highlight of close buttons on tab-bar
* src/w32term.c (w32_draw_image_relief): Support tab-bar drawing
with relief as xterm.c does.

* src/xdisp.c (handle_tab_bar_click): Access the mouse-highlight
info.  Call show_mouse_face to show the button in the pressed or
the released state, according to value of DOWN_P.
(note_tab_bar_highlight): Function added back.
(note_mouse_highlight): Call note_tab_bar_highlight when the mouse
pointer is in the tab-bar window.
(show_mouse_face): Return immediately if mouse_face_window is not
set up in HLINFO.  This avoids rare assertion violations.
2021-04-13 16:40:42 +03:00
Eli Zaretskii
eedad01b4b Fix typos in manuals
* doc/misc/eshell.texi (Completion):
* doc/lispref/objects.texi (Mutability): Fix typos.  (Bug#47738)
2021-04-13 15:30:02 +03:00
Stefan Monnier
6de79542e4 * lisp/comint.el: Add font-lock-face to rear-nonsticky
(comint--prompt-rear-nonsticky): New const.
(comint-send-input, comint-output-filter): Use it.
2021-04-12 22:49:48 -04:00
Stefan Monnier
214dfbfea0 Don't version-control generated file grammat-wy.el
This file is needed for CEDET's bootstrap, tho, so we now keep a copy of it
under version control in `gram-wy-boot.el`, very much like we do with
the `ldefs-boot.el` copy of `loaddefs.el`.

* lisp/cedet/semantic/grm-wy-boot.el: Rename from
`lisp/cedet/semantic/grammar-wy.el`.

* lisp/cedet/semantic/grammar.el: Load `grm-wy-boot.el` if
`grammar-wy.el` hasn't been generated yet.

* admin/update_autogen: Also refresh `grm-wy-boot.el`.

* admin/grammars/Makefile.in (WISENT): Add `grammar-wy.el` to the
generated files.

* .gitignore: Add `grammar-wy.el`.
2021-04-12 22:10:38 -04:00
Stefan Monnier
fc3caa45ef * lisp/minibuffer.el (completion-table-with-quoting): Fix bug#47678 2021-04-12 19:23:57 -04:00
Wilson Snyder
3cb0229d75 * lisp/progmodes/verilog-mode.el (vl-memory): Add missing defvar. 2021-04-12 13:36:05 -04:00
Stefan Monnier
f63da590fd * lisp/emacs-lisp/smie.el: Fix URL. Remove redundant :group args
(smie-indent-forward-token): Improve error message.
(smie--funcall): New function.
(smie-indent-calculate): Use it.
2021-04-12 13:01:06 -04:00
Stefan Monnier
c42dc493d1 * lisp/emacs-lisp/memory-report.el (memory-report--object-size-1): Simplify 2021-04-12 12:55:52 -04:00
Stefan Monnier
be75b08f82 * lisp/emacs-lisp/float-sup.el (pi): Actually mark it as obsolete 2021-04-12 12:53:53 -04:00
Stefan Monnier
0e2cf3b985 * lisp/emacs-lisp/edebug.el (edebug--frame): Move docstring where it belongs 2021-04-12 12:51:28 -04:00
Stefan Monnier
0df37f7416 * lisp/vt-control.el: Avoid called-interactively-p
(vt-keypad-on, vt-keypad-off): Use the `tell` arg instead.
(vt-numlock): Add `tell` arg.
2021-04-12 12:49:36 -04:00
Stefan Monnier
cf774fb8cc * lisp/files.el (file-modes-number-to-symbolic): Add filetype arg.
* lisp/tar-mode.el (tar-header-block-summarize): Use it.
(tar-grind-file-mode): Declare obsolete.
2021-04-12 12:46:47 -04:00
Stefan Monnier
9a6523dfd6 * lisp/frame.el (delete-other-frames): Add universal prefix iconify arg
(frame--current-backround-mode): New function,
extracted from `frame-set-background-mode`.  Use `color-dark-p`.
(frame-set-background-mode): Use it.
2021-04-12 12:32:58 -04:00