summaryrefslogtreecommitdiff
path: root/lisp/whitespace.el
Commit message (Collapse)AuthorAgeFilesLines
* ; Add 2024 to copyright yearsPo Lu2024-01-021-1/+1
|
* ; Add 2023 to copyright years.Eli Zaretskii2023-01-011-1/+1
|
* whitespace: Avoid mutating original buffer's markers in clonesRichard Hansen2022-12-211-0/+15
| | | | | | | | | | | | | | | | * lisp/whitespace.el (whitespace--clone): New hook function that is run after cloning a buffer that copies `whitespace-bob-marker' and `whitespace-eob-marker' and changes the copies to point to the new buffer (Bug#59618). (whitespace-color-on): Register the hook function. (whitespace-color-off): Unregister the hook function. * test/lisp/whitespace-tests.el (whitespace-tests--with-test-buffer): New macro. (whitespace-tests--check-markers): New function. (whitespace-tests--indirect-clone-breaks-base-markers) (whitespace-tests--indirect-clone-markers) (whitespace-tests--regular-clone-markers): New tests.
* whitespace: Fix unintended change in buffer modification statusRichard Hansen2022-12-191-12/+16
| | | | | | | | | | | | * lisp/whitespace.el (whitespace--empty-at-bob-matcher) whitespace--empty-at-eob-matcher, whitespace--update-bob-eob): Silently add the `font-lock-multiline' text property when highlighting beginning-of-buffer and end-of-buffer empty lines to prevent Emacs from running modification hooks or considering the buffer to be modified (Bug#60066). * test/lisp/whitespace-tests.el (whitespace-tests--empty-bob-eob-modified): Add a regression test.
* ; Fix typos (misspelled symbols)Stefan Kangas2022-11-211-1/+1
|
* Merge from origin/emacs-28Stefan Kangas2022-11-011-1/+1
|\ | | | | | | | | | | | | | | | | 1862df834c ; * src/search.c (Fmatch_data): Doc fix. 15fc5225b1 ; * lisp/whitespace.el (whitespace-trailing): Fix a typo. 9f3c896f7c ; * doc/emacs/text.texi (Quotation Marks): Typo fix. (Bug... # Conflicts: # src/search.c
| * ; * lisp/whitespace.el (whitespace-trailing): Fix a typo.Eli Zaretskii2022-10-291-1/+1
| |
* | Merge from origin/emacs-28Stefan Kangas2022-10-281-126/+161
|\| | | | | | | | | | | | | 510020d30d ; Improve doc strings in whitespace.el # Conflicts: # lisp/whitespace.el
| * ; Improve doc strings in whitespace.elEli Zaretskii2022-10-271-125/+161
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/whitespace.el (whitespace-hspace-regexp) (whitespace-space-regexp, whitespace-tab-regexp) (whitespace-trailing-regexp, whitespace-space-before-tab-regexp) (whitespace-indentation-regexp, whitespace-empty-at-bob-regexp) (whitespace-empty-at-eob-regexp) (whitespace-space-after-tab-regexp) (whitespace-big-indent-regexp, whitespace-line-column) (whitespace-display-mappings, whitespace-global-modes) (whitespace-action, whitespace-style, whitespace-space) (whitespace-hspace, whitespace-tab, whitespace-trailing) (whitespace-space-before-tab, whitespace-indentation) (whitespace-big-indent, whitespace-empty) (whitespace-space-after-tab): Doc fixes.
* | Fix whitespace-mode in read-only buffersLars Ingebrigtsen2022-09-261-32/+33
| | | | | | | | | | * lisp/whitespace.el (whitespace--update-bob-eob): Don't bug out in read-only buffers (bug#58082).
* | whitespace: Redo BoB/EoB empty line highlightingRichard Hansen2022-09-111-100/+155
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/whitespace.el (whitespace--empty-at-bob-matcher, whitespace--empty-at-eob-matcher, whitespace--update-bob-eob, whitespace-color-off, whitespace-color-on, whitespace-empty-at-bob-regexp, whitespace-empty-at-eob-regexp, whitespace-looking-back, whitespace-post-command-hook): Redo the `empty' line highlighting logic to ensure that a buffer change causes all affected `empty' lines to become (un)highlighted (bug#37467). Also, for improved UX, don't highlight BoB empty lines at or below point (not just when point is at 1), or EoB empty lines at or above point (not just when point is `eobp'). (whitespace-bob-marker, whitespace-eob-marker): Clarify documentation. * test/lisp/whitespace-tests.el (whitespace--with-test-buffer, whitespace--fu, whitespace-tests--empty-bob, whitespace-tests--empty-eob): Add tests.
* | whitespace: Include empty final line in BoB empty matchRichard Hansen2022-09-111-1/+1
| | | | | | | | | | | | * lisp/whitespace.el (whitespace-empty-at-bob-regexp): Include any last line trailing whitespace in the BoB empty line match to ensure that those characters get highlighted.
* | whitespace: Reset `whitespace-buffer-changed' when refontifyingRichard Hansen2022-09-111-0/+1
| | | | | | | | | | * lisp/whitespace.el (whitespace-post-command-hook): Add missing reset of `whitespace-buffer-changed' back to nil between commands.
* | ; whitespace: Use `defvar-local' for buffer-local varsRichard Hansen2022-09-111-8/+8
| |
* | ; whitespace: Delete unused `whitespace-font-lock-refontify' varRichard Hansen2022-09-111-5/+0
| |
* | Fix whitespace-mode display table restoration logicLars Ingebrigtsen2022-07-151-3/+5
| | | | | | | | | | * lisp/whitespace.el (whitespace-display-char-on): Fix the saving logic -- `whitespace-mode' is on by this point (bug#48583).
* | ; Fix typos.Mattias Engdegård2022-07-021-1/+1
| |
* | whitespace: Redraw if indentation or line length changesRichard Hansen2022-06-201-10/+28
| | | | | | | | | | | | | | | | | | | | | | | | * lisp/whitespace.el (whitespace-color-on): Convert the indentation matcher from a static regular expression to a function so that changes to `indent-tabs-mode' and `tab-width' are picked up the next time `font-lock-flush' runs. (whitespace--indentation-matcher): The new function matcher. (whitespace--variable-watcher): New variable watcher that calls `font-lock-flush' if `whitespace-mode' is enabled for the buffer. (whitespace--watched-vars): List of variables to watch. (whitespace-unload-function): Un-watch the variables. (bug#56103).
* | whitespace.el: New whitespace style `lines-char'Miha Rihtaršič2022-06-151-8/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/whitespace.el (whitespace-style): (whitespace-style-value-list): (whitespace-toggle-option-alist): (global-whitespace-toggle-options): (whitespace-help-text): (whitespace-interactive-char): (whitespace-style-face-p): (whitespace-color-on): (whitespace-lines-regexp): New whitespace style `lines-char', which highlights only the first character over the whitespace-line-column limit (bug#55980).
* | Merge from origin/emacs-28Stefan Kangas2022-06-121-133/+133
|\| | | | | | | | | cbd2c87a5d ; Fix last change in whitespace.el. 52ad2b53cb Fix doc strings in whitespace.el
| * ; Fix last change in whitespace.el.Eli Zaretskii2022-06-111-117/+117
| |
| * Fix doc strings in whitespace.elEli Zaretskii2022-06-111-16/+16
| | | | | | | | | | * lisp/whitespace.el (whitespace-style, whitespace-action): Untabify the doc strings. (Bug#55904)
* | 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
| |
* | Remove redundant #' before lambdaStefan Kangas2021-10-211-27/+26
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * admin/unidata/unidata-gen.el (unidata-gen-table) (unidata-gen-table-symbol, unidata-gen-table-integer) (unidata-gen-table-numeric, unidata-gen-table-word-list) (unidata-describe-decomposition): * lisp/apropos.el (apropos-user-option): * lisp/bookmark.el (bookmark-bmenu-search): * lisp/composite.el (unicode-category-table): * lisp/elec-pair.el (electric-pair--balance-info): * lisp/electric.el (electric-quote-chars): * lisp/emulation/cua-base.el (cua-rectangle-mark-key): * lisp/epa-hook.el (epa-file-encrypt-to): * lisp/faces.el (face-font-selection-order) (face-font-family-alternatives, face-font-registry-alternatives) (face-valid-attribute-values, tty-run-terminal-initialization): * lisp/files.el (recover-file, file-expand-wildcards): * lisp/frame.el (frames-on-display-list): * lisp/help-at-pt.el (help-at-pt-display-when-idle): * lisp/help-fns.el (help-fns--face-attributes): * lisp/ido.el (ido-mode, ido-unc-hosts): * lisp/isearch.el (isearch-highlight-regexp) (isearch-highlight-lines-matching-regexp): * lisp/language/indian.el (script-regexp-alist): * lisp/language/lao.el: * lisp/leim/quail/ipa.el (ipa-x-sampa-prepend-to-keymap-entry): * lisp/mh-e/mh-folder.el (mh-process-commands): * lisp/mh-e/mh-mime.el (mh-display-with-external-viewer): * lisp/ps-mule.el (ps-mule-end-job): * lisp/ps-print.el (ps-color-scale, ps-background-pages) (ps-background-text, ps-background-image, ps-background) (ps-begin-job, ps-print-translation-table): * lisp/recentf.el (recentf-sort-ascending) (recentf-sort-descending, recentf-sort-basenames-ascending) (recentf-sort-basenames-descending) (recentf-sort-directories-ascending) (recentf-sort-directories-descending): * lisp/replace.el (occur-engine-add-prefix): * lisp/select.el (xselect--encode-string): * lisp/server.el (server-use-tcp): * lisp/ses.el (ses-sort-column): * lisp/sort.el (sort-columns): * lisp/term/ns-win.el (window-system-initialization): * lisp/tree-widget.el (tree-widget-image-formats): * lisp/whitespace.el (whitespace-report-region): Remove redundant #' before lambda.
* ; Fix some recent fixes to doc stringsEli Zaretskii2021-09-261-2/+1
| | | | | | | | | | | | | | | | * lisp/whitespace.el (whitespace-empty-at-bob-regexp): * lisp/vc/vc-dir.el (vc-dir-child-files-and-states): * lisp/vc/vc-annotate.el (vc-annotate-show-changeset-diff-revision-at-line): * lisp/vc/ediff.el (ediff-merge-with-ancestor-command): * lisp/gnus/nnvirtual.el (nnvirtual-update-xref-header) (nnvirtual-map-article): * lisp/emulation/viper-init.el (viper-ESC-keyseq-timeout): * lisp/emulation/viper-cmd.el (viper-set-parsing-style-toggling-macro): * lisp/cedet/data-debug.el (data-debug-insert-hash-table-button): "The first line of a doc string must be a complete sentence." Also, fix some awkward wording in doc strings while at that.
* ; Adjust overly long docstrings to fit 80 charactersStefan Kangas2021-09-261-2/+2
|
* ;* lisp/whitespace.el (whitespace-display-window): Add doc-string.Martin Rudalics2021-09-231-0/+1
|
* ; More minor stylistic fixes found by checkdocStefan Kangas2021-09-221-3/+3
|
* Restore some of the previous behaviour in whitespace-display-windowLars Ingebrigtsen2021-09-211-4/+5
| | | | | * lisp/whitespace.el (whitespace-display-window): Emulate previous behaviour (bug#50716). Code from martin rudalics <rudalics@gmx.at>.
* Fix whitespace-report window creationLars Ingebrigtsen2021-09-211-7/+2
| | | | | * lisp/whitespace.el (whitespace-display-window): Avoid creating many buffers if called many times (bug#50716).
* Use `special-mode' for whitespace-reportLars Ingebrigtsen2021-09-211-23/+25
| | | | | * lisp/whitespace.el (whitespace-report-region): Use `special-mode' instead of `fundamental-mode' (bug#50715).
* ; Normalize some header commentsStefan Kangas2021-09-161-1/+1
|
* Add a customization group link from whitespace-modeLars Ingebrigtsen2021-09-041-1/+4
| | | | | * lisp/whitespace.el (whitespace-mode): Add a link to the whitespace customization group to see the faces (bug#18296).
* Extend whitespace-empty to the end of the lineLars Ingebrigtsen2021-07-311-1/+1
| | | | | * lisp/whitespace.el (whitespace-empty): Restore Emacs 26 look by extending the face (bug#42112).
* ; End recently added sentences with a period.Basil L. Contovounesios2021-06-011-1/+1
|
* Obsolete `global-whitespace-newline-mode'Lars Ingebrigtsen2021-06-011-0/+3
| | | | | | * lisp/whitespace.el (global-whitespace-newline-mode): Make obsolete since it doesn't work correctly, and seems superfluous (bug#12496).
* Make the default `whitespace-enable-predicate' use `derived-mode-p'Lars Ingebrigtsen2021-01-281-2/+2
| | | | | * lisp/whitespace.el (whitespace-enable-predicate): Use `derived-mode-p' to check modes instead of `eq' (bug#40481).
* Update copyright year to 2021Paul Eggert2021-01-011-1/+1
| | | | Run "TZ=UTC0 admin/update-copyright".
* Prefer setq-local in whitespace.elStefan Kangas2020-12-071-17/+12
| | | | | * lisp/whitespace.el (whitespace-turn-on, whitespace-color-on): Prefer setq-local.
* Remove redundant installation instructionsStefan Kangas2020-11-121-13/+0
| | | | | | | | | | | | | | | | | | | | | | * lisp/net/newsticker.el: * lisp/net/sieve-mode.el: * lisp/play/bubbles.el: * lisp/play/handwrite.el: * lisp/progmodes/python.el: * lisp/progmodes/ruby-mode.el: * lisp/whitespace.el: Remove redundant installation instructions. These packages are distributed with Emacs and/or GNU ELPA. * lisp/calendar/timeclock.el: * lisp/ehelp.el: * lisp/emacs-lisp/checkdoc.el: * lisp/filesets.el: * lisp/mail/reporter.el: * lisp/net/rfc2104.el: * lisp/net/webjump.el: * lisp/pixel-scroll.el: Remove redundant recommendation to call require before using autoloaded functions. * lisp/tar-mode.el: Remove reference to package uncompress, removed in Emacs 23.
* Make more load-hooks obsolete (Bug#21563)Stefan Kangas2020-10-201-1/+2
| | | | | | | | | | | | | | | | | | | * lisp/progmodes/dcl-mode.el (dcl-mode): * lisp/progmodes/idlw-complete-structtag.el: Recommend with-eval-after-load instead of load-hooks. * lisp/calc/calc-ext.el (calc-ext-load-hook): * lisp/emacs-lisp/bytecomp.el (bytecomp-load-hook): * lisp/emacs-lisp/cl-extra.el (cl-extra-load-hook): * lisp/emacs-lisp/cl-macs.el (cl-macs-load-hook): * lisp/emacs-lisp/cl-seq.el (cl-seq-load-hook): * lisp/gnus/message.el (message-load-hook): * lisp/gnus/nnheader.el (nnheader-load-hook): * lisp/gnus/nnmail.el (nnmail-load-hook): * lisp/progmodes/dcl-mode.el (dcl-mode-load-hook): * lisp/textmodes/tex-mode.el (tex-mode-load-hook): * lisp/whitespace.el (whitespace-load-hook): Obsolete for with-eval-after-load. Note that these variables are never declared, but the byte-compiler will still warn about them if used.
* ; Prefer https to http in many URLsStefan Kangas2020-10-011-1/+1
| | | | These were all tested with https and confirmed working.
* Fix defcustom type in whitespace.elLars Ingebrigtsen2020-09-251-3/+3
| | | | | | * lisp/whitespace.el (whitespace-space-after-tab-regexp) (whitespace-indentation-regexp): The first string here isn't a regexp, it's a string (that's expanded with format to be a regexp).
* Fix some defcustom typesLars Ingebrigtsen2020-09-251-0/+2
| | | | | | | | | | * lisp/whitespace.el (whitespace-style): * lisp/gnus/message.el (message-screenshot-command): * lisp/progmodes/compile.el (compilation-transform-file-match-alist): * lisp/progmodes/gdb-mi.el (gdb-default-window-configuration-file): * lisp/progmodes/python.el (python-pdbtrack-exit-command): Fix the defcustom types. * lisp/progmodes/sql.el (sql-password-wallet): Fix the value.
* ; * lisp/whitespace.el: Capitalize "Code" section heading.Jonas Bernoulli2020-08-131-1/+1
|
* Tweak how whitespace-mode marks the end of the bufferLars Ingebrigtsen2020-08-081-2/+8
| | | | | | | * lisp/whitespace.el (whitespace-missing-newline-at-eof): Change the colours to not be as angry. (whitespace-color-on): Don't mark the end of the buffer if point is there.
* Make whitespace-mode highlight missing newlines at the end of buffersLars Ingebrigtsen2020-08-071-2/+17
| | | | | | | | | | * lisp/whitespace.el (whitespace-missing-newline-at-eof): New face (bug#34952). (whitespace-report-region): Add a test for end-of-buffer-without-newline. (whitespace-color-on): Ditto. * doc/emacs/display.texi (Useless Whitespace): Document it.
* whitespace: Turn long lines regexp into a function (bug#36837)Štěpán Němec2020-03-011-10/+14
| | | | | | | * lisp/whitespace.el (whitespace-color-on): Turn long lines regexp into a function to ensure it uses current 'whitespace-line-column' and 'fill-column' values. (Bug#36837) (whitespace-lines-regexp): New function.
* Merge from origin/emacs-27Glenn Morris2020-02-061-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 09eed01afb Wrap some set-auto-mode calls with delay-mode-hooks (bug#3... 4a0a114505 Support ido-vertical-mode better ef5fba9f40 Fix faces tab-bar and tab-line. 831508422e Cater for 3-argument version of pthread_setname_np f27187f963 Clarify lexvar restrictions for add-to-ordered-list, add-t... 32763dac46 Replace add-to-list to lexical variable with push (bug#39373) d07f177382 Clarify add-to-list documentation (bug#39373) d3d2ea927c MH-E: alter content in mh-display-msg, not mh-show-mode db7fa2546f Update documentation for mh-show-mode-hook d10be6bf28 Example goto-addr hook: MH-E already uses goto-address # Conflicts: # etc/NEWS