diff options
| author | Kenichi Handa | 2010-09-07 20:22:15 +0900 |
|---|---|---|
| committer | Kenichi Handa | 2010-09-07 20:22:15 +0900 |
| commit | 439dcbc16bd3d4fcef87736fe84173de6af4cf2e (patch) | |
| tree | 2e3cff07e60db016e7de14833432590a1a18ea7a /lisp | |
| parent | 396475b7c1ae2e1a5b1d4be68e6b5b0819a7695b (diff) | |
| parent | 9c405a86c6d6ee1034252d653c246ef509145000 (diff) | |
| download | emacs-439dcbc16bd3d4fcef87736fe84173de6af4cf2e.tar.gz emacs-439dcbc16bd3d4fcef87736fe84173de6af4cf2e.zip | |
merge emacs-23
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/ChangeLog | 99 | ||||
| -rw-r--r-- | lisp/desktop.el | 2 | ||||
| -rw-r--r-- | lisp/emacs-lisp/rx.el | 7 | ||||
| -rw-r--r-- | lisp/files.el | 4 | ||||
| -rw-r--r-- | lisp/proced.el | 2 | ||||
| -rw-r--r-- | lisp/textmodes/bibtex.el | 2 | ||||
| -rw-r--r-- | lisp/whitespace.el | 185 |
7 files changed, 208 insertions, 93 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index d61a8c565a8..b8fd151f001 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,11 +1,47 @@ | |||
| 1 | 2010-09-06 Vinicius Jose Latorre <viniciusjl@ig.com.br> | ||
| 2 | |||
| 3 | * whitespace.el: Allow cleaning up blanks without blank | ||
| 4 | visualization (Bug#6651). Adjust help window for | ||
| 5 | whitespace-toggle-options (Bug#6479). Allow to use fill-column | ||
| 6 | instead of whitespace-line-column (from EmacsWiki). New version | ||
| 7 | 13.1. | ||
| 8 | (whitespace-style): Added new value 'face. Adjust docstring. | ||
| 9 | (whitespace-space, whitespace-hspace, whitespace-tab): Adjust | ||
| 10 | foreground property face. | ||
| 11 | (whitespace-line-column): Adjust docstring and type declaration. | ||
| 12 | (whitespace-style-value-list, whitespace-toggle-option-alist) | ||
| 13 | (whitespace-help-text): Adjust const initialization. | ||
| 14 | (whitespace-toggle-options, global-whitespace-toggle-options): | ||
| 15 | Adjust docstring. | ||
| 16 | (whitespace-display-window, whitespace-interactive-char) | ||
| 17 | (whitespace-style-face-p, whitespace-color-on): Adjust code. | ||
| 18 | (whitespace-help-scroll): New fun. | ||
| 19 | |||
| 20 | 2010-09-05 Alexander Klimov <alserkli@inbox.ru> (tiny change) | ||
| 21 | |||
| 22 | * files.el (directory-abbrev-alist): Use \` as default regexp. | ||
| 23 | |||
| 24 | * emacs-lisp/rx.el (rx-any): Don't explode ranges that end in special | ||
| 25 | chars like - or ] (bug#6984). | ||
| 26 | (rx-any-condense-range): Explode 2-char ranges. | ||
| 27 | |||
| 28 | 2010-09-02 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 29 | |||
| 30 | * textmodes/bibtex.el: | ||
| 31 | * proced.el: Update to new email for Roland Winkler <winkler@gnu.org>. | ||
| 32 | |||
| 33 | 2010-09-02 Glenn Morris <rgm@gnu.org> | ||
| 34 | |||
| 35 | * desktop.el (desktop-path): Bump :version after 2009-09-15 change. | ||
| 36 | |||
| 1 | 2010-08-31 Kenichi Handa <handa@m17n.org> | 37 | 2010-08-31 Kenichi Handa <handa@m17n.org> |
| 2 | 38 | ||
| 3 | * international/mule-cmds.el (standard-display-european-internal): | 39 | * international/mule-cmds.el (standard-display-european-internal): |
| 4 | Setup standard-display-table for 8-bit characters by storing 8-bit | 40 | Setup standard-display-table for 8-bit characters by storing 8-bit |
| 5 | characters in the element vector. | 41 | characters in the element vector. |
| 6 | 42 | ||
| 7 | * disp-table.el (standard-display-8bit): Setup | 43 | * disp-table.el (standard-display-8bit): |
| 8 | standard-display-table for 8-bit characters by storing 8-bit | 44 | Setup standard-display-table for 8-bit characters by storing 8-bit |
| 9 | characters in the element vector. | 45 | characters in the element vector. |
| 10 | (standard-display-european): Likewise. | 46 | (standard-display-european): Likewise. |
| 11 | 47 | ||
| @@ -42,8 +78,8 @@ | |||
| 42 | (tramp-compat-file-attributes): Handle only | 78 | (tramp-compat-file-attributes): Handle only |
| 43 | `wrong-number-of-arguments' error. | 79 | `wrong-number-of-arguments' error. |
| 44 | 80 | ||
| 45 | * net/tramp-fish.el (tramp-fish-handle-copy-file): Add | 81 | * net/tramp-fish.el (tramp-fish-handle-copy-file): |
| 46 | PRESERVE_SELINUX_CONTEXT. | 82 | Add PRESERVE_SELINUX_CONTEXT. |
| 47 | (tramp-fish-handle-delete-file): Add TRASH arg. | 83 | (tramp-fish-handle-delete-file): Add TRASH arg. |
| 48 | (tramp-fish-handle-directory-files-and-attributes): | 84 | (tramp-fish-handle-directory-files-and-attributes): |
| 49 | Do not use `tramp-fish-handle-file-attributes. | 85 | Do not use `tramp-fish-handle-file-attributes. |
| @@ -61,10 +97,10 @@ | |||
| 61 | (with-tramp-dbus-call-method): Format trace message. | 97 | (with-tramp-dbus-call-method): Format trace message. |
| 62 | (tramp-gvfs-handle-copy-file): Handle PRESERVE-SELINUX-CONTEXT. | 98 | (tramp-gvfs-handle-copy-file): Handle PRESERVE-SELINUX-CONTEXT. |
| 63 | (tramp-gvfs-handle-copy-file, tramp-gvfs-handle-rename-file): | 99 | (tramp-gvfs-handle-copy-file, tramp-gvfs-handle-rename-file): |
| 64 | Implement backup call, when operation on local files fails. Use | 100 | Implement backup call, when operation on local files fails. |
| 65 | progress reporter. Flush properties of changed files. | 101 | Use progress reporter. Flush properties of changed files. |
| 66 | (tramp-gvfs-handle-delete-file): Add TRASH arg. Use | 102 | (tramp-gvfs-handle-delete-file): Add TRASH arg. |
| 67 | `tramp-compat-delete-file'. | 103 | Use `tramp-compat-delete-file'. |
| 68 | (tramp-gvfs-handle-expand-file-name): Expand "~/". | 104 | (tramp-gvfs-handle-expand-file-name): Expand "~/". |
| 69 | (tramp-gvfs-handle-make-directory): Make more traces. | 105 | (tramp-gvfs-handle-make-directory): Make more traces. |
| 70 | (tramp-gvfs-handle-write-region): Protect deleting tmpfile. | 106 | (tramp-gvfs-handle-write-region): Protect deleting tmpfile. |
| @@ -73,17 +109,17 @@ | |||
| 73 | into account for the resulting file name. | 109 | into account for the resulting file name. |
| 74 | (tramp-gvfs-handler-askquestion): Preserve current message, in | 110 | (tramp-gvfs-handler-askquestion): Preserve current message, in |
| 75 | order to let progress reporter continue afterwards. (Bug#6257) | 111 | order to let progress reporter continue afterwards. (Bug#6257) |
| 76 | Return dummy mountpoint, when the answer is "no". See | 112 | Return dummy mountpoint, when the answer is "no". |
| 77 | `tramp-gvfs-maybe-open-connection'. | 113 | See `tramp-gvfs-maybe-open-connection'. |
| 78 | (tramp-gvfs-handler-mounted-unmounted) | 114 | (tramp-gvfs-handler-mounted-unmounted) |
| 79 | (tramp-gvfs-connection-mounted-p): Test also for new mountspec | 115 | (tramp-gvfs-connection-mounted-p): Test also for new mountspec |
| 80 | attribute "default_location". Set "prefix" property. Handle | 116 | attribute "default_location". Set "prefix" property. |
| 81 | default-location. | 117 | Handle default-location. |
| 82 | (tramp-gvfs-mount-spec): Return both prefix and mountspec. | 118 | (tramp-gvfs-mount-spec): Return both prefix and mountspec. |
| 83 | (tramp-gvfs-maybe-open-connection): Test, whether mountpoint | 119 | (tramp-gvfs-maybe-open-connection): Test, whether mountpoint |
| 84 | exists. Raise an error, if not (due to a corresponding answer | 120 | exists. Raise an error, if not (due to a corresponding answer |
| 85 | "no" in interactive questions, for example). Use | 121 | "no" in interactive questions, for example). |
| 86 | `tramp-compat-funcall'. | 122 | Use `tramp-compat-funcall'. |
| 87 | 123 | ||
| 88 | * net/tramp-imap.el (top): Autoload `epg-make-context'. | 124 | * net/tramp-imap.el (top): Autoload `epg-make-context'. |
| 89 | (tramp-imap-handle-copy-file): Add PRESERVE-SELINUX-CONTEXT. | 125 | (tramp-imap-handle-copy-file): Add PRESERVE-SELINUX-CONTEXT. |
| @@ -92,8 +128,8 @@ | |||
| 92 | (tramp-imap-handle-file-local-copy): Use `with-progress-reporter'. | 128 | (tramp-imap-handle-file-local-copy): Use `with-progress-reporter'. |
| 93 | (tramp-imap-handle-delete-file): Add TRASH arg. | 129 | (tramp-imap-handle-delete-file): Add TRASH arg. |
| 94 | 130 | ||
| 95 | * net/tramp-smb.el (tramp-smb-handle-copy-file): Add | 131 | * net/tramp-smb.el (tramp-smb-handle-copy-file): |
| 96 | PRESERVE-SELINUX-CONTEXT. | 132 | Add PRESERVE-SELINUX-CONTEXT. |
| 97 | (tramp-smb-handle-copy-file) | 133 | (tramp-smb-handle-copy-file) |
| 98 | (tramp-smb-handle-file-local-copy, tramp-smb-handle-rename-file) | 134 | (tramp-smb-handle-file-local-copy, tramp-smb-handle-rename-file) |
| 99 | (tramp-smb-handle-write-region, tramp-smb-maybe-open-connection): | 135 | (tramp-smb-handle-write-region, tramp-smb-maybe-open-connection): |
| @@ -160,8 +196,8 @@ | |||
| 160 | (tramp-get-remote-path): Use `copy-tree'. | 196 | (tramp-get-remote-path): Use `copy-tree'. |
| 161 | (tramp-completion-handle-file-name-all-completions): Ensure, that | 197 | (tramp-completion-handle-file-name-all-completions): Ensure, that |
| 162 | non remote files are still checked. Oops. | 198 | non remote files are still checked. Oops. |
| 163 | (tramp-handle-copy-file, tramp-do-copy-or-rename-file): Handle | 199 | (tramp-handle-copy-file, tramp-do-copy-or-rename-file): |
| 164 | PRESERVE-SELINUX-CONTEXT. | 200 | Handle PRESERVE-SELINUX-CONTEXT. |
| 165 | (tramp-do-copy-or-rename-file): Add progress reporter. | 201 | (tramp-do-copy-or-rename-file): Add progress reporter. |
| 166 | (tramp-do-copy-or-rename-file-directly): Do not use | 202 | (tramp-do-copy-or-rename-file-directly): Do not use |
| 167 | `tramp-handle-file-remote-p'. | 203 | `tramp-handle-file-remote-p'. |
| @@ -175,8 +211,8 @@ | |||
| 175 | cache. | 211 | cache. |
| 176 | (tramp-handle-expand-file-name) | 212 | (tramp-handle-expand-file-name) |
| 177 | (tramp-completion-handle-file-name-all-completions) | 213 | (tramp-completion-handle-file-name-all-completions) |
| 178 | (tramp-completion-handle-file-name-completion): Use | 214 | (tramp-completion-handle-file-name-completion): |
| 179 | `tramp-connectable-p'. | 215 | Use `tramp-connectable-p'. |
| 180 | (tramp-handle-start-file-process): Set connection property "vec". | 216 | (tramp-handle-start-file-process): Set connection property "vec". |
| 181 | Use it, in order to invalidate file caches. Check only for | 217 | Use it, in order to invalidate file caches. Check only for |
| 182 | `remote-tty' process property. | 218 | `remote-tty' process property. |
| @@ -538,8 +574,7 @@ | |||
| 538 | 2010-07-03 Michael Albinus <michael.albinus@gmx.de> | 574 | 2010-07-03 Michael Albinus <michael.albinus@gmx.de> |
| 539 | 575 | ||
| 540 | * net/zeroconf.el (zeroconf-resolve-service) | 576 | * net/zeroconf.el (zeroconf-resolve-service) |
| 541 | (zeroconf-service-resolver-handler): Use | 577 | (zeroconf-service-resolver-handler): Use `dbus-byte-array-to-string'. |
| 542 | `dbus-byte-array-to-string'. | ||
| 543 | (zeroconf-publish-service): Use `dbus-string-to-byte-array'. | 578 | (zeroconf-publish-service): Use `dbus-string-to-byte-array'. |
| 544 | 579 | ||
| 545 | 2010-07-03 Jan Moringen <jan.moringen@uni-bielefeld.de> | 580 | 2010-07-03 Jan Moringen <jan.moringen@uni-bielefeld.de> |
| @@ -643,8 +678,8 @@ | |||
| 643 | 2010-06-21 Dan Nicolaescu <dann@ics.uci.edu> | 678 | 2010-06-21 Dan Nicolaescu <dann@ics.uci.edu> |
| 644 | 679 | ||
| 645 | Fix reading file names in Git annotate buffers. | 680 | Fix reading file names in Git annotate buffers. |
| 646 | * vc-git.el (vc-git-annotate-extract-revision-at-line): Remove | 681 | * vc-git.el (vc-git-annotate-extract-revision-at-line): |
| 647 | trailing whitespace. Suggested by Eric Hanchrow. (Bug#6481) | 682 | Remove trailing whitespace. Suggested by Eric Hanchrow. (Bug#6481) |
| 648 | 683 | ||
| 649 | 2010-06-20 Alan Mackenzie <acm@muc.de> | 684 | 2010-06-20 Alan Mackenzie <acm@muc.de> |
| 650 | 685 | ||
| @@ -887,15 +922,15 @@ | |||
| 887 | 2010-04-20 Kenichi Handa <handa@m17n.org> | 922 | 2010-04-20 Kenichi Handa <handa@m17n.org> |
| 888 | 923 | ||
| 889 | * language/indian.el (oriya-composable-pattern) | 924 | * language/indian.el (oriya-composable-pattern) |
| 890 | (tamil-composable-pattern, malayalam-composable-pattern): Add | 925 | (tamil-composable-pattern, malayalam-composable-pattern): |
| 891 | two-part vowels to "v" (vowel sign). | 926 | Add two-part vowels to "v" (vowel sign). |
| 892 | 927 | ||
| 893 | 2010-04-20 Chong Yidong <cyd@stupidchicken.com> | 928 | 2010-04-20 Chong Yidong <cyd@stupidchicken.com> |
| 894 | 929 | ||
| 895 | * files.el (copy-directory): Handle symlinks (Bug#5982). | 930 | * files.el (copy-directory): Handle symlinks (Bug#5982). |
| 896 | 931 | ||
| 897 | * progmodes/compile.el (compilation-next-error-function): Revert | 932 | * progmodes/compile.el (compilation-next-error-function): |
| 898 | 2009-10-12 change (Bug#5983). | 933 | Revert 2009-10-12 change (Bug#5983). |
| 899 | 934 | ||
| 900 | 2010-04-20 Dan Nicolaescu <dann@ics.uci.edu> | 935 | 2010-04-20 Dan Nicolaescu <dann@ics.uci.edu> |
| 901 | 936 | ||
| @@ -911,8 +946,8 @@ | |||
| 911 | 946 | ||
| 912 | 2010-04-18 Chong Yidong <cyd@stupidchicken.com> | 947 | 2010-04-18 Chong Yidong <cyd@stupidchicken.com> |
| 913 | 948 | ||
| 914 | * cedet/ede/pmake.el (ede-proj-makefile-insert-variables): Don't | 949 | * cedet/ede/pmake.el (ede-proj-makefile-insert-variables): |
| 915 | destroy list before using it. | 950 | Don't destroy list before using it. |
| 916 | 951 | ||
| 917 | 2010-04-17 Dan Nicolaescu <dann@ics.uci.edu> | 952 | 2010-04-17 Dan Nicolaescu <dann@ics.uci.edu> |
| 918 | 953 | ||
| @@ -1175,8 +1210,8 @@ | |||
| 1175 | 1210 | ||
| 1176 | 2010-03-07 Štěpán Němec <stepnem@gmail.com> (tiny change) | 1211 | 2010-03-07 Štěpán Němec <stepnem@gmail.com> (tiny change) |
| 1177 | 1212 | ||
| 1178 | * vc-git.el (vc-git-annotate-extract-revision-at-line): Use | 1213 | * vc-git.el (vc-git-annotate-extract-revision-at-line): |
| 1179 | vc-git-root as default directory for revision path (Bug#5657). | 1214 | Use vc-git-root as default directory for revision path (Bug#5657). |
| 1180 | 1215 | ||
| 1181 | 2010-03-06 Chong Yidong <cyd@stupidchicken.com> | 1216 | 2010-03-06 Chong Yidong <cyd@stupidchicken.com> |
| 1182 | 1217 | ||
diff --git a/lisp/desktop.el b/lisp/desktop.el index 60bc044696b..c247565af20 100644 --- a/lisp/desktop.el +++ b/lisp/desktop.el | |||
| @@ -226,7 +226,7 @@ the normal hook `desktop-not-loaded-hook' is run." | |||
| 226 | The base name of the file is specified in `desktop-base-file-name'." | 226 | The base name of the file is specified in `desktop-base-file-name'." |
| 227 | :type '(repeat directory) | 227 | :type '(repeat directory) |
| 228 | :group 'desktop | 228 | :group 'desktop |
| 229 | :version "22.1") | 229 | :version "23.2") ; user-emacs-directory added |
| 230 | 230 | ||
| 231 | (defcustom desktop-missing-file-warning nil | 231 | (defcustom desktop-missing-file-warning nil |
| 232 | "If non-nil, offer to recreate the buffer of a deleted file. | 232 | "If non-nil, offer to recreate the buffer of a deleted file. |
diff --git a/lisp/emacs-lisp/rx.el b/lisp/emacs-lisp/rx.el index 85fe3514b01..522d452c2dc 100644 --- a/lisp/emacs-lisp/rx.el +++ b/lisp/emacs-lisp/rx.el | |||
| @@ -427,7 +427,7 @@ Only both edges of each range is checked." | |||
| 427 | (mapcar (lambda (e) | 427 | (mapcar (lambda (e) |
| 428 | (cond | 428 | (cond |
| 429 | ((= (car e) (cdr e)) (list (car e))) | 429 | ((= (car e) (cdr e)) (list (car e))) |
| 430 | ;; ((= (1+ (car e)) (cdr e)) (list (car e) (cdr e))) | 430 | ((= (1+ (car e)) (cdr e)) (list (car e) (cdr e))) |
| 431 | ((list e)))) | 431 | ((list e)))) |
| 432 | l)) | 432 | l)) |
| 433 | (delete-dups str)))) | 433 | (delete-dups str)))) |
| @@ -545,7 +545,10 @@ ARG is optional." | |||
| 545 | ((numberp e) (string e)) | 545 | ((numberp e) (string e)) |
| 546 | ((consp e) | 546 | ((consp e) |
| 547 | (if (and (= (1+ (car e)) (cdr e)) | 547 | (if (and (= (1+ (car e)) (cdr e)) |
| 548 | (null (memq (car e) '(?\] ?-)))) | 548 | ;; rx-any-condense-range should |
| 549 | ;; prevent this case from happening. | ||
| 550 | (null (memq (car e) '(?\] ?-))) | ||
| 551 | (null (memq (cdr e) '(?\] ?-)))) | ||
| 549 | (string (car e) (cdr e)) | 552 | (string (car e) (cdr e)) |
| 550 | (string (car e) ?- (cdr e)))) | 553 | (string (car e) ?- (cdr e)))) |
| 551 | (e))) | 554 | (e))) |
diff --git a/lisp/files.el b/lisp/files.el index f6564768ae7..02f5f8fdacf 100644 --- a/lisp/files.el +++ b/lisp/files.el | |||
| @@ -66,9 +66,9 @@ Use this feature when you have directories which you normally refer to | |||
| 66 | via absolute symbolic links. Make TO the name of the link, and FROM | 66 | via absolute symbolic links. Make TO the name of the link, and FROM |
| 67 | the name it is linked to." | 67 | the name it is linked to." |
| 68 | :type '(repeat (cons :format "%v" | 68 | :type '(repeat (cons :format "%v" |
| 69 | :value ("" . "") | 69 | :value ("\\`" . "") |
| 70 | (regexp :tag "From") | 70 | (regexp :tag "From") |
| 71 | (regexp :tag "To"))) | 71 | (string :tag "To"))) |
| 72 | :group 'abbrev | 72 | :group 'abbrev |
| 73 | :group 'find-file) | 73 | :group 'find-file) |
| 74 | 74 | ||
diff --git a/lisp/proced.el b/lisp/proced.el index 06056ed2683..ee4e7b26ca1 100644 --- a/lisp/proced.el +++ b/lisp/proced.el | |||
| @@ -2,7 +2,7 @@ | |||
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Roland Winkler <Roland.Winkler@physik.uni-erlangen.de> | 5 | ;; Author: Roland Winkler <winkler@gnu.org> |
| 6 | ;; Keywords: Processes, Unix | 6 | ;; Keywords: Processes, Unix |
| 7 | 7 | ||
| 8 | ;; This file is part of GNU Emacs. | 8 | ;; This file is part of GNU Emacs. |
diff --git a/lisp/textmodes/bibtex.el b/lisp/textmodes/bibtex.el index ac7a2e48a15..c002426daca 100644 --- a/lisp/textmodes/bibtex.el +++ b/lisp/textmodes/bibtex.el | |||
| @@ -9,7 +9,7 @@ | |||
| 9 | ;; Mike Newton <newton@gumby.cs.caltech.edu> | 9 | ;; Mike Newton <newton@gumby.cs.caltech.edu> |
| 10 | ;; Aaron Larson <alarson@src.honeywell.com> | 10 | ;; Aaron Larson <alarson@src.honeywell.com> |
| 11 | ;; Dirk Herrmann <D.Herrmann@tu-bs.de> | 11 | ;; Dirk Herrmann <D.Herrmann@tu-bs.de> |
| 12 | ;; Maintainer: Roland Winkler <roland.winkler@physik.uni-erlangen.de> | 12 | ;; Maintainer: Roland Winkler <winkler@gnu.org> |
| 13 | ;; Keywords: BibTeX, LaTeX, TeX | 13 | ;; Keywords: BibTeX, LaTeX, TeX |
| 14 | 14 | ||
| 15 | ;; This file is part of GNU Emacs. | 15 | ;; This file is part of GNU Emacs. |
diff --git a/lisp/whitespace.el b/lisp/whitespace.el index 9f4b033e75f..4b8b9a61173 100644 --- a/lisp/whitespace.el +++ b/lisp/whitespace.el | |||
| @@ -6,7 +6,7 @@ | |||
| 6 | ;; Author: Vinicius Jose Latorre <viniciusjl@ig.com.br> | 6 | ;; Author: Vinicius Jose Latorre <viniciusjl@ig.com.br> |
| 7 | ;; Maintainer: Vinicius Jose Latorre <viniciusjl@ig.com.br> | 7 | ;; Maintainer: Vinicius Jose Latorre <viniciusjl@ig.com.br> |
| 8 | ;; Keywords: data, wp | 8 | ;; Keywords: data, wp |
| 9 | ;; Version: 13.0 | 9 | ;; Version: 13.1 |
| 10 | ;; X-URL: http://www.emacswiki.org/cgi-bin/wiki/ViniciusJoseLatorre | 10 | ;; X-URL: http://www.emacswiki.org/cgi-bin/wiki/ViniciusJoseLatorre |
| 11 | 11 | ||
| 12 | ;; This file is part of GNU Emacs. | 12 | ;; This file is part of GNU Emacs. |
| @@ -378,24 +378,32 @@ | |||
| 378 | "Visualize blanks (TAB, (HARD) SPACE and NEWLINE)." | 378 | "Visualize blanks (TAB, (HARD) SPACE and NEWLINE)." |
| 379 | :link '(emacs-library-link :tag "Source Lisp File" "whitespace.el") | 379 | :link '(emacs-library-link :tag "Source Lisp File" "whitespace.el") |
| 380 | :version "23.1" | 380 | :version "23.1" |
| 381 | :group 'wp | 381 | :group 'convenience) |
| 382 | :group 'data) | ||
| 383 | 382 | ||
| 384 | 383 | ||
| 385 | (defcustom whitespace-style | 384 | (defcustom whitespace-style |
| 386 | '(tabs spaces trailing lines space-before-tab newline | 385 | '(face |
| 387 | indentation empty space-after-tab | 386 | tabs spaces trailing lines space-before-tab newline |
| 388 | space-mark tab-mark newline-mark) | 387 | indentation empty space-after-tab |
| 388 | space-mark tab-mark newline-mark) | ||
| 389 | "Specify which kind of blank is visualized. | 389 | "Specify which kind of blank is visualized. |
| 390 | 390 | ||
| 391 | It's a list containing some or all of the following values: | 391 | It's a list containing some or all of the following values: |
| 392 | 392 | ||
| 393 | face enable all visualization via faces (see below). | ||
| 394 | |||
| 393 | trailing trailing blanks are visualized via faces. | 395 | trailing trailing blanks are visualized via faces. |
| 396 | It has effect only if `face' (see above) | ||
| 397 | is present in `whitespace-style'. | ||
| 394 | 398 | ||
| 395 | tabs TABs are visualized via faces. | 399 | tabs TABs are visualized via faces. |
| 400 | It has effect only if `face' (see above) | ||
| 401 | is present in `whitespace-style'. | ||
| 396 | 402 | ||
| 397 | spaces SPACEs and HARD SPACEs are visualized via | 403 | spaces SPACEs and HARD SPACEs are visualized via |
| 398 | faces. | 404 | faces. |
| 405 | It has effect only if `face' (see above) | ||
| 406 | is present in `whitespace-style'. | ||
| 399 | 407 | ||
| 400 | lines lines which have columns beyond | 408 | lines lines which have columns beyond |
| 401 | `whitespace-line-column' are highlighted via | 409 | `whitespace-line-column' are highlighted via |
| @@ -403,6 +411,8 @@ It's a list containing some or all of the following values: | |||
| 403 | Whole line is highlighted. | 411 | Whole line is highlighted. |
| 404 | It has precedence over `lines-tail' (see | 412 | It has precedence over `lines-tail' (see |
| 405 | below). | 413 | below). |
| 414 | It has effect only if `face' (see above) | ||
| 415 | is present in `whitespace-style'. | ||
| 406 | 416 | ||
| 407 | lines-tail lines which have columns beyond | 417 | lines-tail lines which have columns beyond |
| 408 | `whitespace-line-column' are highlighted via | 418 | `whitespace-line-column' are highlighted via |
| @@ -410,45 +420,69 @@ It's a list containing some or all of the following values: | |||
| 410 | But only the part of line which goes | 420 | But only the part of line which goes |
| 411 | beyond `whitespace-line-column' column. | 421 | beyond `whitespace-line-column' column. |
| 412 | It has effect only if `lines' (see above) | 422 | It has effect only if `lines' (see above) |
| 413 | is not present in `whitespace-style'. | 423 | is not present in `whitespace-style' |
| 424 | and if `face' (see above) is present in | ||
| 425 | `whitespace-style'. | ||
| 414 | 426 | ||
| 415 | newline NEWLINEs are visualized via faces. | 427 | newline NEWLINEs are visualized via faces. |
| 428 | It has effect only if `face' (see above) | ||
| 429 | is present in `whitespace-style'. | ||
| 416 | 430 | ||
| 417 | empty empty lines at beginning and/or end of buffer | 431 | empty empty lines at beginning and/or end of buffer |
| 418 | are visualized via faces. | 432 | are visualized via faces. |
| 433 | It has effect only if `face' (see above) | ||
| 434 | is present in `whitespace-style'. | ||
| 419 | 435 | ||
| 420 | indentation::tab 8 or more SPACEs at beginning of line are | 436 | indentation::tab 8 or more SPACEs at beginning of line are |
| 421 | visualized via faces. | 437 | visualized via faces. |
| 438 | It has effect only if `face' (see above) | ||
| 439 | is present in `whitespace-style'. | ||
| 422 | 440 | ||
| 423 | indentation::space TABs at beginning of line are visualized via | 441 | indentation::space TABs at beginning of line are visualized via |
| 424 | faces. | 442 | faces. |
| 443 | It has effect only if `face' (see above) | ||
| 444 | is present in `whitespace-style'. | ||
| 425 | 445 | ||
| 426 | indentation 8 or more SPACEs at beginning of line are | 446 | indentation 8 or more SPACEs at beginning of line are |
| 427 | visualized, if `indent-tabs-mode' (which see) | 447 | visualized, if `indent-tabs-mode' (which see) |
| 428 | is non-nil; otherwise, TABs at beginning of | 448 | is non-nil; otherwise, TABs at beginning of |
| 429 | line are visualized via faces. | 449 | line are visualized via faces. |
| 450 | It has effect only if `face' (see above) | ||
| 451 | is present in `whitespace-style'. | ||
| 430 | 452 | ||
| 431 | space-after-tab::tab 8 or more SPACEs after a TAB are | 453 | space-after-tab::tab 8 or more SPACEs after a TAB are |
| 432 | visualized via faces. | 454 | visualized via faces. |
| 455 | It has effect only if `face' (see above) | ||
| 456 | is present in `whitespace-style'. | ||
| 433 | 457 | ||
| 434 | space-after-tab::space TABs are visualized when 8 or more | 458 | space-after-tab::space TABs are visualized when 8 or more |
| 435 | SPACEs occur after a TAB, via faces. | 459 | SPACEs occur after a TAB, via faces. |
| 460 | It has effect only if `face' (see above) | ||
| 461 | is present in `whitespace-style'. | ||
| 436 | 462 | ||
| 437 | space-after-tab 8 or more SPACEs after a TAB are | 463 | space-after-tab 8 or more SPACEs after a TAB are |
| 438 | visualized, if `indent-tabs-mode' | 464 | visualized, if `indent-tabs-mode' |
| 439 | (which see) is non-nil; otherwise, | 465 | (which see) is non-nil; otherwise, |
| 440 | the TABs are visualized via faces. | 466 | the TABs are visualized via faces. |
| 467 | It has effect only if `face' (see above) | ||
| 468 | is present in `whitespace-style'. | ||
| 441 | 469 | ||
| 442 | space-before-tab::tab SPACEs before TAB are visualized via | 470 | space-before-tab::tab SPACEs before TAB are visualized via |
| 443 | faces. | 471 | faces. |
| 472 | It has effect only if `face' (see above) | ||
| 473 | is present in `whitespace-style'. | ||
| 444 | 474 | ||
| 445 | space-before-tab::space TABs are visualized when SPACEs occur | 475 | space-before-tab::space TABs are visualized when SPACEs occur |
| 446 | before TAB, via faces. | 476 | before TAB, via faces. |
| 477 | It has effect only if `face' (see above) | ||
| 478 | is present in `whitespace-style'. | ||
| 447 | 479 | ||
| 448 | space-before-tab SPACEs before TAB are visualized, if | 480 | space-before-tab SPACEs before TAB are visualized, if |
| 449 | `indent-tabs-mode' (which see) is | 481 | `indent-tabs-mode' (which see) is |
| 450 | non-nil; otherwise, the TABs are | 482 | non-nil; otherwise, the TABs are |
| 451 | visualized via faces. | 483 | visualized via faces. |
| 484 | It has effect only if `face' (see above) | ||
| 485 | is present in `whitespace-style'. | ||
| 452 | 486 | ||
| 453 | space-mark SPACEs and HARD SPACEs are visualized via | 487 | space-mark SPACEs and HARD SPACEs are visualized via |
| 454 | display table. | 488 | display table. |
| @@ -487,9 +521,16 @@ So, for example, if indentation and indentation::space are | |||
| 487 | included in `whitespace-style' list, the indentation value is | 521 | included in `whitespace-style' list, the indentation value is |
| 488 | evaluated instead of indentation::space value. | 522 | evaluated instead of indentation::space value. |
| 489 | 523 | ||
| 524 | One reason for not visualize spaces via faces (if `face' is not | ||
| 525 | included in `whitespace-style') is to use exclusively for | ||
| 526 | cleanning up a buffer. See `whitespace-cleanup' and | ||
| 527 | `whitespace-cleanup-region' for documentation. | ||
| 528 | |||
| 490 | See also `whitespace-display-mappings' for documentation." | 529 | See also `whitespace-display-mappings' for documentation." |
| 491 | :type '(repeat :tag "Kind of Blank" | 530 | :type '(repeat :tag "Kind of Blank" |
| 492 | (choice :tag "Kind of Blank Face" | 531 | (choice :tag "Kind of Blank Face" |
| 532 | (const :tag "(Face) Face visualization" | ||
| 533 | face) | ||
| 493 | (const :tag "(Face) Trailing TABs, SPACEs and HARD SPACEs" | 534 | (const :tag "(Face) Trailing TABs, SPACEs and HARD SPACEs" |
| 494 | trailing) | 535 | trailing) |
| 495 | (const :tag "(Face) SPACEs and HARD SPACEs" | 536 | (const :tag "(Face) SPACEs and HARD SPACEs" |
| @@ -522,9 +563,9 @@ Used when `whitespace-style' includes the value `spaces'." | |||
| 522 | 563 | ||
| 523 | (defface whitespace-space | 564 | (defface whitespace-space |
| 524 | '((((class color) (background dark)) | 565 | '((((class color) (background dark)) |
| 525 | (:background "grey20" :foreground "aquamarine3")) | 566 | (:background "grey20" :foreground "darkgray")) |
| 526 | (((class color) (background light)) | 567 | (((class color) (background light)) |
| 527 | (:background "LightYellow" :foreground "aquamarine3")) | 568 | (:background "LightYellow" :foreground "lightgray")) |
| 528 | (t (:inverse-video t))) | 569 | (t (:inverse-video t))) |
| 529 | "Face used to visualize SPACE." | 570 | "Face used to visualize SPACE." |
| 530 | :group 'whitespace) | 571 | :group 'whitespace) |
| @@ -540,9 +581,9 @@ Used when `whitespace-style' includes the value `spaces'." | |||
| 540 | 581 | ||
| 541 | (defface whitespace-hspace ; 'nobreak-space | 582 | (defface whitespace-hspace ; 'nobreak-space |
| 542 | '((((class color) (background dark)) | 583 | '((((class color) (background dark)) |
| 543 | (:background "grey24" :foreground "aquamarine3")) | 584 | (:background "grey24" :foreground "darkgray")) |
| 544 | (((class color) (background light)) | 585 | (((class color) (background light)) |
| 545 | (:background "LemonChiffon3" :foreground "aquamarine3")) | 586 | (:background "LemonChiffon3" :foreground "lightgray")) |
| 546 | (t (:inverse-video t))) | 587 | (t (:inverse-video t))) |
| 547 | "Face used to visualize HARD SPACE." | 588 | "Face used to visualize HARD SPACE." |
| 548 | :group 'whitespace) | 589 | :group 'whitespace) |
| @@ -558,9 +599,9 @@ Used when `whitespace-style' includes the value `tabs'." | |||
| 558 | 599 | ||
| 559 | (defface whitespace-tab | 600 | (defface whitespace-tab |
| 560 | '((((class color) (background dark)) | 601 | '((((class color) (background dark)) |
| 561 | (:background "grey22" :foreground "aquamarine3")) | 602 | (:background "grey22" :foreground "darkgray")) |
| 562 | (((class color) (background light)) | 603 | (((class color) (background light)) |
| 563 | (:background "beige" :foreground "aquamarine3")) | 604 | (:background "beige" :foreground "lightgray")) |
| 564 | (t (:inverse-video t))) | 605 | (t (:inverse-video t))) |
| 565 | "Face used to visualize TAB." | 606 | "Face used to visualize TAB." |
| 566 | :group 'whitespace) | 607 | :group 'whitespace) |
| @@ -867,8 +908,13 @@ Used when `whitespace-style' includes `space-after-tab', | |||
| 867 | (defcustom whitespace-line-column 80 | 908 | (defcustom whitespace-line-column 80 |
| 868 | "Specify column beyond which the line is highlighted. | 909 | "Specify column beyond which the line is highlighted. |
| 869 | 910 | ||
| 911 | It must be an integer or nil. If nil, the `fill-column' variable value is | ||
| 912 | used. | ||
| 913 | |||
| 870 | Used when `whitespace-style' includes `lines' or `lines-tail'." | 914 | Used when `whitespace-style' includes `lines' or `lines-tail'." |
| 871 | :type '(integer :tag "Line Length") | 915 | :type '(choice :tag "Line Length Limit" |
| 916 | (integer :tag "Line Length") | ||
| 917 | (const :tag "Use fill-column" nil)) | ||
| 872 | :group 'whitespace) | 918 | :group 'whitespace) |
| 873 | 919 | ||
| 874 | 920 | ||
| @@ -1152,7 +1198,8 @@ See also `whitespace-newline' and `whitespace-display-mappings'." | |||
| 1152 | 1198 | ||
| 1153 | 1199 | ||
| 1154 | (defconst whitespace-style-value-list | 1200 | (defconst whitespace-style-value-list |
| 1155 | '(tabs | 1201 | '(face |
| 1202 | tabs | ||
| 1156 | spaces | 1203 | spaces |
| 1157 | trailing | 1204 | trailing |
| 1158 | lines | 1205 | lines |
| @@ -1177,7 +1224,8 @@ See also `whitespace-newline' and `whitespace-display-mappings'." | |||
| 1177 | 1224 | ||
| 1178 | 1225 | ||
| 1179 | (defconst whitespace-toggle-option-alist | 1226 | (defconst whitespace-toggle-option-alist |
| 1180 | '((?t . tabs) | 1227 | '((?f . face) |
| 1228 | (?t . tabs) | ||
| 1181 | (?s . spaces) | 1229 | (?s . spaces) |
| 1182 | (?r . trailing) | 1230 | (?r . trailing) |
| 1183 | (?l . lines) | 1231 | (?l . lines) |
| @@ -1257,6 +1305,7 @@ Interactively, it reads one of the following chars: | |||
| 1257 | 1305 | ||
| 1258 | CHAR MEANING | 1306 | CHAR MEANING |
| 1259 | (VIA FACES) | 1307 | (VIA FACES) |
| 1308 | f toggle face visualization | ||
| 1260 | t toggle TAB visualization | 1309 | t toggle TAB visualization |
| 1261 | s toggle SPACE and HARD SPACE visualization | 1310 | s toggle SPACE and HARD SPACE visualization |
| 1262 | r toggle trailing blanks visualization | 1311 | r toggle trailing blanks visualization |
| @@ -1285,6 +1334,7 @@ Interactively, it reads one of the following chars: | |||
| 1285 | Non-interactively, ARG should be a symbol or a list of symbols. | 1334 | Non-interactively, ARG should be a symbol or a list of symbols. |
| 1286 | The valid symbols are: | 1335 | The valid symbols are: |
| 1287 | 1336 | ||
| 1337 | face toggle face visualization | ||
| 1288 | tabs toggle TAB visualization | 1338 | tabs toggle TAB visualization |
| 1289 | spaces toggle SPACE and HARD SPACE visualization | 1339 | spaces toggle SPACE and HARD SPACE visualization |
| 1290 | trailing toggle trailing blanks visualization | 1340 | trailing toggle trailing blanks visualization |
| @@ -1334,6 +1384,7 @@ Interactively, it accepts one of the following chars: | |||
| 1334 | 1384 | ||
| 1335 | CHAR MEANING | 1385 | CHAR MEANING |
| 1336 | (VIA FACES) | 1386 | (VIA FACES) |
| 1387 | f toggle face visualization | ||
| 1337 | t toggle TAB visualization | 1388 | t toggle TAB visualization |
| 1338 | s toggle SPACE and HARD SPACE visualization | 1389 | s toggle SPACE and HARD SPACE visualization |
| 1339 | r toggle trailing blanks visualization | 1390 | r toggle trailing blanks visualization |
| @@ -1362,6 +1413,7 @@ Interactively, it accepts one of the following chars: | |||
| 1362 | Non-interactively, ARG should be a symbol or a list of symbols. | 1413 | Non-interactively, ARG should be a symbol or a list of symbols. |
| 1363 | The valid symbols are: | 1414 | The valid symbols are: |
| 1364 | 1415 | ||
| 1416 | face toggle face visualization | ||
| 1365 | tabs toggle TAB visualization | 1417 | tabs toggle TAB visualization |
| 1366 | spaces toggle SPACE and HARD SPACE visualization | 1418 | spaces toggle SPACE and HARD SPACE visualization |
| 1367 | trailing toggle trailing blanks visualization | 1419 | trailing toggle trailing blanks visualization |
| @@ -1891,9 +1943,10 @@ cleaning up these problems." | |||
| 1891 | 1943 | ||
| 1892 | (defconst whitespace-help-text | 1944 | (defconst whitespace-help-text |
| 1893 | "\ | 1945 | "\ |
| 1894 | Whitespace Toggle Options | 1946 | Whitespace Toggle Options | scroll up : SPC or > | |
| 1895 | 1947 | | scroll down: M-SPC or < | | |
| 1896 | FACES | 1948 | FACES \\__________________________/ |
| 1949 | [] f - toggle face visualization | ||
| 1897 | [] t - toggle TAB visualization | 1950 | [] t - toggle TAB visualization |
| 1898 | [] s - toggle SPACE and HARD SPACE visualization | 1951 | [] s - toggle SPACE and HARD SPACE visualization |
| 1899 | [] r - toggle trailing blanks visualization | 1952 | [] r - toggle trailing blanks visualization |
| @@ -1967,15 +2020,13 @@ cleaning up these problems." | |||
| 1967 | "Display BUFFER in a new window." | 2020 | "Display BUFFER in a new window." |
| 1968 | (goto-char (point-min)) | 2021 | (goto-char (point-min)) |
| 1969 | (set-buffer-modified-p nil) | 2022 | (set-buffer-modified-p nil) |
| 1970 | (let ((size (- (window-height) | 2023 | (when (< (window-height) (* 2 window-min-height)) |
| 1971 | (max window-min-height | 2024 | (kill-buffer buffer) |
| 1972 | (1+ (count-lines (point-min) | 2025 | (error "Window height is too small; \ |
| 1973 | (point-max))))))) | ||
| 1974 | (when (<= size 0) | ||
| 1975 | (kill-buffer buffer) | ||
| 1976 | (error "Frame height is too small; \ | ||
| 1977 | can't split window to display whitespace toggle options")) | 2026 | can't split window to display whitespace toggle options")) |
| 1978 | (set-window-buffer (split-window nil size) buffer))) | 2027 | (let ((win (split-window))) |
| 2028 | (set-window-buffer win buffer) | ||
| 2029 | (shrink-window-if-larger-than-buffer win))) | ||
| 1979 | 2030 | ||
| 1980 | 2031 | ||
| 1981 | (defun whitespace-kill-buffer (buffer-name) | 2032 | (defun whitespace-kill-buffer (buffer-name) |
| @@ -1991,6 +2042,24 @@ can't split window to display whitespace toggle options")) | |||
| 1991 | (whitespace-kill-buffer whitespace-help-buffer-name)) | 2042 | (whitespace-kill-buffer whitespace-help-buffer-name)) |
| 1992 | 2043 | ||
| 1993 | 2044 | ||
| 2045 | (defun whitespace-help-scroll (&optional up) | ||
| 2046 | "Scroll help window, if it exists. | ||
| 2047 | |||
| 2048 | If UP is non-nil, scroll up; otherwise, scroll down." | ||
| 2049 | (condition-case data-help | ||
| 2050 | (let ((buffer (get-buffer whitespace-help-buffer-name))) | ||
| 2051 | (if buffer | ||
| 2052 | (with-selected-window (get-buffer-window buffer) | ||
| 2053 | (if up | ||
| 2054 | (scroll-up 3) | ||
| 2055 | (scroll-down 3))) | ||
| 2056 | (ding))) | ||
| 2057 | ;; handler | ||
| 2058 | ((error) | ||
| 2059 | ;; just ignore error | ||
| 2060 | ))) | ||
| 2061 | |||
| 2062 | |||
| 1994 | (defun whitespace-interactive-char (local-p) | 2063 | (defun whitespace-interactive-char (local-p) |
| 1995 | "Interactive function to read a char and return a symbol. | 2064 | "Interactive function to read a char and return a symbol. |
| 1996 | 2065 | ||
| @@ -2001,6 +2070,7 @@ It accepts one of the following chars: | |||
| 2001 | 2070 | ||
| 2002 | CHAR MEANING | 2071 | CHAR MEANING |
| 2003 | (VIA FACES) | 2072 | (VIA FACES) |
| 2073 | f toggle face visualization | ||
| 2004 | t toggle TAB visualization | 2074 | t toggle TAB visualization |
| 2005 | s toggle SPACE and HARD SPACE visualization | 2075 | s toggle SPACE and HARD SPACE visualization |
| 2006 | r toggle trailing blanks visualization | 2076 | r toggle trailing blanks visualization |
| @@ -2050,9 +2120,13 @@ See also `whitespace-toggle-option-alist'." | |||
| 2050 | (cdr | 2120 | (cdr |
| 2051 | (assq ch whitespace-toggle-option-alist))))) | 2121 | (assq ch whitespace-toggle-option-alist))))) |
| 2052 | ;; while body | 2122 | ;; while body |
| 2053 | (if (eq ch ?\?) | 2123 | (cond |
| 2054 | (whitespace-help-on style) | 2124 | ((eq ch ?\?) (whitespace-help-on style)) |
| 2055 | (ding))) | 2125 | ((eq ch ?\ ) (whitespace-help-scroll t)) |
| 2126 | ((eq ch ?\M- ) (whitespace-help-scroll)) | ||
| 2127 | ((eq ch ?>) (whitespace-help-scroll t)) | ||
| 2128 | ((eq ch ?<) (whitespace-help-scroll)) | ||
| 2129 | (t (ding)))) | ||
| 2056 | (whitespace-help-off) | 2130 | (whitespace-help-off) |
| 2057 | (message " ")) ; clean echo area | 2131 | (message " ")) ; clean echo area |
| 2058 | ;; handler | 2132 | ;; handler |
| @@ -2131,22 +2205,23 @@ resultant list will be returned." | |||
| 2131 | 2205 | ||
| 2132 | (defun whitespace-style-face-p () | 2206 | (defun whitespace-style-face-p () |
| 2133 | "Return t if there is some visualization via face." | 2207 | "Return t if there is some visualization via face." |
| 2134 | (or (memq 'tabs whitespace-active-style) | 2208 | (and (memq 'face whitespace-active-style) |
| 2135 | (memq 'spaces whitespace-active-style) | 2209 | (or (memq 'tabs whitespace-active-style) |
| 2136 | (memq 'trailing whitespace-active-style) | 2210 | (memq 'spaces whitespace-active-style) |
| 2137 | (memq 'lines whitespace-active-style) | 2211 | (memq 'trailing whitespace-active-style) |
| 2138 | (memq 'lines-tail whitespace-active-style) | 2212 | (memq 'lines whitespace-active-style) |
| 2139 | (memq 'newline whitespace-active-style) | 2213 | (memq 'lines-tail whitespace-active-style) |
| 2140 | (memq 'empty whitespace-active-style) | 2214 | (memq 'newline whitespace-active-style) |
| 2141 | (memq 'indentation whitespace-active-style) | 2215 | (memq 'empty whitespace-active-style) |
| 2142 | (memq 'indentation::tab whitespace-active-style) | 2216 | (memq 'indentation whitespace-active-style) |
| 2143 | (memq 'indentation::space whitespace-active-style) | 2217 | (memq 'indentation::tab whitespace-active-style) |
| 2144 | (memq 'space-after-tab whitespace-active-style) | 2218 | (memq 'indentation::space whitespace-active-style) |
| 2145 | (memq 'space-after-tab::tab whitespace-active-style) | 2219 | (memq 'space-after-tab whitespace-active-style) |
| 2146 | (memq 'space-after-tab::space whitespace-active-style) | 2220 | (memq 'space-after-tab::tab whitespace-active-style) |
| 2147 | (memq 'space-before-tab whitespace-active-style) | 2221 | (memq 'space-after-tab::space whitespace-active-style) |
| 2148 | (memq 'space-before-tab::tab whitespace-active-style) | 2222 | (memq 'space-before-tab whitespace-active-style) |
| 2149 | (memq 'space-before-tab::space whitespace-active-style))) | 2223 | (memq 'space-before-tab::tab whitespace-active-style) |
| 2224 | (memq 'space-before-tab::space whitespace-active-style)))) | ||
| 2150 | 2225 | ||
| 2151 | 2226 | ||
| 2152 | (defun whitespace-color-on () | 2227 | (defun whitespace-color-on () |
| @@ -2204,14 +2279,16 @@ resultant list will be returned." | |||
| 2204 | (list | 2279 | (list |
| 2205 | ;; Show "long" lines | 2280 | ;; Show "long" lines |
| 2206 | (list | 2281 | (list |
| 2207 | (format | 2282 | (let ((line-column (or whitespace-line-column fill-column))) |
| 2208 | "^\\([^\t\n]\\{%s\\}\\|[^\t\n]\\{0,%s\\}\t\\)\\{%d\\}%s\\(.+\\)$" | 2283 | (format |
| 2209 | whitespace-tab-width (1- whitespace-tab-width) | 2284 | "^\\([^\t\n]\\{%s\\}\\|[^\t\n]\\{0,%s\\}\t\\)\\{%d\\}%s\\(.+\\)$" |
| 2210 | (/ whitespace-line-column whitespace-tab-width) | 2285 | whitespace-tab-width |
| 2211 | (let ((rem (% whitespace-line-column whitespace-tab-width))) | 2286 | (1- whitespace-tab-width) |
| 2212 | (if (zerop rem) | 2287 | (/ line-column whitespace-tab-width) |
| 2213 | "" | 2288 | (let ((rem (% line-column whitespace-tab-width))) |
| 2214 | (format ".\\{%d\\}" rem)))) | 2289 | (if (zerop rem) |
| 2290 | "" | ||
| 2291 | (format ".\\{%d\\}" rem))))) | ||
| 2215 | (if (memq 'lines whitespace-active-style) | 2292 | (if (memq 'lines whitespace-active-style) |
| 2216 | 0 ; whole line | 2293 | 0 ; whole line |
| 2217 | 2) ; line tail | 2294 | 2) ; line tail |