Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
439dcbc1
Commit
439dcbc1
authored
Sep 07, 2010
by
Kenichi Handa
Browse files
merge emacs-23
parents
396475b7
9c405a86
Changes
13
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
7049 additions
and
19317 deletions
+7049
-19317
configure
configure
+6816
-19213
doc/emacs/ChangeLog
doc/emacs/ChangeLog
+8
-0
doc/emacs/dired.texi
doc/emacs/dired.texi
+6
-7
doc/emacs/misc.texi
doc/emacs/misc.texi
+3
-0
doc/lispref/ChangeLog
doc/lispref/ChangeLog
+4
-0
doc/lispref/files.texi
doc/lispref/files.texi
+4
-4
lisp/ChangeLog
lisp/ChangeLog
+67
-32
lisp/desktop.el
lisp/desktop.el
+1
-1
lisp/emacs-lisp/rx.el
lisp/emacs-lisp/rx.el
+5
-2
lisp/files.el
lisp/files.el
+2
-2
lisp/proced.el
lisp/proced.el
+1
-1
lisp/textmodes/bibtex.el
lisp/textmodes/bibtex.el
+1
-1
lisp/whitespace.el
lisp/whitespace.el
+131
-54
No files found.
configure
View file @
439dcbc1
This diff is collapsed.
Click to expand it.
doc/emacs/ChangeLog
View file @
439dcbc1
2010-09-04 Chong Yidong <cyd@stupidchicken.com>
* dired.texi (Dired Enter): Minor doc fix (Bug#6982).
2010-09-02 Glenn Morris <rgm@gnu.org>
* misc.texi (Saving Emacs Sessions): Mention desktop-path. (Bug#6948)
2010-08-21 Glenn Morris <rgm@gnu.org>
* misc.texi (Amusements): Mention bubbles and animate.
...
...
doc/emacs/dired.texi
View file @
439dcbc1
...
...
@@ -75,13 +75,12 @@ a directory name.
The variable @code{dired-listing-switches} specifies the options to
give to @code{ls} for listing the directory; this string @emph{must}
contain @samp{-l}. If you use a numeric prefix argument with the
@code{dired} command, you can specify the @code{ls} switches with the
minibuffer before you enter the directory specification. No matter
how they are specified, the @code{ls} switches can include short
options (that is, single characters) requiring no arguments, and long
options (starting with @samp{--}) whose arguments are specified with
@samp{=}.
contain @samp{-l}. If you use a prefix argument with the @code{dired}
command, you can specify the @code{ls} switches with the minibuffer
before you enter the directory specification. No matter how they are
specified, the @code{ls} switches can include short options (that is,
single characters) requiring no arguments, and long options (starting
with @samp{--}) whose arguments are specified with @samp{=}.
On MS-Windows and MS-DOS systems, Emacs @emph{emulates} @code{ls};
see @ref{ls in Lisp}, for options and peculiarities of that emulation.
...
...
doc/emacs/misc.texi
View file @
439dcbc1
...
...
@@ -2349,8 +2349,11 @@ sessions, or add this line in your init file (@pxref{Init File}):
@findex desktop-change-dir
@findex desktop-revert
@vindex desktop-path
If you turn on @code{desktop-save-mode} in your init file, then when
Emacs starts, it looks for a saved desktop in the current directory.
(More precisely, it looks in the directories specified by
@var{desktop-path}, and uses the first desktop it finds.)
Thus, you can have separate saved desktops in different directories,
and the starting directory determines which one Emacs reloads. You
can save the current desktop and reload one saved in another directory
...
...
doc/lispref/ChangeLog
View file @
439dcbc1
2010-09-05 Alexander Klimov <alserkli@inbox.ru> (tiny change)
* files.texi (Directory Names): Use \` rather than ^.
2010-08-22 Chong Yidong <cyd@stupidchicken.com>
* modes.texi (Defining Minor Modes): Doc fix (Bug#6880).
...
...
doc/lispref/files.texi
View file @
439dcbc1
...
...
@@ -1933,7 +1933,7 @@ The variable @code{directory-abbrev-alist} contains an alist of
abbreviations to use for file directories. Each element has the form
@code{(@var{from} . @var{to})}, and says to replace @var{from} with
@var{to} when it appears in a directory name. The @var{from} string is
actually a regular expression; it should always start with @samp{
^
}.
actually a regular expression; it should always start with @samp{
\`
}.
The @var{to} string should be an ordinary absolute directory name. Do
not use @samp{~} to stand for a home directory in that string. The
function @code{abbreviate-file-name} performs these substitutions.
...
...
@@ -1946,9 +1946,9 @@ and so on are normally accessed through symbolic links named @file{/fsf}
and
so
on
.
@
example
((
"
^
/home/fsf"
.
"/fsf"
)
(
"
^
/home/gp"
.
"/gp"
)
(
"
^
/home/gd"
.
"/gd"
))
((
"
\\
`
/home/fsf"
.
"/fsf"
)
(
"
\\
`
/home/gp"
.
"/gp"
)
(
"
\\
`
/home/gd"
.
"/gd"
))
@
end
example
@
end
defopt
...
...
lisp/ChangeLog
View file @
439dcbc1
2010-09-06 Vinicius Jose Latorre <viniciusjl@ig.com.br>
* whitespace.el: Allow cleaning up blanks without blank
visualization (Bug#6651). Adjust help window for
whitespace-toggle-options (Bug#6479). Allow to use fill-column
instead of whitespace-line-column (from EmacsWiki). New version
13.1.
(whitespace-style): Added new value 'face. Adjust docstring.
(whitespace-space, whitespace-hspace, whitespace-tab): Adjust
foreground property face.
(whitespace-line-column): Adjust docstring and type declaration.
(whitespace-style-value-list, whitespace-toggle-option-alist)
(whitespace-help-text): Adjust const initialization.
(whitespace-toggle-options, global-whitespace-toggle-options):
Adjust docstring.
(whitespace-display-window, whitespace-interactive-char)
(whitespace-style-face-p, whitespace-color-on): Adjust code.
(whitespace-help-scroll): New fun.
2010-09-05 Alexander Klimov <alserkli@inbox.ru> (tiny change)
* files.el (directory-abbrev-alist): Use \` as default regexp.
* emacs-lisp/rx.el (rx-any): Don't explode ranges that end in special
chars like - or ] (bug#6984).
(rx-any-condense-range): Explode 2-char ranges.
2010-09-02 Stefan Monnier <monnier@iro.umontreal.ca>
* textmodes/bibtex.el:
* proced.el: Update to new email for Roland Winkler <winkler@gnu.org>.
2010-09-02 Glenn Morris <rgm@gnu.org>
* desktop.el (desktop-path): Bump :version after 2009-09-15 change.
2010-08-31 Kenichi Handa <handa@m17n.org>
* international/mule-cmds.el (standard-display-european-internal):
Setup standard-display-table for 8-bit characters by storing 8-bit
characters in the element vector.
* disp-table.el (standard-display-8bit):
Setup
standard-display-table for 8-bit characters by storing 8-bit
* disp-table.el (standard-display-8bit):
Setup
standard-display-table for 8-bit characters by storing 8-bit
characters in the element vector.
(standard-display-european): Likewise.
...
...
@@ -42,8 +78,8 @@
(tramp-compat-file-attributes): Handle only
`wrong-number-of-arguments' error.
* net/tramp-fish.el (tramp-fish-handle-copy-file):
Add
PRESERVE_SELINUX_CONTEXT.
* net/tramp-fish.el (tramp-fish-handle-copy-file):
Add
PRESERVE_SELINUX_CONTEXT.
(tramp-fish-handle-delete-file): Add TRASH arg.
(tramp-fish-handle-directory-files-and-attributes):
Do not use `tramp-fish-handle-file-attributes.
...
...
@@ -61,10 +97,10 @@
(with-tramp-dbus-call-method): Format trace message.
(tramp-gvfs-handle-copy-file): Handle PRESERVE-SELINUX-CONTEXT.
(tramp-gvfs-handle-copy-file, tramp-gvfs-handle-rename-file):
Implement backup call, when operation on local files fails.
Use
progress reporter. Flush properties of changed files.
(tramp-gvfs-handle-delete-file): Add TRASH arg.
Use
`tramp-compat-delete-file'.
Implement backup call, when operation on local files fails.
Use
progress reporter. Flush properties of changed files.
(tramp-gvfs-handle-delete-file): Add TRASH arg.
Use
`tramp-compat-delete-file'.
(tramp-gvfs-handle-expand-file-name): Expand "~/".
(tramp-gvfs-handle-make-directory): Make more traces.
(tramp-gvfs-handle-write-region): Protect deleting tmpfile.
...
...
@@ -73,17 +109,17 @@
into account for the resulting file name.
(tramp-gvfs-handler-askquestion): Preserve current message, in
order to let progress reporter continue afterwards. (Bug#6257)
Return dummy mountpoint, when the answer is "no".
See
`tramp-gvfs-maybe-open-connection'.
Return dummy mountpoint, when the answer is "no".
See
`tramp-gvfs-maybe-open-connection'.
(tramp-gvfs-handler-mounted-unmounted)
(tramp-gvfs-connection-mounted-p): Test also for new mountspec
attribute "default_location". Set "prefix" property.
Handle
default-location.
attribute "default_location". Set "prefix" property.
Handle
default-location.
(tramp-gvfs-mount-spec): Return both prefix and mountspec.
(tramp-gvfs-maybe-open-connection): Test, whether mountpoint
exists. Raise an error, if not (due to a corresponding answer
"no" in interactive questions, for example).
Use
`tramp-compat-funcall'.
"no" in interactive questions, for example).
Use
`tramp-compat-funcall'.
* net/tramp-imap.el (top): Autoload `epg-make-context'.
(tramp-imap-handle-copy-file): Add PRESERVE-SELINUX-CONTEXT.
...
...
@@ -92,8 +128,8 @@
(tramp-imap-handle-file-local-copy): Use `with-progress-reporter'.
(tramp-imap-handle-delete-file): Add TRASH arg.
* net/tramp-smb.el (tramp-smb-handle-copy-file):
Add
PRESERVE-SELINUX-CONTEXT.
* net/tramp-smb.el (tramp-smb-handle-copy-file):
Add
PRESERVE-SELINUX-CONTEXT.
(tramp-smb-handle-copy-file)
(tramp-smb-handle-file-local-copy, tramp-smb-handle-rename-file)
(tramp-smb-handle-write-region, tramp-smb-maybe-open-connection):
...
...
@@ -160,8 +196,8 @@
(tramp-get-remote-path): Use `copy-tree'.
(tramp-completion-handle-file-name-all-completions): Ensure, that
non remote files are still checked. Oops.
(tramp-handle-copy-file, tramp-do-copy-or-rename-file):
Handle
PRESERVE-SELINUX-CONTEXT.
(tramp-handle-copy-file, tramp-do-copy-or-rename-file):
Handle
PRESERVE-SELINUX-CONTEXT.
(tramp-do-copy-or-rename-file): Add progress reporter.
(tramp-do-copy-or-rename-file-directly): Do not use
`tramp-handle-file-remote-p'.
...
...
@@ -175,8 +211,8 @@
cache.
(tramp-handle-expand-file-name)
(tramp-completion-handle-file-name-all-completions)
(tramp-completion-handle-file-name-completion):
Use
`tramp-connectable-p'.
(tramp-completion-handle-file-name-completion):
Use
`tramp-connectable-p'.
(tramp-handle-start-file-process): Set connection property "vec".
Use it, in order to invalidate file caches. Check only for
`remote-tty' process property.
...
...
@@ -538,8 +574,7 @@
2010-07-03 Michael Albinus <michael.albinus@gmx.de>
* net/zeroconf.el (zeroconf-resolve-service)
(zeroconf-service-resolver-handler): Use
`dbus-byte-array-to-string'.
(zeroconf-service-resolver-handler): Use `dbus-byte-array-to-string'.
(zeroconf-publish-service): Use `dbus-string-to-byte-array'.
2010-07-03 Jan Moringen <jan.moringen@uni-bielefeld.de>
...
...
@@ -643,8 +678,8 @@
2010-06-21 Dan Nicolaescu <dann@ics.uci.edu>
Fix reading file names in Git annotate buffers.
* vc-git.el (vc-git-annotate-extract-revision-at-line):
Remove
trailing whitespace. Suggested by Eric Hanchrow. (Bug#6481)
* vc-git.el (vc-git-annotate-extract-revision-at-line):
Remove
trailing whitespace. Suggested by Eric Hanchrow. (Bug#6481)
2010-06-20 Alan Mackenzie <acm@muc.de>
...
...
@@ -887,15 +922,15 @@
2010-04-20 Kenichi Handa <handa@m17n.org>
* language/indian.el (oriya-composable-pattern)
(tamil-composable-pattern, malayalam-composable-pattern):
Add
two-part vowels to "v" (vowel sign).
(tamil-composable-pattern, malayalam-composable-pattern):
Add
two-part vowels to "v" (vowel sign).
2010-04-20 Chong Yidong <cyd@stupidchicken.com>
* files.el (copy-directory): Handle symlinks (Bug#5982).
* progmodes/compile.el (compilation-next-error-function):
Revert
2009-10-12 change (Bug#5983).
* progmodes/compile.el (compilation-next-error-function):
Revert
2009-10-12 change (Bug#5983).
2010-04-20 Dan Nicolaescu <dann@ics.uci.edu>
...
...
@@ -911,8 +946,8 @@
2010-04-18 Chong Yidong <cyd@stupidchicken.com>
* cedet/ede/pmake.el (ede-proj-makefile-insert-variables):
Don't
destroy list before using it.
* cedet/ede/pmake.el (ede-proj-makefile-insert-variables):
Don't
destroy list before using it.
2010-04-17 Dan Nicolaescu <dann@ics.uci.edu>
...
...
@@ -1175,8 +1210,8 @@
2010-03-07 Štěpán Němec <stepnem@gmail.com> (tiny change)
* vc-git.el (vc-git-annotate-extract-revision-at-line):
Use
vc-git-root as default directory for revision path (Bug#5657).
* vc-git.el (vc-git-annotate-extract-revision-at-line):
Use
vc-git-root as default directory for revision path (Bug#5657).
2010-03-06 Chong Yidong <cyd@stupidchicken.com>
...
...
lisp/desktop.el
View file @
439dcbc1
...
...
@@ -226,7 +226,7 @@ the normal hook `desktop-not-loaded-hook' is run."
The base name of the file is specified in `desktop-base-file-name'."
:type
'
(
repeat
directory
)
:group
'desktop
:version
"2
2.1"
)
:version
"2
3.2"
)
; user-emacs-directory added
(
defcustom
desktop-missing-file-warning
nil
"If non-nil, offer to recreate the buffer of a deleted file.
...
...
lisp/emacs-lisp/rx.el
View file @
439dcbc1
...
...
@@ -427,7 +427,7 @@ Only both edges of each range is checked."
(mapcar (lambda (e)
(cond
((= (car e) (cdr e)) (list (car e)))
;;
((= (1+ (car e)) (cdr e)) (list (car e) (cdr e)))
((= (1+ (car e)) (cdr e)) (list (car e) (cdr e)))
((list e))))
l))
(delete-dups str))))
...
...
@@ -545,7 +545,10 @@ ARG is optional."
((numberp e) (string e))
((consp e)
(if (and (= (1+ (car e)) (cdr e))
(null (memq (car e) '(?\] ?-))))
;; rx-any-condense-range should
;; prevent this case from happening.
(null (memq (car e) '(?\] ?-)))
(null (memq (cdr e) '(?\] ?-))))
(string (car e) (cdr e))
(string (car e) ?- (cdr e))))
(e)))
...
...
lisp/files.el
View file @
439dcbc1
...
...
@@ -66,9 +66,9 @@ Use this feature when you have directories which you normally refer to
via absolute symbolic links. Make TO the name of the link, and FROM
the name it is linked to."
:type '(repeat (cons :format "%v"
:value ("" . "")
:value ("
\\`
" . "")
(regexp :tag "From")
(
regexp
:tag "To")))
(
string
:tag "To")))
:group 'abbrev
:group 'find-file)
...
...
lisp/proced.el
View file @
439dcbc1
...
...
@@ -2,7 +2,7 @@
;; Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
;; Author: Roland Winkler <
Roland.Winkler@physik.uni-erlangen.de
>
;; Author: Roland Winkler <
winkler@gnu.org
>
;; Keywords: Processes, Unix
;; This file is part of GNU Emacs.
...
...
lisp/textmodes/bibtex.el
View file @
439dcbc1
...
...
@@ -9,7 +9,7 @@
;; Mike Newton <newton@gumby.cs.caltech.edu>
;; Aaron Larson <alarson@src.honeywell.com>
;; Dirk Herrmann <D.Herrmann@tu-bs.de>
;; Maintainer: Roland Winkler <
roland.
winkler@
physik.uni-erlangen.de
>
;; Maintainer: Roland Winkler <winkler@
gnu.org
>
;; Keywords: BibTeX, LaTeX, TeX
;; This file is part of GNU Emacs.
...
...
lisp/whitespace.el
View file @
439dcbc1
...
...
@@ -6,7 +6,7 @@
;; Author: Vinicius Jose Latorre <viniciusjl@ig.com.br>
;; Maintainer: Vinicius Jose Latorre <viniciusjl@ig.com.br>
;; Keywords: data, wp
;; Version: 13.
0
;; Version: 13.
1
;; X-URL: http://www.emacswiki.org/cgi-bin/wiki/ViniciusJoseLatorre
;; This file is part of GNU Emacs.
...
...
@@ -378,24 +378,32 @@
"Visualize blanks (TAB, (HARD) SPACE and NEWLINE)."
:link
'
(
emacs-library-link
:tag
"Source Lisp File"
"whitespace.el"
)
:version
"23.1"
:group
'wp
:group
'data
)
:group
'convenience
)
(
defcustom
whitespace-style
'
(
tabs
spaces
trailing
lines
space-before-tab
newline
indentation
empty
space-after-tab
space-mark
tab-mark
newline-mark
)
'
(
face
tabs
spaces
trailing
lines
space-before-tab
newline
indentation
empty
space-after-tab
space-mark
tab-mark
newline-mark
)
"Specify which kind of blank is visualized.
It's a list containing some or all of the following values:
face enable all visualization via faces (see below).
trailing trailing blanks are visualized via faces.
It has effect only if `face' (see above)
is present in `whitespace-style'.
tabs TABs are visualized via faces.
It has effect only if `face' (see above)
is present in `whitespace-style'.
spaces SPACEs and HARD SPACEs are visualized via
faces.
It has effect only if `face' (see above)
is present in `whitespace-style'.
lines lines which have columns beyond
`whitespace-line-column' are highlighted via
...
...
@@ -403,6 +411,8 @@ It's a list containing some or all of the following values:
Whole line is highlighted.
It has precedence over `lines-tail' (see
below).
It has effect only if `face' (see above)
is present in `whitespace-style'.
lines-tail lines which have columns beyond
`whitespace-line-column' are highlighted via
...
...
@@ -410,45 +420,69 @@ It's a list containing some or all of the following values:
But only the part of line which goes
beyond `whitespace-line-column' column.
It has effect only if `lines' (see above)
is not present in `whitespace-style'.
is not present in `whitespace-style'
and if `face' (see above) is present in
`whitespace-style'.
newline NEWLINEs are visualized via faces.
It has effect only if `face' (see above)
is present in `whitespace-style'.
empty empty lines at beginning and/or end of buffer
are visualized via faces.
It has effect only if `face' (see above)
is present in `whitespace-style'.
indentation::tab 8 or more SPACEs at beginning of line are
visualized via faces.
It has effect only if `face' (see above)
is present in `whitespace-style'.
indentation::space TABs at beginning of line are visualized via
faces.
It has effect only if `face' (see above)
is present in `whitespace-style'.
indentation 8 or more SPACEs at beginning of line are
visualized, if `indent-tabs-mode' (which see)
is non-nil; otherwise, TABs at beginning of
line are visualized via faces.
It has effect only if `face' (see above)
is present in `whitespace-style'.
space-after-tab::tab 8 or more SPACEs after a TAB are
visualized via faces.
It has effect only if `face' (see above)
is present in `whitespace-style'.
space-after-tab::space TABs are visualized when 8 or more
SPACEs occur after a TAB, via faces.
It has effect only if `face' (see above)
is present in `whitespace-style'.
space-after-tab 8 or more SPACEs after a TAB are
visualized, if `indent-tabs-mode'
(which see) is non-nil; otherwise,
the TABs are visualized via faces.
It has effect only if `face' (see above)
is present in `whitespace-style'.
space-before-tab::tab SPACEs before TAB are visualized via
faces.
It has effect only if `face' (see above)
is present in `whitespace-style'.
space-before-tab::space TABs are visualized when SPACEs occur
before TAB, via faces.
It has effect only if `face' (see above)
is present in `whitespace-style'.
space-before-tab SPACEs before TAB are visualized, if
`indent-tabs-mode' (which see) is
non-nil; otherwise, the TABs are
visualized via faces.
It has effect only if `face' (see above)
is present in `whitespace-style'.
space-mark SPACEs and HARD SPACEs are visualized via
display table.
...
...
@@ -487,9 +521,16 @@ So, for example, if indentation and indentation::space are
included in `whitespace-style' list, the indentation value is
evaluated instead of indentation::space value.
One reason for not visualize spaces via faces (if `face' is not
included in `whitespace-style') is to use exclusively for
cleanning up a buffer. See `whitespace-cleanup' and
`whitespace-cleanup-region' for documentation.
See also `whitespace-display-mappings' for documentation."
:type
'
(
repeat
:tag
"Kind of Blank"
(
choice
:tag
"Kind of Blank Face"
(
const
:tag
"(Face) Face visualization"
face
)
(
const
:tag
"(Face) Trailing TABs, SPACEs and HARD SPACEs"
trailing
)
(
const
:tag
"(Face) SPACEs and HARD SPACEs"
...
...
@@ -522,9 +563,9 @@ Used when `whitespace-style' includes the value `spaces'."
(
defface
whitespace-space
'
((((
class
color
)
(
background
dark
))
(
:background
"grey20"
:foreground
"
aquamarine3
"
))
(
:background
"grey20"
:foreground
"
darkgray
"
))
(((
class
color
)
(
background
light
))
(
:background
"LightYellow"
:foreground
"
aquamarine3
"
))
(
:background
"LightYellow"
:foreground
"
lightgray
"
))
(
t
(
:inverse-video
t
)))
"Face used to visualize SPACE."
:group
'whitespace
)
...
...
@@ -540,9 +581,9 @@ Used when `whitespace-style' includes the value `spaces'."
(
defface
whitespace-hspace
; 'nobreak-space
'
((((
class
color
)
(
background
dark
))
(
:background
"grey24"
:foreground
"
aquamarine3
"
))
(
:background
"grey24"
:foreground
"
darkgray
"
))
(((
class
color
)
(
background
light
))
(
:background
"LemonChiffon3"
:foreground
"
aquamarine3
"
))
(
:background
"LemonChiffon3"
:foreground
"
lightgray
"
))
(
t
(
:inverse-video
t
)))
"Face used to visualize HARD SPACE."
:group
'whitespace
)
...
...
@@ -558,9 +599,9 @@ Used when `whitespace-style' includes the value `tabs'."
(
defface
whitespace-tab
'
((((
class
color
)
(
background
dark
))
(
:background
"grey22"
:foreground
"
aquamarine3
"
))
(
:background
"grey22"
:foreground
"
darkgray
"
))
(((
class
color
)
(
background
light
))
(
:background
"beige"
:foreground
"
aquamarine3
"
))
(
:background
"beige"
:foreground
"
lightgray
"
))
(
t
(
:inverse-video
t
)))
"Face used to visualize TAB."
:group
'whitespace
)
...
...
@@ -867,8 +908,13 @@ Used when `whitespace-style' includes `space-after-tab',
(defcustom whitespace-line-column 80
"Specify column beyond which the line is highlighted.
It must be an integer or nil. If nil, the `fill-column' variable value is
used.
Used when `whitespace-style' includes `lines' or `lines-tail'."
:type '(integer :tag "Line Length")
:type '(choice :tag "Line Length Limit"
(integer :tag "Line Length")
(const :tag "Use fill-column" nil))
:group 'whitespace)
...
...
@@ -1152,7 +1198,8 @@ See also `whitespace-newline' and `whitespace-display-mappings'."
(defconst whitespace-style-value-list
'(tabs
'(face
tabs
spaces
trailing
lines
...
...
@@ -1177,7 +1224,8 @@ See also `whitespace-newline' and `whitespace-display-mappings'."
(defconst whitespace-toggle-option-alist
'((?t . tabs)
'((?f . face)
(?t . tabs)
(?s . spaces)
(?r . trailing)
(?l . lines)
...
...
@@ -1257,6 +1305,7 @@ Interactively, it reads one of the following chars:
CHAR MEANING
(VIA FACES)
f toggle face visualization
t toggle TAB visualization
s toggle SPACE and HARD SPACE visualization
r toggle trailing blanks visualization
...
...
@@ -1285,6 +1334,7 @@ Interactively, it reads one of the following chars:
Non-interactively, ARG should be a symbol or a list of symbols.
The valid symbols are:
face toggle face visualization
tabs toggle TAB visualization
spaces toggle SPACE and HARD SPACE visualization
trailing toggle trailing blanks visualization
...
...
@@ -1334,6 +1384,7 @@ Interactively, it accepts one of the following chars:
CHAR MEANING
(VIA FACES)
f toggle face visualization
t toggle TAB visualization
s toggle SPACE and HARD SPACE visualization
r toggle trailing blanks visualization
...
...
@@ -1362,6 +1413,7 @@ Interactively, it accepts one of the following chars:
Non-interactively, ARG should be a symbol or a list of symbols.
The valid symbols are:
face toggle face visualization
tabs toggle TAB visualization
spaces toggle SPACE and HARD SPACE visualization
trailing toggle trailing blanks visualization
...
...
@@ -1891,9 +1943,10 @@ cleaning up these problems."
(defconst whitespace-help-text
"\
Whitespace Toggle Options
FACES
Whitespace Toggle Options |
scroll
up
:
SPC
or
>
|
|
scroll
down:
M-SPC
or
<
|
FACES \\__________________________/
[] f - toggle face visualization
[] t - toggle TAB visualization
[] s - toggle SPACE and HARD SPACE visualization
[] r - toggle trailing blanks visualization
...
...
@@ -1967,15 +2020,13 @@ cleaning up these problems."
"Display BUFFER in a new window."
(goto-char (point-min))
(set-buffer-modified-p nil)
(let ((size (- (window-height)
(max window-min-height
(1+ (count-lines (point-min)
(point-max)))))))
(when (<= size 0)
(kill-buffer buffer)
(error "Frame height is too small; \
(when (< (window-height) (* 2 window-min-height))
(kill-buffer buffer)
(error "Window height is too small; \
can't split window to display whitespace toggle options"))
(set-window-buffer (split-window nil size) buffer)))
(let ((win (split-window)))
(set-window-buffer win buffer)
(shrink-window-if-larger-than-buffer win)))
(defun whitespace-kill-buffer (buffer-name)
...
...
@@ -1991,6 +2042,24 @@ can't split window to display whitespace toggle options"))
(whitespace-kill-buffer whitespace-help-buffer-name))
(defun whitespace-help-scroll (&optional up)
"Scroll help window, if it exists.
If UP is non-nil, scroll up; otherwise, scroll down."
(condition-case data-help
(let ((buffer (get-buffer whitespace-help-buffer-name)))
(if buffer
(with-selected-window (get-buffer-window buffer)
(if up
(scroll-up 3)
(scroll-down 3)))
(ding)))
;; handler
((error)
;; just ignore error
)))
(defun whitespace-interactive-char (local-p)
"Interactive function to read a char and return a symbol.
...
...
@@ -2001,6 +2070,7 @@ It accepts one of the following chars:
CHAR MEANING
(VIA FACES)
f toggle face visualization
t toggle TAB visualization
s toggle SPACE and HARD SPACE visualization
r toggle trailing blanks visualization
...
...
@@ -2050,9 +2120,13 @@ See also `whitespace-toggle-option-alist'."
(cdr
(assq ch whitespace-toggle-option-alist)))))
;; while body
(if (eq ch ?\?)
(whitespace-help-on style)
(ding)))
(cond
((eq ch ?\?) (whitespace-help-on style))
((eq ch ?\ ) (whitespace-help-scroll t))
((eq ch ?\M- ) (whitespace-help-scroll))
((eq ch ?>) (whitespace-help-scroll t))
((eq ch ?<) (whitespace-help-scroll))
(t (ding))))
(whitespace-help-off)
(message " ")) ; clean echo area
;; handler
...
...
@@ -2131,22 +2205,23 @@ resultant list will b