1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-18 10:16:51 +00:00
Commit Graph

148969 Commits

Author SHA1 Message Date
Remington Furman
865535a24c Make `number-at-point' work for more hex numbers
* lisp/thingatpt.el (number-at-point): Rewrite to actually catch
the hex numbers (bug#49588).

Copyright-paperwork-exempt: yes
2021-07-16 11:47:36 +02:00
Lars Ingebrigtsen
dc85ffffc8 Clarify -unload-feature in Coding Conventions
* doc/lispref/tips.texi (Coding Conventions): Clarify when an
unload function is useful (bug#21440).
2021-07-16 10:56:21 +02:00
Lars Ingebrigtsen
1cd278bfcd Add a couple more shell-tests-split-string tests 2021-07-16 01:42:55 +02:00
Glenn Morris
653848a277 Improve recent jka-compr-compression-info-list change
* lisp/jka-cmpr-hook.el (jka-compr-compression-info-list):
Document previous change, and fix :type.
2021-07-15 13:19:48 -07:00
Tassilo Horn
f770538b30 Add bug-reference support for Codeberg projects
* lisp/progmodes/bug-reference.el (bug-reference-setup-from-vc-alist):
Add support for codeberg.org bug and pull request references.
* doc/emacs/maintaining.texi (Bug Reference): Mention that bug and
pull request references for codeberg projects are supported.
2021-07-15 21:51:54 +02:00
Tassilo Horn
ec3b108c1f Add support for sourcehut to bug-reference.el
* lisp/progmodes/bug-reference.el (bug-reference-setup-from-vc-alist):
Add support for bug references like  and ~user/project#19 for
sourcehut (sr.ht).
* doc/emacs/maintaining.texi (Bug Reference): Document sourcehut
support.
2021-07-15 21:43:29 +02:00
Ori
eaefa44acd ; * lisp/help-fns.el: Speed up `describe-mode'
* lisp/help-fns.el (help-fns--list-local-commands): Speed up (bug#49579).

A predicate checks if there are no key bindings for a given function. A
full list of bindings is not needed, even a single binding is sufficient
to say the function is bound. Set FIRSTONLY arg in where-is-internal so
this predicate runs faster, with functional equivalence. For some
configurations this has a noticeable improvement on the speed of
describe-mode.

Copyright-paperwork-exempt: yes
2021-07-15 18:57:38 +02:00
Lars Ingebrigtsen
8f5738eb8f Add more car/cdr examples to shortdoc
* lisp/emacs-lisp/shortdoc.el (list): Add more car/cdr examples.
2021-07-15 18:32:34 +02:00
Lars Ingebrigtsen
22a5482ab6 Improve the shortdoc link action in *Help* buffers
* lisp/emacs-lisp/shortdoc.el (shortdoc-display-group): Allow
taking an optional parameter to place point on a specific function.
(shortdoc--display-function): Go to the function in question in
the shortdoc buffer.
2021-07-15 18:29:27 +02:00
Lars Ingebrigtsen
ceecac4c79 Add new user option to abbreviate file names in save-place
* lisp/saveplace.el (save-place-abbreviate-file-names): New user
option (bug#13286).
(save-place-to-alist): Use it.
2021-07-15 18:03:36 +02:00
Lars Ingebrigtsen
fbc9a50993 Allow restoring the original order in 'tabulated-list-mode'
* lisp/emacs-lisp/tabulated-list.el (tabulated-list-sort): Allow
restoring the original order (bug#13411).
(tabulated-list--sort-by-column-name): Store the original order.
(tabulated-list--original-order): New buffer-local variable.
2021-07-15 17:37:58 +02:00
Protesilaos Stavrou
335a5fd173
Update modus-themes to version 1.5.0
* doc/misc/modus-themes.org (Enable and load): Include internal link.
(Sample configuration for use-package): Update code sample.
(Customization Options): Update references to customization options.
(Option for more italic constructs): Document new variable, as an
alias of the deprecated 'modus-themes-slanted-constructs'.

(Option for syntax highlighting, Option for links)
(Option for command prompt styles, Option for mode line presentation)
(Option for language checkers)
(Option for line highlighting (hl-line-mode))
(Option for parenthesis matching (show-paren-mode))
(Option for active region, Option for the headings' overall style):
Update documentation to describe new possible values, expressed as a
list of symbols.

(Option for Org agenda constructs): Document new user option.

(Control the scale of headings): Update symbol of variable.

(Remap face with local value (DIY), Backdrop for pdf-tools (DIY)):
Tweak text of internal reference.

(Font configurations for Org and others (DIY)):  Add internal link and
document how to configure the 'bold' and 'italic' faces.

(Custom Org user faces (DIY)): Minor corrections or changes to single
words.

(Full support for packages or face groups): Include new items.

(Notes on individual packages): Add notes on Avy hints, the colour of
days in 'M-x calendar', and underlines in 'compilation-mode' buffers.

(What is the best setup for legibility?): Remove single word.
(Acknowledgements): Update list of contributors.

* etc/themes/modus-themes.el (modus-themes-faces)
(modus-themes-operandi-colors, modus-themes-vivendi-colors)
(modus-themes-subtle-red, modus-themes-subtle-green)
(modus-themes-subtle-yellow, modus-themes-subtle-blue)
(modus-themes-subtle-magenta, modus-themes-subtle-cyan)
(modus-themes-subtle-neutral, modus-themes-intense-red)
(modus-themes-intense-green, modus-themes-intense-yellow)
(modus-themes-intense-blue, modus-themes-intense-magenta)
(modus-themes-intense-cyan, modus-themes-intense-neutral)
(modus-themes-refine-red, modus-themes-refine-green)
(modus-themes-refine-yellow, modus-themes-refine-blue)
(modus-themes-refine-magenta, modus-themes-refine-cyan)
(modus-themes-active-red, modus-themes-active-green)
(modus-themes-active-yellow, modus-themes-active-blue)
(modus-themes-active-magenta, modus-themes-active-cyan)
(modus-themes-fringe-red, modus-themes-fringe-green)
(modus-themes-fringe-yellow, modus-themes-fringe-blue)
(modus-themes-fringe-magenta, modus-themes-fringe-cyan)
(modus-themes-nuanced-red, modus-themes-nuanced-green)
(modus-themes-nuanced-yellow, modus-themes-nuanced-blue)
(modus-themes-nuanced-magenta, modus-themes-nuanced-cyan)
(modus-themes-special-cold, modus-themes-special-mild)
(modus-themes-special-warm, modus-themes-special-calm)
(modus-themes-diff-added, modus-themes-diff-changed)
(modus-themes-diff-removed, modus-themes-diff-refine-added)
(modus-themes-diff-refine-changed, modus-themes-diff-refine-removed)
(modus-themes-diff-focus-added, modus-themes-diff-focus-changed)
(modus-themes-diff-focus-removed, modus-themes-diff-heading)
(modus-themes-pseudo-header, modus-themes-mark-alt)
(modus-themes-mark-del, modus-themes-mark-sel, modus-themes-mark-symbol)
(modus-themes-heading-1, modus-themes-heading-2, modus-themes-heading-3)
(modus-themes-heading-4, modus-themes-heading-5, modus-themes-heading-6)
(modus-themes-heading-7, modus-themes-heading-8, modus-themes-hl-line)
(modus-themes-bold, modus-themes-slant, modus-themes-variable-pitch)
(modus-themes-graph-red-0, modus-themes-graph-red-1)
(modus-themes-graph-green-0, modus-themes-graph-green-1)
(modus-themes-graph-yellow-0, modus-themes-graph-yellow-1)
(modus-themes-graph-blue-0, modus-themes-graph-blue-1)
(modus-themes-graph-magenta-0, modus-themes-graph-magenta-1)
(modus-themes-graph-cyan-0, modus-themes-graph-cyan-1)
(modus-themes-lang-note, modus-themes-lang-warning)
(modus-themes-lang-error, modus-themes-reset-soft)
(modus-themes-reset-hard, modus-themes-key-binding)
(modus-themes-search-success, modus-themes-search-success-modeline)
(modus-themes-search-success-lazy): Add new ':group' specification for
custom faces.

(modus-themes-operandi-color-overrides)
(modus-themes-vivendi-color-overrides, modus-themes-bold-constructs)
(modus-themes-variable-pitch-headings, modus-themes-variable-pitch-ui)
(modus-themes-no-mixed-fonts, modus-themes-fringes)
(modus-themes-scale-headings, modus-themes-scale-1, modus-themes-scale-2)
(modus-themes-scale-3, modus-themes-scale-4, modus-themes-scale-title)
(modus-themes-org-blocks, modus-themes-completions)
(modus-themes-success-deuteranopia, modus-themes-mail-citations)
(modus-themes-subtle-line-numbers, modus-themes-intense-hl-line): Add
custom setter.

(modus-themes-scale-5, modus-themes-scale-title): Deprecate variable
and replace it with alias 'modus-themes-scale-title'.

(modus-themes-slanted-constructs, modus-themes-italic-constructs):
Deprecate variable and replace it with alias
'modus-themes-italic-constructs'.

(modus-themes-org-habit, modus-themes-org-agenda): Deprecate variable
and make its functionality a part of 'modus-themes-org-agenda'.

(modus-themes-headings, modus-themes-mode-line, modus-themes-diffs)
(modus-themes-prompts, modus-themes-paren-match, modus-themes-syntax)
(modus-themes-links, modus-themes-region, modus-themes-lang-checkers)
(modus-themes-org-blocks): Make user options accept a value as a list
of properties.

(modus-themes--mixed-fonts, modus-themes--slant)
(modus-themes--fixed-pitch, modus-themes--lang-check)
(modus-themes--prompt, modus-themes--paren)
(modus-themes--syntax-foreground, modus-themes--syntax-extra)
(modus-themes--syntax-string, modus-themes--syntax-docstring)
(modus-themes--syntax-comment, modus-themes--heading-p)
(modus-themes--heading, modus-themes--org-habit)
(modus-themes--mode-line-attrs, modus-themes--link-color)
(modus-themes--link, modus-themes--region, modus-themes--hl-line):
Update internal functions to parse new values for user options.

* etc/themes/modus-operandi-theme.el,
  etc/themes/modus-vivendi-theme.el: Bump version number.

A detailed change log is provided here (no javascript required):
<https://protesilaos.com/codelog/2021-07-15-modus-themes-1-5-0/>.
2021-07-15 18:11:24 +03:00
Lars Ingebrigtsen
5260f1f2c3 Autoload `split-string-shell-command'
* lisp/shell.el (split-string-shell-command): Autoload.
2021-07-15 17:04:26 +02:00
Eli Zaretskii
acf583b209 Fix 'shell-tests-split-string' on MS-Windows
* test/lisp/shell-tests.el (shell-tests-split-string): Skip test
that always fails on MS-Windows/MS-DOS.
2021-07-15 12:37:26 +03:00
Eli Zaretskii
07392da96d Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs 2021-07-15 12:23:50 +03:00
Lars Ingebrigtsen
0848af9f66 Improve the `window-end' doc string
* src/window.c (Fwindow_end): Be more explicit about what the
position is (bug#13429).
2021-07-15 11:22:52 +02:00
Eli Zaretskii
0c28223bb2 ; * etc/NEWS: Fix wording in a recent addition. 2021-07-15 12:22:47 +03:00
Eli Zaretskii
9eee02886d ; * lisp/gnus/message.el (message-signature-separator): Add :version. 2021-07-15 12:22:27 +03:00
Lars Ingebrigtsen
4aac8f60e6 Mention more split-string-* functions in shortdoc
* lisp/emacs-lisp/shortdoc.el (string): Mention
split-string-and-unquote and split-string-shell-command.
2021-07-15 10:37:11 +02:00
Lars Ingebrigtsen
eb4a120ea5 Allow using spaces in `inferior-lisp' command names
* lisp/progmodes/inf-lisp.el (inferior-lisp): Allow using spaces
in the command names (by splitting using shell syntax) (bug#16005).
2021-07-15 10:33:22 +02:00
Lars Ingebrigtsen
28e7b51041 Rename shell-split-string to split-string-shell-command
* lisp/shell.el (split-string-shell-command):
* doc/lispref/processes.texi (Shell Arguments): Rename from
shell-split-string.
2021-07-15 10:29:04 +02:00
Lars Ingebrigtsen
4fb6cf3f38 Add a new function 'shell-split-string'
* doc/lispref/processes.texi (Shell Arguments): Document it.
* lisp/shell.el (shell-split-string): New function.
2021-07-15 10:25:41 +02:00
Lars Ingebrigtsen
d4217b38d7 Clarify overriding-local-map doc string
* src/keyboard.c (syms_of_keyboard): Clarify
`overriding-local-map' vs. text properties/overlays (bug#16312).
2021-07-15 07:17:53 +02:00
Paul Eggert
0afbde4e68 Pacify gcc -Woverflow more clearly
* src/alloc.c (mark_maybe_pointer): Make it clearer that ANDing
with UINTPTR_MAX is intended.  Omit a now-unnecessary cast.
2021-07-14 17:20:19 -05:00
Michael Albinus
525d5cab36 Preserve backward compatibility in Tramp
* lisp/net/tramp-crypt.el (tramp-crypt-handle-lock-file)
(tramp-crypt-handle-unlock-file): Preserve backward compatibility.

* lisp/net/tramp-sh.el (tramp-sh-handle-write-region): Do not
create lock file twice.

* lisp/net/tramp.el (tramp-handle-make-lock-file-name): Move lock
file security check ...
(tramp-handle-lock-file): ... here.
(tramp-handle-unlock-file): Preserve backward compatibility.

* test/lisp/net/tramp-tests.el (lock-file-name-transforms)
(remote-file-name-inhibit-locks): Declare.
(tramp-allow-unsafe-temporary-files): Set to t.
(tramp-test37-make-auto-save-file-name)
(tramp-test38-find-backup-file-name): Move binding of
`tramp-allow-unsafe-temporary-files' up.
(tramp-test39-lock-file): Bind `tramp-allow-unsafe-temporary-files'.
Preserve backward compatibility.  Extend test.
2021-07-14 18:36:14 +02:00
Lars Ingebrigtsen
f45710e1dd Fontify the signature separator in Message mode
* lisp/gnus/message.el (message-signature-separator): New face
(bug#17757).
(message-font-lock-keywords): Add it to the signature, and ensure
that the trailing space isn't removed when hitting RET.
(message--match-signature): New helper function.
2021-07-14 18:08:33 +02:00
Lars Ingebrigtsen
6309cae3f2 Clarify backward-delete-char-untabify doc string
* lisp/simple.el (backward-delete-char-untabify): Mention the
effect of Transient Mark mode (bug#17263).
2021-07-14 17:10:24 +02:00
Lars Ingebrigtsen
5796e0063c * etc/NEWS: Add back a missing apostrophe. 2021-07-14 16:51:26 +02:00
Lars Ingebrigtsen
9a534506ba switch-to-buffer-other-frame doc string improvement
* lisp/window.el (switch-to-buffer-other-frame): Document that we
don't always display the buffer in a different frame (bug#17719).
2021-07-14 16:40:18 +02:00
Lars Ingebrigtsen
6ff726362d Fix hilit-chg highlighting of characters where text has been removed
* lisp/hilit-chg.el (hilit-chg-set-face-on-change): Remove
highlighting from characters that are just highlighted because of
something that has been previously deleted (bug#17784).
2021-07-14 16:40:18 +02:00
Eli Zaretskii
8168a792ca Fix deprecation warnings from libtiff
* src/image.c (UINT32) [TIFFLIB_VERSION >= 20210416]: Define to
use stdint.h type for recent libtiff versions.  Reported by Andy
Moreton <andrewjmoreton@gmail.com>.
2021-07-14 15:27:19 +03:00
Michael Albinus
10f18ff13b * etc/NEWS (insert-into-buffer'): Fix thinko. 2021-07-14 13:58:04 +02:00
Lars Ingebrigtsen
c218aa5b53 Make `apropos-library' also work for libraries without symbols
* lisp/apropos.el (apropos--preamble): Factor out (bug#17832)...
(apropos-print-doc): ... from here.
(apropos-library): Use it to display the apropos buffer even if it
has no symbols of its own.
2021-07-14 12:11:52 +02:00
Juri Linkov
dd34bef7d3 Revert e061999559 that added save-match-data.
* lisp/isearch.el (isearch-filter-predicate): Mention precautions against
clobbering the match data in docstring (bug#49534).
2021-07-14 02:21:17 +03:00
Juri Linkov
e061999559 * lisp/isearch.el: Add save-match-data for funcall isearch-filter-predicate.
* lisp/isearch.el (isearch-search): Add save-match-data before
funcall isearch-filter-predicate.
(isearch-lazy-highlight-search): Add save-match-data before
funcall isearch-filter-predicate.
(Bug#49534)
2021-07-14 01:29:53 +03:00
Lars Ingebrigtsen
f339cc3b81 Add a better interactive spec to `facemenu-add-face'
* lisp/facemenu.el (facemenu-add-face): Use `read-face-name'
(bug#18369) by copying over the interactive spec from
facemenu-set-face.
2021-07-14 00:12:45 +02:00
Lars Ingebrigtsen
a5d1bd6a6d Make jka-compr-insert-file-contents slightly more efficient
* lisp/jka-compr.el (jka-compr-insert-file-contents): Make more
efficient by using `insert-into-buffer'.
2021-07-13 23:48:04 +02:00
Lars Ingebrigtsen
210b10f3fe Add new function 'insert-into-buffer'
* doc/lispref/text.texi (Insertion): Document it.
* lisp/subr.el (insert-into-buffer): New function.
2021-07-13 23:46:16 +02:00
Lars Ingebrigtsen
3ce37f5afa Fall back on zlib-decompress-region if gzip doesn't exist
* lisp/jka-cmpr-hook.el (jka-compr-info-uncompress-function): New
function (bug#18823).
(jka-compr-compression-info-list): Expand info with decompression
function.

* lisp/jka-compr.el (jka-compr-insert-file-contents): Fall back on
internal decompression function if external doesn't exist.
2021-07-13 23:23:11 +02:00
Daniel Martín
e368f56037 Fix dired-number-of-marked-files when there are no marked files
* lisp/dired.el (dired-number-of-marked-files): Fix if expression so
that the else part is evaluated correctly.
2021-07-13 22:40:12 +02:00
Stefan Monnier
83ded11b03 * doc/lispref/modes.texi (Multiline Font Lock): Tweak last change 2021-07-13 16:18:25 -04:00
Lars Ingebrigtsen
eae23d60f8 Allow not updating Customize settings in set-frame-font
* lisp/frame.el (set-frame-font): Allow not updating the
Customization settings (bug#19298).
2021-07-13 21:48:49 +02:00
Lars Ingebrigtsen
7ec5a9593d Document the syntax-multilne text property
* doc/lispref/modes.texi (Multiline Font Lock): Document the
syntax-multiline text property (bug#20436).
2021-07-13 21:29:13 +02:00
Juri Linkov
35a8861619 Support Isearch filter predicates with empty search hits (bug#49534)
* lisp/isearch.el (isearch-search): Move (= (match-beginning 0) (match-end 0))
and (bobp)/(eobp) outside the call to isearch-filter-predicate.
Use forward-char 1/-1 on empty matches only when going to retry search.
(isearch-lazy-highlight-search):  Remove (= (point) bound),
but leave (= (match-beginning 0) (match-end 0)) since empty matches
make no sense in lazy-highlighting.
2021-07-13 22:25:05 +03:00
Lars Ingebrigtsen
b68e7a64ae Make 'tex-validate-buffer' work again
* lisp/textmodes/tex-mode.el (tex-validate-buffer): The *Occur*
buffer is read-only, so inhibit that before inserting things into
it (bug#19326).
2021-07-13 20:13:26 +02:00
Michael Albinus
1e96b97e3c Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs 2021-07-13 19:50:30 +02:00
Michael Albinus
cce84822f7 Add remote-file-name-inhibit-locks
* doc/emacs/files.texi (Interlocking):
* doc/lispref/files.texi (File Locks):
* doc/misc/tramp.texi (Auto-save File Lock and Backup):
Add remote-file-name-inhibit-locks.

* etc/NEWS: New user option 'remote-file-name-inhibit-locks'.

* lisp/files.el (remote-file-name-inhibit-locks): New defcustom.

* lisp/net/tramp-adb.el (tramp-adb-file-name-handler-alist):
* lisp/net/tramp-crypt.el (tramp-crypt-file-name-handler-alist):
* lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist):
* lisp/net/tramp-rclone.el (tramp-rclone-file-name-handler-alist):
* lisp/net/tramp-sh.el (tramp-sh-file-name-handler-alist):
* lisp/net/tramp-smb.el (tramp-smb-file-name-handler-alist):
* lisp/net/tramp-sshfs.el (tramp-sshfs-file-name-handler-alist):
* lisp/net/tramp-sudoedit.el (tramp-sudoedit-file-name-handler-alist):
Use `tramp-handle-make-lock-file-name'.

* lisp/net/tramp.el (tramp-allow-unsafe-temporary-files): Fix docstring.
(tramp-handle-make-lock-file-name): New defun.

* test/lisp/net/tramp-tests.el (tramp-test39-lock-file): Extend test.
2021-07-13 19:50:05 +02:00
Lars Ingebrigtsen
5afe27624f Add new user option to avoid piling on Dired buffers
* doc/emacs/dired.texi (Dired Visiting): Document it.

* lisp/dired.el (dired-kill-when-opening-new-dired-buffer): New
user option (bug#20598).
(dired-up-directory, dired-find-file): Use it.
(dired--find-possibly-alternative-file): New convenience command
to respect the user option.
2021-07-13 19:49:50 +02:00
Mattias Engdegård
7a803ecd3d Block TLS handshake until TCP connection established
If a TLS handshake is attempted before the completion of an
asynchronous TCP connection has been ascertained, our local state will
not be set up correctly for further progress and the sentinel "open"
event will never be sent.  This can occur if sufficient time passes
after the initiation of an async TCP connection so that by the time
`wait_reading_process_output` is called, the connection has already
been established on the TCP level.

This somewhat timing-sensitive bug has plagued HTTPS connections on
some platforms, notably macOS, for a long time (bug#49449).

* src/process.c (wait_reading_process_output): Gate the TLS handshake
by the NON_BLOCKING_CONNECT_FD flag.  The flag will be cleared as soon
as the TCP socket is found to be writable.
* test/src/process-tests.el (process-async-https-with-delay):
New test.
2021-07-13 19:07:41 +02:00
Ken Brown
a41f585bf1 Fix portability issue with make-serial-process
* src/sysdep.c (struct speed_struct): New struct.
(speeds): New static array of struct speed_struct.
(convert_speed): New static function to convert a numerical baud
rate (e.g., 9600) to a Bnnn constant defined in termios.h (e.g.,
B9600).
(serial_configure): Use convert_speed to make the call to cfsetspeed
compliant with its advertised API.  (Bug#49524)
2021-07-13 09:02:45 -04:00