1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-10 05:30:45 -08:00
Commit graph

149403 commits

Author SHA1 Message Date
Mattias Engdegård
1bfbb2b706 Add font-lock-doc-markup-face (bug#50041)
This face is intended for mark-up syntax and constructs inside text
using font-lock-doc-face; ie, documentation comments and strings in
programming modes.

* lisp/font-lock.el (font-lock-doc-markup-face): New face.
* lisp/cus-theme.el (custom-theme--listed-faces): Add it to the list.
* doc/lispref/modes.texi (Faces for Font Lock): Document it.
* etc/NEWS: Mention it.
2021-08-14 11:00:40 +02:00
Eli Zaretskii
a3dd5f1216 ; * etc/NEWS: Improve wording of a recent addition. 2021-08-14 10:35:09 +03:00
Alan Mackenzie
254dc6ab4c CC Mode: Fix a bug in yesterday's patch
* lisp/progmodes/cc-mode.el (c-before-change-check-unbalanced-strings): Check
the language has multi-line strings before calling
c-ml-string-opener-at-or-around-point.
2021-08-13 20:58:30 +00:00
Lars Ingebrigtsen
8fbb870083 Make debug' reset inhibit-read-only' while running
* lisp/emacs-lisp/debug.el (debug): Bind `inhibit-read-only' to
nil in case we're in a context that has bound it to t (bug#26947).
2021-08-13 15:50:14 +02:00
Lars Ingebrigtsen
e30c7f314b Adjust previous diff-changed-unspecified change
* lisp/vc/diff-mode.el (diff-changed-unspecified): Adjust the
definition to Emacs 28 (bug#26969).
2021-08-13 15:37:21 +02:00
Lars Ingebrigtsen
4d51c2c472 Add new face diff-changed-unspecified
* lisp/vc/diff-mode.el (diff-changed-unspecified): New face.
(diff-font-lock-keywords): Use it (bug#26969).
2021-08-13 15:35:49 +02:00
Lars Ingebrigtsen
cebe18b63e permanently-enabled-local-variables doc string clarification
* lisp/files.el (permanently-enabled-local-variables): Clarify
what kind of local variables this refers to.
2021-08-13 14:44:30 +02:00
Lars Ingebrigtsen
711eb40b9b Make info-look search harder for the Python info file
* lisp/info-look.el (python-mode): Try harder to find the correct
info file (bug#31405).
2021-08-13 13:38:38 +02:00
Lars Ingebrigtsen
65dd00667f Fix problem where an error would change standard-output
* src/keyboard.c (cmd_error): Don't set
standard-output/standard-input (bug#30529).  Instead bind them
temporarily while handling the error.
2021-08-13 13:19:39 +02:00
Lars Ingebrigtsen
37dbf10893 Unknown line endings in filepos-to-bufferpos/bufferpos-to-linepos
* lisp/international/mule-util.el (filepos-to-bufferpos): Give
better errors on `exact' with unknown line endings, and guess at
Unix if `approximate' (bug#36573).
(bufferpos-to-filepos): Ditto.
2021-08-13 13:06:33 +02:00
Lars Ingebrigtsen
6247540723 Remove :group from defcustoms in image-dired.el
* lisp/image-dired.el: Remove :group from the defcustoms throughout.
2021-08-13 12:28:55 +02:00
Peter Münster
6fd2a49335 Don't disable transient mark mode when changing image faces
* lisp/image-dired.el (image-dired-thumb-update-marks): Keep the
mark state when changing faces. (bug#49999).
2021-08-13 12:25:27 +02:00
Juri Linkov
a93d164ff3 * lisp/tab-bar.el (tab-bar-history-buttons-show): Remove defcustom.
(tab-bar-format-history): Don't use this recently added variable
because now it's possible to customize the option 'tab-bar-format'
to remove 'tab-bar-format-history' from it that gives the same result.
2021-08-13 10:30:20 +03:00
Juri Linkov
a9ad3d4774 Add save-some-buffers-root to save-some-buffers-default-predicate (bug#46374)
* lisp/files.el (save-some-buffers-default-predicate): Add choice
'save-some-buffers-root'.
(save-some-buffers-root): New predicate function.
(save-some-buffers): Check if 'pred' returns a lexically-bound lambda,
then use it as 'pred'.

Thanks to Tino Calancha <tino.calancha@gmail.com>
2021-08-13 10:10:29 +03:00
Alan Mackenzie
c4d34d24e3 CC Mode: Enhance C++ Mode raw strings to multi-line strings for any language
* lisp/progmodes/cc-defs.el (cadar, caddr, cdddr): Add defsubsts for these for
when they are missing from the host Emacs.
(c-point): Add new `position' 'boll "beginning of logical line".
(c-clear-char-properties): Return the position of the lowest removed
property.

* lisp/progmodes/cc-engine.el (c-full-pp-to-literal): Fix for rare case where
LIMIT < START in parse-partial-sexp.
(c-old-beg-rs, c-old-end-rs, c-raw-string-end-delim-disrupted)
(c-raw-string-pos, c-raw-string-in-end-delim, c-depropertize-raw-string)
(c-depropertize-raw-strings-in-region, c-before-change-check-raw-strings)
(c-propertize-raw-string-id, c-propertize-raw-string-opener): Old functions
and variables removed or renamed "raw" -> "ml" and adapted.
(c-old-beg-ml, c-old-1-beg-ml, c-old-end-ml, c-beg-pos, c-end-pos)
(c-ml-string-end-delim-disrupted, c-depropertize-ml-string-delims)
(c-ml-string-delims-around-point,c-position-wrt-ml-delims)
(c-before-change-check-ml-strings, c-after-change-unmark-ml-strings)
(c-maybe-re-mark-ml-string, c-propertize-ml-string-id)
(c-propertize-ml-string-opener, c-depropertize-ml-string)
(c-depropertize-ml-strings-in-region): New functions and variables adapted and
possibly renamed from "raw" -> "ml".
(c-ml-string-make-closer-re, c-ml-string-make-opener-re)
(c-c++-make-ml-string-closer-re, c-c++-make-ml-string-opener-re)
(c-get-ml-closer, c-ml-string-opener-around-point)
(c-ml-string-opener-intersects-region, c-ml-string-opener-at-or-around-point)
(c-ml-string-back-to-neutral, c-ml-string-in-end-delim, c-neutralize-pos)
(c-neutralized-prop): New functions and variables.

* lisp/progmodes/cc-fonts.el (c-basic-matchers-before): Replace
c-font-lock-raw-strings with c-font-lock-ml-strings.
(c-font-lock-ml-strings): New function taking the place of the old
c-font-lock-ml-strings.

* lisp/progmodes/cc-langs.el (c-get-state-before-change-functions): Move
c-depropertize-CPP to the second item of the C++ entry, and replace
c-before-change-check-raw-strings by c-before-change-check-ml-strings.  Add a
new entry for Pike Mode.
(c-before-font-lock-functions): (Replace c-after-change-unmark-raw-strings by
c-after-change-unmark-ml-strings in the C++ entry, and add a new entry for
Pike Mode.
(c-ml-string-backslash-escapes, c-ml-string-non-punc-skip-chars)
(c-ml-string-opener-re, c-ml-string-max-opener-len, c-ml-string-any-closer-re)
(c-ml-string-max-closer-len, c-ml-string-max-closer-len-no-leader)
(c-ml-string-back-closer-re, c-make-ml-string-closer-re-function)
(c-make-ml-string-opener-re-function, c-ml-string-cpp-or-opener-re)
(c-cpp-or-ml-match-offset): New c-lang-defconsts and c-land-defvars.
(c-multiline-string-start-char): Remove the Pike Mode setting.

* lisp/progmodes/cc-mode.el (c-depropertize-CPP): Test for general ml strings
rather than C++ raw strings.
(c-unescaped-nls-in-string-p): Handle languages with ml strings.
(c-clear-string-fences): Fix bug with wrong parenthesisation.
(c-before-change-check-unbalanced-strings)
(c-after-change-mark-abnormal-strings, c-after-change-escape-NL-in-string):
Adapt for multi-line strings.
2021-08-12 19:04:28 +00:00
Michael Albinus
5d50acd0a6 Improve connection type `pipe' for remote processes
* doc/misc/tramp.texi (Remote processes): New subsection "Remote
process connection type".

* lisp/net/tramp-adb.el (tramp-adb-handle-make-process):
Use `tramp-process-connection-type' as default connection type.
Improve check for `:connection-type'.

* lisp/net/tramp-sh.el (tramp-sh-handle-make-process):
Use `tramp-process-connection-type' as default connection type.
Improve check for `:connection-type'.  Send "stty -icrnl" when
connection type is a pipe.

* lisp/net/tramp.el (tramp-process-connection-type): Allow all
possible values.
(tramp-handle-make-process): Use `tramp-process-connection-type'
as default connection type.  Improve check for `:connection-type'.

* test/lisp/net/tramp-tests.el (tramp-test30-make-process): Extend test.
2021-08-12 20:09:48 +02:00
Stefan Monnier
5809728bc5 * lisp/emacs-lisp/lisp-mnt.el (lm-crack-address): Handle multi-addresses
(lm-authors, lm-maintainers): Adjust accordingly.
2021-08-12 13:55:38 -04:00
Basil L. Contovounesios
1d60a25541 ; Fix last change. 2021-08-12 16:35:43 +01:00
Lars Ingebrigtsen
4e4b76b094 Make info-look try to use more recent Python manual
* lisp/info-look.el: Use the Debian-installed python3.9 manual if
it exists (bug#31405).
2021-08-12 17:20:35 +02:00
Lars Ingebrigtsen
0d04ceca2e Further tweak minibuffer-inactive-mode doc string
* lisp/minibuffer.el (minibuffer-inactive-mode): Mention
`minibuffer-exit-hook' (bug#13641).
2021-08-12 17:15:52 +02:00
Lars Ingebrigtsen
afc945d0c9 Improve minibuffer-inactive-mode documentation
* lisp/minibuffer.el (minibuffer-inactive-mode): Clarify when it's
used (bug#13641).
2021-08-12 17:15:52 +02:00
Lars Ingebrigtsen
1678d3599b Mention url-handler-mode in the Emacs manual
* doc/emacs/misc.texi (Browse-URL): Mention url-handler-mode
(bug#30389).

* lisp/url/url-handlers.el (url-handler-mode): Improve doc string.
2021-08-12 17:15:52 +02:00
Stefan Monnier
96d83a8546 * lisp/emacs-lisp/pcase.el (pcase-setq): Align its semantics with pcase-let
* test/lisp/emacs-lisp/pcase-tests.el (pcase-tests-setq): Rename from
pcase-setq and ajust accordingly.
2021-08-12 11:04:30 -04:00
Lars Ingebrigtsen
0a611a5d7f Add support for Python mode in info-lookup-symbol
* lisp/info-look.el (:mode): Add support for Python mode
(bug#31405).
2021-08-12 16:10:57 +02:00
Lars Ingebrigtsen
368c9f5e84 Clarify smie-indent-forward-token doc string
* lisp/emacs-lisp/smie.el (smie-indent-forward-token): Doc string
clarification (bug#31948).
2021-08-12 15:39:36 +02:00
Lars Ingebrigtsen
7328a6ea10 Change the `region' face in the Wombat theme
* etc/themes/wombat-theme.el (class): Don't use a foreground in
the `region' face because it obscures syntax highlighting (bug#32143).
2021-08-12 15:34:36 +02:00
Omar Polo
45cfa2a8cd Mention `find-ignore-file' in the vc.el commentary
* lisp/vc/vc.el: Update documentation in the comments about
`find-ignore-file' (bug#50013).
2021-08-12 14:59:45 +02:00
Lars Ingebrigtsen
cb03917034 Add XLFD font parsing tests
* test/src/font-tests.el (font-parse-xlfd-test): Add some tests
for XLFD testing (bug#35816).
2021-08-12 14:18:08 +02:00
Stefan Monnier
9445d7bf8c * lisp/emacs-lisp/cl-macs.el (fixnum, bignum): Fix type definitions 2021-08-11 22:42:06 -04:00
Lars Ingebrigtsen
8dd6120594 Fix bytecomp container test case
* lisp/startup.el (normal-top-level): Make startup more robust --
we may not be allowed to create any directories when running under
test mode (bug#48350).
2021-08-12 01:19:30 +02:00
Stefan Monnier
bd6c3a014a * lisp/obsolete/cl.el (labels): Don't quote lambda
(flet): Don't need `fboundp` any more before calling `symbol-function`.
2021-08-11 18:20:35 -04:00
Earl Hyatt
2f90fa19b8 Add a `pcase-setq' macro
* doc/lispref/control.texi (Destructuring with pcase Patterns):
Document this macro.

* lisp/emacs-lisp/pcase.el (pcase-setq): New macro.  This macro is
the 'setq' equivalent of 'pcase-let'.

* test/lisp/emacs-lisp/pcase-tests.el (pcase-setq): Test this new
macro. (bug#49809).
2021-08-11 23:54:31 +02:00
Lars Ingebrigtsen
3b5f8ab0d0 Allow using a single anonymous face in enriced-mode
* lisp/format.el (format-annotate-single-property-change): Allow
using a single anonymous face (bug#33682).
2021-08-11 22:29:38 +02:00
Lars Ingebrigtsen
81fd380dea Allow using XLFD font names with dashes in the family name
* src/font.c (font_parse_xlfd_1): Rename from font_parse_xlfd to
allow calling twice from a wrapper (bug#35816).
(font_parse_xlfd): Wrapper function -- first try to parse in the
normal way, and then try to guess that the hyphenated bits are in
the family name.
2021-08-11 22:07:13 +02:00
Lars Ingebrigtsen
bdec9daf57 Allow `tex-buffer' to work on buffers not visiting files
* lisp/textmodes/tex-mode.el (tex-region): Make `tex-buffer' work
again on unsaved files (bug#34082).
2021-08-11 21:26:29 +02:00
Stephen Berman
b81de1be90 Fix URL entry in ffap after previous change
* lisp/ffap.el (ffap-read-file-or-url): Make URL entry actually
work again (bug#50011).
2021-08-11 18:06:19 +02:00
Peter Münster
7dbbe6cbc5 Add new image-dired commands
* lisp/image-dired.el (image-dired-delete-marked): Factored out
(bug#50000).
(image-dired-display-thumbs): From here.
(image-dired-tag-marked-thumbnails): New command.
(image-dired-delete-marked): Ditto.
2021-08-11 18:06:19 +02:00
Michael Albinus
244acc5a05 Replace some `string-match-p' calls in Tramp
* lisp/net/tramp.el (tramp-debug-message, tramp-set-completion-function)
(tramp-get-completion-methods, tramp-get-completion-user-host):
* lisp/net/tramp-adb.el (tramp-adb-handle-make-process):
* lisp/net/tramp-sh.el (tramp-sh-handle-make-process)
(tramp-open-connection-setup-interactive-shell)
(tramp-convert-file-attributes): Use `string-prefix-p'.

* lisp/net/tramp.el (tramp-dissect-file-name)
(tramp-progress-reporter-update, tramp-handle-insert-directory):
* lisp/net/tramp-cache.el (tramp-get-hash-table)
(tramp-flush-directory-properties):
* lisp/net/tramp-cmds.el (tramp-append-tramp-buffers):
* lisp/net/tramp-sh.el (tramp-sh-handle-insert-directory)
(tramp-call-local-coding-command, tramp-get-inline-coding):
* lisp/net/tramp-smb.el (tramp-smb-handle-file-attributes)
(tramp-smb-handle-file-name-all-completions)
(tramp-smb-handle-file-writable-p)
(tramp-smb-handle-insert-directory)
(tramp-smb-handle-start-file-process, )
(tramp-smb-read-file-entry): Use `tramp-compat-string-search'.
2021-08-11 15:34:43 +02:00
Rajeev Narang
1ab9fa60e7 Make icalendar parse multi-line items correctly
* lisp/calendar/icalendar.el (icalendar--parse-summary-and-rest):
Parse multi-line items correctly (bug#37887).
2021-08-11 14:57:43 +02:00
Lars Ingebrigtsen
0af1142de1 Fix icalendar-import-file prompt
* lisp/calendar/icalendar.el (icalendar-import-file): Fix prompt.
2021-08-11 14:54:20 +02:00
Lars Ingebrigtsen
8b15ce8daa Make gnus-icalendar-event-from-ical more robust
* lisp/gnus/gnus-icalendar.el (gnus-icalendar-event-from-ical):
Don't bug out on nil UIDs.
2021-08-11 14:52:32 +02:00
Peter Oliver
024e6d213c Drop redundant keywords in .desktop files.
The Freedesktop.org Desktop Entry spec says, “The values [of
Keywords]… should not be redundant with the values of Name or
GenericName”.

* etc/emacs.desktop, etc/emacsclient.desktop (Keywords): Remove
keywords that are duplicated from the GenericName field.
2021-08-11 14:05:25 +02:00
Peter Oliver
aea7823a7e Hint that emacsclient.desktop should match a search for “emacsclient”
This is necessary to get the Gnome desktop to show “Emacs (Client)”
when the user searches for “emacsclient”.

* etc/emacsclient.desktop, emacsclient-mail.desktop (Keywords): Add
“emacsclient”.
2021-08-11 14:05:14 +02:00
Peter Oliver
0a4b66f827 Valid quoting in .desktop files
* etc/emacsclient.desktop, emacsclient-mail.desktop (Exec): Quote
according to the rules in the Freedesktop.org Desktop Entry
Specification.
2021-08-11 14:04:58 +02:00
Peter Münster
8b645837d2 Mark marked images in Image-Dired mode
* lisp/image-dired.el (image-dired-thumb-update-marks): New
function that makes the marks visible in the thumbnail buffer
(bug#49988).
(image-dired-thumb-margin, image-dired-thumb-mark-color): New user
options.
2021-08-11 14:03:23 +02:00
Peter Münster
c56e395edf Let image-dired-mouse-toggle-mark act on active region
* lisp/image-dired.el (image-dired-mouse-toggle-mark): When region is
active, then toggle marks of all images within (bug#49987).
(image-dired-mouse-toggle-mark-1): Separated out into function.
2021-08-11 13:39:53 +02:00
Juri Linkov
fc174eb20b ; Fix typos 2021-08-11 10:10:19 +03:00
Juri Linkov
da8277abc1 * lisp/replace.el (perform-replace): Use 'remove-function' (bug#49963).
Don't let-bind the value of 'isearch-filter-predicate' to protect
from changing the global value, since with a buffer-local value
it still changes the global value.  So after using 'add-function' on the
global value of 'isearch-filter-predicate', call 'remove-function' to remove
'region-filter' from the global value in 'unwind-protect'.
2021-08-11 10:06:29 +03:00
Lars Ingebrigtsen
a8e89964f3 Use ### for outline headings in shell-script-mode
* lisp/progmodes/sh-script.el (sh-mode): Use ### for outline headings.
This aligns it more with emacs-lisp-mode headings.
2021-08-10 18:21:15 +02:00
Lars Ingebrigtsen
a6bd049031 Add support for outlining in shell-script-mode
* lisp/progmodes/sh-script.el (sh-mode): Set outline-regexp (bug#49346).
2021-08-10 17:52:26 +02:00