Merge from mainline.

This commit is contained in:
Paul Eggert 2011-02-17 23:44:39 -08:00
commit 37b3d30244
139 changed files with 7374 additions and 1825 deletions

View file

@ -1,3 +1,8 @@
2011-02-18 Paul Eggert <eggert@cs.ucla.edu>
Import IRIX 6.5 getloadavg fixes from gnulib.
* configure, lib/getloadavg.c, m4/getloadavg.m4: Regenerate.
2011-02-16 Paul Eggert <eggert@cs.ucla.edu>
Import getloadavg module from gnulib.

2
configure vendored
View file

@ -14475,6 +14475,8 @@ test -f "$srcdir/$gl_source_base/getloadavg.c" ||
gl_save_LIBS=$LIBS
# getloadvg is present in libc on glibc >= 2.2, MacOS X, FreeBSD >= 2.0,
# NetBSD >= 0.9, OpenBSD >= 2.0, Solaris >= 7.
ac_fn_c_check_func "$LINENO" "getloadavg" "ac_cv_func_getloadavg"
if test "x$ac_cv_func_getloadavg" = xyes; then :

View file

@ -1,3 +1,26 @@
2011-02-17 Teodor Zlatanov <tzz@lifelogs.com>
* auth.texi (Help for users): Use :port instead of :protocol for all
auth-source docs.
(GnuPG and EasyPG Assistant Configuration): Mention the default now is
to have two files in `auth-sources'.
2011-02-16 Glenn Morris <rgm@gnu.org>
* dired-x.texi: Use emacsver.texi to get Emacs version.
* Makefile.in ($(infodir)/dired-x, dired-x.dvi, dired-x.pdf):
Depend on emacsver.texi.
* dired-x.texi: Drop meaningless version number.
(Introduction): Remove old info.
(Optional Installation Dired Jump): Autoload from dired-x.
Remove incorrect info about loaddefs.el.
(Bugs): Just refer to M-x report-emacs-bug.
* dired-x.texi (Multiple Dired Directories): Update for rename of
default-directory-alist.
(Miscellaneous Commands): No longer mention very old VM version 4.
2011-02-15 Paul Eggert <eggert@cs.ucla.edu>
Merge from gnulib.
@ -5,7 +28,8 @@
2011-02-14 Teodor Zlatanov <tzz@lifelogs.com>
* auth.texi (Help for users): Login collection is "Login" and not "login".
* auth.texi (Help for users):
Login collection is "Login" and not "login".
2011-02-13 Michael Albinus <michael.albinus@gmx.de>

View file

@ -287,12 +287,12 @@ dbus.pdf: ${srcdir}/dbus.texi
$(ENVADD) $(TEXI2PDF) $<
dired-x : $(infodir)/dired-x
$(infodir)/dired-x: dired-x.texi
$(infodir)/dired-x: dired-x.texi $(emacsdir)/emacsver.texi
$(mkinfodir)
cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) $<
dired-x.dvi: ${srcdir}/dired-x.texi
dired-x.dvi: ${srcdir}/dired-x.texi $(emacsdir)/emacsver.texi
$(ENVADD) $(TEXI2DVI) $<
dired-x.pdf: ${srcdir}/dired-x.texi
dired-x.pdf: ${srcdir}/dired-x.texi $(emacsdir)/emacsver.texi
$(ENVADD) $(TEXI2PDF) $<
ebrowse : $(infodir)/ebrowse

View file

@ -105,8 +105,7 @@ It's known as @var{:host} in @code{auth-source-search} queries. You
can also use @code{host}.
The @code{port} is the connection port or protocol. It's known as
@var{:port} in @code{auth-source-search} queries. You can also use
@code{protocol}.
@var{:port} in @code{auth-source-search} queries.
The @code{user} is the user name. It's known as @var{:user} in
@code{auth-source-search} queries. You can also use @code{login} and
@ -155,8 +154,8 @@ particular host and protocol. While you can get fancy, the default
and simplest configuration is:
@lisp
;;; old default: required :host and :protocol, not needed anymore
(setq auth-sources '((:source "~/.authinfo.gpg" :host t :protocol t)))
;;; old default: required :host and :port, not needed anymore
(setq auth-sources '((:source "~/.authinfo.gpg" :host t :port t)))
;;; mostly equivalent (see below about fallbacks) but shorter:
(setq auth-sources '((:source "~/.authinfo.gpg")))
;;; even shorter and the @emph{default}:
@ -263,7 +262,9 @@ TODO: how to include docstring?
@appendix GnuPG and EasyPG Assistant Configuration
If you don't customize @code{auth-sources}, the auth-source library
reads @code{~/.authinfo.gpg}, which is a GnuPG encrypted file.
reads @code{~/.authinfo.gpg}, which is a GnuPG encrypted file. Then
it will check @code{~/.authinfo} but it's not recommended to use such
an unencrypted file.
In Emacs 23 or later there is an option @code{auto-encryption-mode} to
automatically decrypt @code{*.gpg} files. It is enabled by default.

View file

@ -7,10 +7,11 @@
@c [Dodd's address no longer valid.]
@comment %**start of header (This is for running Texinfo on a region.)
@c FOR GNU EMACS USE ../info/dired-x BELOW
@setfilename ../../info/dired-x
@c dired-x.el REVISION NUMBER
@settitle Dired Extra Version 2 User's Manual
@settitle Dired Extra User's Manual
@include emacsver.texi
@iftex
@finalout
@end iftex
@ -18,7 +19,8 @@
@comment %**end of header (This is for running Texinfo on a region.)
@copying
Copyright @copyright{} 1994-1995, 1999, 2001-2011 Free Software Foundation, Inc.
Copyright @copyright{} 1994-1995, 1999, 2001-2011
Free Software Foundation, Inc.
@quotation
Permission is granted to copy, distribute and/or modify this document
@ -47,8 +49,7 @@ developing GNU and promoting software freedom.''
@titlepage
@sp 6
@c dired-x.el REVISION NUMBER
@center @titlefont{Dired Extra Version 2}
@center @titlefont{Dired Extra}
@sp 2
@center @titlefont{For The GNU Emacs}
@sp 1
@ -70,10 +71,9 @@ developing GNU and promoting software freedom.''
@node Top
@top Dired Extra
@comment node-name, next, previous, up
@noindent
This documents the ``extra'' features for Dired Mode for GNU Emacs that are
This documents the ``extra'' features for GNU Emacs's Dired Mode that are
provided by the file @file{dired-x.el}.
@itemize @bullet
@ -81,20 +81,8 @@ provided by the file @file{dired-x.el}.
@item
Based on @file{dired.texi} by Sebastian Kremer <sk@@thp.uni-koeln.de>
@c dired-x.el REVISION NUMBER
@item
For @file{dired-x.el} revision 2
@c @item
@c Revision of this manual: 2.53 (2001/02/25 14:05:46)
@c @item
@c Bugs to Lawrence R. Dodd <dodd@@roebling.poly.edu>. @emph{Please} type
@c @kbd{M-x dired-x-submit-report} to submit a bug report (@pxref{Bugs}).
@c @item
@c You can obtain a copy of this package via anonymous ftp in
@c @t{/roebling.poly.edu:/pub/packages/dired-x.tar.gz}
For @file{dired-x.el} as distributed with GNU Emacs @value{EMACSVER}.
@end itemize
@ -124,19 +112,11 @@ For @file{dired-x.el} revision 2
@end ifnottex
@node Introduction, Installation, Top, Top
@comment node-name, next, previous, up
@chapter Introduction
This documents the @emph{extra} features for Dired Mode for GNU Emacs. It
is derived from version 1.191 of Sebastian Kremer's @file{dired-x.el}.
In adopting this @file{dired-x.el} to GNU Emacs v19 some material that has
been incorporated into @file{dired.el} and @file{dired-aux.el} of the GNU Emacs
19 distribution has been removed and some material was modified for agreement
with the functions in @file{dired.el} and @file{dired-aux.el}. For example,
the code using @code{gmhist} history functions was replaced with code using
the mini-buffer history now built into GNU Emacs. Finally, a few other
features have been added and a few more functions have been bound to keys.
This documents some @emph{extra} features for GNU Emacs's Dired Mode
that are provided by @file{dired-x.el} (derived from Sebastian Kremer's
original @file{dired-x.el}).
@ifnottex
@menu
@ -146,7 +126,6 @@ features have been added and a few more functions have been bound to keys.
@end ifnottex
@node Features, Technical Details, , Introduction
@comment node-name, next, previous, up
@section Features
@cindex Features
@ -194,7 +173,6 @@ C-f} and @kbd{C-x 4 C-f} to @code{dired-x-find-file} and
Point}).
@node Technical Details, , Features, Introduction
@comment node-name, next, previous, up
@section Technical Details
@cindex Redefined functions
@cindex @file{dired-aux.el}
@ -222,7 +200,6 @@ and the following functions from @file{dired-aux.el}
@end itemize
@node Installation, Omitting Files in Dired, Introduction, Top
@comment node-name, next, previous, up
@chapter Installation
@noindent
@ -231,8 +208,8 @@ This manual describes the Dired features provided by the file
file and (optionally) set some variables.
@noindent
In your @file{.emacs} file in your home directory, or in the system-wide
initialization file @file{default.el} in the @file{site-lisp} directory, put
In your @file{~/.emacs} file, or in the system-wide initialization file
@file{default.el} in the @file{site-lisp} directory, put
@example
(add-hook 'dired-load-hook
@ -261,48 +238,27 @@ when you first type @kbd{C-x d}).
@end ifnottex
@node Optional Installation Dired Jump, Optional Installation File At Point, , Installation
@comment node-name, next, previous, up
@section Optional Installation Dired Jump
@cindex Autoloading @code{dired-jump} and @code{dired-jump-other-window}
In order to have @code{dired-jump} and @code{dired-jump-other-window}
(@pxref{Miscellaneous Commands}) work @emph{before} @code{dired} and
@code{dired-x} have been properly loaded the user should set-up an autoload
@code{dired-x} have been properly loaded you should set-up an autoload
for these functions. In your @file{.emacs} file put
@example
;; Autoload `dired-jump' and `dired-jump-other-window'.
;; We autoload from FILE dired.el. This will then load dired-x.el
;; and hence define `dired-jump' and `dired-jump-other-window'.
(autoload 'dired-jump "dired-x"
"Jump to Dired buffer corresponding to current buffer." t)
(autoload 'dired-jump-other-window "dired-x"
"Like \\[dired-jump] (dired-jump) but in other window." t)
(define-key global-map "\C-x\C-j" 'dired-jump)
(define-key global-map "\C-x4\C-j" 'dired-jump-other-window)
(autoload (quote dired-jump) "dired" "\
Jump to Dired buffer corresponding to current buffer.
If in a file, Dired the current directory and move to file's line.
If in Dired already, pop up a level and goto old directory's line.
In case the proper Dired file line cannot be found, refresh the Dired
buffer and try again." t nil)
(autoload (quote dired-jump-other-window) "dired" "\
Like \\[dired-jump] (dired-jump) but in other window." t nil)
@end example
Note that in recent releases of GNU Emacs 19 (i.e., 19.25 or later) the file
@file{../lisp/loaddefs.el} of the Emacs distribution already contains the
proper auto-loading for @code{dired-jump} so you need only put
@example
(define-key global-map "\C-x\C-j" 'dired-jump)
@end example
@noindent
in your @file{.emacs} file in order to have @kbd{C-x C-j} work
before @code{dired} is loaded.
@node Optional Installation File At Point, , Optional Installation Dired Jump, Installation
@comment node-name, next, previous, up
@section Optional Installation File At Point
@cindex Binding @code{dired-x-find-file}
@ -335,7 +291,6 @@ loaded
@end example
@node Omitting Files in Dired, Local Variables, Installation, Top
@comment node-name, next, previous, up
@chapter Omitting Files in Dired
@cindex Omitting Files in Dired
@ -392,8 +347,6 @@ inside @code{dired-load-hook} (@pxref{Installation}) and then evaluate
@end ifnottex
@node Omitting Variables, Omitting Examples, , Omitting Files in Dired
@comment node-name, next, previous, up
@section Omitting Variables
@cindex Customizing file omitting
@ -501,7 +454,6 @@ will show up again after reverting the buffer, unlike the others.
@end table
@node Omitting Examples, Omitting Technical, Omitting Variables, Omitting Files in Dired
@comment node-name, next, previous, up
@section Examples of Omitting Various File Types
@itemize @bullet
@ -555,7 +507,6 @@ in the @code{dired-load-hook} (@pxref{Installation}).
@end itemize
@node Omitting Technical, , Omitting Examples, Omitting Files in Dired
@comment node-name, next, previous, up
@section Some Technical Details of Omitting
Loading @file{dired-x.el} will install Dired Omit by putting
@ -563,8 +514,8 @@ Loading @file{dired-x.el} will install Dired Omit by putting
call @code{dired-extra-startup}, which in turn calls @code{dired-omit-startup}
in your @code{dired-mode-hook}.
@c FIXME does the standard dir-locals mechanism obsolete this?
@node Local Variables, Shell Command Guessing, Omitting Files in Dired, Top
@comment node-name, next, previous, up
@chapter Local Variables for Dired Directories
@cindex Local Variables for Dired Directories
@ -633,7 +584,6 @@ Variables are hacked.
@end table
@node Shell Command Guessing, Virtual Dired, Local Variables, Top
@comment node-name, next, previous, up
@chapter Shell Command Guessing
@cindex Guessing shell commands for files.
@ -740,7 +690,6 @@ History list for commands that read dired-shell commands.
@end table
@node Virtual Dired, Advanced Mark Commands, Shell Command Guessing, Top
@comment node-name, next, previous, up
@chapter Virtual Dired
@cindex Virtual Dired
@ -782,7 +731,6 @@ The regexp is a bit more complicated than usual to exclude @file{.dired}
local-variable files.
@node Advanced Mark Commands, Multiple Dired Directories, Virtual Dired, Top
@comment node-name, next, previous, up
@chapter Advanced Mark Commands
@table @kbd
@ -829,8 +777,6 @@ Flag all files with a certain extension for deletion. A @samp{.} is
@end ifnottex
@node Advanced Cleaning Functions, Advanced Cleaning Variables, , Advanced Mark Commands
@comment node-name, next, previous, up
@section Advanced Cleaning Functions
@table @code
@ -862,8 +808,6 @@ and @file{*.dvi} files for deletion.
@end table
@node Advanced Cleaning Variables, Special Marking Function, Advanced Cleaning Functions, Advanced Mark Commands
@comment node-name, next, previous, up
@section Advanced Cleaning Variables
@noindent Variables used by the above cleaning commands (and in the default value for
@ -903,8 +847,6 @@ List of extensions of dispensable files created by Bib@TeX{}.
@end table
@node Special Marking Function, , Advanced Cleaning Variables, Advanced Mark Commands
@comment node-name, next, previous, up
@section Special Marking Function
@table @kbd
@ -961,7 +903,6 @@ to mark all @file{.el} files without a corresponding @file{.elc} file.
@end table
@node Multiple Dired Directories, Find File At Point, Advanced Mark Commands, Top
@comment node-name, next, previous, up
@chapter Multiple Dired Directories and Non-Dired Commands
@cindex Multiple Dired directories
@ -978,8 +919,8 @@ A general mechanism is provided for special handling of the working
directory in special major modes:
@table @code
@item default-directory-alist
@vindex default-directory-alist
@item dired-default-directory-alist
@vindex dired-default-directory-alist
Default: @code{((dired-mode . (dired-current-directory)))}
Alist of major modes and their notion of @code{default-directory}, as a
@ -990,12 +931,10 @@ in favor of @code{default-directory}.
@findex dired-default-directory
Use this function like you would use the variable
@code{default-directory}, except that @code{dired-default-directory}
also consults the variable @code{default-directory-alist}.
also consults the variable @code{dired-default-directory-alist}.
@end table
@node Find File At Point, Miscellaneous Commands, Multiple Dired Directories, Top
@comment node-name, next, previous, up
@section Find File At Point
@cindex Visiting a file mentioned in a buffer
@cindex Finding a file at point
@ -1072,7 +1011,6 @@ that uses the value of @code{dired-x-hands-off-my-keys} to determine if
@end table
@node Miscellaneous Commands, Bugs, Find File At Point, Top
@comment node-name, next, previous, up
@chapter Miscellaneous Commands
Miscellaneous features not fitting anywhere else:
@ -1141,13 +1079,12 @@ file (assumed to be a UNIX mail folder).
@vindex dired-vm-read-only-folders
If you give this command a prefix argument, it will visit the folder
read-only. This only works in VM 5, not VM 4.
read-only.
If the variable @code{dired-vm-read-only-folders} is @code{t},
@code{dired-vm} will
visit all folders read-only. If it is neither @code{nil} nor @code{t}, e.g.,
the symbol @code{if-file-read-only}, only files not writable by you are
visited read-only. This is the recommended value if you run VM 5.
@code{dired-vm} will visit all folders read-only. If it is neither
@code{nil} nor @code{t}, e.g., the symbol @code{if-file-read-only}, only
files not writable by you are visited read-only.
@vindex dired-bind-vm
If the variable @code{dired-bind-vm} is @code{t}, @code{dired-vm} will be bound
@ -1210,50 +1147,30 @@ info.
@end table
@node Bugs, GNU Free Documentation License, Miscellaneous Commands, Top
@comment node-name, next, previous, up
@chapter Bugs
@cindex Bugs
@findex dired-x-submit-report
@noindent
If you encounter a bug in this package, wish to suggest an
enhancement, or want to make a smart remark, then type
@example
@kbd{M-x dired-x-submit-report}
@end example
@noindent
to set up an outgoing mail buffer, with the proper address to the
@file{dired-x.el} maintainer automatically inserted in the @samp{To:@:} field.
This command also inserts information that the Dired X maintainer can use to
recreate your exact setup, making it easier to verify your bug or social
maladjustment.
Lawrence R. Dodd
@c <dodd@@roebling.poly.edu>
If you encounter a bug in this package, or wish to suggest an
enhancement, then please use @kbd{M-x report-emacs-bug} to report it.
@node GNU Free Documentation License, Concept Index, Bugs, Top
@appendix GNU Free Documentation License
@include doclicense.texi
@node Concept Index, Command Index, GNU Free Documentation License, Top
@comment node-name, next, previous, up
@unnumbered Concept Index
@printindex cp
@node Command Index, Key Index, Concept Index, Top
@comment node-name, next, previous, up
@unnumbered Function Index
@printindex fn
@node Key Index, Variable Index, Command Index, Top
@comment node-name, next, previous, up
@unnumbered Key Index
@printindex ky
@node Variable Index, , Key Index, Top
@comment node-name, next, previous, up
@unnumbered Variable Index
@printindex vr

View file

@ -1,3 +1,24 @@
2011-02-17 Ken Manheimer <ken.manheimer@gmail.com>
* etc/images/icons/allout-widgets/dark-bg,
etc/images/icons/allout-widgets/light-bg,
encrypted-locked.{xpm,png}, unlocked-encrypted.{xpm,png}:
Reorganize icon directories and files to reconcile against windows
short-filename clashes.
2011-02-16 Ken Manheimer <ken.manheimer@gmail.com>
* etc/images/icons/allout-widgets-dark-bg,
etc/images/icons/allout-widgets-light-bg: Icons for new
allout-widgets.el.
* etc/images/icons/README: Include coypright and GPL 3 license for
new icons.
2011-02-16 Michael Albinus <michael.albinus@gmx.de>
* NEWS: Add soap-client.el and soap-inspect.el.
2011-02-13 Michael Albinus <michael.albinus@gmx.de>
* NEWS: Tramp methods "imap" and "imaps" are discontinued.

View file

@ -639,6 +639,9 @@ secrets.
** notifications.el provides an implementation of the Desktop
Notifications API. It requires D-Bus for communication.
** soap-client.el supports access to SOAP web services from Emacs.
soap-inspect.el is an interactive inspector for SOAP WSDL structures.
* Incompatible Lisp Changes in Emacs 24.1

View file

@ -15,3 +15,52 @@ Files: hicolor/16x16/apps/emacs22.png hicolor/24x24/apps/emacs22.png
Author: Andrew Zhilin <andrew_zhilin@yahoo.com>
Copyright (C) 2005-2011 Free Software Foundation, Inc.
License: GNU General Public License version 3 or later (see COPYING)
Files: allout-widgets-dark-bg/closed.png
allout-widgets-dark-bg/closed.xpm
allout-widgets-dark-bg/empty.png
allout-widgets-dark-bg/empty.xpm
allout-widgets-dark-bg/encrypted-locked.png
allout-widgets-dark-bg/encrypted-locked.xpm
allout-widgets-dark-bg/encrypted-unlocked.png
allout-widgets-dark-bg/encrypted-unlocked.xpm
allout-widgets-dark-bg/end-connector.png
allout-widgets-dark-bg/end-connector.xpm
allout-widgets-dark-bg/extender-connector.png
allout-widgets-dark-bg/extender-connector.xpm
allout-widgets-dark-bg/leaf.png
allout-widgets-dark-bg/leaf.xpm
allout-widgets-dark-bg/mid-connector.png
allout-widgets-dark-bg/mid-connector.xpm
allout-widgets-dark-bg/opened.png
allout-widgets-dark-bg/opened.xpm
allout-widgets-dark-bg/skip-descender.png
allout-widgets-dark-bg/skip-descender.xpm
allout-widgets-dark-bg/through-descender.png
allout-widgets-dark-bg/through-descender.xpm
allout-widgets-light-bg/closed.png
allout-widgets-light-bg/closed.xpm
allout-widgets-light-bg/empty.png
allout-widgets-light-bg/empty.xpm
allout-widgets-light-bg/encrypted-locked.png
allout-widgets-light-bg/encrypted-locked.xpm
allout-widgets-light-bg/encrypted-unlocked.png
allout-widgets-light-bg/encrypted-unlocked.xpm
allout-widgets-light-bg/end-connector.png
allout-widgets-light-bg/end-connector.xpm
allout-widgets-light-bg/extender-connector.png
allout-widgets-light-bg/extender-connector.xpm
allout-widgets-light-bg/leaf.png
allout-widgets-light-bg/leaf.xpm
allout-widgets-light-bg/mid-connector.png
allout-widgets-light-bg/mid-connector.xpm
allout-widgets-light-bg/opened.png
allout-widgets-light-bg/opened.xpm
allout-widgets-light-bg/skip-descender.png
allout-widgets-light-bg/skip-descender.xpm
allout-widgets-light-bg/through-descender.png
allout-widgets-light-bg/through-descender.xpm
Author: Ken Manheimer <ken.manheimer@gmail.com>
Copyright (C) 2011 Free Software Foundation, Inc.
License: GNU General Public License version 3 or later (see COPYING)

Binary file not shown.

After

Width:  |  Height:  |  Size: 232 B

View file

@ -0,0 +1,30 @@
/* XPM */
static char *dummy[]={
"9 17 10 1",
". c None",
"# c #000080",
"h c #52a55a",
"g c #52ad52",
"e c #5ab54a",
"d c #5abd42",
"c c #63c639",
"b c #63ce31",
"f c #ada5c6",
"a c #ffff00",
".........",
".........",
".........",
"######...",
"aaaaaa#..",
".bbcdaa#.",
".###deaa#",
"..ff##gaa",
"fffff##ha",
"..ff##haa",
".###ghaa#",
".eeggaa#.",
"aaaaaa#..",
"######...",
".........",
".........",
"........."};

Binary file not shown.

After

Width:  |  Height:  |  Size: 231 B

View file

@ -0,0 +1,29 @@
/* XPM */
static char *dummy[]={
"10 17 9 1",
". c None",
"# c #000080",
"f c #52a55a",
"g c #52ad52",
"d c #5abd42",
"b c #63c639",
"c c #6bd629",
"e c #ada5c6",
"a c #ffff00",
"..........",
"..........",
"..........",
"...######.",
"..#aaaaaa.",
".#aabbbb..",
"#aabc###..",
"aad##ee...",
"adeeeee...",
"aad##ee...",
"#aafg###..",
".#aabbbb..",
"..#aaaaaa.",
"...######.",
"..........",
"..........",
".........."};

Binary file not shown.

After

Width:  |  Height:  |  Size: 107 B

View file

@ -0,0 +1,22 @@
/* XPM */
static char *dummy[]={
"11 17 2 1",
". c None",
"# c #ada5c6",
"....#......",
"....#......",
"....#......",
"....#......",
"....#......",
"....#......",
"....#......",
"....##.....",
".....######",
"...........",
"...........",
"...........",
"...........",
"...........",
"...........",
"...........",
"..........."};

Binary file not shown.

After

Width:  |  Height:  |  Size: 92 B

View file

@ -0,0 +1,22 @@
/* XPM */
static char *dummy[]={
"11 17 2 1",
". c None",
"# c #ada5c6",
"...........",
"...........",
"...........",
"...........",
"...........",
"...........",
"...........",
"...........",
"###########",
"...........",
"...........",
"...........",
"...........",
"...........",
"...........",
"...........",
"..........."};

Binary file not shown.

After

Width:  |  Height:  |  Size: 211 B

View file

@ -0,0 +1,33 @@
/* XPM */
static char *dummy[]={
"16 21 9 1",
". c None",
"a c #737373",
"b c #7b7b7b",
"# c #808080",
"c c #848484",
"d c #8c8c8c",
"e c #949494",
"f c #9c9c9c",
"g c #a5a5a5",
"................",
"................",
"................",
"................",
"................",
"................",
"...#####........",
"..#abbcc#.......",
".#abbccdd#......",
"#abbccddee#.....",
"#bbccddeef#.....",
"#bccddeefg#.....",
".#cddeefg#......",
"..#deefg#.......",
"...#####........",
"................",
"................",
"................",
"................",
"................",
"................"};

Binary file not shown.

After

Width:  |  Height:  |  Size: 210 B

View file

@ -0,0 +1,26 @@
/* XPM */
static char *dummy[]={
"10 17 6 1",
". c None",
"b c #333300",
"# c #666600",
"d c #808080",
"c c #999933",
"a c #999966",
"..........",
"..........",
"..........",
"..........",
"...##a#...",
"..aaaaaa..",
".aa....##.",
".ab....a#.",
".cb....#b.",
"caaaaaaacb",
"cddddddddb",
"adaddddddb",
"adaddddddb",
"caadddddab",
"addddddddb",
"bbbbbbbbbb",
".........."};

Binary file not shown.

After

Width:  |  Height:  |  Size: 125 B

View file

@ -0,0 +1,22 @@
/* XPM */
static char *dummy[]={
"11 17 2 1",
". c None",
"# c #ada5c6",
"....#......",
"....#......",
"....#......",
"....#......",
"....#......",
"....#......",
"....#......",
"....##.....",
"....#.#####",
"....##.....",
"....#......",
"....#......",
"....#......",
"....#......",
"....#......",
"....#......",
"....#......"};

Binary file not shown.

After

Width:  |  Height:  |  Size: 206 B

View file

@ -0,0 +1,25 @@
/* XPM */
static char *dummy[]={
"10 17 5 1",
". c None",
"a c #000080",
"b c #63c639",
"c c #ada5c6",
"# c #ffff00",
"..........",
"..........",
"..........",
"..........",
"#.......#a",
"#ba...ab#a",
"#ba...ab#a",
"#bccccab#a",
"#bacccab#a",
"#bbacabb#a",
"##bacab##a",
"a##bbb##a.",
".a#####a..",
"..a###a...",
"...a#a....",
"....c.....",
"....c....."};

Binary file not shown.

After

Width:  |  Height:  |  Size: 84 B

View file

@ -0,0 +1,21 @@
/* XPM */
static char *dummy[]={
"11 17 1 1",
". c None",
"...........",
"...........",
"...........",
"...........",
"...........",
"...........",
"...........",
"...........",
"...........",
"...........",
"...........",
"...........",
"...........",
"...........",
"...........",
"...........",
"..........."};

Binary file not shown.

After

Width:  |  Height:  |  Size: 92 B

View file

@ -0,0 +1,22 @@
/* XPM */
static char *dummy[]={
"11 17 2 1",
". c None",
"# c #ada5c6",
"....#......",
"....#......",
"....#......",
"....#......",
"....#......",
"....#......",
"....#......",
"....#......",
"....#......",
"....#......",
"....#......",
"....#......",
"....#......",
"....#......",
"....#......",
"....#......",
"....#......"};

Binary file not shown.

After

Width:  |  Height:  |  Size: 202 B

View file

@ -0,0 +1,26 @@
/* XPM */
static char *dummy[]={
"10 17 6 1",
". c None",
"c c #333300",
"a c #666600",
"b c #999933",
"# c #999966",
"d c #ffff00",
"..........",
"..........",
"..........",
"...####...",
"..#a#a###.",
"..a#...##.",
".a#.....#.",
".##.......",
"..##......",
"b###c###bc",
"bddddddddc",
"#d#ddddddc",
"#d#ddddddc",
"b##ddddd#c",
"#ddddddddc",
"cccccccccc",
".........."};

Binary file not shown.

After

Width:  |  Height:  |  Size: 212 B

View file

@ -0,0 +1,24 @@
/* XPM */
static char *dummy[]={
"9 17 4 1",
". c None",
"# c #00ff00",
"b c #00ffff",
"a c #606060",
".........",
".........",
".........",
"######...",
"aaaaaa#..",
".bbbbaa#.",
"....bbaa#",
"..aa..baa",
"aaaaa..ba",
"..aa..baa",
"....bbaa#",
".bbbbaa#.",
"aaaaaa#..",
"######...",
".........",
".........",
"........."};

Binary file not shown.

After

Width:  |  Height:  |  Size: 214 B

View file

@ -0,0 +1,24 @@
/* XPM */
static char *dummy[]={
"10 17 4 1",
". c None",
"# c #00ff00",
"b c #00ffff",
"a c #606060",
"..........",
"..........",
"..........",
"...######.",
"..#aaaaaa.",
".#aabbbb..",
"#aabb.....",
"aab..aa...",
"abaaaaa...",
"aab..aa...",
"#aabb.....",
".#aabbbb..",
"..#aaaaaa.",
"...######.",
"..........",
"..........",
".........."};

Binary file not shown.

After

Width:  |  Height:  |  Size: 111 B

View file

@ -0,0 +1,22 @@
/* XPM */
static char *dummy[]={
"11 17 2 1",
". c None",
"# c #606060",
"....#......",
"....#......",
"....#......",
"....#......",
"....#......",
"....#......",
"....#......",
"....##.....",
".....######",
"...........",
"...........",
"...........",
"...........",
"...........",
"...........",
"...........",
"..........."};

Binary file not shown.

After

Width:  |  Height:  |  Size: 105 B

View file

@ -0,0 +1,22 @@
/* XPM */
static char *dummy[]={
"11 17 2 1",
". c None",
"# c #606060",
"...........",
"...........",
"...........",
"...........",
"...........",
"...........",
"...........",
"...........",
"###########",
"...........",
"...........",
"...........",
"...........",
"...........",
"...........",
"...........",
"..........."};

Binary file not shown.

After

Width:  |  Height:  |  Size: 211 B

View file

@ -0,0 +1,33 @@
/* XPM */
static char *dummy[]={
"16 21 9 1",
". c None",
"a c #737373",
"b c #7b7b7b",
"# c #808080",
"c c #848484",
"d c #8c8c8c",
"e c #949494",
"f c #9c9c9c",
"g c #a5a5a5",
"................",
"................",
"................",
"................",
"................",
"................",
"...#####........",
"..#abbcc#.......",
".#abbccdd#......",
"#abbccddee#.....",
"#bbccddeef#.....",
"#bccddeefg#.....",
".#cddeefg#......",
"..#deefg#.......",
"...#####........",
"................",
"................",
"................",
"................",
"................",
"................"};

Binary file not shown.

After

Width:  |  Height:  |  Size: 210 B

View file

@ -0,0 +1,26 @@
/* XPM */
static char *dummy[]={
"10 17 6 1",
". c None",
"b c #333300",
"# c #666600",
"d c #808080",
"c c #999933",
"a c #999966",
"..........",
"..........",
"..........",
"..........",
"...##a#...",
"..aaaaaa..",
".aa....##.",
".ab....a#.",
".cb....#b.",
"caaaaaaacb",
"cddddddddb",
"adaddddddb",
"adaddddddb",
"caadddddab",
"addddddddb",
"bbbbbbbbbb",
".........."};

Binary file not shown.

After

Width:  |  Height:  |  Size: 115 B

View file

@ -0,0 +1,22 @@
/* XPM */
static char *dummy[]={
"11 17 2 1",
". c None",
"# c #606060",
"....#......",
"....#......",
"....#......",
"....#......",
"....#......",
"....#......",
"....#......",
"....##.....",
"....#.#####",
"....##.....",
"....#......",
"....#......",
"....#......",
"....#......",
"....#......",
"....#......",
"....#......"};

Binary file not shown.

After

Width:  |  Height:  |  Size: 212 B

View file

@ -0,0 +1,24 @@
/* XPM */
static char *dummy[]={
"10 17 4 1",
". c None",
"a c #00ff00",
"b c #00ffff",
"# c #606060",
"..........",
"..........",
"..........",
"..........",
"#.......#a",
"#b.....b#a",
"#b.....b#a",
"#b####.b#a",
"#b.###.b#a",
"#bb.#.bb#a",
"##b.#.b##a",
"a##b#b##a.",
".a##b##a..",
"..a###a...",
"...a#a....",
"....#.....",
"....#....."};

Binary file not shown.

After

Width:  |  Height:  |  Size: 84 B

View file

@ -0,0 +1,21 @@
/* XPM */
static char *dummy[]={
"11 17 1 1",
". c None",
"...........",
"...........",
"...........",
"...........",
"...........",
"...........",
"...........",
"...........",
"...........",
"...........",
"...........",
"...........",
"...........",
"...........",
"...........",
"...........",
"..........."};

Binary file not shown.

After

Width:  |  Height:  |  Size: 105 B

View file

@ -0,0 +1,22 @@
/* XPM */
static char *dummy[]={
"11 17 2 1",
". c None",
"# c #606060",
"....#......",
"....#......",
"....#......",
"....#......",
"....#......",
"....#......",
"....#......",
"....#......",
"....#......",
"....#......",
"....#......",
"....#......",
"....#......",
"....#......",
"....#......",
"....#......",
"....#......"};

Binary file not shown.

After

Width:  |  Height:  |  Size: 202 B

View file

@ -0,0 +1,26 @@
/* XPM */
static char *dummy[]={
"10 17 6 1",
". c None",
"c c #333300",
"a c #666600",
"b c #999933",
"# c #999966",
"d c #ffff00",
"..........",
"..........",
"..........",
"...####...",
"..#a#a###.",
"..a#...##.",
".a#.....#.",
".##.......",
"..##......",
"b###c###bc",
"bddddddddc",
"#d#ddddddc",
"#d#ddddddc",
"b##ddddd#c",
"#ddddddddc",
"cccccccccc",
".........."};

View file

@ -508,7 +508,7 @@ getloadavg (double loadavg[], int nelem)
elem = -1;
# endif
# if !defined (LDAV_DONE) && defined (HAVE_LIBKSTAT)
# if !defined (LDAV_DONE) && defined (HAVE_LIBKSTAT) /* Solaris <= 2.6 */
/* Use libkstat because we don't have to be root. */
# define LDAV_DONE
kstat_ctl_t *kc;
@ -559,6 +559,7 @@ getloadavg (double loadavg[], int nelem)
# endif /* HAVE_LIBKSTAT */
# if !defined (LDAV_DONE) && defined (hpux) && defined (HAVE_PSTAT_GETDYNAMIC)
/* HP-UX */
/* Use pstat_getdynamic() because we don't have to be root. */
# define LDAV_DONE
# undef LOAD_AVE_TYPE
@ -575,7 +576,7 @@ getloadavg (double loadavg[], int nelem)
# endif /* hpux && HAVE_PSTAT_GETDYNAMIC */
# if ! defined LDAV_DONE && defined HAVE_LIBPERFSTAT
# if ! defined LDAV_DONE && defined HAVE_LIBPERFSTAT /* AIX */
# define LDAV_DONE
# undef LOAD_AVE_TYPE
/* Use perfstat_cpu_total because we don't have to be root. */
@ -592,6 +593,7 @@ getloadavg (double loadavg[], int nelem)
# endif
# if !defined (LDAV_DONE) && (defined (__linux__) || defined (__CYGWIN__))
/* Linux without glibc, Cygwin */
# define LDAV_DONE
# undef LOAD_AVE_TYPE
@ -648,7 +650,7 @@ getloadavg (double loadavg[], int nelem)
# endif /* __linux__ || __CYGWIN__ */
# if !defined (LDAV_DONE) && defined (__NetBSD__)
# if !defined (LDAV_DONE) && defined (__NetBSD__) /* NetBSD < 0.9 */
# define LDAV_DONE
# undef LOAD_AVE_TYPE
@ -680,7 +682,7 @@ getloadavg (double loadavg[], int nelem)
# endif /* __NetBSD__ */
# if !defined (LDAV_DONE) && defined (NeXT)
# if !defined (LDAV_DONE) && defined (NeXT) /* NeXTStep */
# define LDAV_DONE
/* The NeXT code was adapted from iscreen 3.2. */
@ -842,6 +844,7 @@ getloadavg (double loadavg[], int nelem)
# endif /* OSF_MIPS */
# if !defined (LDAV_DONE) && (defined (__MSDOS__) || defined (WINDOWS32))
/* DJGPP */
# define LDAV_DONE
/* A faithful emulation is going to have to be saved for a rainy day. */
@ -851,7 +854,7 @@ getloadavg (double loadavg[], int nelem)
}
# endif /* __MSDOS__ || WINDOWS32 */
# if !defined (LDAV_DONE) && defined (OSF_ALPHA)
# if !defined (LDAV_DONE) && defined (OSF_ALPHA) /* OSF/1 */
# define LDAV_DONE
struct tbl_loadavg load_ave;
@ -863,7 +866,7 @@ getloadavg (double loadavg[], int nelem)
: (load_ave.tl_avenrun.l[elem] / (double) load_ave.tl_lscale));
# endif /* OSF_ALPHA */
# if ! defined LDAV_DONE && defined __VMS
# if ! defined LDAV_DONE && defined __VMS /* VMS */
/* VMS specific code -- read from the Load Ave driver. */
LOAD_AVE_TYPE load_ave[3];
@ -907,6 +910,7 @@ getloadavg (double loadavg[], int nelem)
# endif /* ! defined LDAV_DONE && defined __VMS */
# if ! defined LDAV_DONE && defined LOAD_AVE_TYPE && ! defined __VMS
/* IRIX, other old systems */
/* UNIX-specific code -- read the average from /dev/kmem. */
@ -948,9 +952,7 @@ getloadavg (double loadavg[], int nelem)
}
# endif /* !SUNOS_5 */
# else /* sgi */
int ldav_off;
ldav_off = sysmp (MP_KERNADDR, MPKA_AVENRUN);
ptrdiff_t ldav_off = sysmp (MP_KERNADDR, MPKA_AVENRUN);
if (ldav_off != -1)
offset = (long int) ldav_off & 0x7fffffff;
# endif /* sgi */

2
lisp/.gitignore vendored
View file

@ -4,5 +4,3 @@ loaddefs.el
subdirs.el
finder-inf.el
cus-load.el
# arch-tag: ab6e8f91-fb95-4efe-9c1b-68e21561e68a

View file

@ -1,3 +1,129 @@
2011-02-18 Stefan Monnier <monnier@iro.umontreal.ca>
* emacs-lisp/pcase.el (pcase--u1): Understand non-linear patterns.
2011-02-18 Christian Ohler <ohler@gnu.org>
* emacs-lisp/ert.el (ert--setup-results-buffer)
(ert-results-pop-to-backtrace-for-test-at-point)
(ert-results-pop-to-messages-for-test-at-point)
(ert-results-pop-to-should-forms-for-test-at-point)
(ert-results-pop-to-timings): Revert parts of change 2011-02-02T17:59:44Z!sds@gnu.org that
were incorrect and unnecessary. This should make `make check'
pass again.
2011-02-17 Ken Manheimer <ken.manheimer@gmail.com>
* lisp/allout-widgets.el: (allout-widgets-icons-light-subdir)
(allout-widgets-icons-dark-subdir): Track relocations of icons
* lisp/allout.el: Remove commentary about remove encryption
passphrase mnemonic support and verification.
(allout-encrypt-string): (allout-encrypt-string): Recognize epg
failure to decrypt gpg2 armored text using gpg1, and indicate that
the gpg version *might* be the problem in the error message.
2011-02-17 Deniz Dogan <deniz.a.m.dogan@gmail.com>
* net/rcirc.el (rcirc-float-time): New function.
(rcirc-keepalive, rcirc-handler-ctcp-KEEPALIVE)
(rcirc-ctcp-sender-PING): Use it.
2011-02-17 Glenn Morris <rgm@gnu.org>
* speedbar.el (speedbar-ignored-modes, speedbar-file-unshown-regexp)
(speedbar-update-flag, speedbar-fetch-etags-command)
(speedbar-fetch-etags-arguments):
* term.el (term-buffer-maximum-size, term-input-chunk-size)
(term-completion-autolist, term-completion-addsuffix)
(term-completion-recexact, term-completion-fignore):
* term/sup-mouse.el (sup-mouse-fast-select-window):
* term/x-win.el (x-select-request-type):
Convert some defvars with "*" to defcustoms.
* shell.el (shell-delimiter-argument-list): Set it to nil. (Bug#8027)
* vc/vc.el (vc-default-previous-version):
Remove alias that points nowhere. (Bug#4496)
* dired-x.el (dired-clean-up-after-deletion):
kill-buffer does not need save-excursion.
(dired-do-run-mail): Doc fix.
(dired-filename-at-point): Doc fix.
Use looking-at, and skip-chars rather than re search.
* dired-x.el (dired-filename-at-point): Fix 8-year old typo.
2011-02-16 Ken Manheimer <ken.manheimer@gmail.com>
* allout-widgets.el: New allout extension that shows allout
outline structure with graphical widgets. 'allout-widgets'
customize group is an 'allout' subgroup, for easy discovery.
* allout.el: Include PGP and GnuPG in Keywords, and other
commentary refinements.
(allout-abbreviate-flattened-numbering): Rename to
allout-flattened-numbering-abbreviation, and
define-obsolete-variable-alias the old name.
(allout-flattened-numbering-abbreviation): Rename from
allout-abbreviate-flattened-numbering.
(allout-mode-p): Include among autoloads, for use by other modes
with impunity.
(allout-listify-exposed): Use
allout-flattened-numbering-abbreviation.
(allout-encrypt-string): Use set-buffer-multibyte directly.
(allout-set-buffer-multibyte): Remove.
2011-02-16 Deniz Dogan <deniz.a.m.dogan@gmail.com>
* simple.el (just-one-space): Remove useless `or' call.
2011-02-16 Alex Harsanyi <AlexHarsanyi@gmail.com>
* soap-client.el (soap-well-known-xmlns, soap-local-xmlns)
(soap-default-xmlns, soap-target-xmlns, soap-multi-refs)
(soap-decoded-multi-refs, soap-current-wsdl)
(soap-encoded-namespaces): Rename CL-style *...* variables.
2011-02-16 Michael Albinus <michael.albinus@gmx.de>
* net/soap-client.el: Add "comm" and "hypermedia" to the
keywords. Reflow too long lines.
* net/soap-inspect.el: Ditto. Require 'cl.
2011-02-16 Bastien Guerry <bzg@altern.org>
* play/doctor.el (doctor-mode): Bugfix: escape the "," character
in a `doctor-type' argument.
2011-02-16 Alex Harsanyi <AlexHarsanyi@gmail.com>
* net/soap-client.el:
* net/soap-inspect.el: New files.
2011-02-16 Leo <sdl.web@gmail.com>
* dired-x.el (dired-mode-map, dired-extra-startup):
Remove dired-copy-filename-as-kill since it's already in dired.el.
2011-02-16 Glenn Morris <rgm@gnu.org>
* dired-x.el (dired-bind-jump, dired-bind-man, dired-bind-info):
Doc fixes. Add :set property, replacing top-level calls.
(dired-vm-read-only-folders, dired-vm): Doc fix (drop v. old VM 4).
(dired-guess-shell-gnutar): Test tar version rather than system-type.
(dired-extra-startup, dired-man, dired-info): Doc fixes.
(dired-clean-up-after-deletion): Use when and dolist.
(dired-jump): Use unless and when.
(dired-virtual): Use line-end-position.
(dired-default-directory-alist): Rename from default-directory-alist.
(dired-default-directory): Update for above name change.
(dired-vm): Drop VM < 5 and simplify.
(dired-buffer-more-recently-used-p): Rewrite.
(dired-filename-at-point): Use when and or.
(dired-x-read-filename-at-point): Rename from read-filename-at-point.
Update callers.
2011-02-15 Glenn Morris <rgm@gnu.org>
* dired-x.el: Use easymenu for menu items. Fix item capitalization.

2365
lisp/allout-widgets.el Normal file

File diff suppressed because it is too large Load diff

View file

@ -6,7 +6,7 @@
;; Maintainer: Ken Manheimer <ken dot manheimer at gmail dot com>
;; Created: Dec 1991 -- first release to usenet
;; Version: 2.3
;; Keywords: outlines wp languages
;; Keywords: outlines, wp, languages, PGP, GnuPG
;; Website: http://myriadicity.net/Sundry/EmacsAllout
;; This file is part of GNU Emacs.
@ -39,11 +39,9 @@
;; emacs local file variables need to be enabled when the
;; file was visited -- see `enable-local-variables'.)
;; - Configurable per-file initial exposure settings
;; - Symmetric-key and key-pair topic encryption, plus symmetric passphrase
;; mnemonic support, with verification against an established passphrase
;; (using a stashed encrypted dummy string) and user-supplied hint
;; maintenance. Encryption is via the Emacs 'epg' library. See
;; allout-toggle-current-subtree-encryption docstring.
;; - Symmetric-key and key-pair topic encryption. Encryption is via the
;; Emacs 'epg' library. See allout-toggle-current-subtree-encryption
;; docstring.
;; - Automatic topic-number maintenance
;; - "Hot-spot" operation, for single-keystroke maneuvering and
;; exposure control (see the allout-mode docstring)
@ -59,8 +57,8 @@
;; See the `allout-mode' function's docstring for an introduction to the
;; mode.
;;
;; The latest development version and helpful notes are available at
;; http://myriadicity.net/Sundry/EmacsAllout .
;; Directions to the latest development version and helpful notes are
;; available at http://myriadicity.net/Sundry/EmacsAllout .
;;
;; The outline menubar additions provide quick reference to many of the
;; features. See the docstring of the variables `allout-layout' and
@ -76,7 +74,7 @@
;;; Code:
;;;_* Dependency autoloads
;;;_* Dependency loads
(require 'overlay)
(eval-when-compile
;; Most of the requires here are for stuff covered by autoloads, which
@ -94,7 +92,9 @@
;;;_ > defgroup allout, allout-keybindings
(defgroup allout nil
"Extensive outline mode for use alone and with other modes."
"Extensive outline minor-mode, for use stand-alone and with other modes.
See Allout Auto Activation for automatic activation."
:prefix "allout-"
:group 'outlines)
(defgroup allout-keybindings nil
@ -308,9 +308,7 @@ performing auto-layout is asked of the user each time.
With value \"activate\", only auto-mode-activation is enabled.
Auto-layout is not.
With value nil, neither auto-mode-activation nor auto-layout are
enabled, and allout auto-activation processing is removed from
file visiting activities."
With value nil, inhibit any automatic allout-mode activation."
:set 'allout-auto-activation-helper
:type '(choice (const :tag "On" t)
(const :tag "Ask about layout" "ask")
@ -752,8 +750,10 @@ Set this var to the bullet you want to use for file cross-references."
;;;###autoload
(put 'allout-presentation-padding 'safe-local-variable 'integerp)
;;;_ = allout-abbreviate-flattened-numbering
(defcustom allout-abbreviate-flattened-numbering nil
;;;_ = allout-flattened-numbering-abbreviation
(define-obsolete-variable-alias 'allout-abbreviate-flattened-numbering
'allout-flattened-numbering-abbreviation "24.0")
(defcustom allout-flattened-numbering-abbreviation nil
"If non-nil, `allout-flatten-exposed-to-buffer' abbreviates topic
numbers to minimal amount with some context. Otherwise, entire
numbers are always used."
@ -1553,6 +1553,7 @@ See `allout-encryption-ciphertext-rejection-regexps' for rejection reasons.")
;;;_ > allout-mode-p ()
;; Must define this macro above any uses, or byte compilation will lack
;; proper def, if file isn't loaded -- eg, during emacs build!
;;;###autoload
(defmacro allout-mode-p ()
"Return t if `allout-mode' is active in current buffer."
'allout-mode)
@ -5410,7 +5411,7 @@ header and body. The elements of that list are:
bullet)))
(cond ((listp format)
(list depth
(if allout-abbreviate-flattened-numbering
(if allout-flattened-numbering-abbreviation
(allout-stringify-flat-index format
gone-out)
(allout-stringify-flat-index-plain
@ -6054,7 +6055,7 @@ signal."
(with-temp-buffer
(insert text)
;; convey the text characteristics of the original buffer:
(allout-set-buffer-multibyte multibyte)
(set-buffer-multibyte multibyte)
(when encoding
(set-buffer-file-coding-system encoding)
(if (not decrypt)
@ -6085,9 +6086,14 @@ signal."
(setq result-text
(if decrypt
(epg-decrypt-string epg-context
(encode-coding-string massaged-text
(or encoding 'utf-8)))
(condition-case err
(epg-decrypt-string epg-context
(encode-coding-string massaged-text
(or encoding 'utf-8)))
(epg-error
(signal 'egp-error
(cons (concat (cadr err) " - gpg version problem?")
(cddr err)))))
(replace-regexp-in-string "\n$" ""
(epg-encrypt-string epg-context
(encode-coding-string massaged-text
@ -6673,14 +6679,6 @@ To ignore intangibility, bind `inhibit-point-motion-hooks' to t."
'previous-single-property-change)
;; No docstring because xemacs defalias doesn't support it.
)
;;;_ > allout-set-buffer-multibyte
(if (fboundp 'set-buffer-multibyte)
(defalias 'allout-set-buffer-multibyte 'set-buffer-multibyte)
(with-no-warnings
;; this definition is used only in older or alternative emacs, where
;; the setting is our only recourse.
(defun allout-set-buffer-multibyte (is-multibyte)
(set enable-multibyte-characters is-multibyte))))
;;;_ > allout-select-safe-coding-system
(defalias 'allout-select-safe-coding-system
(if (fboundp 'select-safe-coding-system)

View file

@ -32,7 +32,7 @@
;;
;; (add-hook 'dired-load-hook
;; (lambda ()
;; (require 'dired-x)
;; (load "dired-x")
;; ;; Set global variables here. For example:
;; ;; (setq dired-guess-shell-gnutar "gtar")
;; ))
@ -79,7 +79,6 @@
(defcustom dired-bind-vm nil
"Non-nil means \"V\" runs `dired-vm', otherwise \"V\" runs `dired-rmail'.
RMAIL files in the old Babyl format (used before before Emacs 23.1)
contain \"-*- rmail -*-\" at the top, so `dired-find-file'
will run `rmail' on these files. New RMAIL files use the standard
@ -88,26 +87,49 @@ mbox format, and so cannot be distinguished in this way."
:group 'dired-keys)
(defcustom dired-bind-jump t
"Non-nil means bind `dired-jump' to C-x C-j, otherwise do not."
"Non-nil means bind `dired-jump' to C-x C-j, otherwise do not.
Setting this variable directly after dired-x is loaded has no effect -
use \\[customize]."
:type 'boolean
:set (lambda (sym val)
(if (set sym val)
(progn
(define-key global-map "\C-x\C-j" 'dired-jump)
(define-key global-map "\C-x4\C-j" 'dired-jump-other-window))
(if (eq 'dired-jump (lookup-key global-map "\C-x\C-j"))
(define-key global-map "\C-x\C-j" nil))
(if (eq 'dired-jump-other-window (lookup-key global-map "\C-x4\C-j"))
(define-key global-map "\C-x4\C-j" nil))))
:group 'dired-keys)
(defcustom dired-bind-man t
"Non-nil means bind `dired-man' to \"N\" in dired-mode, otherwise do not."
"Non-nil means bind `dired-man' to \"N\" in dired-mode, otherwise do not.
Setting this variable directly after dired-x is loaded has no effect -
use \\[customize]."
:type 'boolean
:set (lambda (sym val)
(if (set sym val)
(define-key dired-mode-map "N" 'dired-man)
(if (eq 'dired-man (lookup-key dired-mode-map "N"))
(define-key dired-mode-map "N" nil))))
:group 'dired-keys)
(defcustom dired-bind-info t
"Non-nil means bind `dired-info' to \"I\" in dired-mode, otherwise do not."
"Non-nil means bind `dired-info' to \"I\" in dired-mode, otherwise do not.
Setting this variable directly after dired-x is loaded has no effect -
use \\[customize]."
:type 'boolean
:set (lambda (sym val)
(if (set sym val)
(define-key dired-mode-map "I" 'dired-info)
(if (eq 'dired-info (lookup-key dired-mode-map "I"))
(define-key dired-mode-map "I" nil))))
:group 'dired-keys)
(defcustom dired-vm-read-only-folders nil
"If non-nil, \\[dired-vm] will visit all folders read-only.
If neither nil nor t, e.g. the symbol `if-file-read-only', only
files not writable by you are visited read-only.
Read-only folders only work in VM 5, not in VM 4."
files not writable by you are visited read-only."
:type '(choice (const :tag "off" nil)
(const :tag "on" t)
(other :tag "non-writable only" if-file-read-only))
@ -181,13 +203,20 @@ listing a directory. See also `dired-local-variables-file'."
:type 'boolean
:group 'dired-x)
(defcustom dired-guess-shell-gnutar (when (or (eq system-type 'gnu)
(eq system-type 'gnu/linux))
"tar")
(defcustom dired-guess-shell-gnutar
(catch 'found
(dolist (exe '("tar" "gtar"))
(if (with-temp-buffer
(ignore-errors (call-process exe nil t nil "--version"))
(and (re-search-backward "GNU tar" nil t) t))
(throw 'found exe))))
"If non-nil, name of GNU tar executable.
\(E.g., \"tar\" or \"gtar\"). The `z' switch will be used with it for
compressed or gzip'ed tar files. If you don't have GNU tar, set this
to nil: a pipe using `zcat' or `gunzip -c' will be used."
;; Changed from system-type test to testing --version output.
;; Maybe test --help for -z instead?
:version "24.1"
:type '(choice (const :tag "Not GNU tar" nil)
(string :tag "Command name"))
:group 'dired-x)
@ -216,19 +245,12 @@ to nil: a pipe using `zcat' or `gunzip -c' will be used."
(define-key dired-mode-map "*(" 'dired-mark-sexp)
(define-key dired-mode-map "*." 'dired-mark-extension)
(define-key dired-mode-map "\M-!" 'dired-smart-shell-command)
(define-key dired-mode-map "w" 'dired-copy-filename-as-kill)
(define-key dired-mode-map "\M-G" 'dired-goto-subdir)
(define-key dired-mode-map "F" 'dired-do-find-marked-files)
(define-key dired-mode-map "Y" 'dired-do-relsymlink)
(define-key dired-mode-map "%Y" 'dired-do-relsymlink-regexp)
(define-key dired-mode-map "V" 'dired-do-run-mail)
(if dired-bind-man
(define-key dired-mode-map "N" 'dired-man))
(if dired-bind-info
(define-key dired-mode-map "I" 'dired-info))
;;; MENU BINDINGS
(require 'easymenu)
@ -270,11 +292,6 @@ matching regexp"]
files"]
"Refresh"))
;;; GLOBAL BINDING.
(when dired-bind-jump
(define-key global-map "\C-x\C-j" 'dired-jump)
(define-key global-map "\C-x4\C-j" 'dired-jump-other-window))
;; Install into appropriate hooks.
@ -290,31 +307,9 @@ files"]
\\[dired-do-find-marked-files]\t-- visit all marked files simultaneously
\\[dired-omit-mode]\t-- toggle omitting of files
\\[dired-mark-sexp]\t-- mark by Lisp expression
\\[dired-copy-filename-as-kill]\t-- copy the file or subdir names into the kill ring;
\t you can feed it to other commands using \\[yank]
For more features, see variables
`dired-bind-vm'
`dired-bind-jump'
`dired-bind-info'
`dired-bind-man'
`dired-vm-read-only-folders'
`dired-omit-mode'
`dired-omit-files'
`dired-omit-extensions'
`dired-omit-size-limit'
`dired-find-subdir'
`dired-enable-local-variables'
`dired-local-variables-file'
`dired-guess-shell-gnutar'
`dired-guess-shell-gzip-quiet'
`dired-guess-shell-znew-switches'
`dired-guess-shell-alist-user'
`dired-clean-up-buffers-too'
See also functions
To see the options you can set, use M-x customize-group RET dired-x RET.
See also the functions:
`dired-flag-extension'
`dired-virtual'
`dired-jump'
@ -324,7 +319,6 @@ See also functions
`dired-info'
`dired-do-find-marked-files'"
(interactive)
;; These must be done in each new dired buffer.
(dired-hack-local-variables)
(dired-omit-startup))
@ -339,28 +333,21 @@ Remove expanded subdir of deleted dir, if any."
(save-excursion (and (cdr dired-subdir-alist)
(dired-goto-subdir fn)
(dired-kill-subdir)))
;; Offer to kill buffer of deleted file FN.
(if dired-clean-up-buffers-too
(progn
(let ((buf (get-file-buffer fn)))
(and buf
(funcall (function y-or-n-p)
(format "Kill buffer of %s, too? "
(file-name-nondirectory fn)))
(save-excursion ; you never know where kill-buffer leaves you
(kill-buffer buf))))
(let ((buf-list (dired-buffers-for-dir (expand-file-name fn)))
(buf nil))
(and buf-list
(y-or-n-p (format "Kill dired buffer%s of %s, too? "
(dired-plural-s (length buf-list))
(file-name-nondirectory fn)))
(while buf-list
(save-excursion (kill-buffer (car buf-list)))
(setq buf-list (cdr buf-list)))))))
;; Anything else?
)
(when dired-clean-up-buffers-too
(let ((buf (get-file-buffer fn)))
(and buf
(funcall (function y-or-n-p)
(format "Kill buffer of %s, too? "
(file-name-nondirectory fn)))
(kill-buffer buf)))
(let ((buf-list (dired-buffers-for-dir (expand-file-name fn))))
(and buf-list
(y-or-n-p (format "Kill dired buffer%s of %s, too? "
(dired-plural-s (length buf-list))
(file-name-nondirectory fn)))
(dolist (buf buf-list)
(kill-buffer buf))))))
;;; EXTENSION MARKING FUNCTIONS.
@ -460,11 +447,10 @@ move to its line in dired."
(progn
(setq dir (dired-current-directory))
(dired-up-directory other-window)
(or (dired-goto-file dir)
(unless (dired-goto-file dir)
;; refresh and try again
(progn
(dired-insert-subdir (file-name-directory dir))
(dired-goto-file dir))))
(dired-insert-subdir (file-name-directory dir))
(dired-goto-file dir)))
(if other-window
(dired-other-window dir)
(dired dir))
@ -475,10 +461,9 @@ move to its line in dired."
(dired-insert-subdir (file-name-directory file))
(dired-goto-file file))
;; Toggle omitting, if it is on, and try again.
(if dired-omit-mode
(progn
(dired-omit-mode)
(dired-goto-file file))))))))
(when dired-omit-mode
(dired-omit-mode)
(dired-goto-file file)))))))
(defun dired-jump-other-window (&optional file-name)
"Like \\[dired-jump] (`dired-jump') but in other window."
@ -695,7 +680,7 @@ you can relist single subdirs using \\[dired-do-redisplay]."
(forward-line 1)
(and (looking-at "^ wildcard ")
(buffer-substring (match-end 0)
(progn (end-of-line) (point)))))))
(line-end-position))))))
(if wildcard
(setq dirname (expand-file-name wildcard default-directory))))
;; If raw ls listing (not a saved old dired buffer), give it a
@ -777,9 +762,12 @@ Also useful for `auto-mode-alist' like this:
;; mechanism is provided for special handling of the working directory in
;; special major modes.
(define-obsolete-variable-alias 'default-directory-alist
'dired-default-directory-alist "24.1")
;; It's easier to add to this alist than redefine function
;; default-directory while keeping the old information.
(defconst default-directory-alist
(defconst dired-default-directory-alist
'((dired-mode . (if (fboundp 'dired-current-directory)
(dired-current-directory)
default-directory)))
@ -789,8 +777,8 @@ nil is ignored in favor of `default-directory'.")
(defun dired-default-directory ()
"Usage like variable `default-directory'.
Knows about the special cases in variable `default-directory-alist'."
(or (eval (cdr (assq major-mode default-directory-alist)))
Knows about the special cases in variable `dired-default-directory-alist'."
(or (eval (cdr (assq major-mode dired-default-directory-alist)))
default-directory))
(defun dired-smart-shell-command (command &optional output-buffer error-buffer)
@ -1369,8 +1357,9 @@ NOSELECT the files are merely found but not selected."
(declare-function Man-getpage-in-background "man" (topic))
(defun dired-man ()
"Run man on this file. Display old buffer if buffer name matches filename.
Uses `man.el' of \\[manual-entry] fame."
"Run `man' on this file."
;; Used also to say: "Display old buffer if buffer name matches filename."
;; but I have no idea what that means.
(interactive)
(require 'man)
(let* ((file (dired-get-filename))
@ -1382,7 +1371,7 @@ Uses `man.el' of \\[manual-entry] fame."
;; Run Info on files.
(defun dired-info ()
"Run info on this file."
"Run `info' on this file."
(interactive)
(info (dired-get-filename)))
@ -1393,17 +1382,16 @@ Uses `man.el' of \\[manual-entry] fame."
(defun dired-vm (&optional read-only)
"Run VM on this file.
With prefix arg, visit folder read-only (this requires at least VM 5).
See also variable `dired-vm-read-only-folders'."
With optional prefix argument, visits the folder read-only.
Otherwise obeys the value of `dired-vm-read-only-folders'."
(interactive "P")
(let ((dir (dired-current-directory))
(fil (dired-get-filename)))
;; take care to supply 2nd arg only if requested - may still run VM 4!
(cond (read-only (vm-visit-folder fil t))
((eq t dired-vm-read-only-folders) (vm-visit-folder fil t))
((null dired-vm-read-only-folders) (vm-visit-folder fil))
(t (vm-visit-folder fil (not (file-writable-p fil)))))
;; so that pressing `v' inside VM does prompt within current directory:
(vm-visit-folder fil (or read-only
(eq t dired-vm-read-only-folders)
(and dired-vm-read-only-folders
(not (file-writable-p fil)))))
;; So that pressing `v' inside VM does prompt within current directory:
(set (make-local-variable 'vm-folder-directory) dir)))
(defun dired-rmail ()
@ -1412,7 +1400,7 @@ See also variable `dired-vm-read-only-folders'."
(rmail (dired-get-filename)))
(defun dired-do-run-mail ()
"If `dired-bind-vm' is t, then function `dired-vm', otherwise `dired-rmail'."
"If `dired-bind-vm' is non-nil, call `dired-vm', else call `dired-rmail'."
(interactive)
(if dired-bind-vm
;; Read mail folder using vm.
@ -1450,16 +1438,11 @@ See also variable `dired-vm-read-only-folders'."
;; This should be a builtin
(defun dired-buffer-more-recently-used-p (buffer1 buffer2)
"Return t if BUFFER1 is more recently used than BUFFER2."
(if (equal buffer1 buffer2)
nil
(let ((more-recent nil)
(list (buffer-list)))
(while (and list
(not (setq more-recent (equal buffer1 (car list))))
(not (equal buffer2 (car list))))
(setq list (cdr list)))
more-recent)))
"Return t if BUFFER1 is more recently used than BUFFER2.
Considers buffers closer to the car of `buffer-list' to be more recent."
(and (not (equal buffer1 buffer2))
(memq buffer1 (buffer-list))
(not (memq buffer1 (memq buffer2 (buffer-list))))))
;; Same thing as `dired-buffers-for-dir' of dired.el? - lrd 11/23/93
;; (defun dired-buffers-for-dir-exact (dir)
@ -1559,7 +1542,7 @@ to mark all zero length files."
(forward-char mode-len)
(setq nlink (read (current-buffer)))
;; Karsten Wenger <kw@cis.uni-muenchen.de> fixed uid.
(setq uid (buffer-substring (+ (point) 1)
(setq uid (buffer-substring (1+ (point))
(progn (forward-word 1) (point))))
(re-search-forward directory-listing-before-filename-regexp)
(goto-char (match-beginning 1))
@ -1649,7 +1632,7 @@ Identical to `find-file' except when called interactively, with a prefix arg
\(e.g., \\[universal-argument]\), in which case it guesses filename near point.
Useful for editing file mentioned in buffer you are viewing,
or to test if that file exists. Use minibuffer after snatching filename."
(interactive (list (read-filename-at-point "Find file: ")))
(interactive (list (dired-x-read-filename-at-point "Find file: ")))
(find-file (expand-file-name filename)))
(defun dired-x-find-file-other-window (filename)
@ -1661,52 +1644,43 @@ Identical to `find-file-other-window' except when called interactively, with
a prefix arg \(e.g., \\[universal-argument]\), in which case it guesses filename near point.
Useful for editing file mentioned in buffer you are viewing,
or to test if that file exists. Use minibuffer after snatching filename."
(interactive (list (read-filename-at-point "Find file: ")))
(interactive (list (dired-x-read-filename-at-point "Find file: ")))
(find-file-other-window (expand-file-name filename)))
;;; Internal functions.
;; Fixme: This should probably use `thing-at-point'. -- fx
(defun dired-filename-at-point ()
"Get the filename closest to point, but do not change position.
Has a preference for looking backward when not directly on a symbol.
Not perfect - point must be in middle of or end of filename."
"Return the filename closest to point, expanded.
Point should be in or after a filename."
(let ((filename-chars "-.[:alnum:]_/:$+@")
start end filename prefix)
(save-excursion
;; First see if just past a filename.
(if (not (eobp))
(if (looking-at "[] \t\n[{}()]") ; whitespace or some parens
(progn
(skip-chars-backward " \n\t\r({[]})")
(if (not (bobp))
(backward-char 1)))))
(if (string-match (concat "[" filename-chars "]")
(char-to-string (following-char)))
(or (eobp) ; why?
(when (looking-at "[] \t\n[{}()]") ; whitespace or some parens
(skip-chars-backward " \n\t\r({[]})")
(or (bobp) (backward-char 1))))
(if (looking-at (format "[%s]" filename-chars))
(progn
(if (re-search-backward (concat "[^" filename-chars "]") nil t)
(forward-char)
(goto-char (point-min)))
(setq start (point))
(setq prefix
(skip-chars-backward filename-chars)
(setq start (point)
prefix
;; This is something to do with ange-ftp filenames.
;; It convert foo@bar to /foo@bar.
;; But when does the former occur in dired buffers?
(and (string-match
"^\\w+@"
(buffer-substring start (line-beginning-position)))
(buffer-substring start (line-end-position)))
"/"))
(goto-char start)
(if (string-match "[/~]" (char-to-string (preceding-char)))
(setq start (1- start)))
(re-search-forward (concat "\\=[" filename-chars "]*") nil t))
(skip-chars-forward filename-chars))
(error "No file found around point!"))
;; Return string.
(expand-file-name (concat prefix (buffer-substring start (point)))))))
(defun read-filename-at-point (prompt)
(defun dired-x-read-filename-at-point (prompt)
"Return filename prompting with PROMPT with completion.
If `current-prefix-arg' is non-nil, uses name at point as guess."
(if current-prefix-arg
@ -1716,6 +1690,9 @@ If `current-prefix-arg' is non-nil, uses name at point as guess."
guess
nil (file-name-nondirectory guess)))
(read-file-name prompt default-directory)))
(define-obsolete-function-alias 'read-filename-at-point
'dired-x-read-filename-at-point "24.1") ; is this even needed?
;;; BUG REPORTS

View file

@ -4029,7 +4029,7 @@ true then the type of the file linked to by FILE is printed instead.
;;;***
;;;### (autoloads (dired-do-relsymlink dired-jump) "dired-x" "dired-x.el"
;;;;;; "d35468f85920d324895b0c04bb703328")
;;;;;; "a2af6147cf06b53166d9e1a3bb200675")
;;; Generated autoloads from dired-x.el
(autoload 'dired-jump "dired-x" "\

View file

@ -1877,6 +1877,7 @@ BUFFER-NAME, if non-nil, is the buffer name to use."
(let ((inhibit-read-only t))
(buffer-disable-undo)
(erase-buffer)
(ert-results-mode)
;; Erase buffer again in case switching out of the previous
;; mode inserted anything. (This happens e.g. when switching
;; from ert-results-mode to ert-results-mode when
@ -1895,9 +1896,8 @@ BUFFER-NAME, if non-nil, is the buffer name to use."
(ewoc-enter-last ewoc
(make-ert--ewoc-entry :test test :hidden-p t)))
(ert--results-update-ewoc-hf ert--results-ewoc ert--results-stats)
(goto-char (1- (point-max)))))
(ert-results-mode)
buffer)))
(goto-char (1- (point-max)))
buffer)))))
(defvar ert--selector-history nil
@ -2343,6 +2343,7 @@ To be used in the ERT results buffer."
(let ((inhibit-read-only t))
(buffer-disable-undo)
(erase-buffer)
(ert-simple-view-mode)
;; Use unibyte because `debugger-setup-buffer' also does so.
(set-buffer-multibyte nil)
(setq truncate-lines t)
@ -2351,8 +2352,7 @@ To be used in the ERT results buffer."
(goto-char (point-min))
(insert "Backtrace for test `")
(ert-insert-test-name-button (ert-test-name test))
(insert "':\n")
(ert-simple-view-mode)))))))
(insert "':\n")))))))
(defun ert-results-pop-to-messages-for-test-at-point ()
"Display the part of the *Messages* buffer generated during the test at point.
@ -2368,12 +2368,12 @@ To be used in the ERT results buffer."
(let ((inhibit-read-only t))
(buffer-disable-undo)
(erase-buffer)
(ert-simple-view-mode)
(insert (ert-test-result-messages result))
(goto-char (point-min))
(insert "Messages for test `")
(ert-insert-test-name-button (ert-test-name test))
(insert "':\n")
(ert-simple-view-mode)))))
(insert "':\n")))))
(defun ert-results-pop-to-should-forms-for-test-at-point ()
"Display the list of `should' forms executed during the test at point.
@ -2389,6 +2389,7 @@ To be used in the ERT results buffer."
(let ((inhibit-read-only t))
(buffer-disable-undo)
(erase-buffer)
(ert-simple-view-mode)
(if (null (ert-test-result-should-forms result))
(insert "\n(No should forms during this test.)\n")
(loop for form-description in (ert-test-result-should-forms result)
@ -2406,8 +2407,7 @@ To be used in the ERT results buffer."
(insert (concat "(Values are shallow copies and may have "
"looked different during the test if they\n"
"have been modified destructively.)\n"))
(forward-line 1)
(ert-simple-view-mode)))))
(forward-line 1)))))
(defun ert-results-toggle-printer-limits-for-test-at-point ()
"Toggle how much of the condition to print for the test at point.
@ -2442,6 +2442,7 @@ To be used in the ERT results buffer."
(let ((inhibit-read-only t))
(buffer-disable-undo)
(erase-buffer)
(ert-simple-view-mode)
(if (null data)
(insert "(No data)\n")
(insert (format "%-3s %8s %8s\n" "" "time" "cumul"))
@ -2454,8 +2455,7 @@ To be used in the ERT results buffer."
(insert "\n"))))
(goto-char (point-min))
(insert "Tests by run time (seconds):\n\n")
(forward-line 1)
(ert-simple-view-mode))))
(forward-line 1))))
;;;###autoload
(defun ert-describe-test (test-or-test-name)

View file

@ -61,6 +61,8 @@ UPatterns can take the following forms:
`QPAT matches if the QPattern QPAT matches.
(pred PRED) matches if PRED applied to the object returns non-nil.
(guard BOOLEXP) matches if BOOLEXP evaluates to non-nil.
If a SYMBOL is used twice in the same pattern (i.e. the pattern is
\"non-linear\"), then the second occurrence is turned into an `eq'uality test.
QPatterns can take the following forms:
(QPAT1 . QPAT2) matches if QPAT1 matches the car and QPAT2 the cdr.
@ -457,7 +459,12 @@ and otherwise defers to REST which is a list of branches of the form
(pcase--u1 matches code vars then-rest)
(pcase--u else-rest))))
((symbolp upat)
(pcase--u1 matches code (cons (cons upat sym) vars) rest))
(if (not (assq upat vars))
(pcase--u1 matches code (cons (cons upat sym) vars) rest)
;; Non-linear pattern. Turn it into an `eq' test.
(pcase--u1 (cons `(match ,sym . (pred (eq ,(cdr (assq upat vars)))))
matches)
code vars rest)))
((eq (car-safe upat) '\`)
(pcase--q1 sym (cadr upat) matches code vars rest))
((eq (car-safe upat) 'or)

View file

@ -1,3 +1,81 @@
2011-02-18 Lars Ingebrigtsen <larsi@gnus.org>
* auth-source.el (auth-source-search): Don't try to create credentials
if the caller doesn't want that.
* nnimap.el (nnimap-log-command): Add a newline to the inhibited
logging.
(nnimap-credentials): Protect against auth-source-search returning nil.
(nnimap-request-list): Protect against not being able to open the
server.
2011-02-17 Lars Ingebrigtsen <larsi@gnus.org>
* auth-source.el (auth-source-search): Do a two-phase search, one with
no :create to get the responses from all backends.
* nnimap.el (nnimap-open-connection-1): Delete duplicate server names
when getting credentials.
* gnus-util.el (gnus-delete-duplicates): New function.
2011-02-17 Teodor Zlatanov <tzz@lifelogs.com>
* nnimap.el (nnimap-credentials): Instead of picking the first port as
a creation default, pass the whole port list down. It will be
completed.
* auth-source.el (auth-source-search): Updated docs to talk about
multiple creation choices.
(auth-source-netrc-create): Accept a list as a value (from the search
parameters) and do completion on that list. Keep a separate netrc line
with the password obscured for showing the user.
* nnimap.el (nnimap-open-connection-1): Make the `nnimap-address' the
first choice to `auth-source-search' so it will be used for entry
creation instead of the server's Gnus-specific name.
(nnimap-credentials): Rely on the auth-source library to select which
port is actually wanted in the new netrc entry, so don't override
`auth-source-creation-defaults'.
* auth-source.el (auth-source-netrc-parse): Use :port instead of
:protocol and accept a missing user, host, or port as a wildcard match.
(auth-source-debug): Default to off.
(auth-source-netrc-search, auth-source-netrc-create)
(auth-source-secrets-search, auth-source-secrets-create)
(auth-source-user-or-password, auth-source-backend, auth-sources)
(auth-source-backend-parse-parameters, auth-source-search): Use :port
instead of :protocol.
* nnimap.el (nnimap-credentials): Pass a port default to
`auth-source-search' in case an entry needs to be created.
(nnimap-open-connection-1): Use :port instead of :protocol.
2011-02-17 Katsumi Yamaoka <yamaoka@jpl.org>
* auth-source.el (auth-source-secrets-search): Use mm-delete-duplicates
instead of delete-dups that is not available in XEmacs 21.4.
2011-02-16 Lars Ingebrigtsen <larsi@gnus.org>
* gnus-sum.el (gnus-propagate-marks): Change default to t again, since
nil means that nnimap doesn't get updated.
2011-02-16 Teodor Zlatanov <tzz@lifelogs.com>
* auth-source.el (auth-source-netrc-create): Return a synthetic search
result when the user doesn't want to write to the file.
(auth-source-netrc-search): Expect a synthetic result and proceed
accordingly.
(auth-source-cache-expiry): New variable to override
`password-cache-expiry'.
(auth-source-remember): Use it.
* nnimap.el (nnimap-credentials): Remove the `inhibit-create'
parameter. Create entry if necessary by using :create t.
(nnimap-open-connection-1): Don't pass `inhibit-create'.
2011-02-15 Teodor Zlatanov <tzz@lifelogs.com>
* auth-source.el (auth-source-debug): Enable by default and don't

View file

@ -40,6 +40,7 @@
;;; Code:
(require 'password-cache)
(require 'mm-util)
(require 'gnus-util)
(require 'netrc)
(require 'assoc)
@ -61,6 +62,18 @@
:version "23.1" ;; No Gnus
:group 'gnus)
;;;###autoload
(defcustom auth-source-cache-expiry 7200
"How many seconds passwords are cached, or nil to disable
expiring. Overrides `password-cache-expiry' through a
let-binding."
:group 'auth-source
:type '(choice (const :tag "Never" nil)
(const :tag "All Day" 86400)
(const :tag "2 Hours" 7200)
(const :tag "30 Minutes" 1800)
(integer :tag "Seconds")))
(defclass auth-source-backend ()
((type :initarg :type
:initform 'netrc
@ -81,11 +94,11 @@
:type t
:custom string
:documentation "The backend user.")
(protocol :initarg :protocol
:initform t
:type t
:custom string
:documentation "The backend protocol.")
(port :initarg :port
:initform t
:type t
:custom string
:documentation "The backend protocol.")
(create-function :initarg :create-function
:initform ignore
:type function
@ -135,7 +148,7 @@
:version "23.2" ;; No Gnus
:type `boolean)
(defcustom auth-source-debug t
(defcustom auth-source-debug nil
"Whether auth-source should log debug messages.
If the value is nil, debug messages are not logged.
@ -200,7 +213,7 @@ can get pretty complex."
:tag "Regular expression")))
(list
:tag "Protocol"
(const :format "" :value :protocol)
(const :format "" :value :port)
(choice
:tag "Protocol"
(const :tag "Any" t)
@ -253,19 +266,19 @@ If the value is not a list, symmetric encryption will be used."
msg))
;; (auth-source-pick nil :host "any" :protocol 'imap :user "joe")
;; (auth-source-pick t :host "any" :protocol 'imap :user "joe")
;; (setq auth-sources '((:source (:secrets default) :host t :protocol t :user "joe")
;; (:source (:secrets "session") :host t :protocol t :user "joe")
;; (:source (:secrets "Login") :host t :protocol t)
;; (:source "~/.authinfo.gpg" :host t :protocol t)))
;; (auth-source-pick nil :host "any" :port 'imap :user "joe")
;; (auth-source-pick t :host "any" :port 'imap :user "joe")
;; (setq auth-sources '((:source (:secrets default) :host t :port t :user "joe")
;; (:source (:secrets "session") :host t :port t :user "joe")
;; (:source (:secrets "Login") :host t :port t)
;; (:source "~/.authinfo.gpg" :host t :port t)))
;; (setq auth-sources '((:source (:secrets default) :host t :protocol t :user "joe")
;; (:source (:secrets "session") :host t :protocol t :user "joe")
;; (:source (:secrets "Login") :host t :protocol t)
;; (setq auth-sources '((:source (:secrets default) :host t :port t :user "joe")
;; (:source (:secrets "session") :host t :port t :user "joe")
;; (:source (:secrets "Login") :host t :port t)
;; ))
;; (setq auth-sources '((:source "~/.authinfo.gpg" :host t :protocol t)))
;; (setq auth-sources '((:source "~/.authinfo.gpg" :host t :port t)))
;; (auth-source-backend-parse "myfile.gpg")
;; (auth-source-backend-parse 'default)
@ -342,8 +355,8 @@ If the value is not a list, symmetric encryption will be used."
(defun auth-source-backend-parse-parameters (entry backend)
"Fills in the extra auth-source-backend parameters of ENTRY.
Using the plist ENTRY, get the :host, :protocol, and :user search
parameters. Accepts :port as an alias to :protocol."
Using the plist ENTRY, get the :host, :port, and :user search
parameters."
(let ((entry (if (stringp entry)
nil
entry))
@ -352,15 +365,14 @@ parameters. Accepts :port as an alias to :protocol."
(oset backend host val))
(when (setq val (plist-get entry :user))
(oset backend user val))
;; accept :port as an alias for :protocol
(when (setq val (or (plist-get entry :protocol) (plist-get entry :port)))
(oset backend protocol val)))
(when (setq val (plist-get entry :port))
(oset backend port val)))
backend)
;; (mapcar 'auth-source-backend-parse auth-sources)
(defun* auth-source-search (&rest spec
&key type max host user protocol secret
&key type max host user port secret
create delete
&allow-other-keys)
"Search or modify authentication backends according to SPEC.
@ -373,7 +385,7 @@ other properties will always hold scalar values.
Typically the :secret property, if present, contains a password.
Common search keys are :max, :host, :protocol, and :user. In
Common search keys are :max, :host, :port, and :user. In
addition, :create specifies how tokens will be or created.
Finally, :type can specify which backend types you want to check.
@ -387,7 +399,7 @@ any of the search terms matches).
A new token will be created if no matching tokens were found.
The new token will have only the keys the backend requires. For
the netrc backend, for instance, that's the user, host, and
protocol keys.
port keys.
Here's an example:
@ -403,11 +415,11 @@ which says:
'netrc', maximum one result.
Create a new entry if you found none. The netrc backend will
automatically require host, user, and protocol. The host will be
automatically require host, user, and port. The host will be
'mine'. We prompt for the user with default 'defaultUser' and
for the protocol without a default. We will not prompt for A, Q,
for the port without a default. We will not prompt for A, Q,
or P. The resulting token will only have keys user, host, and
protocol.\"
port.\"
:create '(A B C) also means to create a token if possible.
@ -432,17 +444,17 @@ which says:
or 'twosuch' in backends of type 'netrc', maximum one result.
Create a new entry if you found none. The netrc backend will
automatically require host, user, and protocol. The host will be
automatically require host, user, and port. The host will be
'nonesuch' and Q will be 'qqqq'. We prompt for A with default
'default A', for B and protocol with default nil, and for the
'default A', for B and port with default nil, and for the
user with default 'defaultUser'. We will not prompt for Q. The
resulting token will have keys user, host, protocol, A, B, and Q.
resulting token will have keys user, host, port, A, B, and Q.
It will not have P with any value, even though P is used in the
search to find only entries that have P set to 'pppp'.\"
When multiple values are specified in the search parameter, the
first one is used for creation. So :host (X Y Z) would create a
token for host X, for instance.
user is prompted for which one. So :host (X Y Z) would ask the
user to choose between X, Y, and Z.
This creation can fail if the search was not specific enough to
create a new token (it's up to the backend to decide that). You
@ -468,14 +480,14 @@ the match rules above. Defaults to t.
:user (X Y Z) means to match only users X, Y, or Z according to
the match rules above. Defaults to t.
:protocol (P Q R) means to match only protocols P, Q, or R.
:port (P Q R) means to match only protocols P, Q, or R.
Defaults to t.
:K (V1 V2 V3) for any other key K will match values V1, V2, or
V3 (note the match rules above).
The return value is a list with at most :max tokens. Each token
is a plist with keys :backend :host :protocol :user, plus any other
is a plist with keys :backend :host :port :user, plus any other
keys provided by the backend (notably :secret). But note the
exception for :max 0, which see above.
@ -488,7 +500,7 @@ must call it to obtain the actual value."
unless (memq (nth i spec) ignored-keys)
collect (nth i spec)))
(found (auth-source-recall spec))
filtered-backends accessor-key found-here goal)
filtered-backends accessor-key found-here goal matches)
(if (and found auth-source-do-cache)
(auth-source-do-debug
@ -517,38 +529,58 @@ must call it to obtain the actual value."
;; (debug spec "filtered" filtered-backends)
(setq goal max)
(dolist (backend filtered-backends)
(setq found-here (apply
(slot-value backend 'search-function)
:backend backend
:create create
:delete delete
spec))
;; First go through all the backends without :create, so we can
;; query them all.
(let ((uspec (copy-sequence spec)))
(plist-put uspec :create nil)
(dolist (backend filtered-backends)
(let ((match (apply
(slot-value backend 'search-function)
:backend backend
uspec)))
(when match
(push (list backend match) matches)))))
;; If we didn't find anything, then we allow the backend(s) to
;; create the entries.
(when (and create
(not matches))
(let ((match (apply
(slot-value backend 'search-function)
:backend backend
:create create
:delete delete
spec)))
(when match
(push (list backend match) matches))))
;; if max is 0, as soon as we find something, return it
(when (and (zerop max) (> 0 (length found-here)))
(return t))
(setq backend (caar matches)
found-here (cadar matches))
;; decrement the goal by the number of new results
(decf goal (length found-here))
;; and append the new results to the full list
(setq found (append found found-here))
(block nil
;; if max is 0, as soon as we find something, return it
(when (and (zerop max) (> 0 (length found-here)))
(return t))
(auth-source-do-debug
"auth-source-search: found %d results (max %d/%d) in %S matching %S"
(length found-here) max goal backend spec)
;; decrement the goal by the number of new results
(decf goal (length found-here))
;; and append the new results to the full list
(setq found (append found found-here))
;; return full list if the goal is 0 or negative
(when (zerop (max 0 goal))
(return found))
(auth-source-do-debug
"auth-source-search: found %d results (max %d/%d) in %S matching %S"
(length found-here) max goal backend spec)
;; change the :max parameter in the spec to the goal
(setq spec (plist-put spec :max goal)))
;; return full list if the goal is 0 or negative
(when (zerop (max 0 goal))
(return found))
(when (and found auth-source-do-cache)
(auth-source-remember spec found)))
;; change the :max parameter in the spec to the goal
(setq spec (plist-put spec :max goal))
found))
(when (and found auth-source-do-cache)
(auth-source-remember spec found))))
found))
;;; (auth-source-search :max 1)
;;; (funcall (plist-get (nth 0 (auth-source-search :max 1)) :secret))
@ -588,8 +620,9 @@ Returns the deleted entries."
(defun auth-source-remember (spec found)
"Remember FOUND search results for SPEC."
(password-cache-add
(concat auth-source-magic (format "%S" spec)) found))
(let ((password-cache-expiry auth-source-cache-expiry))
(password-cache-add
(concat auth-source-magic (format "%S" spec)) found)))
(defun auth-source-recall (spec)
"Recall FOUND search results for SPEC."
@ -648,7 +681,7 @@ while \(:host t) would find all host entries."
;;; (auth-source-netrc-parse "~/.authinfo.gpg")
(defun* auth-source-netrc-parse (&rest
spec
&key file max host user protocol delete
&key file max host user port delete
&allow-other-keys)
"Parse FILE and return a list of all entries in the file.
Note that the MAX parameter is used so we can exit the parse early."
@ -710,18 +743,21 @@ Note that the MAX parameter is used so we can exit the parse early."
host
(or
(aget alist "machine")
(aget alist "host")))
(aget alist "host")
t))
(auth-source-search-collection
user
(or
(aget alist "login")
(aget alist "account")
(aget alist "user")))
(aget alist "user")
t))
(auth-source-search-collection
protocol
port
(or
(aget alist "port")
(aget alist "protocol"))))
(aget alist "protocol")
t)))
(decf max)
(push (nreverse alist) result)
;; to delete a line, we just comment it out
@ -787,7 +823,7 @@ Note that the MAX parameter is used so we can exit the parse early."
(defun* auth-source-netrc-search (&rest
spec
&key backend create delete
type max host user protocol
type max host user port
&allow-other-keys)
"Given a property list SPEC, return search matches from the :backend.
See `auth-source-search' for details on SPEC."
@ -802,20 +838,23 @@ See `auth-source-search' for details on SPEC."
:file (oref backend source)
:host (or host t)
:user (or user t)
:protocol (or protocol t)))))
:port (or port t)))))
;; if we need to create an entry AND none were found to match
(when (and create
(= 0 (length results)))
;; create based on the spec
(apply (slot-value backend 'create-function) spec)
;; turn off the :create key
(setq spec (plist-put spec :create nil))
;; run the search again to get the updated data
;; the result will be returned, even if the search fails
(setq results (apply 'auth-source-netrc-search spec)))
;; create based on the spec and record the value
(setq results (or
;; if the user did not want to create the entry
;; in the file, it will be returned
(apply (slot-value backend 'create-function) spec)
;; if not, we do the search again without :create
;; to get the updated data.
;; the result will be returned, even if the search fails
(apply 'auth-source-netrc-search
(plist-put spec :create nil)))))
results))
;;; (auth-source-search :host "nonesuch" :type 'netrc :max 1 :create t)
@ -823,26 +862,33 @@ See `auth-source-search' for details on SPEC."
(defun* auth-source-netrc-create (&rest spec
&key backend
secret host user protocol create
secret host user port create
&allow-other-keys)
(let* ((base-required '(host user protocol secret))
(let* ((base-required '(host user port secret))
;; we know (because of an assertion in auth-source-search) that the
;; :create parameter is either t or a list (which includes nil)
(create-extra (if (eq t create) nil create))
(required (append base-required create-extra))
(file (oref backend source))
(add "")
(show "")
;; `valist' is an alist
valist)
valist
;; `artificial' will be returned if no creation is needed
artificial)
;; only for base required elements (defined as function parameters):
;; fill in the valist with whatever data we may have from the search
;; we take the first value if it's a list, the whole value otherwise
;; we complete the first value if it's a list and use the value otherwise
(dolist (br base-required)
(when (symbol-value br)
(aput 'valist br (if (listp (symbol-value br))
(nth 0 (symbol-value br))
(symbol-value br)))))
(let ((br-choice (cond
;; all-accepting choice (predicate is t)
((eq t (symbol-value br)) nil)
;; just the value otherwise
(t (symbol-value br)))))
(when br-choice
(aput 'valist br br-choice)))))
;; for extra required elements, see if the spec includes a value for them
(dolist (er create-extra)
@ -862,7 +908,7 @@ See `auth-source-search' for details on SPEC."
((and (not given-default) (eq r 'user))
(user-login-name))
;; note we need this empty string
((and (not given-default) (eq r 'protocol))
((and (not given-default) (eq r 'port))
"")
(t given-default)))
;; the prompt's default string depends on the data so far
@ -872,20 +918,22 @@ See `auth-source-search' for details on SPEC."
;; the prompt should also show what's entered so far
(user-value (aget valist 'user))
(host-value (aget valist 'host))
(protocol-value (aget valist 'protocol))
(port-value (aget valist 'port))
;; note this handles lists by just printing them
;; later we allow the user to use completing-read to pick
(info-so-far (concat (if user-value
(format "%s@" user-value)
"[USER?]")
(if host-value
(format "%s" host-value)
"[HOST?]")
(if protocol-value
(if port-value
;; this distinguishes protocol between
(if (zerop (length protocol-value))
(if (zerop (length port-value))
"" ; 'entered as "no default"' vs.
(format ":%s" protocol-value)) ; given
(format ":%s" port-value)) ; given
;; and this is when the protocol is unknown
"[PROTOCOL?]"))))
"[PORT?]"))))
;; now prompt if the search SPEC did not include a required key;
;; take the result and put it in `data' AND store it in `valist'
@ -900,25 +948,48 @@ See `auth-source-search' for details on SPEC."
(format "Enter %s for %s%s: "
r info-so-far default-string)
nil nil default))
((listp data)
(completing-read
(format "Enter %s for %s (TAB to see the choices): "
r info-so-far)
data
nil ; no predicate
t ; require a match
;; note the default is nil, but if the user
;; hits RET we'll get "", which is handled OK later
nil))
(t data))))
(when data
(setq artificial (plist-put artificial
(intern (concat ":" (symbol-name r)))
(if (eq r 'secret)
(lexical-let ((data data))
(lambda () data))
data))))
;; when r is not an empty string...
(when (and (stringp data)
(< 0 (length data)))
;; append the key (the symbol name of r) and the value in r
(setq add (concat add
(format "%s%s %S"
;; prepend a space
(if (zerop (length add)) "" " ")
;; remap auth-source tokens to netrc
(case r
(let ((printer (lambda (hide)
;; append the key (the symbol name of r)
;; and the value in r
(format "%s%s %S"
;; prepend a space
(if (zerop (length add)) "" " ")
;; remap auth-source tokens to netrc
(case r
('user "login")
('host "machine")
('secret "password")
('protocol "port")
('port "port") ; redundant but clearer
(t (symbol-name r)))
;; the value will be printed in %S format
data))))))
;; the value will be printed in %S format
(if (and hide (eq r 'secret))
"HIDDEN_SECRET"
data)))))
(setq add (concat add (funcall printer nil)))
(setq show (concat show (funcall printer t)))))))
(with-temp-buffer
(when (file-exists-p file)
@ -935,14 +1006,17 @@ See `auth-source-search' for details on SPEC."
(goto-char (point-max))
;; ask AFTER we've successfully opened the file
(when (y-or-n-p (format "Add to file %s: line [%s]" file add))
(unless (bolp)
(insert "\n"))
(insert add "\n")
(write-region (point-min) (point-max) file nil 'silent)
(auth-source-do-debug
"auth-source-netrc-create: wrote 1 new line to %s"
file)))))
(if (y-or-n-p (format "Add to file %s: line [%s]" file show))
(progn
(unless (bolp)
(insert "\n"))
(insert add "\n")
(write-region (point-min) (point-max) file nil 'silent)
(auth-source-do-debug
"auth-source-netrc-create: wrote 1 new line to %s"
file)
nil)
(list artificial)))))
;;; Backend specific parsing: Secrets API backend
@ -956,7 +1030,7 @@ See `auth-source-search' for details on SPEC."
(defun* auth-source-secrets-search (&rest
spec
&key backend create delete label
type max host user protocol
type max host user port
&allow-other-keys)
"Search the Secrets API; spec is like `auth-source'.
@ -1012,10 +1086,10 @@ authentication tokens:
nil
(list k (plist-get spec k))))
search-keys)))
;; needed keys (always including host, login, protocol, and secret)
(returned-keys (delete-dups (append
'(:host :login :protocol :secret)
search-keys)))
;; needed keys (always including host, login, port, and secret)
(returned-keys (mm-delete-duplicates (append
'(:host :login :port :secret)
search-keys)))
(items (loop for item in (apply 'secrets-search-items coll search-spec)
unless (and (stringp label)
(not (string-match label item)))
@ -1051,7 +1125,7 @@ authentication tokens:
(defun* auth-source-secrets-create (&rest
spec
&key backend type max host user protocol
&key backend type max host user port
&allow-other-keys)
;; TODO
;; (apply 'secrets-create-item (auth-get-source entry) name passwd spec)
@ -1068,8 +1142,8 @@ authentication tokens:
'auth-source-forget "Emacs 24.1")
(defun auth-source-user-or-password
(mode host protocol &optional username create-missing delete-existing)
"Find MODE (string or list of strings) matching HOST and PROTOCOL.
(mode host port &optional username create-missing delete-existing)
"Find MODE (string or list of strings) matching HOST and PORT.
DEPRECATED in favor of `auth-source-search'!
@ -1092,14 +1166,14 @@ stored in the password database which matches best (see
MODE can be \"login\" or \"password\"."
(auth-source-do-debug
"auth-source-user-or-password: DEPRECATED get %s for %s (%s) + user=%s"
mode host protocol username)
mode host port username)
(let* ((listy (listp mode))
(mode (if listy mode (list mode)))
(cname (if username
(format "%s %s:%s %s" mode host protocol username)
(format "%s %s:%s" mode host protocol)))
(search (list :host host :protocol protocol))
(format "%s %s:%s %s" mode host port username)
(format "%s %s:%s" mode host port)))
(search (list :host host :port port))
(search (if username (append search (list :user username)) search))
(search (if create-missing
(append search (list :create t))
@ -1121,7 +1195,7 @@ MODE can be \"login\" or \"password\"."
(if (and (member "password" mode) t)
"SECRET"
found)
host protocol username)
host port username)
found) ; return the found data
;; else, if not found, search with a max of 1
(let ((choice (nth 0 (apply 'auth-source-search

View file

@ -1234,11 +1234,10 @@ For example: ((1 . cn-gb-2312) (2 . big5))."
:type 'boolean
:group 'gnus-summary-marks)
(defcustom gnus-propagate-marks nil
(defcustom gnus-propagate-marks t
"If non-nil, Gnus will store and retrieve marks from the backends.
This means that marks will be stored both in .newsrc.eld and in
the backend, and will slow operation down somewhat."
:version "24.1"
:type 'boolean
:group 'gnus-summary-marks)

View file

@ -871,6 +871,15 @@ Bind `print-quoted' and `print-readably' to t, and `print-length' and
(when (file-exists-p file)
(delete-file file)))
(defun gnus-delete-duplicates (list)
"Remove duplicate entries from LIST."
(let ((result nil))
(while list
(unless (member (car list) result)
(push (car list) result))
(pop list))
(nreverse result)))
(defun gnus-delete-directory (directory)
"Delete files in DIRECTORY. Subdirectories remain.
If there's no subdirectory, delete DIRECTORY as well."

View file

@ -276,18 +276,17 @@ textual parts.")
(push (current-buffer) nnimap-process-buffers)
(current-buffer)))
(defun nnimap-credentials (address ports &optional inhibit-create)
(let* ((found (nth 0 (auth-source-search :max 1
:host address
:port ports
:create (if inhibit-create
nil
(null ports)))))
(user (plist-get found :user))
(secret (plist-get found :secret))
(secret (if (functionp secret) (funcall secret) secret)))
(defun nnimap-credentials (address ports)
(let ((found (nth 0 (auth-source-search :max 1
:host address
:port ports
:create t))))
(if found
(list user secret)
(list (plist-get found :user)
(let ((secret (plist-get found :secret)))
(if (functionp secret)
(funcall secret)
secret)))
nil)))
(defun nnimap-keepalive ()
@ -386,10 +385,11 @@ textual parts.")
;; Look for the credentials based on
;; the virtual server name and the address
(nnimap-credentials
(list
(nnoo-current-server 'nnimap)
nnimap-address)
ports t))))
(gnus-delete-duplicates
(list
nnimap-address
(nnoo-current-server 'nnimap)))
ports))))
(setq nnimap-object nil)
(let ((nnimap-inhibit-logging t))
(setq login-result
@ -400,7 +400,7 @@ textual parts.")
(dolist (host (list (nnoo-current-server 'nnimap)
nnimap-address))
(dolist (port ports)
(auth-source-forget+ :host host :protocol port)))
(auth-source-forget+ :host host :port port)))
(delete-process (nnimap-process nnimap-object))
(setq nnimap-object nil))))
(when nnimap-object
@ -1075,60 +1075,62 @@ textual parts.")
(nreverse groups)))
(deffoo nnimap-request-list (&optional server)
(nnimap-possibly-change-group nil server)
(with-current-buffer nntp-server-buffer
(erase-buffer)
(let ((groups
(with-current-buffer (nnimap-buffer)
(nnimap-get-groups)))
sequences responses)
(when groups
(with-current-buffer (nnimap-buffer)
(setf (nnimap-group nnimap-object) nil)
(dolist (group groups)
(setf (nnimap-examined nnimap-object) group)
(push (list (nnimap-send-command "EXAMINE %S" (utf7-encode group t))
group)
sequences))
(nnimap-wait-for-response (caar sequences))
(setq responses
(nnimap-get-responses (mapcar #'car sequences))))
(dolist (response responses)
(let* ((sequence (car response))
(response (cadr response))
(group (cadr (assoc sequence sequences))))
(when (and group
(equal (caar response) "OK"))
(let ((uidnext (nnimap-find-parameter "UIDNEXT" response))
highest exists)
(dolist (elem response)
(when (equal (cadr elem) "EXISTS")
(setq exists (string-to-number (car elem)))))
(when uidnext
(setq highest (1- (string-to-number (car uidnext)))))
(cond
((null highest)
(insert (format "%S 0 1 y\n" (utf7-decode group t))))
((zerop exists)
;; Empty group.
(insert (format "%S %d %d y\n"
(utf7-decode group t) highest (1+ highest))))
(t
;; Return the widest possible range.
(insert (format "%S %d 1 y\n" (utf7-decode group t)
(or highest exists)))))))))
t))))
(when (nnimap-possibly-change-group nil server)
(with-current-buffer nntp-server-buffer
(erase-buffer)
(let ((groups
(with-current-buffer (nnimap-buffer)
(nnimap-get-groups)))
sequences responses)
(when groups
(with-current-buffer (nnimap-buffer)
(setf (nnimap-group nnimap-object) nil)
(dolist (group groups)
(setf (nnimap-examined nnimap-object) group)
(push (list (nnimap-send-command "EXAMINE %S"
(utf7-encode group t))
group)
sequences))
(nnimap-wait-for-response (caar sequences))
(setq responses
(nnimap-get-responses (mapcar #'car sequences))))
(dolist (response responses)
(let* ((sequence (car response))
(response (cadr response))
(group (cadr (assoc sequence sequences))))
(when (and group
(equal (caar response) "OK"))
(let ((uidnext (nnimap-find-parameter "UIDNEXT" response))
highest exists)
(dolist (elem response)
(when (equal (cadr elem) "EXISTS")
(setq exists (string-to-number (car elem)))))
(when uidnext
(setq highest (1- (string-to-number (car uidnext)))))
(cond
((null highest)
(insert (format "%S 0 1 y\n" (utf7-decode group t))))
((zerop exists)
;; Empty group.
(insert (format "%S %d %d y\n"
(utf7-decode group t)
highest (1+ highest))))
(t
;; Return the widest possible range.
(insert (format "%S %d 1 y\n" (utf7-decode group t)
(or highest exists)))))))))
t)))))
(deffoo nnimap-request-newgroups (date &optional server)
(nnimap-possibly-change-group nil server)
(with-current-buffer nntp-server-buffer
(erase-buffer)
(dolist (group (with-current-buffer (nnimap-buffer)
(nnimap-get-groups)))
(unless (assoc group nnimap-current-infos)
;; Insert dummy numbers here -- they don't matter.
(insert (format "%S 0 1 y\n" group))))
t))
(when (nnimap-possibly-change-group nil server)
(with-current-buffer nntp-server-buffer
(erase-buffer)
(dolist (group (with-current-buffer (nnimap-buffer)
(nnimap-get-groups)))
(unless (assoc group nnimap-current-infos)
;; Insert dummy numbers here -- they don't matter.
(insert (format "%S 0 1 y\n" group))))
t)))
(deffoo nnimap-retrieve-group-data-early (server infos)
(when (nnimap-possibly-change-group nil server)
@ -1589,7 +1591,7 @@ textual parts.")
(goto-char (point-max))
(insert (format-time-string "%H:%M:%S") " "
(if nnimap-inhibit-logging
"(inhibited)"
"(inhibited)\n"
command)))
command)

View file

@ -556,6 +556,11 @@ If ARG is non-nil, instead prompt for connection parameters."
`(with-current-buffer rcirc-server-buffer
,@body))
(defun rcirc-float-time ()
(if (featurep 'xemacs)
(time-to-seconds (current-time))
(float-time)))
(defun rcirc-keepalive ()
"Send keep alive pings to active rcirc processes.
Kill processes that have not received a server message since the
@ -567,10 +572,7 @@ last ping."
(rcirc-send-ctcp process
rcirc-nick
(format "KEEPALIVE %f"
(if (featurep 'xemacs)
(time-to-seconds
(current-time))
(float-time)))))))
(rcirc-float-time))))))
(rcirc-process-list))
;; no processes, clean up timer
(cancel-timer rcirc-keepalive-timer)
@ -578,10 +580,7 @@ last ping."
(defun rcirc-handler-ctcp-KEEPALIVE (process target sender message)
(with-rcirc-process-buffer process
(setq header-line-format (format "%f" (- (if (featurep 'xemacs)
(time-to-seconds
(current-time))
(float-time))
(setq header-line-format (format "%f" (- (rcirc-float-time)
(string-to-number message))))))
(defvar rcirc-debug-buffer " *rcirc debug*")
@ -2209,7 +2208,7 @@ With a prefix arg, prompt for new topic."
(defun rcirc-ctcp-sender-PING (process target request)
"Send a CTCP PING message to TARGET."
(let ((timestamp (format "%.0f" (float-time))))
(let ((timestamp (format "%.0f" (rcirc-float-time))))
(rcirc-send-ctcp process target "PING" timestamp)))
(defun rcirc-cmd-me (args &optional process target)

1741
lisp/net/soap-client.el Normal file

File diff suppressed because it is too large Load diff

357
lisp/net/soap-inspect.el Normal file
View file

@ -0,0 +1,357 @@
;;;; soap-inspect.el -- Interactive inspector for soap WSDL structures
;; Copyright (C) 2010-2011 Free Software Foundation, Inc.
;; Author: Alexandru Harsanyi (AlexHarsanyi@gmail.com)
;; Created: October 2010
;; Keywords: soap, web-services, comm, hypermedia
;; Homepage: http://code.google.com/p/emacs-soap-client
;; This file is part of GNU Emacs.
;; GNU Emacs is free software: you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.
;; GNU Emacs is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
;;; Commentary:
;;
;; This package provides an inspector for a WSDL document loaded with
;; `soap-load-wsdl' or `soap-load-wsdl-from-url'. To use it, evaluate:
;;
;; (soap-inspect *wsdl*)
;;
;; This will pop-up the inspector buffer. You can click on ports, operations
;; and types to explore the structure of the wsdl document.
;;
;;; Code:
(eval-when-compile (require 'cl))
(require 'soap-client)
;;; sample-value
(defun soap-sample-value (type)
"Provide a sample value for TYPE, a WSDL type.
A sample value is a LISP value which soap-client.el will accept
for encoding it using TYPE when making SOAP requests.
This is a generic function, depending on TYPE a specific function
will be called."
(let ((sample-value (get (aref type 0) 'soap-sample-value)))
(if sample-value
(funcall sample-value type)
(error "Cannot provide sample value for type %s" (aref type 0)))))
(defun soap-sample-value-for-basic-type (type)
"Provide a sample value for TYPE which is a basic type.
This is a specific function which should not be called directly,
use `soap-sample-value' instead."
(case (soap-basic-type-kind type)
(string "a string value")
(boolean t) ; could be nil as well
((long int) (random 4200))
;; TODO: we need better sample values for more types.
(t (format "%s" (soap-basic-type-kind type)))))
(defun soap-sample-value-for-seqence-type (type)
"Provide a sample value for TYPE which is a sequence type.
Values for sequence types are ALISTS of (slot-name . VALUE) for
each sequence element.
This is a specific function which should not be called directly,
use `soap-sample-value' instead."
(let ((sample-value nil))
(dolist (element (soap-sequence-type-elements type))
(push (cons (soap-sequence-element-name element)
(soap-sample-value (soap-sequence-element-type element)))
sample-value))
(when (soap-sequence-type-parent type)
(setq sample-value
(append (soap-sample-value (soap-sequence-type-parent type))
sample-value)))
sample-value))
(defun soap-sample-value-for-array-type (type)
"Provide a sample value for TYPE which is an array type.
Values for array types are LISP vectors of values which are
array's element type.
This is a specific function which should not be called directly,
use `soap-sample-value' instead."
(let* ((element-type (soap-array-type-element-type type))
(sample1 (soap-sample-value element-type))
(sample2 (soap-sample-value element-type)))
;; Our sample value is a vector of two elements, but any number of
;; elements are permissible
(vector sample1 sample2 '&etc)))
(defun soap-sample-value-for-message (message)
"Provide a sample value for a WSDL MESSAGE.
This is a specific function which should not be called directly,
use `soap-sample-value' instead."
;; NOTE: parameter order is not considered.
(let (sample-value)
(dolist (part (soap-message-parts message))
(push (cons (car part)
(soap-sample-value (cdr part)))
sample-value))
(nreverse sample-value)))
(progn
;; Install soap-sample-value methods for our types
(put (aref (make-soap-basic-type) 0) 'soap-sample-value
'soap-sample-value-for-basic-type)
(put (aref (make-soap-sequence-type) 0) 'soap-sample-value
'soap-sample-value-for-seqence-type)
(put (aref (make-soap-array-type) 0) 'soap-sample-value
'soap-sample-value-for-array-type)
(put (aref (make-soap-message) 0) 'soap-sample-value
'soap-sample-value-for-message) )
;;; soap-inspect
(defvar soap-inspect-previous-items nil
"A stack of previously inspected items in the *soap-inspect* buffer.
Used to implement the BACK button.")
(defvar soap-inspect-current-item nil
"The current item being inspected in the *soap-inspect* buffer.")
(progn
(make-variable-buffer-local 'soap-inspect-previous-items)
(make-variable-buffer-local 'soap-inspect-current-item))
(defun soap-inspect (element)
"Inspect a SOAP ELEMENT in the *soap-inspect* buffer.
The buffer is populated with information about ELEMENT with links
to its sub elements. If ELEMENT is the WSDL document itself, the
entire WSDL can be inspected."
(let ((inspect (get (aref element 0) 'soap-inspect)))
(unless inspect
(error "Soap-inspect: no inspector for element"))
(with-current-buffer (get-buffer-create "*soap-inspect*")
(setq buffer-read-only t)
(let ((inhibit-read-only t))
(erase-buffer)
(when soap-inspect-current-item
(push soap-inspect-current-item
soap-inspect-previous-items))
(setq soap-inspect-current-item element)
(funcall inspect element)
(unless (null soap-inspect-previous-items)
(insert "\n\n")
(insert-text-button
"[back]"
'type 'soap-client-describe-back-link
'item element)
(insert "\n"))
(goto-char (point-min))
(pop-to-buffer (current-buffer))))))
(define-button-type 'soap-client-describe-link
'face 'italic
'help-echo "mouse-2, RET: describe item"
'follow-link t
'action (lambda (button)
(let ((item (button-get button 'item)))
(soap-inspect item)))
'skip t)
(define-button-type 'soap-client-describe-back-link
'face 'italic
'help-echo "mouse-2, RET: browse the previous item"
'follow-link t
'action (lambda (button)
(let ((item (pop soap-inspect-previous-items)))
(when item
(setq soap-inspect-current-item nil)
(soap-inspect item))))
'skip t)
(defun soap-insert-describe-button (element)
"Insert a button to inspect ELEMENT when pressed."
(insert-text-button
(soap-element-fq-name element)
'type 'soap-client-describe-link
'item element))
(defun soap-inspect-basic-type (basic-type)
"Insert information about BASIC-TYPE into the current buffer."
(insert "Basic type: " (soap-element-fq-name basic-type))
(insert "\nSample value\n")
(pp (soap-sample-value basic-type) (current-buffer)))
(defun soap-inspect-sequence-type (sequence)
"Insert information about SEQUENCE into the current buffer."
(insert "Sequence type: " (soap-element-fq-name sequence) "\n")
(when (soap-sequence-type-parent sequence)
(insert "Parent: ")
(soap-insert-describe-button
(soap-sequence-type-parent sequence))
(insert "\n"))
(insert "Elements: \n")
(dolist (element (soap-sequence-type-elements sequence))
(insert "\t" (symbol-name (soap-sequence-element-name element))
"\t")
(soap-insert-describe-button
(soap-sequence-element-type element))
(when (soap-sequence-element-multiple? element)
(insert " multiple"))
(when (soap-sequence-element-nillable? element)
(insert " optional"))
(insert "\n"))
(insert "Sample value:\n")
(pp (soap-sample-value sequence) (current-buffer)))
(defun soap-inspect-array-type (array)
"Insert information about the ARRAY into the current buffer."
(insert "Array name: " (soap-element-fq-name array) "\n")
(insert "Element type: ")
(soap-insert-describe-button
(soap-array-type-element-type array))
(insert "\nSample value:\n")
(pp (soap-sample-value array) (current-buffer)))
(defun soap-inspect-message (message)
"Insert information about MESSAGE into the current buffer."
(insert "Message name: " (soap-element-fq-name message) "\n")
(insert "Parts:\n")
(dolist (part (soap-message-parts message))
(insert "\t" (symbol-name (car part))
" type: ")
(soap-insert-describe-button (cdr part))
(insert "\n")))
(defun soap-inspect-operation (operation)
"Insert information about OPERATION into the current buffer."
(insert "Operation name: " (soap-element-fq-name operation) "\n")
(let ((input (soap-operation-input operation)))
(insert "\tInput: " (symbol-name (car input)) " (" )
(soap-insert-describe-button (cdr input))
(insert ")\n"))
(let ((output (soap-operation-output operation)))
(insert "\tOutput: " (symbol-name (car output)) " (")
(soap-insert-describe-button (cdr output))
(insert ")\n"))
(insert "\n\nSample invocation:\n")
(let ((sample-message-value
(soap-sample-value (cdr (soap-operation-input operation))))
(funcall (list 'soap-invoke '*WSDL* "SomeService" (soap-element-name operation))))
(let ((sample-invocation
(append funcall (mapcar 'cdr sample-message-value))))
(pp sample-invocation (current-buffer)))))
(defun soap-inspect-port-type (port-type)
"Insert information about PORT-TYPE into the current buffer."
(insert "Port-type name: " (soap-element-fq-name port-type) "\n")
(insert "Operations:\n")
(loop for o being the hash-values of
(soap-namespace-elements (soap-port-type-operations port-type))
do (progn
(insert "\t")
(soap-insert-describe-button (car o)))))
(defun soap-inspect-binding (binding)
"Insert information about BINDING into the current buffer."
(insert "Binding: " (soap-element-fq-name binding) "\n")
(insert "\n")
(insert "Bound operations:\n")
(let* ((ophash (soap-binding-operations binding))
(operations (loop for o being the hash-keys of ophash
collect o))
op-name-width)
(setq operations (sort operations 'string<))
(setq op-name-width (loop for o in operations maximizing (length o)))
(dolist (op operations)
(let* ((bound-op (gethash op ophash))
(soap-action (soap-bound-operation-soap-action bound-op))
(use (soap-bound-operation-use bound-op)))
(unless soap-action
(setq soap-action ""))
(insert "\t")
(soap-insert-describe-button (soap-bound-operation-operation bound-op))
(when (or use (not (equal soap-action "")))
(insert (make-string (- op-name-width (length op)) ?\s))
(insert " (")
(insert soap-action)
(when use
(insert " " (symbol-name use)))
(insert ")"))
(insert "\n")))))
(defun soap-inspect-port (port)
"Insert information about PORT into the current buffer."
(insert "Port name: " (soap-element-name port) "\n"
"Service URL: " (soap-port-service-url port) "\n"
"Binding: ")
(soap-insert-describe-button (soap-port-binding port)))
(defun soap-inspect-wsdl (wsdl)
"Insert information about WSDL into the current buffer."
(insert "WSDL Origin: " (soap-wsdl-origin wsdl) "\n")
(insert "Ports:")
(dolist (p (soap-wsdl-ports wsdl))
(insert "\n--------------------\n")
;; (soap-insert-describe-button p)
(soap-inspect-port p))
(insert "\n--------------------\nNamespace alias table:\n")
(dolist (a (soap-wsdl-alias-table wsdl))
(insert "\t" (car a) " => " (cdr a) "\n")))
(progn
;; Install the soap-inspect methods for our types
(put (aref (make-soap-basic-type) 0) 'soap-inspect
'soap-inspect-basic-type)
(put (aref (make-soap-sequence-type) 0) 'soap-inspect
'soap-inspect-sequence-type)
(put (aref (make-soap-array-type) 0) 'soap-inspect
'soap-inspect-array-type)
(put (aref (make-soap-message) 0) 'soap-inspect
'soap-inspect-message)
(put (aref (make-soap-operation) 0) 'soap-inspect
'soap-inspect-operation)
(put (aref (make-soap-port-type) 0) 'soap-inspect
'soap-inspect-port-type)
(put (aref (make-soap-binding) 0) 'soap-inspect
'soap-inspect-binding)
(put (aref (make-soap-port) 0) 'soap-inspect
'soap-inspect-port)
(put (aref (make-soap-wsdl) 0) 'soap-inspect
'soap-inspect-wsdl))
(provide 'soap-inspect)
;;; soap-inspect.el ends here

View file

@ -141,7 +141,7 @@ reads the sentence before point, and prints the Doctor's answer."
(turn-on-auto-fill)
(doctor-type '(i am the psychotherapist \.
(doc$ doctor--please) (doc$ doctor--describe) your (doc$ doctor--problems) \.
each time you are finished talking, type \R\E\T twice \.))
each time you are finished talking\, type \R\E\T twice \.))
(insert "\n"))
(defun make-doctor-variables ()

View file

@ -5,8 +5,9 @@
;; Authors: Emil Åström <emil_astrom(at)hotmail(dot)com>
;; Milan Zamazal <pdm(at)freesoft(dot)cz>
;; Stefan Bruda <stefan(at)bruda(dot)ca> (current maintainer)
;; Stefan Bruda <stefan(at)bruda(dot)ca>
;; * See below for more details
;; Maintainer: Stefan Bruda <stefan(at)bruda(dot)ca>
;; Keywords: prolog major mode sicstus swi mercury
(defvar prolog-mode-version "1.22"

View file

@ -151,12 +151,14 @@ This is a fine thing to set in your `.emacs' file."
:type '(repeat (string :tag "Suffix"))
:group 'shell)
(defvar shell-delimiter-argument-list '(?\| ?& ?< ?> ?\( ?\) ?\;)
(defcustom shell-delimiter-argument-list nil ; '(?\| ?& ?< ?> ?\( ?\) ?\;)
"List of characters to recognize as separate arguments.
This variable is used to initialize `comint-delimiter-argument-list' in the
shell buffer. The value may depend on the operating system or shell.
This is a fine thing to set in your `.emacs' file.")
shell buffer. The value may depend on the operating system or shell."
:type '(choice (const nil)
(repeat :tag "List of characters" character))
:version "24.1" ; changed to nil (bug#8027)
:group 'shell)
(defvar shell-file-name-chars
(if (memq system-type '(ms-dos windows-nt cygwin))

View file

@ -778,7 +778,7 @@ If N is negative, delete newlines as well."
(n (abs n)))
(skip-chars-backward skip-characters)
(constrain-to-field nil orig-pos)
(dotimes (i (or n 1))
(dotimes (i n)
(if (= (following-char) ?\s)
(forward-char 1)
(insert ?\s)))

View file

@ -614,8 +614,11 @@ state data."
:group 'speedbar
:type 'hook)
(defvar speedbar-ignored-modes '(fundamental-mode)
"*List of major modes which speedbar will not switch directories for.")
(defcustom speedbar-ignored-modes '(fundamental-mode)
"List of major modes which speedbar will not switch directories for."
:group 'speedbar
:type '(choice (const nil)
(repeat :tag "List of modes" (symbol :tag "Major mode"))))
(defun speedbar-extension-list-to-regex (extlist)
"Takes EXTLIST, a list of extensions and transforms it into regexp.
@ -669,7 +672,7 @@ directories here; see `vc-directory-exclusion-list'."
:group 'speedbar
:type 'string)
(defvar speedbar-file-unshown-regexp
(defcustom speedbar-file-unshown-regexp
(let ((nstr "") (noext completion-ignored-extensions))
(while noext
(setq nstr (concat nstr (regexp-quote (car noext)) "\\'"
@ -677,8 +680,10 @@ directories here; see `vc-directory-exclusion-list'."
noext (cdr noext)))
;; backup refdir lockfile
(concat nstr "\\|#[^#]+#$\\|\\.\\.?\\'\\|\\.#"))
"*Regexp matching files we don't want displayed in a speedbar buffer.
It is generated from the variable `completion-ignored-extensions'.")
"Regexp matching files we don't want displayed in a speedbar buffer.
It is generated from the variable `completion-ignored-extensions'."
:group 'speedbar
:type 'string)
(defvar speedbar-file-regexp nil
"Regular expression matching files we know how to expand.
@ -755,14 +760,17 @@ DIRECTORY-EXPRESSION to `speedbar-ignored-directory-expressions'."
speedbar-ignored-directory-regexp (speedbar-extension-list-to-regex
speedbar-ignored-directory-expressions)))
(defvar speedbar-update-flag dframe-have-timer-flag
"*Non-nil means to automatically update the display.
(defcustom speedbar-update-flag dframe-have-timer-flag
"Non-nil means to automatically update the display.
When this is nil then speedbar will not follow the attached frame's directory.
When speedbar is active, use:
\\<speedbar-key-map> `\\[speedbar-toggle-updates]'
to toggle this value.")
If you want to change this while speedbar is active, either use
\\[customize] or call \\<speedbar-key-map> `\\[speedbar-toggle-updates]'."
:group 'speedbar
:initialize 'custom-initialize-default
:set (lambda (sym val)
(set sym val)
(speedbar-toggle-updates))
:type 'boolean)
(defvar speedbar-update-flag-disable nil
"Permanently disable changing of the update flag.")
@ -3643,17 +3651,20 @@ to be at the beginning of a line in the etags buffer.
This variable is ignored if `speedbar-use-imenu-flag' is non-nil.")
(defvar speedbar-fetch-etags-command "etags"
"*Command used to create an etags file.
(defcustom speedbar-fetch-etags-command "etags"
"Command used to create an etags file.
This variable is ignored if `speedbar-use-imenu-flag' is t."
:group 'speedbar
:type 'string)
This variable is ignored if `speedbar-use-imenu-flag' is t.")
(defvar speedbar-fetch-etags-arguments '("-D" "-I" "-o" "-")
"*List of arguments to use with `speedbar-fetch-etags-command'.
(defcustom speedbar-fetch-etags-arguments '("-D" "-I" "-o" "-")
"List of arguments to use with `speedbar-fetch-etags-command'.
This creates an etags output buffer. Use `speedbar-toggle-etags' to
modify this list conveniently.
This variable is ignored if `speedbar-use-imenu-flag' is t.")
This variable is ignored if `speedbar-use-imenu-flag' is t."
:group 'speedbar
:type '(choice (const nil)
(repeat :tag "List of arguments" string)))
(defun speedbar-toggle-etags (flag)
"Toggle FLAG in `speedbar-fetch-etags-arguments'.

View file

@ -762,11 +762,13 @@ Buffer local variable.")
"magenta3" "cyan3" "white"])
;; Inspiration came from comint.el -mm
(defvar term-buffer-maximum-size 2048
"*The maximum size in lines for term buffers.
(defcustom term-buffer-maximum-size 2048
"The maximum size in lines for term buffers.
Term buffers are truncated from the top to be no greater than this number.
Notice that a setting of 0 means \"don't truncate anything\". This variable
is buffer-local.")
is buffer-local."
:group 'term
:type 'integer)
(when (featurep 'xemacs)
(defvar term-terminal-menu
@ -2209,9 +2211,11 @@ Security bug: your string can still be temporarily recovered with
;;; Low-level process communication
(defvar term-input-chunk-size 512
"*Long inputs send to term processes are broken up into chunks of this size.
If your process is choking on big inputs, try lowering the value.")
(defcustom term-input-chunk-size 512
"Long inputs send to term processes are broken up into chunks of this size.
If your process is choking on big inputs, try lowering the value."
:group 'term
:type 'integer)
(defun term-send-string (proc str)
"Send to PROC the contents of STR as input.
@ -3909,27 +3913,38 @@ This is a good place to put keybindings.")
;; Commands like this are fine things to put in load hooks if you
;; want them present in specific modes.
(defvar term-completion-autolist nil
"*If non-nil, automatically list possibilities on partial completion.
This mirrors the optional behavior of tcsh.")
(defcustom term-completion-autolist nil
"If non-nil, automatically list possibilities on partial completion.
This mirrors the optional behavior of tcsh."
:group 'term
:type 'boolean)
(defvar term-completion-addsuffix t
"*If non-nil, add a `/' to completed directories, ` ' to file names.
(defcustom term-completion-addsuffix t
"If non-nil, add a `/' to completed directories, ` ' to file names.
If a cons pair, it should be of the form (DIRSUFFIX . FILESUFFIX) where
DIRSUFFIX and FILESUFFIX are strings added on unambiguous or exact
completion. This mirrors the optional behavior of tcsh.")
completion. This mirrors the optional behavior of tcsh."
:group 'term
:type '(choice (const :tag "No suffix" nil)
(cons (string :tag "dirsuffix") (string :tag "filesuffix"))
(other :tag "Suffix" t)))
(defvar term-completion-recexact nil
"*If non-nil, use shortest completion if characters cannot be added.
(defcustom term-completion-recexact nil
"If non-nil, use shortest completion if characters cannot be added.
This mirrors the optional behavior of tcsh.
A non-nil value is useful if `term-completion-autolist' is non-nil too.")
A non-nil value is useful if `term-completion-autolist' is non-nil too."
:group 'term
:type 'boolean)
(defvar term-completion-fignore nil
"*List of suffixes to be disregarded during file completion.
(defcustom term-completion-fignore nil
"List of suffixes to be disregarded during file completion.
This mirrors the optional behavior of bash and tcsh.
Note that this applies to `term-dynamic-complete-filename' only.")
Note that this applies to `term-dynamic-complete-filename' only."
:group 'term
:type '(choice (const nil)
(repeat :tag "List of suffixes" string)))
(defvar term-file-name-prefix ""
"Prefix prepended to absolute file names taken from process input.

View file

@ -30,8 +30,11 @@
;;; User customization option:
(defvar sup-mouse-fast-select-window nil
"*Non-nil for mouse hits to select new window, then execute; else just select.")
(defcustom sup-mouse-fast-select-window nil
"Non-nil means mouse hits select new window, then execute.
Otherwise just select."
:type 'boolean
:group 'mouse)
(defconst mouse-left 0)
(defconst mouse-center 1)

View file

@ -1167,20 +1167,28 @@ pasted text.")
:group 'killing
:version "24.1")
(defvar x-select-request-type nil
"*Data type request for X selection.
(defcustom x-select-request-type nil
"Data type request for X selection.
The value is one of the following data types, a list of them, or nil:
`COMPOUND_TEXT', `UTF8_STRING', `STRING', `TEXT'
If the value is one of the above symbols, try only the specified
type.
If the value is one of the above symbols, try only the specified type.
If the value is a list of them, try each of them in the specified
order until succeed.
The value nil is the same as this list:
\(UTF8_STRING COMPOUND_TEXT STRING)
")
The value nil is the same as the list (UTF8_STRING COMPOUND_TEXT STRING)."
:type '(choice (const :tag "Default" nil)
(const COMPOUND_TEXT)
(const UTF8_STRING)
(const STRING)
(const TEXT)
(set :tag "List of values"
(const COMPOUND_TEXT)
(const UTF8_STRING)
(const STRING)
(const TEXT)))
:group 'killing)
;; Get a selection value of type TYPE by calling x-get-selection with
;; an appropriate DATA-TYPE argument decided by `x-select-request-type'.

View file

@ -2614,9 +2614,6 @@ log entries should be gathered."
(when index
(substring rev 0 index))))
(define-obsolete-function-alias
'vc-default-previous-version 'vc-default-previous-revision "23.1")
(defun vc-default-responsible-p (backend file)
"Indicate whether BACKEND is reponsible for FILE.
The default is to return nil always."

View file

@ -26,6 +26,8 @@ test -f "$srcdir/$1/getloadavg.c" ||
gl_save_LIBS=$LIBS
# getloadvg is present in libc on glibc >= 2.2, MacOS X, FreeBSD >= 2.0,
# NetBSD >= 0.9, OpenBSD >= 2.0, Solaris >= 7.
AC_CHECK_FUNC([getloadavg], [],
[gl_have_func=no

View file

@ -1,3 +1,241 @@
2011-02-18 Stefan Monnier <monnier@iro.umontreal.ca>
* lisp.h (BYTE_MARK_STACK): New macro.
(mark_byte_stack): Only declare if BYTE_MARK_STACK is set.
* bytecode.c (BYTE_MAINTAIN_TOP): New macros.
(struct byte_stack): Only define `top' and `bottom' if used.
(mark_byte_stack): Only define if used.
(BEFORE_POTENTIAL_GC, AFTER_POTENTIAL_GC): Nullify if BYTE_MAINTAIN_TOP
is not set.
(Fbyte_code): Don't set `bottom' unless BYTE_MAINTAIN_TOP is set.
* term.c (OUTPUT_IF): Use OUTPUT.
* alloc.c (Fgarbage_collect): When using stack scanning, don't
redundantly scan byte-code stacks, catchlist, and handlerlist.
2011-02-17 Jan Djärv <jan.h.d@swipnet.se>
* nsfns.m (Fx_create_frame, ns_set_name_as_filename)
(Fns_read_file_name): Replace B_ with BVAR.
* nsterm.m (ns_term_init): Use KVAR.
2011-02-16 Eli Zaretskii <eliz@gnu.org>
* msdos.c (internal_terminal_init): Use KVAR.
* w32fns.c (Fx_create_frame): Use KVAR.
* w32term.c (w32_create_terminal): Use KVAR.
* s/ms-w32.h (MODE_LINE_BINARY_TEXT): Remove.
(getloadavg): Declare prototype which was removed from lisp.h.
* xdisp.c (decode_mode_spec): Don't use MODE_LINE_BINARY_TEXT.
* fileio.c (Finsert_file_contents, Fwrite_region):
Remove references to buffer_file_type.
(syms_of_fileio): Don't intern and staticpro
find-buffer-file-type.
* callproc.c (syms_of_callproc): Remove references to
buffer_file_type.
* buffer.c (reset_buffer_local_variables): Don't set
buffer_file_type.
(init_buffer_once): Likewise.
(syms_of_buffer): Don't define buffer-file-type.
* buffer.h (struct buffer): Remove buffer_file_type.
2011-02-16 Tom Tromey <tromey@parfait>
* callint.c (Fcall_interactively): Update for change to field names.
* doc.c (Fsubstitute_command_keys): Update for change to field names.
* cmds.c (Fself_insert_command): Update for change to field names.
* keymap.c (Fcurrent_active_maps, Fkey_binding)
(Fdescribe_buffer_bindings): Update for change to field names.
* macros.c (Fstart_kbd_macro, end_kbd_macro, Fend_kbd_macro)
(store_kbd_macro_char, Fcall_last_kbd_macro, Fexecute_kbd_macro):
Update for change to field names.
* keyboard.c (echo_char, echo_dash, echo_now, cancel_echoing)
(echo_length, echo_truncate, cmd_error, command_loop_1)
(read_char, kbd_buffer_store_event_hold, make_lispy_event)
(menu_bar_items, tool_bar_items, read_char_minibuf_menu_prompt)
(read_key_sequence, Fcommand_execute, Fexecute_extended_command)
(Fdiscard_input, init_kboard, init_keyboard, mark_kboards):
Update for change to field names.
* xfns.c (Fx_create_frame): Update for change to field names.
* xterm.c (x_connection_closed, x_term_init): Update for change to
field names.
* term.c (term_get_fkeys_1, CONDITIONAL_REASSIGN, init_tty):
Update for change to field names.
* window.c (window_scroll_pixel_based, window_scroll_line_based):
Update for change to field names.
* frame.c (make_frame_without_minibuffer, Fhandle_switch_frame)
(delete_frame): Update for change to field names.
* lisp.h (DEFVAR_KBOARD): Update for change to field names.
* keyboard.h (struct kboard): Rename all Lisp_Object fields.
(KBOARD_INTERNAL_FIELD, KVAR): New macros.
2011-02-16 Tom Tromey <tromey@redhat.com>
* lisp.h (DEFVAR_BUFFER_DEFAULTS): Use BVAR.
2011-02-16 Tom Tromey <tromey@parfait>
* xfns.c (x_create_tip_frame, Fx_show_tip): Replace B_ with BVAR.
* xfaces.c (compute_char_face): Replace B_ with BVAR.
* xdisp.c (pos_visible_p, init_iterator, reseat_1)
(message_dolog, update_echo_area, ensure_echo_area_buffers)
(with_echo_area_buffer, setup_echo_area_for_printing)
(set_message_1, update_menu_bar, update_tool_bar)
(text_outside_line_unchanged_p, redisplay_internal)
(try_scrolling, try_cursor_movement, redisplay_window)
(try_window_reusing_current_matrix, row_containing_pos)
(try_window_id, get_overlay_arrow_glyph_row, display_line)
(Fcurrent_bidi_paragraph_direction, display_mode_lines)
(decode_mode_spec_coding, decode_mode_spec, display_count_lines)
(get_window_cursor_type, note_mouse_highlight): Replace B_ with
BVAR.
* window.c (window_display_table, unshow_buffer, window_loop)
(window_min_size_2, set_window_buffer, Fset_window_buffer)
(select_window, Fforce_window_update, temp_output_buffer_show)
(Fset_window_configuration, save_window_save): Replace B_ with
BVAR.
* w32fns.c (x_create_tip_frame, Fx_show_tip, Fw32_shell_execute):
Replace B_ with BVAR.
* undo.c (record_point, record_insert, record_delete)
(record_marker_adjustment, record_first_change)
(record_property_change, Fundo_boundary, truncate_undo_list)
(Fprimitive_undo): Replace B_ with BVAR.
* syntax.h (Vstandard_syntax_table, CURRENT_SYNTAX_TABLE)
(SETUP_BUFFER_SYNTAX_TABLE): Replace B_ with BVAR.
* syntax.c (update_syntax_table, dec_bytepos, Fsyntax_table)
(Fset_syntax_table, Fmodify_syntax_entry, skip_chars)
(skip_syntaxes, scan_lists): Replace B_ with BVAR.
* search.c (compile_pattern_1, compile_pattern, looking_at_1)
(string_match_1, fast_looking_at, newline_cache_on_off)
(search_command, search_buffer, simple_search, boyer_moore)
(Freplace_match): Replace B_ with BVAR.
* process.c (get_process, list_processes_1, Fstart_process)
(Fmake_serial_process, Fmake_network_process)
(read_process_output, send_process, exec_sentinel)
(status_notify, setup_process_coding_systems): Replace B_ with
BVAR.
* print.c (PRINTDECLARE, PRINTPREPARE, PRINTFINISH, printchar)
(strout, print_string, temp_output_buffer_setup, print_object):
Replace B_ with BVAR.
* msdos.c (IT_frame_up_to_date): Replace B_ with BVAR.
* minibuf.c (read_minibuf, get_minibuffer, Fread_buffer):
Replace B_ with BVAR.
* marker.c (Fmarker_buffer, Fset_marker, set_marker_restricted)
(set_marker_both, set_marker_restricted_both, unchain_marker):
Replace B_ with BVAR.
* lread.c (readchar, unreadchar, openp, readevalloop)
(Feval_buffer, Feval_region): Replace B_ with BVAR.
* lisp.h (DOWNCASE_TABLE, UPCASE_TABLE): Replace B_ with BVAR.
* keymap.c (Flocal_key_binding, Fuse_local_map)
(Fcurrent_local_map, push_key_description)
(Fdescribe_buffer_bindings): Replace B_ with BVAR.
* keyboard.c (command_loop_1, read_char_minibuf_menu_prompt)
(read_key_sequence): Replace B_ with BVAR.
* intervals.h (TEXT_PROP_MEANS_INVISIBLE): Replace B_ with BVAR.
* intervals.c (set_point_both, get_local_map): Replace B_ with
BVAR.
* insdel.c (check_markers, insert_char, insert_1_both)
(insert_from_string_1, insert_from_gap, insert_from_buffer_1)
(adjust_after_replace, replace_range, del_range_2)
(modify_region, prepare_to_modify_buffer)
(Fcombine_after_change_execute): Replace B_ with BVAR.
* indent.c (buffer_display_table, recompute_width_table)
(width_run_cache_on_off, current_column, scan_for_column)
(Findent_to, position_indentation, compute_motion, vmotion):
Replace B_ with BVAR.
* fringe.c (get_logical_cursor_bitmap)
(get_logical_fringe_bitmap, update_window_fringes): Replace B_
with BVAR.
* frame.c (make_frame_visible_1): Replace B_ with BVAR.
* font.c (font_at): Replace B_ with BVAR.
* fns.c (Fbase64_encode_region, Fbase64_decode_region, Fmd5):
Replace B_ with BVAR.
* filelock.c (unlock_all_files, Flock_buffer, Funlock_buffer)
(unlock_buffer): Replace B_ with BVAR.
* fileio.c (Fexpand_file_name, Ffile_directory_p)
(Ffile_regular_p, Ffile_selinux_context)
(Fset_file_selinux_context, Ffile_modes, Fset_file_modes)
(Fset_file_times, Ffile_newer_than_file_p, decide_coding_unwind)
(Finsert_file_contents, choose_write_coding_system)
(Fwrite_region, build_annotations, Fverify_visited_file_modtime)
(Fset_visited_file_modtime, auto_save_error, auto_save_1)
(Fdo_auto_save, Fset_buffer_auto_saved): Replace B_ with BVAR.
* editfns.c (region_limit, Fmark_marker, save_excursion_save)
(save_excursion_restore, Fprevious_char, Fchar_before)
(general_insert_function, Finsert_char, Finsert_byte)
(make_buffer_string_both, Finsert_buffer_substring)
(Fcompare_buffer_substrings, subst_char_in_region_unwind)
(subst_char_in_region_unwind_1, Fsubst_char_in_region)
(Ftranslate_region_internal, save_restriction_restore)
(Fchar_equal): Replace B_ with BVAR.
* dispnew.c (Fframe_or_buffer_changed_p): Replace B_ with BVAR.
* dispextern.h (WINDOW_WANTS_MODELINE_P)
(WINDOW_WANTS_HEADER_LINE_P): Replace B_ with BVAR.
* dired.c (directory_files_internal): Replace B_ with BVAR.
* data.c (swap_in_symval_forwarding, set_internal)
(Fmake_local_variable, Fkill_local_variable, Flocal_variable_p):
Replace B_ with BVAR.
* composite.c (fill_gstring_header)
(composition_compute_stop_pos, composition_adjust_point)
(Ffind_composition_internal): Replace B_ with BVAR.
* coding.c (decode_coding, encode_coding)
(make_conversion_work_buffer, decode_coding_gap)
(decode_coding_object, encode_coding_object)
(Fdetect_coding_region, Ffind_coding_systems_region_internal)
(Funencodable_char_position, Fcheck_coding_systems_region):
Replace B_ with BVAR.
* cmds.c (Fself_insert_command, internal_self_insert): Replace B_
with BVAR.
* charset.c (Ffind_charset_region): Replace B_ with BVAR.
* character.h (FETCH_CHAR_ADVANCE, INC_BOTH, DEC_BOTH)
(ASCII_CHAR_WIDTH): Replace B_ with BVAR.
* character.c (chars_in_text, Fget_byte): Replace B_ with BVAR.
* category.h (Vstandard_category_table): Replace B_ with BVAR.
* category.c (check_category_table, Fcategory_table)
(Fset_category_table, char_category_set): Replace B_ with BVAR.
* casetab.c (Fcurrent_case_table, set_case_table): Replace B_ with
BVAR.
* casefiddle.c (casify_object, casify_region): Replace B_ with
BVAR.
* callproc.c (Fcall_process, Fcall_process_region): Replace B_
with BVAR.
* callint.c (check_mark, Fcall_interactively): Replace B_ with
BVAR.
* bytecode.c (Fbyte_code): Replace B_ with BVAR.
* buffer.h (FETCH_CHAR, FETCH_CHAR_AS_MULTIBYTE, BVAR): Replace B_
with BVAR.
* buffer.c (Fbuffer_live_p, Fget_file_buffer)
(get_truename_buffer, Fget_buffer_create)
(clone_per_buffer_values, Fmake_indirect_buffer, reset_buffer)
(reset_buffer_local_variables, Fbuffer_name, Fbuffer_file_name)
(Fbuffer_local_value, buffer_lisp_local_variables)
(Fset_buffer_modified_p, Frestore_buffer_modified_p)
(Frename_buffer, Fother_buffer, Fbuffer_enable_undo)
(Fkill_buffer, Fset_buffer_major_mode, set_buffer_internal_1)
(set_buffer_temp, Fset_buffer, set_buffer_if_live)
(Fbarf_if_buffer_read_only, Fbury_buffer, Ferase_buffer)
(Fbuffer_swap_text, swapfield_, Fbuffer_swap_text)
(Fset_buffer_multibyte, swap_out_buffer_local_variables)
(record_overlay_string, overlay_strings, init_buffer_once)
(init_buffer, syms_of_buffer): Replace B_ with BVAR.
2011-02-16 Eli Zaretskii <eliz@gnu.org>
* xdisp.c (redisplay_internal): Resynchronize `w' if the selected
window is changed inside calls to do_pending_window_change.
(Bug#8020)
2011-02-16 Paul Eggert <eggert@cs.ucla.edu>
Remove no-longer needed getloadavg symbols.
@ -54,8 +292,8 @@
* xmenu.c (apply_systemfont_to_dialog): Apply to *dialog.font.
(apply_systemfont_to_menu): Set resources *menubar*font and
*popup*font. Remove defflt.
(set_frame_menubar, create_and_show_popup_menu): Call
apply_systemfont_to_menu before lw_create_widget.
(set_frame_menubar, create_and_show_popup_menu):
Call apply_systemfont_to_menu before lw_create_widget.
2011-02-14 Tom Tromey <tromey@redhat.com>
@ -84,8 +322,8 @@
(PRINTPREPARE, PRINTFINISH, temp_output_buffer_setup)
(print_object): Use B_.
* font.c (font_at): Use B_.
* fns.c (Fbase64_encode_region, Fbase64_decode_region, Fmd5): Use
B_.
* fns.c (Fbase64_encode_region, Fbase64_decode_region, Fmd5):
Use B_.
* callint.c (check_mark, Fcall_interactively): Use B_.
* editfns.c (region_limit, Fmark_marker, save_excursion_save)
(save_excursion_restore, Fprevious_char, Fchar_before)
@ -108,8 +346,8 @@
(Freplace_match): Use B_.
* indent.c (buffer_display_table, recompute_width_table)
(width_run_cache_on_off, current_column, scan_for_column)
(Findent_to, position_indentation, compute_motion, vmotion): Use
B_.
(Findent_to, position_indentation, compute_motion, vmotion):
Use B_.
* casefiddle.c (casify_object, casify_region): Use B_.
* casetab.c (Fcurrent_case_table, set_case_table): Use B_.
* cmds.c (Fself_insert_command, internal_self_insert): Use B_.
@ -123,8 +361,8 @@
(Fdo_auto_save, Fset_buffer_auto_saved): Use B_.
* minibuf.c (read_minibuf, get_minibuffer, Fread_buffer): Use B_.
* marker.c (Fmarker_buffer, Fset_marker, set_marker_restricted)
(set_marker_both, set_marker_restricted_both, unchain_marker): Use
B_.
(set_marker_both, set_marker_restricted_both, unchain_marker):
Use B_.
* insdel.c (check_markers, insert_char, insert_1_both)
(insert_from_string_1, insert_from_gap, insert_from_buffer_1)
(adjust_after_replace, replace_range, del_range_2)
@ -148,8 +386,8 @@
(make_conversion_work_buffer, decode_coding_gap)
(decode_coding_object, encode_coding_object)
(Fdetect_coding_region, Ffind_coding_systems_region_internal)
(Funencodable_char_position, Fcheck_coding_systems_region): Use
B_.
(Funencodable_char_position, Fcheck_coding_systems_region):
Use B_.
* charset.c (Ffind_charset_region): Use B_.
* window.c (window_display_table, unshow_buffer, window_loop)
(window_min_size_2, set_window_buffer, Fset_window_buffer)
@ -406,8 +644,8 @@
callers changed.
* editfns.c (general_insert_function): Change signature to
match changes to insert functions' signatures.
* keymap.c (map_keymap_char_table_item, map_keymap_internal): Use
explicit cast when converting between void * and function pointer
* keymap.c (map_keymap_char_table_item, map_keymap_internal):
Use explicit cast when converting between void * and function pointer
types, as C89 requires this.
2011-02-05 Paul Eggert <eggert@cs.ucla.edu>
@ -527,7 +765,7 @@
2011-02-01 Paul Eggert <eggert@cs.ucla.edu>
format-time-string now supports subsecond time stamp resolution
* editfns.c (emacs_nmemftime): Renamed from emacs_memftimeu,
* editfns.c (emacs_nmemftime): Rename from emacs_memftimeu,
for consistency with its new argument and with gnulib nstrftime.
All callers changed. New argument NS.
(Fformat_time_string): Check that the time argument's microseconds
@ -857,11 +1095,11 @@
(history_delete_duplicates, inhibit_x_resources)
(last_nonmenu_event, load_in_progress, max_specpdl_size)
(minibuffer_auto_raise, print_escape_newlines, scroll_margin)
(use_dialog_box, use_file_dialog): Remove declaration. Include
globals.h.
(use_dialog_box, use_file_dialog): Remove declaration.
Include globals.h.
* keymap.h (Voverriding_local_map)
(Voverriding_local_map_menu_flag, meta_prefix_char): Remove
declaration.
(Voverriding_local_map_menu_flag, meta_prefix_char):
Remove declaration.
* keyboard.h (Vdouble_click_time, Vfunction_key_map)
(Vinput_method_function, Vkey_translation_map)
(Vlucid_menu_bar_dirty_flag, Vthis_original_command)
@ -879,16 +1117,16 @@
(focus_follows_mouse): Remove declaration.
* fontset.h (Valternate_fontname_alist, Vfontset_alias_alist)
(Vignore_relative_composition, Votf_script_alist)
(Vuse_default_ascent, Vvertical_centering_font_regexp): Remove
declaration.
(Vuse_default_ascent, Vvertical_centering_font_regexp):
Remove declaration.
* font.h (Vfont_log): Remove declaration.
* dosfns.h (Vdos_display_scancodes, Vdos_version)
(Vdos_windows_version, dos_codepage, dos_country_code)
(dos_decimal_point, dos_hyper_key, dos_keyboard_layout)
(dos_keypad_mode, dos_super_key, dos_timezone_offset): Remove
declaration.
* disptab.h (Vglyph_table, Vstandard_display_table): Remove
declaration.
(dos_keypad_mode, dos_super_key, dos_timezone_offset):
Remove declaration.
* disptab.h (Vglyph_table, Vstandard_display_table):
Remove declaration.
* dispextern.h (Vface_remapping_alist, Vglyphless_char_display)
(Vmouse_autoselect_window, Voverflow_newline_into_fringe)
(Vshow_trailing_whitespace, Vtool_bar_button_margin)
@ -916,10 +1154,10 @@
(Vselect_safe_coding_system_function)
(Vtranslation_table_for_input, coding_system_require_warning)
(eol_mnemonic_dos, eol_mnemonic_mac, eol_mnemonic_undecided)
(eol_mnemonic_unix, inherit_process_coding_system): Remove
declaration.
* charset.h (Vcharset_list, Vcurrent_iso639_language): Remove
declaration.
(eol_mnemonic_unix, inherit_process_coding_system):
Remove declaration.
* charset.h (Vcharset_list, Vcurrent_iso639_language):
Remove declaration.
* character.h (Vauto_fill_chars, Vchar_direction_table)
(Vchar_script_table, Vchar_width_table, Vprintable_chars)
(Vscript_representative_chars, Vtranslation_table_vector)
@ -1034,8 +1272,8 @@
(w32_strict_fontnames, w32_strict_painting): Remove.
(Vhourglass_delay, Vmenu_bar_mode, Vtool_bar_mode)
(Vw32_recognize_altgr, Vwindow_system_version)
(w32_num_mouse_buttons, w32_use_visible_system_caret): Remove
declaration.
(w32_num_mouse_buttons, w32_use_visible_system_caret):
Remove declaration.
* w32console.c (syms_of_ntterm): Update.
(w32_use_full_screen_buffer): Remove.
(Vtty_defined_color_alist): Remove declaration.

View file

@ -4842,8 +4842,6 @@ returns nil, because real GC can't be done. */)
(void)
{
register struct specbinding *bind;
struct catchtag *catch;
struct handler *handler;
char stack_top_variable;
register int i;
int message_p;
@ -4972,9 +4970,11 @@ returns nil, because real GC can't be done. */)
for (i = 0; i < tail->nvars; i++)
mark_object (tail->var[i]);
}
#endif
mark_byte_stack ();
{
struct catchtag *catch;
struct handler *handler;
for (catch = catchlist; catch; catch = catch->next)
{
mark_object (catch->tag);
@ -4985,7 +4985,9 @@ returns nil, because real GC can't be done. */)
mark_object (handler->handler);
mark_object (handler->var);
}
}
mark_backtrace ();
#endif
#ifdef HAVE_WINDOW_SYSTEM
mark_fringe_data ();

File diff suppressed because it is too large Load diff

View file

@ -321,7 +321,7 @@ while (0)
/* Return character at byte position POS. */
#define FETCH_CHAR(pos) \
(!NILP (B_ (current_buffer, enable_multibyte_characters)) \
(!NILP (BVAR (current_buffer, enable_multibyte_characters)) \
? FETCH_MULTIBYTE_CHAR ((pos)) \
: FETCH_BYTE ((pos)))
@ -346,7 +346,7 @@ extern unsigned char *_fetch_multibyte_char_p;
multibyte. */
#define FETCH_CHAR_AS_MULTIBYTE(pos) \
(!NILP (B_ (current_buffer, enable_multibyte_characters)) \
(!NILP (BVAR (current_buffer, enable_multibyte_characters)) \
? FETCH_MULTIBYTE_CHAR ((pos)) \
: UNIBYTE_TO_CHAR (FETCH_BYTE ((pos))))
@ -465,13 +465,13 @@ struct buffer_text
};
/* Lisp fields in struct buffer are hidden from most code and accessed
via the B_ macro, below. Only select pieces of code, like the GC,
via the BVAR macro, below. Only select pieces of code, like the GC,
are allowed to use BUFFER_INTERNAL_FIELD. */
#define BUFFER_INTERNAL_FIELD(field) field ## _
/* Most code should use this macro to access Lisp fields in struct
buffer. */
#define B_(buf, field) ((buf)->BUFFER_INTERNAL_FIELD (field))
#define BVAR(buf, field) ((buf)->BUFFER_INTERNAL_FIELD (field))
/* This is the structure that the buffer Lisp object points to. */
@ -662,12 +662,6 @@ struct buffer
Lisp_Object BUFFER_INTERNAL_FIELD (left_margin);
/* Function to call when insert space past fill column. */
Lisp_Object BUFFER_INTERNAL_FIELD (auto_fill_function);
/* nil: text, t: binary.
This value is meaningful only on certain operating systems. */
/* Actually, we don't need this flag any more because end-of-line
is handled correctly according to the buffer-file-coding-system
of the buffer. Just keeping it for backward compatibility. */
Lisp_Object BUFFER_INTERNAL_FIELD (buffer_file_type);
/* Case table for case-conversion in this buffer.
This char-table maps each char into its lower-case version. */

View file

@ -229,6 +229,8 @@ Lisp_Object Qbytecode;
#define Bconstant 0300
#define CONSTANTLIM 0100
/* Whether to maintain a `top' and `bottom' field in the stack frame. */
#define BYTE_MAINTAIN_TOP (BYTE_CODE_SAFE || BYTE_MARK_STACK)
/* Structure describing a value stack used during byte-code execution
in Fbyte_code. */
@ -241,7 +243,9 @@ struct byte_stack
/* Top and bottom of stack. The bottom points to an area of memory
allocated with alloca in Fbyte_code. */
#if BYTE_MAINTAIN_TOP
Lisp_Object *top, *bottom;
#endif
/* The string containing the byte-code, and its current address.
Storing this here protects it from GC because mark_byte_stack
@ -268,6 +272,7 @@ struct byte_stack *byte_stack_list;
/* Mark objects on byte_stack_list. Called during GC. */
#if BYTE_MARK_STACK
void
mark_byte_stack (void)
{
@ -292,7 +297,7 @@ mark_byte_stack (void)
mark_object (stack->constants);
}
}
#endif
/* Unmark objects in the stacks on byte_stack_list. Relocate program
counters. Called when GC has completed. */
@ -346,8 +351,13 @@ unmark_byte_stack (void)
/* Actions that must be performed before and after calling a function
that might GC. */
#if !BYTE_MAINTAIN_TOP
#define BEFORE_POTENTIAL_GC() ((void)0)
#define AFTER_POTENTIAL_GC() ((void)0)
#else
#define BEFORE_POTENTIAL_GC() stack.top = top
#define AFTER_POTENTIAL_GC() stack.top = NULL
#endif
/* Garbage collect if we have consed enough since the last time.
We do this at every branch, to avoid loops that never GC. */
@ -447,10 +457,13 @@ If the third argument is incorrect, Emacs may crash. */)
stack.byte_string = bytestr;
stack.pc = stack.byte_string_start = SDATA (bytestr);
stack.constants = vector;
stack.bottom = (Lisp_Object *) alloca (XFASTINT (maxdepth)
top = (Lisp_Object *) alloca (XFASTINT (maxdepth)
* sizeof (Lisp_Object));
top = stack.bottom - 1;
#if BYTE_MAINTAIN_TOP
stack.bottom = top;
stack.top = NULL;
#endif
top -= 1;
stack.next = byte_stack_list;
byte_stack_list = &stack;
@ -1398,7 +1411,7 @@ If the third argument is incorrect, Emacs may crash. */)
CHECK_CHARACTER (TOP);
AFTER_POTENTIAL_GC ();
c = XFASTINT (TOP);
if (NILP (B_ (current_buffer, enable_multibyte_characters)))
if (NILP (BVAR (current_buffer, enable_multibyte_characters)))
MAKE_CHAR_MULTIBYTE (c);
XSETFASTINT (TOP, syntax_code_spec[(int) SYNTAX (c)]);
}

View file

@ -149,12 +149,12 @@ static void
check_mark (int for_region)
{
Lisp_Object tem;
tem = Fmarker_buffer (B_ (current_buffer, mark));
tem = Fmarker_buffer (BVAR (current_buffer, mark));
if (NILP (tem) || (XBUFFER (tem) != current_buffer))
error (for_region ? "The mark is not set now, so there is no region"
: "The mark is not set now");
if (!NILP (Vtransient_mark_mode) && NILP (Vmark_even_if_inactive)
&& NILP (B_ (current_buffer, mark_active)))
&& NILP (BVAR (current_buffer, mark_active)))
xsignal0 (Qmark_inactive);
}
@ -280,7 +280,7 @@ invoke it. If KEYS is omitted or nil, the return value of
save_this_command = Vthis_command;
save_this_original_command = Vthis_original_command;
save_real_this_command = real_this_command;
save_last_command = current_kboard->Vlast_command;
save_last_command = KVAR (current_kboard, Vlast_command);
if (NILP (keys))
keys = this_command_keys, key_count = this_command_key_count;
@ -363,7 +363,7 @@ invoke it. If KEYS is omitted or nil, the return value of
Vthis_command = save_this_command;
Vthis_original_command = save_this_original_command;
real_this_command= save_real_this_command;
current_kboard->Vlast_command = save_last_command;
KVAR (current_kboard, Vlast_command) = save_last_command;
temporarily_switch_to_single_kboard (NULL);
return unbind_to (speccount, apply1 (function, specs));
@ -385,7 +385,7 @@ invoke it. If KEYS is omitted or nil, the return value of
else if (*string == '*')
{
string++;
if (!NILP (B_ (current_buffer, read_only)))
if (!NILP (BVAR (current_buffer, read_only)))
{
if (!NILP (record_flag))
{
@ -543,7 +543,7 @@ invoke it. If KEYS is omitted or nil, the return value of
case 'D': /* Directory name. */
args[i] = Fread_file_name (callint_message, Qnil,
B_ (current_buffer, directory), Qlambda, Qnil,
BVAR (current_buffer, directory), Qlambda, Qnil,
Qfile_directory_p);
break;
@ -661,7 +661,7 @@ invoke it. If KEYS is omitted or nil, the return value of
case 'm': /* Value of mark. Does not do I/O. */
check_mark (0);
/* visargs[i] = Qnil; */
args[i] = B_ (current_buffer, mark);
args[i] = BVAR (current_buffer, mark);
varies[i] = 2;
break;
@ -717,11 +717,11 @@ invoke it. If KEYS is omitted or nil, the return value of
check_mark (1);
set_marker_both (point_marker, Qnil, PT, PT_BYTE);
/* visargs[i+1] = Qnil; */
foo = marker_position (B_ (current_buffer, mark));
foo = marker_position (BVAR (current_buffer, mark));
/* visargs[i] = Qnil; */
args[i] = PT < foo ? point_marker : B_ (current_buffer, mark);
args[i] = PT < foo ? point_marker : BVAR (current_buffer, mark);
varies[i] = 3;
args[++i] = PT > foo ? point_marker : B_ (current_buffer, mark);
args[++i] = PT > foo ? point_marker : BVAR (current_buffer, mark);
varies[i] = 4;
break;
@ -832,7 +832,7 @@ invoke it. If KEYS is omitted or nil, the return value of
Vthis_command = save_this_command;
Vthis_original_command = save_this_original_command;
real_this_command= save_real_this_command;
current_kboard->Vlast_command = save_last_command;
KVAR (current_kboard, Vlast_command) = save_last_command;
{
Lisp_Object val;

View file

@ -74,10 +74,6 @@ extern char **environ;
/* Pattern used by call-process-region to make temp files. */
static Lisp_Object Vtemp_file_name_pattern;
#ifdef DOS_NT
Lisp_Object Qbuffer_file_type;
#endif /* DOS_NT */
/* True if we are about to fork off a synchronous process or if we
are waiting for it. */
int synch_process_alive;
@ -265,7 +261,7 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */)
if (nargs >= 2 && ! NILP (args[1]))
{
infile = Fexpand_file_name (args[1], B_ (current_buffer, directory));
infile = Fexpand_file_name (args[1], BVAR (current_buffer, directory));
CHECK_STRING (infile);
}
else
@ -322,7 +318,7 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */)
{
struct gcpro gcpro1, gcpro2, gcpro3, gcpro4;
current_dir = B_ (current_buffer, directory);
current_dir = BVAR (current_buffer, directory);
GCPRO4 (infile, buffer, current_dir, error_file);
@ -336,7 +332,7 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */)
if (NILP (Ffile_accessible_directory_p (current_dir)))
report_file_error ("Setting current directory",
Fcons (B_ (current_buffer, directory), Qnil));
Fcons (BVAR (current_buffer, directory), Qnil));
if (STRING_MULTIBYTE (infile))
infile = ENCODE_FILE (infile);
@ -663,7 +659,7 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */)
/* In unibyte mode, character code conversion should not take
place but EOL conversion should. So, setup raw-text or one
of the subsidiary according to the information just setup. */
if (NILP (B_ (current_buffer, enable_multibyte_characters))
if (NILP (BVAR (current_buffer, enable_multibyte_characters))
&& !NILP (val))
val = raw_text_coding_system (val);
setup_coding_system (val, &process_coding);
@ -713,7 +709,7 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */)
if (!NILP (buffer))
{
if (NILP (B_ (current_buffer, enable_multibyte_characters))
if (NILP (BVAR (current_buffer, enable_multibyte_characters))
&& ! CODING_MAY_REQUIRE_DECODING (&process_coding))
insert_1_both (buf, nread, nread, 0, 1, 0);
else
@ -926,7 +922,7 @@ usage: (call-process-region START END PROGRAM &optional DELETE BUFFER DISPLAY &r
/* Decide coding-system of the contents of the temporary file. */
if (!NILP (Vcoding_system_for_write))
val = Vcoding_system_for_write;
else if (NILP (B_ (current_buffer, enable_multibyte_characters)))
else if (NILP (BVAR (current_buffer, enable_multibyte_characters)))
val = Qraw_text;
else
{
@ -1535,11 +1531,6 @@ set_initial_environment (void)
void
syms_of_callproc (void)
{
#ifdef DOS_NT
Qbuffer_file_type = intern_c_string ("buffer-file-type");
staticpro (&Qbuffer_file_type);
#endif /* DOS_NT */
#ifndef DOS_NT
Vtemp_file_name_pattern = build_string ("emacsXXXXXX");
#elif defined (WINDOWSNT)

View file

@ -39,15 +39,15 @@ casify_object (enum case_action flag, Lisp_Object obj)
register int inword = flag == CASE_DOWN;
/* If the case table is flagged as modified, rescan it. */
if (NILP (XCHAR_TABLE (B_ (current_buffer, downcase_table))->extras[1]))
Fset_case_table (B_ (current_buffer, downcase_table));
if (NILP (XCHAR_TABLE (BVAR (current_buffer, downcase_table))->extras[1]))
Fset_case_table (BVAR (current_buffer, downcase_table));
if (INTEGERP (obj))
{
int flagbits = (CHAR_ALT | CHAR_SUPER | CHAR_HYPER
| CHAR_SHIFT | CHAR_CTL | CHAR_META);
int flags = XINT (obj) & flagbits;
int multibyte = ! NILP (B_ (current_buffer, enable_multibyte_characters));
int multibyte = ! NILP (BVAR (current_buffer, enable_multibyte_characters));
/* If the character has higher bits set
above the flags, return it unchanged.
@ -198,7 +198,7 @@ casify_region (enum case_action flag, Lisp_Object b, Lisp_Object e)
{
register int c;
register int inword = flag == CASE_DOWN;
register int multibyte = !NILP (B_ (current_buffer, enable_multibyte_characters));
register int multibyte = !NILP (BVAR (current_buffer, enable_multibyte_characters));
EMACS_INT start, end;
EMACS_INT start_byte, end_byte;
EMACS_INT first = -1, last; /* Position of first and last changes. */
@ -210,8 +210,8 @@ casify_region (enum case_action flag, Lisp_Object b, Lisp_Object e)
return;
/* If the case table is flagged as modified, rescan it. */
if (NILP (XCHAR_TABLE (B_ (current_buffer, downcase_table))->extras[1]))
Fset_case_table (B_ (current_buffer, downcase_table));
if (NILP (XCHAR_TABLE (BVAR (current_buffer, downcase_table))->extras[1]))
Fset_case_table (BVAR (current_buffer, downcase_table));
validate_region (&b, &e);
start = XFASTINT (b);

View file

@ -71,7 +71,7 @@ DEFUN ("current-case-table", Fcurrent_case_table, Scurrent_case_table, 0, 0, 0,
doc: /* Return the case table of the current buffer. */)
(void)
{
return B_ (current_buffer, downcase_table);
return BVAR (current_buffer, downcase_table);
}
DEFUN ("standard-case-table", Fstandard_case_table, Sstandard_case_table, 0, 0, 0,
@ -160,10 +160,10 @@ set_case_table (Lisp_Object table, int standard)
}
else
{
B_ (current_buffer, downcase_table) = table;
B_ (current_buffer, upcase_table) = up;
B_ (current_buffer, case_canon_table) = canon;
B_ (current_buffer, case_eqv_table) = eqv;
BVAR (current_buffer, downcase_table) = table;
BVAR (current_buffer, upcase_table) = up;
BVAR (current_buffer, case_canon_table) = canon;
BVAR (current_buffer, case_eqv_table) = eqv;
}
return table;

View file

@ -190,7 +190,7 @@ Lisp_Object
check_category_table (Lisp_Object table)
{
if (NILP (table))
return B_ (current_buffer, category_table);
return BVAR (current_buffer, category_table);
CHECK_TYPE (!NILP (Fcategory_table_p (table)), Qcategory_table_p, table);
return table;
}
@ -200,7 +200,7 @@ DEFUN ("category-table", Fcategory_table, Scategory_table, 0, 0, 0,
This is the one specified by the current buffer. */)
(void)
{
return B_ (current_buffer, category_table);
return BVAR (current_buffer, category_table);
}
DEFUN ("standard-category-table", Fstandard_category_table,
@ -281,7 +281,7 @@ Return TABLE. */)
{
int idx;
table = check_category_table (table);
B_ (current_buffer, category_table) = table;
BVAR (current_buffer, category_table) = table;
/* Indicate that this buffer now has a specified category table. */
idx = PER_BUFFER_VAR_IDX (category_table);
SET_PER_BUFFER_VALUE_P (current_buffer, idx, 1);
@ -292,7 +292,7 @@ Return TABLE. */)
Lisp_Object
char_category_set (int c)
{
return CHAR_TABLE_REF (B_ (current_buffer, category_table), c);
return CHAR_TABLE_REF (BVAR (current_buffer, category_table), c);
}
DEFUN ("char-category-set", Fchar_category_set, Schar_category_set, 1, 1, 0,

View file

@ -91,7 +91,7 @@ extern Lisp_Object _temp_category_set;
/* The standard category table is stored where it will automatically
be used in all new buffers. */
#define Vstandard_category_table B_ (&buffer_defaults, category_table)
#define Vstandard_category_table BVAR (&buffer_defaults, category_table)
/* Return the category set of character C in the current category table. */
#define CATEGORY_SET(c) char_category_set (c)

View file

@ -521,7 +521,7 @@ chars_in_text (const unsigned char *ptr, EMACS_INT nbytes)
{
/* current_buffer is null at early stages of Emacs initialization. */
if (current_buffer == 0
|| NILP (B_ (current_buffer, enable_multibyte_characters)))
|| NILP (BVAR (current_buffer, enable_multibyte_characters)))
return nbytes;
return multibyte_chars_in_text (ptr, nbytes);
@ -987,7 +987,7 @@ character is not ASCII nor 8-bit character, an error is signalled. */)
pos = XFASTINT (position);
p = CHAR_POS_ADDR (pos);
}
if (NILP (B_ (current_buffer, enable_multibyte_characters)))
if (NILP (BVAR (current_buffer, enable_multibyte_characters)))
return make_number (*p);
}
else

View file

@ -417,7 +417,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
do \
{ \
CHARIDX++; \
if (!NILP (B_ (current_buffer, enable_multibyte_characters))) \
if (!NILP (BVAR (current_buffer, enable_multibyte_characters))) \
{ \
unsigned char *ptr = BYTE_POS_ADDR (BYTEIDX); \
int len; \
@ -484,7 +484,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
do \
{ \
(charpos)++; \
if (NILP (B_ (current_buffer, enable_multibyte_characters))) \
if (NILP (BVAR (current_buffer, enable_multibyte_characters))) \
(bytepos)++; \
else \
INC_POS ((bytepos)); \
@ -498,7 +498,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
do \
{ \
(charpos)--; \
if (NILP (B_ (current_buffer, enable_multibyte_characters))) \
if (NILP (BVAR (current_buffer, enable_multibyte_characters))) \
(bytepos)--; \
else \
DEC_POS ((bytepos)); \
@ -561,11 +561,11 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#define ASCII_CHAR_WIDTH(c) \
(c < 0x20 \
? (c == '\t' \
? XFASTINT (B_ (current_buffer, tab_width)) \
: (c == '\n' ? 0 : (NILP (B_ (current_buffer, ctl_arrow)) ? 4 : 2))) \
? XFASTINT (BVAR (current_buffer, tab_width)) \
: (c == '\n' ? 0 : (NILP (BVAR (current_buffer, ctl_arrow)) ? 4 : 2))) \
: (c < 0x7f \
? 1 \
: ((NILP (B_ (current_buffer, ctl_arrow)) ? 4 : 2))))
: ((NILP (BVAR (current_buffer, ctl_arrow)) ? 4 : 2))))
/* Return the width of character C. The width is measured by how many
columns C will occupy on the screen when displayed in the current

View file

@ -1554,7 +1554,7 @@ only `ascii', `eight-bit-control', and `eight-bit-graphic'. */)
EMACS_INT from, from_byte, to, stop, stop_byte;
int i;
Lisp_Object val;
int multibyte = ! NILP (B_ (current_buffer, enable_multibyte_characters));
int multibyte = ! NILP (BVAR (current_buffer, enable_multibyte_characters));
validate_region (&beg, &end);
from = XFASTINT (beg);

View file

@ -277,7 +277,7 @@ After insertion, the value of `auto-fill-function' is called if the
int remove_boundary = 1;
CHECK_NATNUM (n);
if (!EQ (Vthis_command, current_kboard->Vlast_command))
if (!EQ (Vthis_command, KVAR (current_kboard, Vlast_command)))
nonundocount = 0;
if (NILP (Vexecuting_kbd_macro)
@ -292,10 +292,10 @@ After insertion, the value of `auto-fill-function' is called if the
}
if (remove_boundary
&& CONSP (B_ (current_buffer, undo_list))
&& NILP (XCAR (B_ (current_buffer, undo_list))))
&& CONSP (BVAR (current_buffer, undo_list))
&& NILP (XCAR (BVAR (current_buffer, undo_list))))
/* Remove the undo_boundary that was just pushed. */
B_ (current_buffer, undo_list) = XCDR (B_ (current_buffer, undo_list));
BVAR (current_buffer, undo_list) = XCDR (BVAR (current_buffer, undo_list));
/* Barf if the key that invoked this was not a character. */
if (!CHARACTERP (last_command_event))
@ -335,12 +335,12 @@ internal_self_insert (int c, EMACS_INT n)
EMACS_INT chars_to_delete = 0;
EMACS_INT spaces_to_insert = 0;
overwrite = B_ (current_buffer, overwrite_mode);
overwrite = BVAR (current_buffer, overwrite_mode);
if (!NILP (Vbefore_change_functions) || !NILP (Vafter_change_functions))
hairy = 1;
/* At first, get multi-byte form of C in STR. */
if (!NILP (B_ (current_buffer, enable_multibyte_characters)))
if (!NILP (BVAR (current_buffer, enable_multibyte_characters)))
{
len = CHAR_STRING (c, str);
if (len == 1)
@ -416,11 +416,11 @@ internal_self_insert (int c, EMACS_INT n)
synt = SYNTAX (c);
if (!NILP (B_ (current_buffer, abbrev_mode))
if (!NILP (BVAR (current_buffer, abbrev_mode))
&& synt != Sword
&& NILP (B_ (current_buffer, read_only))
&& NILP (BVAR (current_buffer, read_only))
&& PT > BEGV
&& (SYNTAX (!NILP (B_ (current_buffer, enable_multibyte_characters))
&& (SYNTAX (!NILP (BVAR (current_buffer, enable_multibyte_characters))
? XFASTINT (Fprevious_char ())
: UNIBYTE_TO_CHAR (XFASTINT (Fprevious_char ())))
== Sword))
@ -448,7 +448,7 @@ internal_self_insert (int c, EMACS_INT n)
if (chars_to_delete)
{
int mc = ((NILP (B_ (current_buffer, enable_multibyte_characters))
int mc = ((NILP (BVAR (current_buffer, enable_multibyte_characters))
&& SINGLE_BYTE_CHAR_P (c))
? UNIBYTE_TO_CHAR (c) : c);
Lisp_Object string = Fmake_string (make_number (n), make_number (mc));
@ -479,7 +479,7 @@ internal_self_insert (int c, EMACS_INT n)
if ((CHAR_TABLE_P (Vauto_fill_chars)
? !NILP (CHAR_TABLE_REF (Vauto_fill_chars, c))
: (c == ' ' || c == '\n'))
&& !NILP (B_ (current_buffer, auto_fill_function)))
&& !NILP (BVAR (current_buffer, auto_fill_function)))
{
Lisp_Object tem;
@ -488,7 +488,7 @@ internal_self_insert (int c, EMACS_INT n)
that. Must have the newline in place already so filling and
justification, if any, know where the end is going to be. */
SET_PT_BOTH (PT - 1, PT_BYTE - 1);
tem = call0 (B_ (current_buffer, auto_fill_function));
tem = call0 (BVAR (current_buffer, auto_fill_function));
/* Test PT < ZV in case the auto-fill-function is strange. */
if (c == '\n' && PT < ZV)
SET_PT_BOTH (PT + 1, PT_BYTE + 1);

View file

@ -7038,8 +7038,8 @@ decode_coding (struct coding_system *coding)
set_buffer_internal (XBUFFER (coding->dst_object));
if (GPT != PT)
move_gap_both (PT, PT_BYTE);
undo_list = B_ (current_buffer, undo_list);
B_ (current_buffer, undo_list) = Qt;
undo_list = BVAR (current_buffer, undo_list);
BVAR (current_buffer, undo_list) = Qt;
}
coding->consumed = coding->consumed_char = 0;
@ -7136,7 +7136,7 @@ decode_coding (struct coding_system *coding)
decode_eol (coding);
if (BUFFERP (coding->dst_object))
{
B_ (current_buffer, undo_list) = undo_list;
BVAR (current_buffer, undo_list) = undo_list;
record_insert (coding->dst_pos, coding->produced_char);
}
return coding->result;
@ -7433,7 +7433,7 @@ encode_coding (struct coding_system *coding)
{
set_buffer_internal (XBUFFER (coding->dst_object));
coding->dst_multibyte
= ! NILP (B_ (current_buffer, enable_multibyte_characters));
= ! NILP (BVAR (current_buffer, enable_multibyte_characters));
}
coding->consumed = coding->consumed_char = 0;
@ -7504,8 +7504,8 @@ make_conversion_work_buffer (int multibyte)
doesn't compile new regexps. */
Fset (Fmake_local_variable (Qinhibit_modification_hooks), Qt);
Ferase_buffer ();
B_ (current_buffer, undo_list) = Qt;
B_ (current_buffer, enable_multibyte_characters) = multibyte ? Qt : Qnil;
BVAR (current_buffer, undo_list) = Qt;
BVAR (current_buffer, enable_multibyte_characters) = multibyte ? Qt : Qnil;
set_buffer_internal (current);
return workbuf;
}
@ -7562,7 +7562,7 @@ decode_coding_gap (struct coding_system *coding,
coding->dst_object = coding->src_object;
coding->dst_pos = PT;
coding->dst_pos_byte = PT_BYTE;
coding->dst_multibyte = ! NILP (B_ (current_buffer, enable_multibyte_characters));
coding->dst_multibyte = ! NILP (BVAR (current_buffer, enable_multibyte_characters));
if (CODING_REQUIRE_DETECTION (coding))
detect_coding (coding);
@ -7728,7 +7728,7 @@ decode_coding_object (struct coding_system *coding,
coding->dst_pos = BUF_PT (XBUFFER (dst_object));
coding->dst_pos_byte = BUF_PT_BYTE (XBUFFER (dst_object));
coding->dst_multibyte
= ! NILP (B_ (XBUFFER (dst_object), enable_multibyte_characters));
= ! NILP (BVAR (XBUFFER (dst_object), enable_multibyte_characters));
}
else
{
@ -7798,7 +7798,7 @@ decode_coding_object (struct coding_system *coding,
TEMP_SET_PT_BOTH (saved_pt, saved_pt_byte);
else if (saved_pt < from + chars)
TEMP_SET_PT_BOTH (from, from_byte);
else if (! NILP (B_ (current_buffer, enable_multibyte_characters)))
else if (! NILP (BVAR (current_buffer, enable_multibyte_characters)))
TEMP_SET_PT_BOTH (saved_pt + (coding->produced_char - chars),
saved_pt_byte + (coding->produced - bytes));
else
@ -7822,7 +7822,7 @@ decode_coding_object (struct coding_system *coding,
{
tail->bytepos = from_byte + coding->produced;
tail->charpos
= (NILP (B_ (current_buffer, enable_multibyte_characters))
= (NILP (BVAR (current_buffer, enable_multibyte_characters))
? tail->bytepos : from + coding->produced_char);
}
}
@ -7960,7 +7960,7 @@ encode_coding_object (struct coding_system *coding,
set_buffer_temp (current);
}
coding->dst_multibyte
= ! NILP (B_ (XBUFFER (dst_object), enable_multibyte_characters));
= ! NILP (BVAR (XBUFFER (dst_object), enable_multibyte_characters));
}
else if (EQ (dst_object, Qt))
{
@ -8003,7 +8003,7 @@ encode_coding_object (struct coding_system *coding,
TEMP_SET_PT_BOTH (saved_pt, saved_pt_byte);
else if (saved_pt < from + chars)
TEMP_SET_PT_BOTH (from, from_byte);
else if (! NILP (B_ (current_buffer, enable_multibyte_characters)))
else if (! NILP (BVAR (current_buffer, enable_multibyte_characters)))
TEMP_SET_PT_BOTH (saved_pt + (coding->produced_char - chars),
saved_pt_byte + (coding->produced - bytes));
else
@ -8027,7 +8027,7 @@ encode_coding_object (struct coding_system *coding,
{
tail->bytepos = from_byte + coding->produced;
tail->charpos
= (NILP (B_ (current_buffer, enable_multibyte_characters))
= (NILP (BVAR (current_buffer, enable_multibyte_characters))
? tail->bytepos : from + coding->produced_char);
}
}
@ -8481,7 +8481,7 @@ highest priority. */)
return detect_coding_system (BYTE_POS_ADDR (from_byte),
to - from, to_byte - from_byte,
!NILP (highest),
!NILP (B_ (current_buffer
!NILP (BVAR (current_buffer
, enable_multibyte_characters)),
Qnil);
}
@ -8564,7 +8564,7 @@ DEFUN ("find-coding-systems-region-internal",
CHECK_NUMBER_COERCE_MARKER (end);
if (XINT (start) < BEG || XINT (end) > Z || XINT (start) > XINT (end))
args_out_of_range (start, end);
if (NILP (B_ (current_buffer, enable_multibyte_characters)))
if (NILP (BVAR (current_buffer, enable_multibyte_characters)))
return Qt;
start_byte = CHAR_TO_BYTE (XINT (start));
end_byte = CHAR_TO_BYTE (XINT (end));
@ -8698,7 +8698,7 @@ to the string. */)
validate_region (&start, &end);
from = XINT (start);
to = XINT (end);
if (NILP (B_ (current_buffer, enable_multibyte_characters))
if (NILP (BVAR (current_buffer, enable_multibyte_characters))
|| (ascii_compatible
&& (to - from) == (CHAR_TO_BYTE (to) - (CHAR_TO_BYTE (from)))))
return Qnil;
@ -8814,7 +8814,7 @@ is nil. */)
CHECK_NUMBER_COERCE_MARKER (end);
if (XINT (start) < BEG || XINT (end) > Z || XINT (start) > XINT (end))
args_out_of_range (start, end);
if (NILP (B_ (current_buffer, enable_multibyte_characters)))
if (NILP (BVAR (current_buffer, enable_multibyte_characters)))
return Qnil;
start_byte = CHAR_TO_BYTE (XINT (start));
end_byte = CHAR_TO_BYTE (XINT (end));

View file

@ -796,7 +796,7 @@ fill_gstring_header (Lisp_Object header, Lisp_Object start, Lisp_Object end, Lis
if (NILP (string))
{
if (NILP (B_ (current_buffer, enable_multibyte_characters)))
if (NILP (BVAR (current_buffer, enable_multibyte_characters)))
error ("Attempt to shape unibyte text");
validate_region (&start, &end);
from = XFASTINT (start);
@ -1028,7 +1028,7 @@ composition_compute_stop_pos (struct composition_it *cmp_it, EMACS_INT charpos,
cmp_it->stop_pos = endpos = start;
cmp_it->ch = -1;
}
if (NILP (B_ (current_buffer, enable_multibyte_characters))
if (NILP (BVAR (current_buffer, enable_multibyte_characters))
|| NILP (Vauto_composition_mode))
return;
if (bytepos < 0)
@ -1674,7 +1674,7 @@ composition_adjust_point (EMACS_INT last_pt, EMACS_INT new_pt)
return new_pt;
}
if (NILP (B_ (current_buffer, enable_multibyte_characters))
if (NILP (BVAR (current_buffer, enable_multibyte_characters))
|| NILP (Vauto_composition_mode))
return new_pt;
@ -1851,7 +1851,7 @@ See `find-composition' for more details. */)
if (!find_composition (from, to, &start, &end, &prop, string))
{
if (!NILP (B_ (current_buffer, enable_multibyte_characters))
if (!NILP (BVAR (current_buffer, enable_multibyte_characters))
&& ! NILP (Vauto_composition_mode)
&& find_automatic_composition (from, to, &start, &end, &gstring,
string))

View file

@ -1009,7 +1009,7 @@ swap_in_symval_forwarding (struct Lisp_Symbol *symbol, struct Lisp_Buffer_Local_
}
else
{
tem1 = assq_no_quit (var, B_ (current_buffer, local_var_alist));
tem1 = assq_no_quit (var, BVAR (current_buffer, local_var_alist));
XSETBUFFER (blv->where, current_buffer);
}
}
@ -1178,7 +1178,7 @@ set_internal (register Lisp_Object symbol, register Lisp_Object newval, register
tem1 = Fassq (symbol,
(blv->frame_local
? XFRAME (where)->param_alist
: B_ (XBUFFER (where), local_var_alist)));
: BVAR (XBUFFER (where), local_var_alist)));
blv->where = where;
blv->found = 1;
@ -1209,8 +1209,8 @@ set_internal (register Lisp_Object symbol, register Lisp_Object newval, register
bindings, not for frame-local bindings. */
eassert (!blv->frame_local);
tem1 = Fcons (symbol, XCDR (blv->defcell));
B_ (XBUFFER (where), local_var_alist)
= Fcons (tem1, B_ (XBUFFER (where), local_var_alist));
BVAR (XBUFFER (where), local_var_alist)
= Fcons (tem1, BVAR (XBUFFER (where), local_var_alist));
}
}
@ -1632,13 +1632,13 @@ Instead, use `add-hook' and specify t for the LOCAL argument. */)
if (let_shadows_global_binding_p (symbol))
message ("Making %s local to %s while let-bound!",
SDATA (SYMBOL_NAME (variable)),
SDATA (B_ (current_buffer, name)));
SDATA (BVAR (current_buffer, name)));
}
}
/* Make sure this buffer has its own value of symbol. */
XSETSYMBOL (variable, sym); /* Update in case of aliasing. */
tem = Fassq (variable, B_ (current_buffer, local_var_alist));
tem = Fassq (variable, BVAR (current_buffer, local_var_alist));
if (NILP (tem))
{
if (let_shadows_buffer_binding_p (sym))
@ -1650,9 +1650,9 @@ Instead, use `add-hook' and specify t for the LOCAL argument. */)
default value. */
find_symbol_value (variable);
B_ (current_buffer, local_var_alist)
BVAR (current_buffer, local_var_alist)
= Fcons (Fcons (variable, XCDR (blv->defcell)),
B_ (current_buffer, local_var_alist));
BVAR (current_buffer, local_var_alist));
/* Make sure symbol does not think it is set up for this buffer;
force it to look once again for this buffer's value. */
@ -1718,10 +1718,10 @@ From now on the default value will apply in this buffer. Return VARIABLE. */)
/* Get rid of this buffer's alist element, if any. */
XSETSYMBOL (variable, sym); /* Propagate variable indirection. */
tem = Fassq (variable, B_ (current_buffer, local_var_alist));
tem = Fassq (variable, BVAR (current_buffer, local_var_alist));
if (!NILP (tem))
B_ (current_buffer, local_var_alist)
= Fdelq (tem, B_ (current_buffer, local_var_alist));
BVAR (current_buffer, local_var_alist)
= Fdelq (tem, BVAR (current_buffer, local_var_alist));
/* If the symbol is set up with the current buffer's binding
loaded, recompute its value. We have to do it now, or else
@ -1848,7 +1848,7 @@ BUFFER defaults to the current buffer. */)
XSETBUFFER (tmp, buf);
XSETSYMBOL (variable, sym); /* Update in case of aliasing. */
for (tail = B_ (buf, local_var_alist); CONSP (tail); tail = XCDR (tail))
for (tail = BVAR (buf, local_var_alist); CONSP (tail); tail = XCDR (tail))
{
elt = XCAR (tail);
if (EQ (variable, XCAR (elt)))

View file

@ -158,7 +158,7 @@ directory_files_internal (Lisp_Object directory, Lisp_Object full, Lisp_Object m
# ifdef WINDOWSNT
/* Windows users want case-insensitive wildcards. */
bufp = compile_pattern (match, 0,
B_ (&buffer_defaults, case_canon_table), 0, 1);
BVAR (&buffer_defaults, case_canon_table), 0, 1);
# else /* !WINDOWSNT */
bufp = compile_pattern (match, 0, Qnil, 0, 1);
# endif /* !WINDOWSNT */

View file

@ -1416,7 +1416,7 @@ struct glyph_string
&& !(W)->pseudo_window_p \
&& FRAME_WANTS_MODELINE_P (XFRAME (WINDOW_FRAME ((W)))) \
&& BUFFERP ((W)->buffer) \
&& !NILP (B_ (XBUFFER ((W)->buffer), mode_line_format)) \
&& !NILP (BVAR (XBUFFER ((W)->buffer), mode_line_format)) \
&& WINDOW_TOTAL_LINES (W) > 1)
/* Value is non-zero if window W wants a header line. */
@ -1426,8 +1426,8 @@ struct glyph_string
&& !(W)->pseudo_window_p \
&& FRAME_WANTS_MODELINE_P (XFRAME (WINDOW_FRAME ((W)))) \
&& BUFFERP ((W)->buffer) \
&& !NILP (B_ (XBUFFER ((W)->buffer), header_line_format)) \
&& WINDOW_TOTAL_LINES (W) > 1 + !NILP (B_ (XBUFFER ((W)->buffer), mode_line_format)))
&& !NILP (BVAR (XBUFFER ((W)->buffer), header_line_format)) \
&& WINDOW_TOTAL_LINES (W) > 1 + !NILP (BVAR (XBUFFER ((W)->buffer), mode_line_format)))
/* Return proper value to be used as baseline offset of font that has

Some files were not shown because too many files have changed in this diff Show more