summaryrefslogtreecommitdiff
path: root/lisp/indent.el
Commit message (Collapse)AuthorAgeFilesLines
* ; Add 2024 to copyright yearsPo Lu2024-01-021-1/+1
|
* * lisp/indent.el (indent-rigidly): Improve prompt (bug#67620).Eli Zaretskii2023-12-041-1/+1
|
* Repair `tab-first-completion` (bug#67158)Aymeric Agon-Rambosson2023-11-291-15/+9
| | | | | | | | | | | 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)
* ; Add 2023 to copyright years.Eli Zaretskii2023-01-011-1/+1
|
* ; Improve documentation of TAB/SPC indentationEli Zaretskii2022-12-271-1/+2
| | | | | | * lisp/indent.el (tab-to-tab-stop): * src/indent.c (Findent_to): Mention 'indent-tabs-mode' in doc strings.
* Prefer defvar-keymap in several casesStefan Kangas2022-09-131-6/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* Use substitute-command-keys in a few more placesStefan Kangas2022-08-231-1/+3
| | | | | | | * 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.
* Add new args MESSAGE and TIMEOUT to set-transient-map (bug#21634)Juri Linkov2022-07-061-5/+2
| | | | | | | | | | | | | * 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.
* Bind TAB in indent-rigidly-map as a convenienceLars Ingebrigtsen2022-05-121-9/+11
| | | | | | * lisp/indent.el (indent-rigidly): Mention it. (indent-rigidly-map): Bind TAB so that `C-x TAB TAB...' does the logical thing.
* Merge from origin/emacs-28Stefan Kangas2022-03-011-1/+1
|\ | | | | | | 6dbc3da205 Fix :tag for eol in tab-first-completion
| * Fix :tag for eol in tab-first-completionLars Ingebrigtsen2022-02-281-1/+1
| | | | | | | | | | * lisp/indent.el (tab-first-completion): Fix the :tag description (bug#54179).
* | Merge from origin/emacs-28Stefan Kangas2022-01-161-4/+5
|\| | | | | | | 7f36aca99d * lisp/indent.el (tab-first-completion): Fix incorrect cho...
| * * lisp/indent.el (tab-first-completion): Fix incorrect choices.Philipp Stephani2022-01-151-4/+5
| |
* | * lisp/indent.el (indent-for-tab-command): Use 'eq' for symbols.Philipp Stephani2022-01-141-6/+6
| |
* | indent-for-tab-command: Deal with large point or modiff values.Philipp Stephani2022-01-141-2/+2
| | | | | | | | | | * lisp/indent.el (indent-for-tab-command): Don't use 'eq' to compare integers that aren't guaranteed to be fixnums.
* | Simplify code for 'indent-for-tab-command' slightly.Philipp Stephani2022-01-141-5/+5
| | | | | | | | | | * lisp/indent.el (indent-for-tab-command): Don't use a one-element list for SYN.
* | Merge from origin/emacs-28Eli Zaretskii2022-01-011-1/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * ; Add 2022 to copyright years.Eli Zaretskii2022-01-011-1/+1
| |
* | Don't ignore restriction in indent-region-line-by-lineMiha Rihtaršič2021-11-181-5/+12
|/ | | | | | | | | | | | | | | | | | | * 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)".
* ; More minor stylistic fixes found by checkdocStefan Kangas2021-09-221-6/+9
|
* ; * lisp/indent.el (tab-first-completion): Fix :version tag.Eli Zaretskii2021-09-051-1/+1
|
* Clarify indent-line-function doc stringEli Zaretskii2021-05-301-2/+2
| | | | | * lisp/indent.el (indent-line-function): Clarify by avoiding specifics (bug#20846).
* * lisp/indent.el (beginning-of-line-text): Mark it as a movement commandStefan Monnier2021-02-081-1/+1
| | | | | 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`.
* Merge from origin/emacs-27Glenn Morris2021-02-061-1/+2
|\ | | | | | | | | | | | | | | | | | | 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
| * Clarify the indent-rigidly doc stringLars Ingebrigtsen2021-02-061-1/+2
| | | | | | | | | | * lisp/indent.el (indent-rigidly): Clarify exiting the transient mode (bug#46296).
| * Update copyright year to 2021Paul Eggert2021-01-011-1/+1
| | | | | | | | Run "TZ=UTC0 admin/update-copyright $(git ls-files)".
* | Don't hard-code ignored functions in `indent-according-to-mode'Lars Ingebrigtsen2021-02-051-5/+6
| | | | | | | | | | | | * lisp/indent.el (indent-line-ignored-functions): New variable (bug#26945). (indent-according-to-mode): Use it.
* | Update copyright year to 2021Paul Eggert2021-01-011-1/+1
| | | | | | | | Run "TZ=UTC0 admin/update-copyright".
* | indent-rigidly doc string clarificationLars Ingebrigtsen2020-10-161-1/+2
| | | | | | | | | | * lisp/indent.el (indent-rigidly): Note that the command deactivates the mark (bug#42842).
* | Add a new variable tab-first-completionAlex Branham2020-10-141-3/+40
| | | | | | | | | | | | | | | | | | * 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.
* | Revert "Explain in the tab-always-indent doc how to make TAB insert a TAB"Lars Ingebrigtsen2020-09-081-10/+1
| | | | | | | | | | | | This reverts commit 4b2371631167e509668b6268334e324fdd2f0327. overriding-terminal-local-map should apparently not be used for minor stuff like this.
* | Explain in the tab-always-indent doc how to make TAB insert a TABLars Ingebrigtsen2020-09-051-1/+10
|/ | | | | * lisp/indent.el (tab-always-indent): Mention how to make TAB insert a TAB character always (bug#37183).
* Update copyright year to 2020Paul Eggert2020-01-011-1/+1
| | | | Run "TZ=UTC0 admin/update-copyright $(git ls-files)".
* Go back to "Maintainer: emacs-devel@gnu.org"Paul Eggert2019-05-251-0/+1
| | | | | | 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.
* Fixes for "Maintainer:" and related linesPaul Eggert2019-05-191-1/+0
| | | | | | 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.
* Update documentation for indent-relative functionsAlex Branham2019-04-051-2/+3
| | | | | | | | | | | * 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
* Avoid using obsolete indent-relative-maybeBasil L. Contovounesios2019-04-031-4/+6
| | | | | | | | | | * 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.
* Merge from origin/emacs-26Paul Eggert2018-12-311-1/+1
|\ | | | | | | | | | | 2fcf2df Fix copyright years by hand 26bed8b Update copyright year to 2019 2814292 Fix value of default frame height. (Bug#33921)
| * Update copyright year to 2019Paul Eggert2019-01-011-1/+1
| | | | | | | | Run 'TZ=UTC0 admin/update-copyright $(git ls-files)'.
* | Preserve nonblank whitespace when indenting (Bug#32200)Noam Postavsky2018-07-221-3/+6
| | | | | | | | | | * lisp/indent.el (indent-line-to): Remove only spaces and tabs, not any whitespace syntax characters.
* | * lisp/indent.el (indent-line-to): Fix dedenting of tabs.Noam Postavsky2018-07-101-3/+5
| |
* | Respect field boundaries in indent-line-to (Bug#32014)Noam Postavsky2018-07-091-2/+3
|/ | | | | | | | * 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.
* Update copyright year to 2018Paul Eggert2018-01-011-1/+1
| | | | Run admin/update-copyright.
* Widen in indent-for-tab-command in the normal case, tooDmitry Gutov2017-12-201-4/+7
| | | | | | Fixing this obvious omission. * lisp/indent.el (indent--funcall-widened): New function. (indent-for-tab-command): Use it.
* Consolidate 'widen' callsDmitry Gutov2017-12-141-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* Prefer HTTPS to FTP and HTTP in documentationPaul Eggert2017-09-131-1/+1
| | | | | | | | | | | | | 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.
* Make `indent-line-to' respect field boundaries (Bug#26891)Noam Postavsky2017-05-151-1/+1
| | | | | * lisp/indent.el (indent-line-to): Use `back-to-indentation' instead of `backward-to-indentation'.
* * lisp/indent.el (indent-region-line-by-line): New function.Stefan Monnier2017-01-301-15/+17
| | | | | Extracted from indent-region. (indent-region, indent-region-function): Use it.
* Merge from origin/emacs-25Paul Eggert2017-01-011-1/+1
|\ | | | | | | | | 2e2a806 Fix copyright years by hand 5badc81 Update copyright year to 2017
| * Update copyright year to 2017Paul Eggert2016-12-311-1/+1
| | | | | | | | Run admin/update-copyright.