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

8252 Commits

Author SHA1 Message Date
Mattias Engdegård
497a1ed8bb string-search robustness and documentation improvement (bug#43598)
* src/fns.c (Fstring_search): Check START-POS argument range.
Simplify logic.  Improve doc string.
* test/src/fns-tests.el (string-search): Add test cases.
* doc/lispref/strings.texi (Text Comparison): Elaborate.
* lisp/emacs-lisp/byte-opt.el (pure-fns): Mark string-search as pure.
2020-09-25 17:08:00 +02:00
Lars Ingebrigtsen
e51a98b0c2 Add a new function 'string-search'
* doc/lispref/strings.texi (Text Comparison): Document it.
* src/fns.c (Fstring_search): New function.
2020-09-25 01:53:16 +02:00
Juri Linkov
1e7f636576 Horizontal scrolling for mouse wheel with Shift modifier (bug#43568)
* lisp/mwheel.el (mouse-wheel-scroll-amount): Change 'shift' default value
from 5 to 'hscroll'.  Add new option "Scroll horizontally" for 'hscroll'.
(mwheel-scroll): Handle value 'hscroll' and call mwheel-scroll-left-function
or mwheel-scroll-right-function.

* doc/emacs/frames.texi (Mouse Commands): Update for horizontal scrolling
with Shift modifier.
2020-09-24 22:25:03 +03:00
Lars Ingebrigtsen
7b3e94b664 Make set-process-buffer also update the process mark
* src/process.c (Fset_process_buffer): Update the process mark
(bug#43573).
2020-09-24 17:14:25 +02:00
Michael Albinus
de54cd6f0e Minor Tramp cleanup
* doc/misc/tramp.texi: Some stylistic changes.
(Frequently Asked Questions): Mention ProxyCommand and ProxyJump.

* lisp/net/tramp-sh.el (tramp-use-ssh-controlmaster-options):
Fix docstring.
2020-09-24 10:17:03 +02:00
Juri Linkov
dc86c4cc0b New command goto-line-relative (bug#5042, bug#9917)
* lisp/simple.el (goto-line-read-args): New function with code from goto-line.
(goto-line): New arg RELATIVE.  Also use 'widen-automatically' to
leave all lines accessible in the narrowed buffer.
(goto-line-relative): New command.

* lisp/info.el (Info-mode-map): Remap 'goto-line' to 'goto-line-relative'.

* doc/emacs/basic.texi (Moving Point):
* doc/emacs/display.texi (Optional Mode Line): Mention goto-line-relative.
2020-09-23 22:39:32 +03:00
Lars Ingebrigtsen
d2b754ec1a Add more isearch submatch faces
* doc/emacs/search.texi (Search Customizations): Adjust
documentation.
* lisp/isearch.el (search-highlight-submatches): Be a boolean.
(isearch-group-{6-9}): New faces.
(isearch-highlight): Use the variable as a boolean.
2020-09-21 15:57:00 +02:00
Lars Ingebrigtsen
e72d3793bc Allow disabling the verbose eldoc truncation message
* doc/emacs/programs.texi (Lisp Doc): Document it.

* lisp/emacs-lisp/eldoc.el (eldoc-display-truncation-message): New
variable (bug#43543).
(eldoc--handle-docs): Use it.
2020-09-21 14:15:39 +02:00
Michael Albinus
63f9d9af81 Add D-Bus tests
* doc/misc/dbus.texi (Type Conversion): Precise basic type values.

* lisp/net/dbus.el (dbus-register-property): Send signal directly.

* src/dbusbind.c (xd_signature): Accept non-nil objects for
DBUS_TYPE_BOOLEAN.

* test/lisp/net/dbus-tests.el (dbus-test01-basic-types)
(dbus-test01-compound-types): New tests.
2020-09-21 13:41:30 +02:00
Glenn Morris
7a5132954b Merge from origin/emacs-27
02a31c9632 (origin/emacs-27) Minor improvement in the ELisp manual's ...
f750def778 Mention in PROBLEMS the problems with fonts and Uniscribe
082d8a21b1 Minor copyedits in 'line-height' documentation
5b23393bcc ; * src/frame.c (syms_of_frame) <make-pointer-invisible>: ...
2020-09-20 17:18:16 -07:00
Glenn Morris
3675993d76 Merge from origin/emacs-27
df04f3e755 Fix a rare segfault in syntax.c
fd1fe1e1ec Add doc to syntax-propertize-function saying it must do a ...
fcd599bbea Minor copyedits of doc of 'with-silent-modifications'
759399cdb1 Improve documentation of 'max-mini-window-height'
3223302aa2 Use modern constant names for the NS pasteboard
985703d380 Fix doc string of 'toggle-menu-bar-mode-from-frame'
184a4977c7 Make vc-bzr tests work with brz 3.1 (bug#43314)

# Conflicts:
#	lisp/emacs-lisp/syntax.el
#	src/syntax.c
2020-09-20 17:18:16 -07:00
Lars Ingebrigtsen
300a5a5757 Fix typo in dbus.texi
* doc/misc/dbus.texi (Type Conversion): Remove spurious { character.
2020-09-20 19:20:57 +02:00
Michael Albinus
f8624fb834 Make D-Bus properties type safe
* doc/misc/dbus.texi (Properties and Annotations):
Precise dbus-get-property and dbus-set-property.
(Type Conversion): Explain :byte and :boolean type conversion.
(Errors and Events): dbus-ignore-errors returns nil when there is
a D-Bus error.  Remove dbus-show-dbus-errors.

* etc/NEWS: Some D-Bus relevant changes.

* lisp/net/dbus.el (dbus-show-dbus-errors): Remove.
(dbus-ignore-errors): Replay implamentation without that variable.
(dbus-check-arguments): New defun.
(dbus-list-activatable-names, dbus-list-names)
(dbus-list-queued-owners, dbus-get-name-owner, dbus-introspect)
(dbus-get-all-properties, dbus-get-all-managed-objects): Don't debug.
(dbus-get-property, dbus-set-property): Propagate errors.
(dbus-register-property): Check for valid VALUE.
(dbus-property-handler): Simplify.

* src/dbusbind.c (Fdbus_message_internal): Adapt docstring.
Handle DBUS_MESSAGE_TYPE_INVALID.

* test/lisp/net/dbus-tests.el (dbus-show-dbus-errors): Don't declare.
(dbus-test06-register-property)
(dbus-test06-register-property-emits-signal): Adapt tests.
2020-09-20 16:44:17 +02:00
Eli Zaretskii
02a31c9632 Minor improvement in the ELisp manual's Introduction
* doc/lispref/intro.texi (Printing Notation): Clarify what
"execute code" means in this context.  (Bug#43463)
2020-09-20 17:33:55 +03:00
Eli Zaretskii
209dfa11a4 Improve documentation of a recently-added feature
* lisp/isearch.el (search-highlight-submatches): Improve the doc
string.

* doc/emacs/search.texi (Search Customizations): Improve the
documentation of 'search-highlight-submatches'.

* etc/NEWS: Minor change of the entry for
'search-highlight-submatches'.
2020-09-20 17:16:38 +03:00
Juri Linkov
09e109851b Highlight regexp sub-expressions
* doc/emacs/search.texi (Search Customizations): Document it.

* lisp/isearch.el (search-highlight-submatches): New variable.
(isearch-group-1, isearch-group-2, isearch-group-3)
(isearch-group-4, isearch-group-5): New faces.
(isearch-highlight): Use them.
(isearch-dehighlight): Ditto (bug#6227).
2020-09-20 15:46:19 +02:00
Michael Albinus
db6bdef2dd ; * doc/lispref/processes.texi (Synchronous Processes): Fix typo. 2020-09-20 11:48:56 +02:00
Earl
676398dd7d Add new tab command `C-x t C-r'
* doc/emacs/misc.texi (FFAP): Document new commands (bug#43503).

* lisp/ffap.el (ffap-read-only-other-tab): New command.

* lisp/tab-bar.el (find-file-read-only-other-tab): New command and
keystroke.
2020-09-20 11:36:52 +02:00
Mauro Aranda
1278a9a907 New command: revert-buffer-with-fine-grain
* doc/emacs/files.texi (Reverting): Document the new command and the
new variable.

* etc/NEWS: Mention the new command and the new variable.

* lisp/files.el (revert-buffer-with-fine-grain): New command.  Revert
a buffer trying to be non-destructive, by using replace-buffer-contents.
(revert-buffer-insert-file-contents-delicately): New function, alternative
to revert-buffer-insert-file-contents-function--default-function.
(revert-buffer-with-fine-grain-max-seconds): New variable.  Passed as
argument MAX-SECS of replace-buffer-contents.

* test/lisp/files-tests.el (files-tests-lao files-tests-tzu): Helper
variables, taken from diffutils manual, to test reverting a buffer.
(files-tests-revert-buffer)
(files-tests-revert-buffer-with-fine-grain): New tests (bug#18).
2020-09-20 01:04:39 +02:00
Peder O. Klingenberg
a2be81780e Extend process-lines to allow exit status handling
* subr.el (process-lines-handling-status): Extension of the old
process-lines, with more flexible handling of the exit status.
(process-lines): Old API implemented using the new function.
(process-lines-ignore-status): Another use of the new function -
return the output lines regardless of the exit status (bug#1321).
2020-09-20 00:16:36 +02:00
Eli Zaretskii
082d8a21b1 Minor copyedits in 'line-height' documentation
* doc/lispref/display.texi (Line Height): Describe the possible
values of the 'line-height' property in a more consistent format.
2020-09-19 22:22:08 +03:00
Lars Ingebrigtsen
eda48b6fed Add a new variable 'gnus-global-groups'
* doc/misc/gnus.texi (HTML): Document it.

* lisp/gnus/gnus-art.el (gnus-global-groups): New variable.
(gnus-block-private-groups): Use it.
2020-09-19 21:16:42 +02:00
Gregor Zattler
c151797da9 * doc/misc/eww.texi: Document the `w' key's double function
* doc/misc/eww.texi (Basics): Describe what the `w' command does
in eww (bug#43517).
2020-09-19 19:28:23 +02:00
Gregor Zattler
2e68cee653 * doc/misc/eww.texi: Document the `w' key's double function
* doc/misc/eww.texi (Basics): Describe what the `w' command does
in eww (bug#43517).
2020-09-19 19:25:24 +02:00
Eli Zaretskii
df04f3e755 Fix a rare segfault in syntax.c
* src/syntax.c (Fforward_comment): Prevent the loop for COUNT < 0
from going outside the valid range of character/byte positions.
(Bug#43499)

* doc/lispref/syntax.texi (Syntax Class Table): Mention the
"comment-fence" and "string-fence" as alternative names of 2
syntax classes.
2020-09-19 19:54:01 +03:00
Alan Mackenzie
fd1fe1e1ec Add doc to syntax-propertize-function saying it must do a 100% job
and cannot be combined with other ways of applying syntax-table text
properties.

* lisp/emacs-lisp/syntax.el (syntax-propertize-function): Amend doc string.

* doc/lispref/syntax.texi (Syntax Properties): Amend the description of the
variable.
2020-09-19 16:50:27 +00:00
Lars Ingebrigtsen
e79d1e151f Document Gnus body matching quirks
* doc/misc/gnus.texi (Summary Score Commands): Document body
match quirks (bug#43502).
2020-09-19 16:46:26 +02:00
Eli Zaretskii
fcd599bbea Minor copyedits of doc of 'with-silent-modifications'
* doc/lispref/text.texi (Changing Properties):
* doc/lispref/buffers.texi (Buffer Modification): Improve
documentation and indexing of 'with-silent-modifications'.
2020-09-19 11:30:57 +03:00
Eli Zaretskii
759399cdb1 Improve documentation of 'max-mini-window-height'
* src/xdisp.c (syms_of_xdisp):
* doc/lispref/minibuf.texi (Minibuffer Windows): More accurate
wording in the documentation of 'max-mini-window-height', to
clarify the meaning of an integer value.
2020-09-18 22:50:36 +03:00
Lars Ingebrigtsen
635666e7bf Use a widget for the face link in Customize buffers
* doc/lispref/customize.texi (Common Keywords): Document it.

* lisp/cus-edit.el (custom-face-value-create): Use a widget
instead of a button so that TAB works (bug#20664).

* lisp/wid-edit.el (face-link): New widget.
(widget-face-link-action): New action.
2020-09-18 13:28:12 +02:00
Richard Stallman
7fec0a444e Document easy ways of typing undo key on TTY frames
* doc/emacs/basic.texi (Basic Undo): Document the easiest way to
type the undo key.

* etc/tutorials/TUTORIAL: Describe typing C-_ without the Shift
key.
2020-09-18 10:50:57 +03:00
Alex Bochannek
12aea1fa80 Allow user-defined scoring in Gnus
* lisp/gnus/gnus-score.el (gnus-score-func): New function (bug#43413).
* doc/misc/gnus.texi (Score File Format): Document it.
2020-09-17 17:02:48 +02:00
Tino Calancha
23a3333b3e Give Lisp control on the lossage size
Add a command 'lossage-size' to set the maximum
number or recorded keystrokes (Bug#38796).

* src/keyboard.c (lossage_limit):
Static variable with the current lossage size limit.
(MIN_NUM_RECENT_KEYS): Renamed from NUM_RECENT_KEYS.
Set it as 100 and use it as the minimum value for lossage_limit.
Keep the same default for the vector size as before (300).
(lossage-size): New command.
(update_recent_keys): Helper function.
(command_loop_1)
(record_char)
(recent-keys)
(syms_of_keyboard): Use lossage_limit as the vector size.

* lisp/help.el (view-lossage): Mention the new command in the docstring.
* etc/NEWS (Changes in Emacs 28.1): Announce this change.
* doc/emacs/help.texi (Misc Help): Update manual.
* test/src/keyboard-tests.el (keyboard-lossage-size): Add test.
2020-09-17 16:32:18 +02:00
Lars Ingebrigtsen
cd151d0608 Fix up previous change for column/line spec mechanism in the mode line
* lisp/bindings.el (column-number-indicator-zero-based): Make
obsolete (bug#28648).
(mode-line-position-column-line-format): New variable.
(mode-line-position--column-line-properties): New const.
(mode-line-position): Use it.
2020-09-17 16:09:37 +02:00
Michael Albinus
92f342f38d D-Bus: keep type information in D-Bus events
* doc/misc/dbus.texi (Errors and Events):
* etc/NEWS: D-Bus events keep the type information of their arguments.

* lisp/net/dbus.el (dbus-check-event): Fix docstring.
(dbus-delete-types, dbus-flatten-types): New defuns.
(dbus-handle-event, dbus-register-property, dbus-property-handler):
Handle type information.
(dbus-set-property): Fix thinko.

* src/dbusbind.c (XD_BASIC_DBUS_TYPE): Simplify.
(xd_dbus_type_to_symbol): New function.
(xd_retrieve_arg): Return type information for the arguments.
(xd_read_message_1):  Return type information for the error name.
(dbus-registered-objects-table): Fix docstring.
2020-09-16 14:32:57 +02:00
Robert Pluim
9bb9f43709 ; Fix grammar of previous commit
* doc/lispref/modes.texi (Mode Line Variables): Fix grammar
of mode-line-position-{line,column}-format descriptions.
2020-09-15 17:39:24 +02:00
Lars Ingebrigtsen
3beb8bc994 Allow controlling the look of the line/column indicators
* doc/lispref/modes.texi (Mode Line Variables): Document them.

* lisp/bindings.el (mode-line-position-line-format): New variable
(bug#28648).
(mode-line-position-column-format): Ditto.
(mode-line-position): Use them.

* lisp/simple.el (column-number-mode): Mention them.
(line-number-mode): Ditto.
2020-09-15 17:15:59 +02:00
Lars Ingebrigtsen
caf64ae08b Add new, simple `replace-in-string' function
* lisp/subr.el (replace-in-string): New, side-effect-free function.

* doc/lispref/searching.texi (Search and Replace): Document it.
2020-09-15 17:15:59 +02:00
Jimmy Aguilar Mena
32220b53fd Document use of uniquify-buffer-name-style as a function. 2020-09-15 16:12:54 +02:00
Lars Ingebrigtsen
14486c4488 Allow preserving (some) text properties from completion tables
* doc/lispref/minibuf.texi (Text from Minibuffer): Document it.

* lisp/minibuffer.el (completion--replace): Preserve text
properties on completed items (bug#43218).
2020-09-14 14:22:06 +02:00
Philipp Stephani
da0e75e741 Add facility to make module functions interactive (Bug#23486).
* src/module-env-28.h: Add field for 'make_interactive' function.

* src/emacs-module.c (Lisp_Module_Function): Add new field holding the
interactive form.
(allocate_module_function): Adapt to structure layout change.
(module_make_interactive, module_function_interactive_form): New
functions.
(initialize_environment): Use them.

* src/eval.c (Fcommandp):
* src/data.c (Finteractive_form): Also handle interactive module
functions.

* test/data/emacs-module/mod-test.c (Fmod_test_identity): New test
function.
(emacs_module_init): Create two interactive module test functions.

* test/src/emacs-module-tests.el (module/interactive/return-t)
(module/interactive/return-t-int, module/interactive/identity):
New unit tests.

* doc/lispref/internals.texi (Module Functions): Document new
function.  Rework paragraph about wrapping module functions, as the
example no longer applies.

* etc/NEWS: Document new facility.
2020-09-13 20:26:47 +02:00
Eli Zaretskii
99af480d00 Fix punctuation in EWW manual
* doc/misc/eww.texi (Advanced): Fix punctuation of a recent
change.
2020-09-13 18:35:54 +03:00
Lars Ingebrigtsen
f7d8650187 Fix up example code from previous eww.texi commit
* doc/misc/eww.texi (Advanced): Simplify example command (and
"--virtual-time-budget=3000" makes Chromium unstable).
2020-09-13 00:44:20 +02:00
Lars Ingebrigtsen
31be4d7ca4 Add a way to use an external command to download HTML in eww
* doc/misc/eww.texi (Advanced): Document it.

* lisp/net/eww.el (eww-retrieve): New function.
(eww-reload): Use it.
(eww): Ditto.
(eww-retrieve-command): New variable.
2020-09-13 00:12:33 +02:00
Glenn Morris
d228cac2e8 Small Texinfo markup fixes
* doc/misc/dbus.texi (Register Objects):
* doc/misc/gnus.texi (Searching): Texinfo markup fixes.
2020-09-12 09:06:10 -07:00
Glenn Morris
a4bfb0bc5c Default Emacs to UTF-8 instead of Latin-1
* doc/emacs/mule.texi (File Name Coding): Document it.

* lisp/international/mule-cmds.el (reset-language-environment):
Default to utf-8 instead of latin-1.

* lisp/mail/sendmail.el (default-sendmail-coding-system): Ditto.

* lisp/mh-e/mh-comp.el (mh-send-letter): Ditto.
2020-09-12 13:37:31 +02:00
Stefan Kangas
7d30ca7f66 Move dired-jump from dired-x to dired (Bug#21981)
* lisp/dired-x.el (dired-bind-jump): Change into defvar and make
obsolete.
(dired-extra-startup): Doc fix.
(dired-jump, dired-jump-other-window): Move from here...
* lisp/dired.el (dired-jump, dired-jump-other-window): ...to here.

* lisp/bindings.el (ctl-x-map, ctl-x-4-map): Bind 'C-j' to
'dired-jump' and 'dired-jump-other-window'.

* doc/misc/dired-x.texi (Features, Installation)
(Miscellaneous Commands): Remove documentation of 'dired-jump'.
* doc/emacs/dired.texi (Dired Enter): Document 'dired-jump' and
dired-jump-other-window.
* etc/NEWS: Announce the above changes.

* test/lisp/dired-tests.el (dired-autoload): Adjust test.
2020-09-12 03:42:37 +02:00
Michael Albinus
dbd8994e0d D-Bus: Implement other compound types of properties
* doc/misc/dbus.texi (Errors and Events):
* etc/NEWS: Mention dbus-show-dbus-errors.

* lisp/net/dbus.el (dbus-compound-types): New defconst.
(dbus): New defgroup.
(dbus-show-dbus-errors): New defcustom.
(dbus-ignore-errors): Use it.
(dbus-set-property): Simplify.
(dbus-property-handler): Implement other compound types of properties.

* test/lisp/net/dbus-tests.el (dbus--test-register-service)
(dbus-test05-register-property): Extend tests.
2020-09-11 15:34:33 +02:00
Michael Albinus
9de9976de0 Adapt Tramp doc
* doc/misc/tramp.texi (Remote shell setup):
Mention password-word-equivalents.

* lisp/net/tramp.el (tramp-password-prompt-regexp): Fix docstring.
2020-09-09 19:29:18 +02:00
Glenn Morris
5a9e237e15 Merge from origin/emacs-27
9b35b0c99c ; * lisp/man.el (Man-mode): Fix formatting.
abca75d2e9 ; Fix typos; change "Emacs-Lisp" to "Emacs Lisp"
2020-09-09 07:51:14 -07:00