Commit graph

3850 commits

Author SHA1 Message Date
Lars Ingebrigtsen
5909b27144 Fix \href{a_b} in tex-mode
* lisp/textmodes/tex-mode.el (tex-font-lock-keywords-2): Fontify
href parameters like constants so that _ aren't fontified like
subscripts.
2022-01-24 15:19:38 +01:00
Lars Ingebrigtsen
8c37b9042e Revert "Fix tex-mode handling of _ chars in href{} commands"
This reverts commit 487a0be7f7.

This will be fixed a different way.
2022-01-24 15:15:59 +01:00
Lars Ingebrigtsen
487a0be7f7 Fix tex-mode handling of _ chars in href{} commands
* lisp/textmodes/tex-mode.el (tex--current-command): New function
(bug#23102).
(tex-font-lock-suscript): Don't subscript _ chars in href.
2022-01-24 12:39:02 +01:00
Lars Ingebrigtsen
07f32fa70a Put the old label into the future history in reftex-change-label
* lisp/textmodes/reftex-global.el (reftex-change-label): Put the
old label into the future history so that it can be edited easily
(bug#53417).
2022-01-22 13:14:43 +01:00
Arash Esbati
808917b3fc Remove matching of whitespaces in LaTeX environment names
* lisp/textmodes/ispell.el (ispell-tex-skip-alists): Don't match
arbitrary number of whitespaces in LaTeX environment names.
(bug#53390)
2022-01-20 19:20:34 +01:00
Juri Linkov
2b59a42583 * lisp/textmodes/paragraphs.el (repunctuate-sentences): Use filter variable.
(repunctuate-sentences-filter)<defun>:
Reimplement without using match data.
(repunctuate-sentences-filter)<defvar>: New variable.
(repunctuate-sentences): Use new variable.
Remove regexp group from spaces as was before.
https://lists.gnu.org/archive/html/emacs-devel/2022-01/msg00395.html
2022-01-05 20:47:20 +02:00
Eli Zaretskii
823b6b8d26 ; Add 2022 to copyright years. 2022-01-01 07:07:15 -05:00
Eli Zaretskii
dcd76bd48d Merge from origin/emacs-28
836be7a112 ; * etc/refcards/ru-refcard.tex: Update Copyright year.
86cbc6ee4a * lisp/net/tramp-sh.el: Adapt copyright year
ebe8772f65 ; Minor fixes related to copyright years
23c1ee6989 ; * test/manual/etags/ETAGS.good_N: Adjust to copyright ye...
8d3fc7ec89 * src/xfaces.c (face_for_font): Make 'hash' be uintptr_t.
19dcb237b5 ; Add 2022 to copyright years.

# Conflicts:
#	etc/NEWS
#	etc/refcards/ru-refcard.tex
#	lib/cdefs.h
#	lisp/erc/erc-dcc.el
#	lisp/erc/erc-imenu.el
#	lisp/erc/erc-replace.el
#	lisp/image-dired.el
#	lisp/progmodes/xref.el
#	m4/alloca.m4
#	m4/byteswap.m4
#	m4/errno_h.m4
#	m4/getopt.m4
#	m4/gnulib-common.m4
#	m4/inttypes.m4
#	m4/stddef_h.m4
#	m4/stdint.m4
#	m4/sys_socket_h.m4
2022-01-01 07:03:03 -05:00
Eli Zaretskii
19dcb237b5 ; Add 2022 to copyright years. 2022-01-01 02:45:51 -05:00
Juri Linkov
fb4f2aa038 * lisp/textmodes/paragraphs.el (repunctuate-sentences-filter): New function.
(repunctuate-sentences): Use it on isearch-filter-predicate
to skip unnecessary matches.  (bug#52769)
2021-12-29 21:10:04 +02:00
Juri Linkov
3fc8032a1a * lisp/textmodes/sgml-mode.el (sgml-mode): Set skeleton-end-newline to nil.
Prevent skeleton.el from adding a newline to each inserted
skeleton.  Those which do want a newline do that explicitly in
their define-skeleton form.  This is what texinfo-mode does (bug#52864).
2021-12-29 20:52:11 +02:00
Sam Steingold
18b680cfd1 Fix bug#52467 by adding a new custom variable 'display-comint-buffer-action'
* lisp/window.el (display-comint-buffer-action): New `defcustom`,
defaults to 'display-buffer-same-window' for backward compatibility.
* lisp/cmuscheme.el (run-scheme, switch-to-scheme): Pass
'display-comint-buffer-action' to 'pop-to-buffer' instead
of using 'pop-to-buffer-same-window'.
* lisp/eshell/eshell.el (eshell): Likewise.
* lisp/shell.el (shell): Likewise.
* lisp/org/ol-eshell.el (org-eshell-open): Likewise.
* lisp/progmodes/inf-lisp.el (inferior-lisp): Likewise.
* lisp/progmodes/project.el (project-shell, project-eshell): Likewise.
* lisp/textmodes/tex-mode.el (tex-display-shell, tex-compile-default)
(tex-recenter-output-buffer): Pass 'display-comint-buffer-action'
to 'pop-to-buffer'.
2021-12-28 17:28:49 -05:00
Juri Linkov
2033f950fa * lisp/textmodes/paragraphs.el (repunctuate-sentences): Region for NO-QUERY.
Use region boundaries also for the case when NO-QUERY arg is non-nil
(bug#52769).
2021-12-28 21:51:54 +02:00
Juri Linkov
af92c52669 * lisp/textmodes/paragraphs.el (repunctuate-sentences): Support region.
Add optional args 'start' and 'end', and pass them as region boundaries
to query-replace-regexp (bug#52769).
2021-12-28 21:19:25 +02:00
Stefan Kangas
c167009400 Make some variable aliases obsolete
* lisp/progmodes/make-mode.el (makefile-query-one-target-method):
* lisp/skeleton.el (skeleton-transformation, skeleton-filter):
* lisp/textmodes/artist.el (artist-text-renderer):
* lisp/textmodes/bibtex.el (bibtex-autokey-name-case-convert):
(bibtex-autokey-titleword-case-convert):
* lisp/textmodes/ispell.el (ispell-format-word):
* lisp/textmodes/sgml-mode.el (sgml-transformation):
* lisp/vc/add-log.el (change-log-time-zone-rule): Make variable
aliases obsolete.
2021-12-20 22:16:24 +01:00
Arash Esbati
5a057f6716 Recognize starred environments
* lisp/textmodes/reftex-vars.el (reftex-label-alist-builtin): Add
missing starred environments from sidecap and rotating packages.
2021-12-15 12:10:05 +01:00
Lars Ingebrigtsen
af1c5ec0fc Fix bibtex-biblatex-entry-alist sorting when using latex
* lisp/textmodes/bibtex.el (bibtex-biblatex-entry-alist): Sort
PhdThesis and TechReport correctly when using the latex variant
(bug#52354).
2021-12-11 04:16:06 +01:00
Stefan Kangas
176c63287f Convert etc-authors-mode-map to defvar-keymap
* lisp/textmodes/etc-authors-mode.el (etc-authors-mode-map):
Convert to defvar-keymap.
2021-12-08 01:57:45 +01:00
Stefan Kangas
13556f32ba ; * lisp/textmodes/texinfo.el: Remove stale comment.
The referenced variable was removed two decades ago.
2021-12-08 01:48:11 +01:00
Lars Ingebrigtsen
08782d58db Fix pixel-fill--fill-line infloop for certain unbreakable lines
* lisp/textmodes/pixel-fill.el (pixel-fill--fill-line): Fix
infloops for certain line widths (bug#52271).
2021-12-04 20:38:22 +01:00
Eli Zaretskii
6927841ecb Fix recent changes related to 'glyphless-display-mode'
* lisp/textmodes/glyphless-mode.el (glyphless-mode-types): Fix
spelling of "bidirectional".
* lisp/international/characters.el (char-acronym-table): Fix
acronyms for LRI and RLI: use their accepted shorthands.
(glyphless-char-display-control): Fix spelling of doc string.

* doc/lispref/display.texi (Glyphless Chars): Fix spelling and add
a cross-reference.
2021-12-02 12:32:17 +02:00
Lars Ingebrigtsen
35075267a6 Add a bidi-control target for `glyphless-char-display-control'
* doc/lispref/display.texi (Glyphless Chars): Document bidi-control.

* lisp/international/characters.el (char-acronym-table): Add the
ISOLATE characters.
(update-glyphless-char-display): Implement bidi-control, and mark
all Cf characters we don't know about as UNK.
(glyphless--bidi-control-characters): New variable.
(glyphless-char-display-control): Add a new type -- bidi-control.

* lisp/textmodes/glyphless-mode.el (glyphless-mode-types): Add a
new type -- bidi-control.
2021-12-02 08:31:37 +01:00
Lars Ingebrigtsen
cbcf8a616e Fix table-fixed-width-mode when typing fast
* lisp/textmodes/table.el (table-with-cache-buffer): Use the value
of table-fixed-width-mode in the correct buffer (bug#26701).
2021-12-01 19:49:13 +01:00
Lars Ingebrigtsen
d086d4f91d Fix fencepost error in pixel-fill--fill-line
* lisp/textmodes/pixel-fill.el (pixel-fill--fill-line): Don't add
a newline (and continuation) if we're at the end of the line.
2021-12-01 17:34:07 +01:00
Lars Ingebrigtsen
6a60bd475d Add a new minor mode `glyphless-display-mode'
* doc/emacs/display.texi (Text Display): Mention it.

* doc/lispref/display.texi (Glyphless Chars): Document it.
* lisp/textmodes/glyphless-mode.el: New minor mode (bug#27544).
2021-12-01 16:53:00 +01:00
Lars Ingebrigtsen
6348ca1a88 Make pixel-fill-region handle space regions better
* lisp/textmodes/pixel-fill.el (pixel-fill-region): Preserve the
face on the replacement spaces.
2021-12-01 15:03:24 +01:00
Lars Ingebrigtsen
9d17e346fe Preserve newlines at the end of pixel-fill-region
* lisp/textmodes/pixel-fill.el (pixel-fill-region): Preserve
newlines at the end.
2021-12-01 14:41:42 +01:00
Eli Zaretskii
7433e74571 Improve documentation of pixel-fill
* doc/lispref/text.texi (Filling): Describe the arguments of
'pixel-fill-region'.  Add index entry.

* lisp/textmodes/pixel-fill.el (pixel-fill-region): Doc fix.
2021-11-30 20:07:19 +02:00
Lars Ingebrigtsen
10d371e4fa Document pixel-fill-region
* doc/lispref/text.texi (Filling): Document pixel-fill-region.

* lisp/textmodes/pixel-fill.el (pixel-fill-width): Add new helper
function.
2021-11-30 16:46:28 +01:00
Lars Ingebrigtsen
72b7fccc15 Add new package pixel-fill.el
* lisp/net/shr.el (shr-char-breakable-p, shr-char-nospace-p)
(shr-char-kinsoku-bol-p, shr-char-kinsoku-eol-p)
(shr-find-fill-point): Moved to pixel-fill.el and renamed.
(shr-pixel-region): Made obsolete.
(shr-fill-line): Use pixel-fill-region.

* lisp/textmodes/pixel-fill.el: New package.
2021-11-30 02:07:22 +01:00
Lars Ingebrigtsen
73cf27aa45 Make Re: recognition in ispell-message less ambiguous
* lisp/textmodes/ispell.el (ispell-message): Require a "Re" as a
word, not as a word ending (bug#52104).
2021-11-29 17:08:11 +01:00
Ikumi Keita
247ed6ccbc Make fill-region-as-paragraph clear the markers it creates
* lisp/textmodes/fill.el (fill-region-as-paragraph): Clear
temporary markers (bug#52175).

Copyright-paperwork-exempt: yes
2021-11-29 15:40:19 +01:00
Juri Linkov
44923722f4 * lisp/textmodes/flyspell.el: Pop up the menu under cursor from keyboard.
* lisp/textmodes/flyspell.el (flyspell-emacs-popup):
Use popup-menu-normalize-position with point when no mouse is involved,
instead of the incorrect use of mouse-position (bug#52025).
2021-11-22 21:07:08 +02:00
Stefan Kangas
4a3ba8528b Use substitute-command-keys for literal key sequences
* lisp/abbrev.el (expand-region-abbrevs):
* lisp/calc/calc-graph.el (calc-graph-show-dumb):
* lisp/calc/calc-help.el (calc-help-for-help):
* lisp/calc/calc-mode.el (calc-auto-why):
* lisp/calc/calc.el (calc-do):
* lisp/calculator.el (calculator-mode):
* lisp/dired-aux.el (dired-create-files)
(dired-do-create-files-regexp, dired-create-files-non-directory):
* lisp/dired-x.el (dired-virtual):
* lisp/dired.el (dired-mark-region, dired-unmark-all-files):
* lisp/emacs-lisp/map-ynp.el (map-y-or-n-p):
* lisp/emacs-lisp/re-builder.el (reb-enter-subexp-mode):
* lisp/epa-ks.el (epa-ks--display-keys):
* lisp/erc/erc.el (erc-toggle-debug-irc-protocol):
* lisp/files.el (save-some-buffers):
* lisp/gnus/gnus-dired.el (gnus-dired-find-file-mailcap)
(gnus-dired-print):
* lisp/gnus/gnus-group.el (gnus-keep-same-level):
* lisp/gnus/gnus-score.el (gnus-score-find-trace):
* lisp/gnus/gnus.el (to-list):
* lisp/gnus/message.el (message--send-mail-maybe-partially):
* lisp/mail/supercite.el (sc-set-variable):
* lisp/minibuffer.el (minibuffer-inactive-mode):
* lisp/progmodes/etags.el (select-tags-table):
* lisp/progmodes/idlw-shell.el (idlwave-shell-mode)
(idlwave-shell-char-mode-loop):
* lisp/replace.el (query-replace-help):
* lisp/simple.el (set-variable):
* lisp/subr.el (read-char-from-minibuffer):
* lisp/textmodes/ispell.el (ispell-help, ispell-message):
* lisp/textmodes/reftex-global.el (reftex-find-duplicate-labels):
* lisp/textmodes/reftex-vars.el
(reftex-toc-include-file-boundaries)
(reftex-toc-include-labels, reftex-toc-include-index-entries)
(reftex-toc-include-context, reftex-toc-follow-mode)
(reftex-index-include-context, reftex-index-follow-mode)
(reftex-enable-partial-scans)
(reftex-auto-update-selection-buffers)
(reftex-highlight-selection):
* lisp/time.el (display-time-update):
* lisp/vc/ediff-help.el (ediff-help-for-quick-help):
* lisp/vc/ediff-init.el (ediff-keep-variants):
* lisp/vc/ediff-ptch.el (ediff-fixup-patch-map)
(ediff-patch-file-internal):
* lisp/windmove.el (windmove-delete-default-keybindings): Use
'substitute-command-keys' for literal key sequences.

* lisp/userlock.el (userlock--fontify-key): Remove function.
(ask-user-about-lock, ask-user-about-lock-help)
(ask-user-about-supersession-threat)
(ask-user-about-supersession-help): Use 'substitute-command-keys' for
literal key sequences.

* lisp/ibuffer.el (ibuffer-unmark-all): Use 'substitute-command-keys'
for command.
2021-11-22 12:04:19 +01:00
Stefan Kangas
c6d5fccc92 Merge from origin/emacs-28
02853edba7 Fix sorting of menus in `context-menu-local' (bug#50067).
14271d050a Fix flyspell-correct-word selected from context menu opene...
bf824843f4 * lisp/repeat.el (describe-repeat-maps): Print all bound k...
6fc94fb99e * lisp/tab-bar.el: Use 'mouse-1' for history buttons like ...
5eeaf85767 Improve documentation of window hooks
7404f4b4e0 Improve doc string of 'highlight-nonselected-windows'
2021-11-19 07:00:24 +01:00
Juri Linkov
14271d050a Fix flyspell-correct-word selected from context menu opened with the keyboard
* lisp/mouse.el (context-menu-open): Call interactively a command
returned by `context-menu-map' such as `flyspell-correct-word' (bug#50067).

* lisp/textmodes/flyspell.el (flyspell-correct-word): Handle the
case when it's called by a key bound to `context-menu-open'.
Then it should work the same way as `C-c $' typed on misspelled word
where the arg `event' of `flyspell-correct-word-before-point' is nil.
2021-11-18 20:23:58 +02:00
Stefan Kangas
9e79575486 Remove some references to XEmacs
* lisp/emulation/viper-cmd.el (viper-start-R-mode):
* lisp/emulation/viper-init.el (viper-window-display-p):
* lisp/emulation/viper-mous.el (viper-surrounding-word):
* lisp/mail/footnote.el (footnote-mode):
* lisp/textmodes/reftex-index.el: Remove some comments referring to
XEmacs.
2021-11-17 06:25:50 +01:00
Lars Ingebrigtsen
a460f3d378 Make html-mode--html-yank-handler more resilient
* lisp/textmodes/sgml-mode.el (html-mode--html-yank-handler): The
HTML may not be valid, so suppress errors.
2021-11-08 06:04:11 +01:00
Lars Ingebrigtsen
cddd927d36 Rename 'register-yank-media-handler'
* lisp/textmodes/sgml-mode.el (html-mode):
* lisp/gnus/message.el (message-mode):
* doc/lispref/frames.texi (Yanking Media): Adjust.
* lisp/yank-media.el (yank-media): Adjust doc string.
(yank-media-handler): Rename from `register-' because that may
cause confusion with register.el functions.
2021-11-08 01:40:58 +01:00
Lars Ingebrigtsen
5f70682d7b Allow 'C-x n d' to work in texinfo-mode
* lisp/textmodes/texinfo.el (texinfo-mode): Set
beginning/end-of-defun functions to allow narrowing to the current
node.
(texinfo--beginning-of-defun, texinfo--end-of-defun): New functions.
2021-11-07 23:57:04 +01:00
Lars Ingebrigtsen
dde591571a Make paragraph/filling functions in texinfo-mode work better
* lisp/textmodes/texinfo.el (texinfo-mode): Make paragraph
definitions more traditional.  This makes (forward-paragraph 1)
behave better.
(texinfo-mode): Set a new filling function.
(texinfo--fill-paragraph): New filling function.
(texinfo-fillable-commands): New variable (bug#49558).
2021-11-07 23:47:47 +01:00
Lars Ingebrigtsen
6a546a2486 Fix html-mode--image-yank-handler prompting
* lisp/textmodes/sgml-mode.el (html-mode--image-yank-handler): Fix
two format statements and rearrange images.
2021-11-07 02:35:00 +01:00
Lars Ingebrigtsen
465cb1fff1 Allow yanking images to html-mode
* lisp/net/mailcap.el (mailcap-mime-type-to-extension): Autoload.
* lisp/textmodes/sgml-mode.el (html-mode--image-yank-handler): New
function.
(html-mode): Accept image/*.
2021-11-07 00:08:36 +01:00
Lars Ingebrigtsen
bb495329e7 Support yank-media in html-mode
* lisp/textmodes/sgml-mode.el (html-mode--html-yank-handler): New
function.
(html-mode): Handle text/html.
2021-11-06 22:45:05 +01:00
Eli Zaretskii
c30f95078c Merge from origin/emacs-28
20ebd91a73 Improve documentation of string truncation APIs
3f998a3fc8 * lisp/textmodes/css-mode.el: Fix typo.  (Bug#51488)
2021-10-30 04:07:09 -04:00
Imran Khan
3f998a3fc8 * lisp/textmodes/css-mode.el: Fix typo. (Bug#51488)
Copyright-paperwork-exempt: yes
2021-10-29 19:06:40 +02:00
Glenn Morris
502a00b8b9 Merge from origin/emacs-28
7e2b973d60 * lisp/textmodes/text-mode.el (text-mode-context-menu): Re...
da6d889e90 ; * etc/NEWS: Use active voice for 'repeat-mode', etc.
e3171e7e86 Allow automatic use of color fonts for emoji on macOS

# Conflicts:
#	etc/NEWS
2021-10-29 09:19:51 -07:00
Juri Linkov
7e2b973d60 * lisp/textmodes/text-mode.el (text-mode-context-menu): Rename recently added. 2021-10-27 20:32:23 +03:00
Lars Ingebrigtsen
85b8609f95 Tweak how auto-fill fills after a period
* lisp/textmodes/fill.el (fill-nobreak-p): Don't break immediately
after a space after a period (bug#17321).
2021-10-11 10:18:03 +02:00
Glenn Morris
2bc37c14db Merge from origin/emacs-28
af01b674ce (origin/emacs-28) ; Fix spacing in previous commit
915e044d60 Use the correct label in the warning
6e83a4100a ; * admin/make-tarball.txt: Should configure --with-native...
525602d682 ; * etc/TODO (display): Add entry about Default_Ignorables.
65de510c16 ; Fix 'restore-buffer-modified-p' doc string typo
9d8202b45e Add Emacs 27 compatibility hack
89d64fca75 Pacify GCC 10.3 -Wmaybe-uninitialized
bb8ef1aa30 * lisp/tab-bar.el (tab-detach, tab-window-detach): New ali...
7ae70054aa ; * src/composite.h (LGSTRING_FONT): Add comment about its...
1af00e67d6 Include the refcards in the release tarball
3c29fb705c ; * src/Makefile.in (../native-lisp): Make the long recipe...
2021-10-08 07:50:28 -07:00