summaryrefslogtreecommitdiff
path: root/lisp/indent.el
AgeCommit message (Collapse)Author
2023-12-09Merge from origin/emacs-29Eli Zaretskii
0f361cc985d ; Minor copyedits in description of ':box' face property 46fe7a17f53 Fix dragging mode line on text terminals with a mouse (bu... 12daf386f37 ; * doc/lispref/processes.texi (Network): Fix wording and... 037d858dc1a (rust-ts-mode): Set electric-indent-chars dc9b733ab88 js-ts-mode: Highlight function parameters inside destruct... 4a72f13bdfb js-ts-mode: Highlight property shorthands in assignments 83ed9018ede (js--treesit-font-lock-settings): Highlight parameters in... ad0f87bb4c3 (js--treesit-font-lock-settings): Remove some duplicates 71c5f3694fd ; Another fix of doc string of 'message-mail-user-agent' ... 04a39353bae ; * lisp/gnus/message.el (message-mail-user-agent): Doc f... 82ddcf37ec6 ; * doc/lispref/files.texi (Changing Files): Fix last cha... 89068516b3e Don't claim to signal an error when deleting a nonexistin... 4fd254e1830 * lisp/indent.el (indent-rigidly): Improve prompt (bug#67... 5f923ff1a6a ; Fix typos a1f88963f5d rust-ts-mode--comment-docstring: Handle block doc comments a547b0e2e83 rust-ts-mode--comment-docstring: Fix/improve the previous...
2023-12-04* lisp/indent.el (indent-rigidly): Improve prompt (bug#67620).Eli Zaretskii
2023-11-29; * lisp/indent.el (indent-for-tab-command): Use 'memq'. (Bug#67158)Eli Zaretskii
2023-11-29Repair `tab-first-completion` (bug#67158)Aymeric Agon-Rambosson
Copyright-paperwork-exempt: yes * lisp/indent.el (indent-for-tab-command): Use `syntax-class` to fix longstanding thinko introduced back in 2020 in commit 64c851166442. Rework the check for `syn` because TAB always completed when `tab-first-completion` had value `word-or-paren` or `word-or-paren-or-punct`. (cherry picked from commit c20226a1ef5fbdfd3e71e2ef8654ee19994c0f2f)
2023-11-25Repair `tab-first-completion` (bug#67158)Aymeric Agon-Rambosson
Copyright-paperwork-exempt: yes * lisp/indent.el (indent-for-tab-command): Use `syntax-class` to fix longstanding thinko introduced back in 2020 in commit 64c851166442. Rework the check for `syn` because TAB always completed when `tab-first-completion` had value `word-or-paren` or `word-or-paren-or-punct`.
2023-01-01; Add 2023 to copyright years.Eli Zaretskii
2022-12-27; Improve documentation of TAB/SPC indentationEli Zaretskii
* lisp/indent.el (tab-to-tab-stop): * src/indent.c (Findent_to): Mention 'indent-tabs-mode' in doc strings.
2022-09-13Prefer defvar-keymap in several casesStefan Kangas
* lisp/calc/calc-embed.el (calc-override-minor-modes-map): * lisp/calc/calc-yank.el (calc-edit-mode-map): * lisp/calc/calc.el (calc-trail-mode-map): * lisp/cedet/semantic/mru-bookmark.el (semantic-mru-bookmark-mode-map): * lisp/cedet/semantic/util-modes.el (semantic-highlight-edits-mode-map) (semantic-show-unmatched-syntax-mode-map) (semantic-show-parser-state-mode-map) (semantic-stickyfunc-mode-map, semantic-highlight-func-mode-map): * lisp/cedet/srecode/srt-mode.el (srecode-template-mode-map): * lisp/gnus/gnus-art.el (gnus-prev-page-map, gnus-next-page-map): * lisp/gnus/gnus-search.el (gnus-search-minibuffer-map): * lisp/gnus/score-mode.el (gnus-score-mode-map): * lisp/gnus/smime.el (smime-mode-map): * lisp/indent.el (edit-tab-stops-map): * lisp/isearch.el (minibuffer-local-isearch-map): * lisp/printing.el (pr-interface-map): * lisp/progmodes/prog-mode.el (prog-mode-map): * lisp/progmodes/subword.el (subword-mode-map): * lisp/reveal.el (reveal-mode-map): * lisp/strokes.el (strokes-mode-map): * lisp/textmodes/flyspell.el (flyspell-mouse-map): * lisp/textmodes/less-css-mode.el (less-css-mode-map): * lisp/textmodes/remember.el (remember-mode-map) (remember-notes-mode-map): * lisp/wid-browse.el (widget-browse-mode-map): * lisp/wid-edit.el (widget-key-sequence-map): Prefer defvar-keymap in some easy-to-convert cases.
2022-08-23Use substitute-command-keys in a few more placesStefan Kangas
* lisp/indent.el (edit-tab-stops): * lisp/printing.el (pr-help-message, pr-show-setup): * lisp/progmodes/cperl-mode.el (cperl-narrow-to-here-doc): Use substitute-command-keys.
2022-07-06Add new args MESSAGE and TIMEOUT to set-transient-map (bug#21634)Juri Linkov
* lisp/subr.el (set-transient-map): Add new args MESSAGE and TIMEOUT. (set-transient-map-timeout, set-transient-map-timer): New variables. * lisp/international/emoji.el (emoji-zoom-increase): * lisp/indent.el (indent-rigidly): * lisp/face-remap.el (text-scale-adjust, global-text-scale-adjust): Use the arg MESSAGE of set-transient-map. * doc/lispref/keymaps.texi (Controlling Active Maps): Mention new args MESSAGE and TIMEOUT of set-transient-map.
2022-05-12Bind TAB in indent-rigidly-map as a convenienceLars Ingebrigtsen
* lisp/indent.el (indent-rigidly): Mention it. (indent-rigidly-map): Bind TAB so that `C-x TAB TAB...' does the logical thing.
2022-03-01Merge from origin/emacs-28Stefan Kangas
6dbc3da205 Fix :tag for eol in tab-first-completion
2022-02-28Fix :tag for eol in tab-first-completionLars Ingebrigtsen
* lisp/indent.el (tab-first-completion): Fix the :tag description (bug#54179).
2022-01-16Merge from origin/emacs-28Stefan Kangas
7f36aca99d * lisp/indent.el (tab-first-completion): Fix incorrect cho...
2022-01-15* lisp/indent.el (tab-first-completion): Fix incorrect choices.Philipp Stephani
2022-01-14* lisp/indent.el (indent-for-tab-command): Use 'eq' for symbols.Philipp Stephani
2022-01-14indent-for-tab-command: Deal with large point or modiff values.Philipp Stephani
* lisp/indent.el (indent-for-tab-command): Don't use 'eq' to compare integers that aren't guaranteed to be fixnums.
2022-01-14Simplify code for 'indent-for-tab-command' slightly.Philipp Stephani
* lisp/indent.el (indent-for-tab-command): Don't use a one-element list for SYN.
2022-01-01Merge from origin/emacs-28Eli Zaretskii
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; Add 2022 to copyright years.Eli Zaretskii
2021-11-18Don't ignore restriction in indent-region-line-by-lineMiha Rihtaršič
* lisp/indent.el (indent-according-to-mode): Don't widen if the new optional argument is non-nil. (indent-region): Explicitly widen before calling indent-region-line-by-line. (indent-region-line-by-line): Don't widen (bug#51892). Emacs convention is that low-level functions should respect restriction so that their callers can set restriction according to their needs. For example, 'c-indent-region' is a lower-level function which respects the current restriction and 'indent-region' is a higher-level user command which sets the restriction for lower-level functions, it calls "(widen)". 'indent-region-line-by-line' is a low-level function on a similar level as 'c-indent-region'. This patch makes it respect the current restriction instead of having it call "(widen)".
2021-09-22; More minor stylistic fixes found by checkdocStefan Kangas
2021-09-05; * lisp/indent.el (tab-first-completion): Fix :version tag.Eli Zaretskii
2021-05-30Clarify indent-line-function doc stringEli Zaretskii
* lisp/indent.el (indent-line-function): Clarify by avoiding specifics (bug#20846).
2021-02-08* lisp/indent.el (beginning-of-line-text): Mark it as a movement commandStefan Monnier
So that combining it with `shift` selects the text, as usual, in case you have it bound for example to `C-a` in a mode like `enriched-mode`.
2021-02-06Merge from origin/emacs-27Glenn Morris
8ad48a0bdd (origin/emacs-27) Improve doc string of 'text-scale-adjust' 7a25ff767d Clarify the indent-rigidly doc string 6c5ddf0e0b Fix two small tab bar issues c71e08eba9 Fix last change in syntax.texi # Conflicts: # lisp/indent.el
2021-02-06Clarify the indent-rigidly doc stringLars Ingebrigtsen
* lisp/indent.el (indent-rigidly): Clarify exiting the transient mode (bug#46296).
2021-02-05Don't hard-code ignored functions in `indent-according-to-mode'Lars Ingebrigtsen
* lisp/indent.el (indent-line-ignored-functions): New variable (bug#26945). (indent-according-to-mode): Use it.
2021-01-01Update copyright year to 2021Paul Eggert
Run "TZ=UTC0 admin/update-copyright".
2021-01-01Update copyright year to 2021Paul Eggert
Run "TZ=UTC0 admin/update-copyright $(git ls-files)".
2020-10-16indent-rigidly doc string clarificationLars Ingebrigtsen
* lisp/indent.el (indent-rigidly): Note that the command deactivates the mark (bug#42842).
2020-10-14Add a new variable tab-first-completionAlex Branham
* doc/emacs/indent.texi (Indent Convenience): Mention it. * doc/lispref/text.texi (Mode-Specific Indent): Document it. * lisp/indent.el (tab-first-completion): New variable (bug#34787). (indent-for-tab-command): Use it.
2020-09-08Revert "Explain in the tab-always-indent doc how to make TAB insert a TAB"Lars Ingebrigtsen
This reverts commit 4b2371631167e509668b6268334e324fdd2f0327. overriding-terminal-local-map should apparently not be used for minor stuff like this.
2020-09-05Explain in the tab-always-indent doc how to make TAB insert a TABLars Ingebrigtsen
* lisp/indent.el (tab-always-indent): Mention how to make TAB insert a TAB character always (bug#37183).
2020-01-01Update copyright year to 2020Paul Eggert
Run "TZ=UTC0 admin/update-copyright $(git ls-files)".
2019-05-25Go back to "Maintainer: emacs-devel@gnu.org"Paul Eggert
Restore lines saying "Maintainer: emacs-devel@gnu.org" when there is no special maintainer for a file. Although this wasn't documented it was common practice and removing the lines didn't have consensus.
2019-05-19Fixes for "Maintainer:" and related linesPaul Eggert
Mostly, this just removes "Maintainer: emacs-devel@gnu.org" lines, which are not that useful. It also cleans up and regularizes a few similar lines.
2019-04-05Update documentation for indent-relative functionsAlex Branham
* lisp/indent.el (indent-relative): Document what happens when there is no previous nonblank line. * doc/lispref/text.texi (Relative Indent): Document indent-relative-first-indent-point instead of obsolete indent-relative-maybe. Fix documentation of which argument from 'indent-relative' is used. Bug#34858
2019-04-03Avoid using obsolete indent-relative-maybeBasil L. Contovounesios
* lisp/electric.el (electric-indent-functions-without-reindent): * lisp/indent.el (indent-according-to-mode): Check for indent-relative-first-indent-point in addition to its obsolete alias indent-relative-maybe. * lisp/obsolete/vi.el (vi-com-map): Use indent-relative-first-indent-point in place of its obsolete alias indent-relative-maybe.
2018-12-31Merge from origin/emacs-26Paul Eggert
2fcf2df Fix copyright years by hand 26bed8b Update copyright year to 2019 2814292 Fix value of default frame height. (Bug#33921)
2019-01-01Update copyright year to 2019Paul Eggert
Run 'TZ=UTC0 admin/update-copyright $(git ls-files)'.
2018-07-22Preserve nonblank whitespace when indenting (Bug#32200)Noam Postavsky
* lisp/indent.el (indent-line-to): Remove only spaces and tabs, not any whitespace syntax characters.
2018-07-10* lisp/indent.el (indent-line-to): Fix dedenting of tabs.Noam Postavsky
2018-07-09Respect field boundaries in indent-line-to (Bug#32014)Noam Postavsky
* lisp/indent.el (indent-line-to): Use the back-to-indentation point as the end-point of whitespace removal, rather than backward-to-indentation which doesn't respect field boundaries. * test/lisp/emacs-lisp/lisp-mode-tests.el (lisp-indent-with-read-only-field): Don't expect to fail.
2018-01-01Update copyright year to 2018Paul Eggert
Run admin/update-copyright.
2017-12-20Widen in indent-for-tab-command in the normal case, tooDmitry Gutov
Fixing this obvious omission. * lisp/indent.el (indent--funcall-widened): New function. (indent-for-tab-command): Use it.
2017-12-14Consolidate 'widen' callsDmitry Gutov
* lisp/progmodes/prog-mode.el (prog-indentation-context): Un-document all elements but the first. (prog-widen): Remove. (http://lists.gnu.org/archive/html/emacs-devel/2017-12/msg00321.html) * doc/lispref/text.texi (Mode-Specific Indent): Update. * lisp/progmodes/ruby-mode.el (ruby-calculate-indent): Don't call widen. * lisp/progmodes/python.el (python-indent-guess-indent-offset) (python-info-current-defun): Replace prog-widen with widen; these functions are not called during indentation. (python-indent-context) (python-indent--calculate-indentation) (python-info-dedenter-opening-block-message) (python-info-line-ends-backslash-p) (python-info-beginning-of-backslash) (python-info-continuation-line-p) (python-info-current-defun): Remove 'widen' calls. * lisp/indent.el (indent-according-to-mode) (indent-for-tab-command, indent-region): Move them here. * lisp/textmodes/mhtml-mode.el (mhtml-indent-line): Bind prog-indentation-context to one-element list.
2017-09-13Prefer HTTPS to FTP and HTTP in documentationPaul Eggert
Most of this change is to boilerplate commentary such as license URLs. This change was prompted by ftp://ftp.gnu.org's going-away party, planned for November. Change these FTP URLs to https://ftp.gnu.org instead. Make similar changes for URLs to other organizations moving away from FTP. Also, change HTTP to HTTPS for URLs to gnu.org and fsf.org when this works, as this will further help defend against man-in-the-middle attacks (for this part I omitted the MS-DOS and MS-Windows sources and the test tarballs to keep the workload down). HTTPS is not fully working to lists.gnu.org so I left those URLs alone for now.
2017-05-15Make `indent-line-to' respect field boundaries (Bug#26891)Noam Postavsky
* lisp/indent.el (indent-line-to): Use `back-to-indentation' instead of `backward-to-indentation'.
2017-01-30* lisp/indent.el (indent-region-line-by-line): New function.Stefan Monnier
Extracted from indent-region. (indent-region, indent-region-function): Use it.