merge from trunk

This commit is contained in:
Tom Tromey 2013-01-16 11:48:32 -07:00
commit 6f4de085f0
190 changed files with 4951 additions and 2231 deletions

View file

@ -1,3 +1,38 @@
2013-01-16 Paul Eggert <eggert@cs.ucla.edu>
Merge from gnulib, incorporating:
2013-01-16 largefile: port better to Mac OS X 10.5
2013-01-15 stdint: fix build with Android's Bionic fox x86
2013-01-16 Paul Eggert <eggert@cs.ucla.edu>
* configure.ac: Document that --enable-gcc-warnings emits errors.
(Bug#13448)
2013-01-13 Glenn Morris <rgm@gnu.org>
* make-dist: Add options for xz compression and no compression.
2013-01-12 Paul Eggert <eggert@cs.ucla.edu>
Enable conservative stack scanning for all architectures.
Suggested by Stefan Monnier in
<http://lists.gnu.org/archive/html/emacs-devel/2013-01/msg00183.html>.
* configure.ac (GC_MARK_STACK): Remove.
2013-01-11 Paul Eggert <eggert@cs.ucla.edu>
* lib/getopt_.h: Remove trailing CRs that crept in.
2013-01-11 Eli Zaretskii <eliz@gnu.org>
* lib/getopt_.h: Regenerate.
2013-01-10 Paul Eggert <eggert@cs.ucla.edu>
Merge from gnulib, incorporating:
2013-01-09 stdlib: port to Solaris 2.6
2013-01-04 Glenn Morris <rgm@gnu.org>
* info/dir: Add htmlfontify.

View file

@ -1,3 +1,8 @@
2013-01-15 Dmitry Antipov <dmantipov@yandex.ru>
* coccinelle/xsave.cocci: Semantic patch to adjust users of
XSAVE_POINTER and XSAVE_INTEGER macros.
2013-01-03 Glenn Morris <rgm@gnu.org>
* check-doc-strings: Update for CVS->bzr, moved lispref/ directory.
@ -132,15 +137,14 @@
* grammars/bovine-grammar.el (bovine--grammar-newstyle-unquote):
Remove.
(bovine-grammar-expand-form): Test for emacs-major-version.
(bovine-grammar-expand-form): Test for emacs-major-version.
* grammars/c.by: Add EXPLICIT to keyword tokens.
Add %provide token.
* grammars/f90.by: Add %provide token.
* grammar/grammar.wy (semantic-grammar-lexer): Remove, since it
* grammars/grammar.wy (semantic-grammar-lexer): Remove, since it
was copied to grammar.el. New %provide token to generate prefix
which conforms with Emacs conventions. Remove lexer definition,
which conforms with Emacs conventions. Remove lexer definition,
which is now in grammar.el.
2012-09-27 Glenn Morris <rgm@gnu.org>
@ -184,7 +188,7 @@
2012-09-13 Paul Eggert <eggert@cs.ucla.edu>
Simplify SIGIO usage (Bug#12408).
* CPP_DEFINES (BROKEN_SIGAIO, BROKEN_SIGIO, BROKEN_SIGPOLL)
* CPP-DEFINES (BROKEN_SIGAIO, BROKEN_SIGIO, BROKEN_SIGPOLL)
(BROKEN_SIGPTY, NO_TERMIO): Remove.
2012-09-11 Paul Eggert <eggert@cs.ucla.edu>

View file

@ -16,9 +16,6 @@ maintainer has been found so far.
1.
==============================================================================
Richard Stallman
???
Jason Rumney
W32
@ -71,13 +68,6 @@ Jay Belanger
etc/calccard.tex
doc/misc/calc.texi
Michael Olson
ERC
lisp/erc/*
etc/ERC-NEWS
doc/misc/erc.texi
lisp/emacs-lisp/tq.el
Bastien Guerry
Org
lisp/org/*
@ -87,9 +77,6 @@ Bastien Guerry
2.
==============================================================================
Steven Tamm
MacOS
Eli Zaretskii
doc/*
lispref/*

View file

@ -0,0 +1,11 @@
// Adjust users of XSAVE_POINTER and XSAVE_INTEGER.
@@
expression E;
@@
(
- XSAVE_POINTER (E)
+ XSAVE_POINTER (E, 0)
|
- XSAVE_INTEGER (E)
+ XSAVE_INTEGER (E, 1)
)

View file

@ -2,22 +2,46 @@ Instructions to create pretest or release tarballs.
-- originally written by Gerd Moellmann, amended by Francesco Potortì
with the initial help of Eli Zaretskii
For each step, check for possible errors.
0. Decide on versions of automake and autoconf, and ensure you will
Steps to take before starting on the first pretest in any release sequence:
1. Decide on versions of automake and autoconf, and ensure you will
have them available for the duration of the release process.
2. Consider increasing the value of the variable
`customize-changed-options-previous-release' in cus-edit.el to
refer to a newer version of Emacs. (This is probably needed only
when preparing the first pretest for a major Emacs release.)
Commit cus-edit.el if changed.
General steps (for each step, check for possible errors):
1. `bzr update' (for a bound branch), or `bzr pull'.
bzr status # check for locally modified files
bzr status # check for locally modified files
2. Bootstrap to make 100% sure all elc files are up-to-date, and to
make sure that the later tagged version will bootstrap, should it be
necessary to check it out.
3. Regenerate the etc/AUTHORS file:
M-: (require 'authors) RET, M-x authors RET, save the *Authors* buffer.
If there are errors that relate to syntactically incorrect
ChangeLog entries, consider fixing them and repeating.
M-: (require 'authors) RET
M-x authors RET
There is almost guaranteed to be an "*Authors Errors*" buffer with
problems caused by certain bad ChangeLog entries. You can ignore
the very old ones (eg lisp/erc has a lot). If there are errors
related to new entries (especially entries that are new since the
last pretest), see if you can fix them. If there was a ChangeLog
typo, fix it. If a file was deleted or renamed, consider adding
an appropriate entry to authors-ignored-files, authors-valid-file-names,
or authors-renamed-files-alist.
If necessary, repeat M-x authors after making those changes.
Save the "*Authors*" buffer as etc/AUTHORS.
Check the diff looks reasonable. Maybe add entries to
authors-ambiguous-files or authors-aliases, and repeat.
Commit any fixes to ChangeLogs or authors.el.
4. Set the version number (M-x load-file RET admin/admin.el RET, then
M-x set-version RET). For a release, add released ChangeLog
@ -26,20 +50,18 @@ For each step, check for possible errors.
For a pretest, start at version .90. After .99, use .990 (so that
it sorts).
If needed, increment the value of the variable
`customize-changed-options-previous-release' in cus-edit.el to
refer to a newer release of Emacs. (This is probably needed only
when preparing a major Emacs release, or branching for it.)
5. autoreconf -i -I m4 --force
make bootstrap
6. Commit etc/AUTHORS, all the files changed by M-x set-version, and
lisp/cus-edit.el (if modified).
Copy lisp/loaddefs.el to lisp/ldefs-boot.el and commit lisp/ldefs-boot.el.
6. Copy lisp/loaddefs.el to lisp/ldefs-boot.el.
Commit etc/AUTHORS, lisp/ldefs-boot.el, and the files changed
by M-x set-version.
For a release, also commit the ChangeLog files in all directories.
7. make-dist --snapshot. Check the contents of the new tar with
7. ./make-dist --snapshot --no-compress
Check the contents of the new tar with
admin/diff-tar-files against an older tar file. Some old pretest
tarballs may be found at <ftp://alpha.gnu.org/gnu/emacs/pretest>;
old release tarballs are at <ftp://ftp.gnu.org/pub/gnu/emacs/>.
@ -49,15 +71,15 @@ For each step, check for possible errors.
something like `find . | sort' in a clean bzr tree, and compare the
results against the new tar contents.
8. tar -zxf emacs-NEW.tar.gz; cd emacs-NEW
./configure && make && make -n install
8. tar -xf emacs-NEW.tar; cd emacs-NEW
./configure --prefix=/tmp/emacs && make && make install
Use `script' or M-x compile to save the compilation log in
compile-NEW.log and compare it against an old one. The easiest way
to do that is to visit the old log in Emacs, change the version
number of the old Emacs to __, do the same with the new log and do
M-x ediff. Especially check that Info files aren't built.
9. cd EMACS_ROOT_DIR; bzr tag TAG
9. cd EMACS_ROOT_DIR && bzr tag TAG
TAG is emacs-XX.Y.ZZ for a pretest, emacs-XX.Y for a release.
Shortly before the release, cut the version branch also, and open
@ -65,16 +87,37 @@ For each step, check for possible errors.
be sent to the emacs-diffs mailing list (by default, the list
normally only gets commits to the trunk).
10. Now you should upload the files to the GNU ftp server. In order to
10. Decide what compression schemes to offer.
For a release, at least gz and xz:
gzip --best -c emacs-NEW.tar > emacs-NEW.tar.gz
xz -c emacs-NEW.tar > emacs-NEW.tar.xz
Now you should upload the files to the GNU ftp server. In order to
do that, you must be registered as an Emacs maintainer and have your
GPG key acknowledged by the ftp people. For instructions, see
http://www.gnu.org/prep/maintain/html_node/Automated-Upload-Registration.html
You can use the gnulib script "gnupload" to upload each FILE, like this:
gnupload --to alpha.gnu.org:emacs/pretest FILE (for a pretest)
gnupload --to ftp.gnu.org:emacs FILE (for a release)
The simplest method is to use the gnulib <http://www.gnu.org/s/gnulib/>
script "build-aux/gnupload" to upload each FILE, like this:
For a pretest:
gnupload [--user your@gpg.key.email] --to alpha.gnu.org:emacs/pretest \
FILE.gz FILE.xz ...
For a release:
gnupload [--user your@gpg.key.email] --to ftp.gnu.org:emacs \
FILE.gz FILE.xz ...
You only need the --user part if you have multiple GPG keys and do
not want to use the default.
Obviously, if you do not have a fast uplink, be prepared for the
upload to take a while.
If you prefer to do it yourself rather than use gnupload:
For each FILE, create a detached GPG binary signature and a
clearsigned directive file like this:
Instead of using gnupload, for each FILE, create a detached GPG
binary signature and a clearsigned directive file like this:
gpg -b FILE
echo directory: emacs/pretest > FILE.directive (for a pretest)
echo directory: emacs > FILE.directive (for a release)
@ -85,13 +128,12 @@ For each step, check for possible errors.
For a pretest, place the files in /incoming/alpha instead, so that
they appear on ftp://alpha.gnu.org/.
For a release, upload xz and bz2 tarfiles as well; this can save a lot
of bandwidth.
11. After five minutes, verify that the files are visible at
ftp://alpha.gnu.org/gnu/emacs/pretest/ for a pretest, at
ftp://alpha.gnu.org/gnu/emacs/pretest/ for a pretest, or
ftp://ftp.gnu.org/gnu/emacs/ for a release.
Download them and check the signatures. Check they build.
12. For a pretest, announce it on emacs-devel and info-gnu-emacs@gnu.org.
For a release, also announce it on info-gnu@gnu.org. (Probably
bcc the info- addresses to make it less likely that people will
@ -99,3 +141,4 @@ For each step, check for possible errors.
13. For a release, update the Emacs homepage in the web repository.
Also add the new NEWS file as NEWS.xx.y.
Maybe regenerate the html manuals, update the FAQ, etc, etc.

View file

@ -288,4 +288,4 @@ 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/>.
along with GNU Emacs. If not, see http://www.gnu.org/licenses/.

View file

@ -160,10 +160,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
/* Mark a secondary stack, like the register stack on the ia64. */
#undef GC_MARK_SECONDARY_STACK
/* Define to GC_USE_GCPROS_AS_BEFORE if conservative garbage collection is not
known to work. */
#undef GC_MARK_STACK
/* Define if setjmp is known to save all registers relevant for conservative
garbage collection in the jmp_buf. */
#undef GC_SETJMP_WORKS

17
autogen/configure vendored
View file

@ -2076,9 +2076,10 @@ Optional Features:
--disable-dependency-tracking speeds up one-time build
--enable-dependency-tracking do not reject slow dependency extractors
--disable-largefile omit support for large files
--enable-gcc-warnings turn on lots of GCC warnings. This is intended for
developers, and may generate false alarms when used
with older or non-GNU development tools.
--enable-gcc-warnings turn on lots of GCC warnings/errors. This is
intended for developers, and may generate false
alarms when used with older or non-GNU development
tools.
--enable-link-time-optimization
build emacs with link-time optimization. This is
supported only for GCC since 4.5.0.
@ -15707,14 +15708,7 @@ esac
case $opsys in
aix4-2 | hpux* | unixware)
$as_echo "#define GC_MARK_STACK GC_USE_GCPROS_AS_BEFORE" >>confdefs.h
;;
gnu-linux | gnu-kfreebsd )
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@ -15739,9 +15733,6 @@ _ACEOF
if ac_fn_c_try_cpp "$LINENO"; then :
$as_echo "#define GC_SETJMP_WORKS 1" >>confdefs.h
else
$as_echo "#define GC_MARK_STACK GC_USE_GCPROS_AS_BEFORE" >>confdefs.h
fi
rm -f conftest.err conftest.$ac_ext
;;

View file

@ -627,7 +627,7 @@ fi
AC_ARG_ENABLE([gcc-warnings],
[AS_HELP_STRING([--enable-gcc-warnings],
[turn on lots of GCC warnings. This is intended for
[turn on lots of GCC warnings/errors. This is intended for
developers, and may generate false alarms when used
with older or non-GNU development tools.])],
[case $enableval in
@ -3777,22 +3777,13 @@ case $opsys in
esac
dnl These won't be used automatically yet. We also need to know, at least,
dnl This won't be used automatically yet. We also need to know, at least,
dnl that the stack is continuous.
AH_TEMPLATE(GC_SETJMP_WORKS, [Define if setjmp is known to save all
registers relevant for conservative garbage collection in the jmp_buf.])
AH_TEMPLATE(GC_MARK_STACK, [Define to GC_USE_GCPROS_AS_BEFORE if
conservative garbage collection is not known to work.])
case $opsys in
aix4-2 | hpux* | unixware)
dnl Conservative garbage collection has not been tested, so for now
dnl play it safe and stick with the old-fashioned way of marking.
AC_DEFINE(GC_MARK_STACK, [GC_USE_GCPROS_AS_BEFORE])
;;
dnl Not all the architectures are tested, but there are Debian packages
dnl for SCM and/or Guile on them, so the technique must work. See also
dnl comments in alloc.c concerning setjmp and gcc.
@ -3807,8 +3798,7 @@ case $opsys in
#else
# error "setjmp not known to work on this arch"
#endif
]], [[]])], AC_DEFINE(GC_SETJMP_WORKS, 1),
AC_DEFINE(GC_MARK_STACK, [GC_USE_GCPROS_AS_BEFORE]) )
]], [[]])], AC_DEFINE(GC_SETJMP_WORKS, 1))
;;
esac

View file

@ -1,3 +1,8 @@
2013-01-07 Bastien Guerry <bzg@gnu.org>
* help.texi (Apropos): Document `apropos-user-option' and update
the doc for `apropos-variable'.
2013-01-05 Glenn Morris <rgm@gnu.org>
* text.texi (HTML Mode): Remove deleted nxml C-RET binding.

View file

@ -295,11 +295,16 @@ search for noninteractive functions too.
Search for functions and variables. Both interactive functions
(commands) and noninteractive functions can be found by this.
@item M-x apropos-variable
@findex apropos-variable
@item M-x apropos-user-option
@findex apropos-user-option
Search for user-customizable variables. With a prefix argument,
search for non-customizable variables too.
@item M-x apropos-variable
@findex apropos-variable
Search for variables. With a prefix argument, search for
customizable variables only.
@item M-x apropos-value
@findex apropos-value
Search for variables whose values match the specified pattern. With a

View file

@ -1,3 +1,12 @@
2013-01-09 Glenn Morris <rgm@gnu.org>
* commands.texi (Interactive Codes):
Whitespace does not terminate interactive "S". (Bug#13393)
2013-01-06 Chong Yidong <cyd@gnu.org>
* windows.texi (Vertical Scrolling): Fix typos (Bug#13267).
2013-01-05 Glenn Morris <rgm@gnu.org>
* display.texi (Overlay Properties): Mention field. (Bug#13364)

View file

@ -471,10 +471,10 @@ Arbitrary text, read in the minibuffer and returned as a string
these characters in the input.) Prompt.
@item S
An interned symbol whose name is read in the minibuffer. Any whitespace
character terminates the input. (Use @kbd{C-q} to include whitespace in
the string.) Other characters that normally terminate a symbol (e.g.,
parentheses and brackets) do not do so here. Prompt.
An interned symbol whose name is read in the minibuffer. Terminate
the input with either @kbd{C-j} or @key{RET}. Other characters that
normally terminate a symbol (e.g., whitespace, parentheses and
brackets) do not do so here. Prompt.
@item U
A key sequence or @code{nil}. Can be used after a @samp{k} or

View file

@ -3054,10 +3054,11 @@ pixels. In this case, the return value is @var{lines}.
@end defun
@defvar auto-window-vscroll
If this variable is non-@code{nil}, the line-move, scroll-up, and
scroll-down functions will automatically modify the vertical scroll
position to scroll through display rows that are taller than the height
of the window, for example in the presence of large images.
If this variable is non-@code{nil}, the @code{line-move},
@code{scroll-up}, and @code{scroll-down} functions will automatically
modify the vertical scroll position to scroll through display rows
that are taller than the height of the window, for example in the
presence of large images.
@end defvar
@node Horizontal Scrolling

View file

@ -1,3 +1,48 @@
2013-01-13 Bastien Guerry <bzg@gnu.org>
* org.texi (Installation): Simplify.
2013-01-13 François Allisson <francois@allisson.co> (tiny change)
* org.texi (Handling links): Update the mention to the obsolete
variable `org-link-to-org-use-id' with a mention to the newer
variable `org-id-link-to-org-use-id'. Mention the need to load
the org-id library.
2013-01-10 Michael Albinus <michael.albinus@gmx.de>
* tramp.texi (Default Host): Introduce `tramp-default-host-alist'.
2013-01-09 Bastien Guerry <bzg@gnu.org>
* org.texi (Pushing to MobileOrg): Add footnote about using
symbolic links in `org-directory'.
(Timestamps, Deadlines and scheduling): Use `diary-float' instead
of the now obsolete alias `org-float'.
(TODO basics): Add `org-use-fast-todo-selection' to the variable
index. Fix description of TODO keywords cycling.
(Advanced features): Add missing argument for @item.
(Storing searches): Add index entries and a note about
*-tree agenda views.
(Structure editing): Document `org-mark-element' and
`org-mark-subtree'.
(Tag inheritance): Document `org-agenda-use-tag-inheritance'.
2013-01-08 Juri Linkov <juri@jurta.org>
* info.texi (Go to node): Mention the abbreviated format
`(FILENAME)' equal to `(FILENAME)Top'. (Bug#13365)
2013-01-06 Andreas Schwab <schwab@linux-m68k.org>
* autotype.texi: Remove undefined command @subtitlefont.
* cc-mode.texi: Likewise.
* org.texi (Advanced features): Use `@w{ }' instead of `@ ' in
@item argument.
(Property searches): Use \\ instead of @backslashchar{}.
* pgg.texi (VERSION): Move @set below @setfilename.
2013-01-05 Andreas Schwab <schwab@linux-m68k.org>
* ada-mode.texi: Remove braces from @title argument.

View file

@ -37,8 +37,7 @@ modify this GNU manual.''
@center @titlefont{Autotyping}
@sp 2
@center @subtitlefont{Convenient features for text that you enter
frequently in Emacs}
@center Convenient features for text that you enter frequently in Emacs
@sp 2
@center Daniel Pfeiffer
@center additions by Dave Love

View file

@ -188,7 +188,7 @@ modify this GNU manual.''
@center @titlefont{CC Mode 5.32}
@sp 2
@center @subtitlefont{A GNU Emacs mode for editing C and C-like languages}
@center A GNU Emacs mode for editing C and C-like languages
@sp 2
@center Barry A. Warsaw, Martin Stjernholm, Alan Mackenzie

View file

@ -7,7 +7,7 @@
@copying
This manual documents Htmlfontify, a source code -> crosslinked +
formatted + syntax colorised html transformer.
formatted + syntax colorized html transformer.
Copyright @copyright{} 2002, 2003, 2013 Free Software Foundation, Inc.
@ -56,7 +56,7 @@ modify this GNU manual.''
@menu
* Introduction:: About Htmlfontify.
* Usage & Examples:: How to use Htmlfontify.
* Customisation:: Fine-tuning Htmlfontify's behaviour.
* Customization:: Fine-tuning Htmlfontify's behaviour.
* Requirements:: External programs used by Htmlfontify.
* GNU Free Documentation License:: The license for this documentation.
* Index:: Index of contents.
@ -68,7 +68,7 @@ modify this GNU manual.''
Htmlfontify provides a means of converting individual Emacs buffers,
source files, or entire source trees to html, preserving formatting
and Emacs colorisation / syntax highlighting as much as possible
and Emacs colorization / syntax highlighting as much as possible
through careful application of CSS stylesheets and html tags.
It can also turn instances of functions, methods and (for some
@ -76,7 +76,7 @@ languages) variables and other constructs and items into links
to their definitions, and create an index file (or files) of
all such symbols, also linked to their points of definition.
Htmlfontify also provides several customisation items, which should
Htmlfontify also provides several customization items, which should
allow it to mesh more-or-less seamlessly with various templating or
publishing systems (in the event, for instance, that you don't want
to produce the html pages directly).
@ -93,7 +93,7 @@ batch mode.
@menu
* Interactive:: Using Htmlfontify interactively.
* Non-interactive:: Using Htmlfontify from elisp.
* Variables:: Variables (other than customisation entries).
* Variables:: Variables (other than customization entries).
* Data Structures:: Important data structures.
* Examples:: Example(s) of Htmlfontify in use.
@end menu
@ -236,7 +236,7 @@ color map specified, otherwise it uses Htmlfontify's built in map.
@end lisp
Return a @code{defface} style alist of possible specifications for
@var{face}, with any entries resulting from user customisation
@var{face}, with any entries resulting from user customization
(@code{custom-set-faces}) taking precedence.
See also: @ref{hfy-default-face-def}
@ -268,10 +268,10 @@ does things like deferring fontification until a section of the buffer is
exposed and rendered, or until Emacs is idle for a while. Sometimes, in
non-interactive circumstances, or if it can't see X, it doesn't bother
with some of the harder stuff. While this is all great from the perspective
of a user waiting for Emacs to load a 20000 line file and colorise it,
of a user waiting for Emacs to load a 20000 line file and colorize it,
it's a pain from the point of view from non-interactive code. This function
lies, cheats, steals and generally bullies Emacs into fontifying a buffer
from start to finish, with all the extra frills, whether it thinks it nneds
from start to finish, with all the extra frills, whether it thinks it needs
to or not. Oh yes: it operates on the current buffer.
@item hfy-link-style-string
@ -861,7 +861,7 @@ As per @ref{hfy-color} but for background colors.
(hfy-kludge-cperl-mode)
@end lisp
cperl mode does its damndest not to do some of its fontification when not
cperl mode does its best to not do some of its fontification when not
in a windowing system---we try to trick it@dots{}
@item hfy-href
@ -1044,7 +1044,7 @@ Convert an Emacs @code{:width} attribute to a CSS font-stretch attribute.
@section Variables
@cindex variables
Important variables that are not customisation items:
Important variables that are not customization items:
@table @code
@ -1234,7 +1234,7 @@ main-content <=MAIN_CONTENT;\n" rtfm-section file style rtfm-section file))
;; Here's the function I actually call---it asks me for a section label,
;; and source and destination directories, and then binds a couple of
;; customisation variable in a let before calling htmlfontify:
;; customization variable in a let before calling htmlfontify:
(defun rtfm-build-source-docs (section srcdir destdir)
(interactive
"s section[eg- emacs / p4-blame]:\nD source-dir: \nD output-dir: ")
@ -1252,11 +1252,11 @@ main-content <=MAIN_CONTENT;\n" rtfm-section file style rtfm-section file))
(htmlfontify-copy-and-link-dir srcdir destdir ".src" ".html")))
@end lisp
@node Customisation
@chapter Customisation
@cindex variables (customisation)
@node Customization
@chapter Customization
@cindex variables (customization)
Htmlfontify provides the following variable and customisation entries:
Htmlfontify provides the following variable and customization entries:
@table @code
@comment AUTOGENERATED BLOCK
@ -1394,7 +1394,7 @@ when @ref{hfy-display-class} has been set (the normal Htmlfontify way of
extracting potentially non-current face information doesn't necessarily
work for @code{default}).
For example, I customise this to:
For example, I customize this to:
@lisp
((t :background "black" :foreground "white" :family "misc-fixed"))
@ -1405,7 +1405,7 @@ For example, I customise this to:
@anchor{hfy-init-kludge-hooks}
List of functions to call when starting htmlfontify-buffer to do any
kludging necessary to get highlighting modes to bahave as you want, even
kludging necessary to get highlighting modes to behave as you want, even
when not running under a window system.
@item hfy-shell-file-name
@ -1421,7 +1421,7 @@ Currently this is only required/used when using GNU etags, see
@vindex hfy-optimisations
@anchor{hfy-optimisations}
Optimisations to turn on. So far, the following have been implemented:
Optimizations to turn on. So far, the following have been implemented:
@table @option
@item merge-adjacent-tags
@ -1454,7 +1454,8 @@ Suppress hyperlinking between files highlighted by different modes.
@end table
Note: like compiler optimisations, these optimise the _output_ of the code,
Note: like compiler optimizations, these optimize the @emph{output} of
the code,
not the processing of the source itself, and are therefore likely to slow
Htmlfontify down, at least a little. Except for skip-refontification,
which can never slow you down, but may result in incomplete fontification.
@ -1470,7 +1471,7 @@ Regex to remove from the <style> a variant of an Htmlfontify CSS class.
@anchor{hfy-link-extn}
File extension used for href links---useful where the Htmlfontify
output files are going to be processed again, with a rersulting change
output files are going to be processed again, with a resulting change
in file extension. If @code{nil}, then any code using this should fall back
to @ref{hfy-extn}.
@ -1570,16 +1571,16 @@ money are always welcome.
@item
A copy of etags (exuberant-ctags or GNU etags). Htmlfontify attempts
to autodetect the version you have and customise itself accordingly,
to autodetect the version you have and customize itself accordingly,
but you should be able to override this.
See: @ref{Customisation}
See: @ref{Customization}
@item
A copy of find (e.g., GNU find) that provides the @code{-path} predicate.
You may be able to work around this with a suitable clever shell
command and the customisation entry: @ref{hfy-find-cmd}
command and the customization entry: @ref{hfy-find-cmd}
@item
A copy of sed (e.g., GNU sed).
@ -1603,7 +1604,7 @@ A copy of the @code{file} command.
@item Functions
@printindex fn
@item Variables & Customisation
@item Variables & Customization
@printindex vr
@end table

View file

@ -1079,7 +1079,8 @@ partial node name.
node name by putting it at the front, in parentheses. Thus,
@kbd{g(dir)Top@key{RET}} would go to the Info Directory node, which is
the node @samp{Top} in the Info file @file{dir}. Likewise,
@kbd{g(emacs)Top@key{RET}} goes to the top node of the Emacs manual.
@kbd{g(emacs)Top@key{RET}} (or just @kbd{g(emacs)@key{RET}}) goes to the
top node of the Emacs manual.
The node name @samp{*} specifies the whole file. So you can look at
all of the current file by typing @kbd{g*@key{RET}} or all of any

View file

@ -2,7 +2,7 @@
@c %**start of header
@setfilename ../../info/org
@settitle The Org Manual
@set VERSION 7.9.2 (GNU Emacs 24.3)
@set VERSION 7.9.3d (GNU Emacs 24.3)
@c Use proper quote and backtick for code sections in PDF output
@c Cf. Texinfo manual 14.2
@ -339,7 +339,7 @@ with contributions by David O'Toole, Bastien Guerry, Philip Rooke, Dan Davison,
Introduction
* Summary:: Brief summary of what Org does
* Installation:: How to install a downloaded version of Org
* Installation:: Installing Org
* Activation:: How to activate Org for certain buffers
* Feedback:: Bug reports, ideas, patches etc.
* Conventions:: Typesetting conventions in the manual
@ -771,7 +771,7 @@ MobileOrg
@menu
* Summary:: Brief summary of what Org does
* Installation:: How to install a downloaded version of Org
* Installation:: Installing Org
* Activation:: How to activate Org for certain buffers
* Feedback:: Bug reports, ideas, patches etc.
* Conventions:: Typesetting conventions in the manual
@ -851,118 +851,69 @@ Theory Ltd.}
@cindex installation
@cindex XEmacs
@b{Important:} @i{If you the version of Org that comes with Emacs or as a
XEmacs package, please skip this section and go directly to @ref{Activation}.
If you downloaded Org as an ELPA package, please read the instructions on the
@uref{http://orgmode.org/elpa.html, Org ELPA page}. To see what version of Org
(if any) is part of your Emacs distribution, type @kbd{M-x org-version} (if
your Emacs distribution does not come with Org, this function will not be
defined).}
Installation of Org mode uses a build system, which is described in more
detail on @uref{http://orgmode.org/worg/dev/org-build-system.html, Worg}.
If you have downloaded Org from the Web as a distribution @file{.zip} or
@file{.tar.gz} archive, take the following steps to install it:
Org is part of recent distributions of GNU Emacs, so you normally don't need
to install it. If, for one reason or another, you want to install Org on top
of this pre-packaged version, there are three ways to do it:
@itemize @bullet
@item Unpack the distribution archive.
@item Change into (@code{cd}) the Org directory.
@item Run @code{make help config}
and then check and edit the file @file{local.mk} if the default configuration
does not match your system. Set the name of the Emacs binary (likely either
@file{emacs} or @file{xemacs}), and the paths to the directories where local
Lisp and Info files will be installed. If the Emacs binary is not in your
path, give the full path to the executable. Avoid spaces in any path names.
@item Run @code{make config}
again to check the configuration.
@item Run @code{make install} or @code{sudo make install}
to build and install Org mode on your system.
@item By using Emacs package system.
@item By downloading Org as an archive.
@item By using Org's git repository.
@end itemize
If you use a cloned Git repository, then the procedure is slightly different.
The following description assumes that you are using the @code{master} branch
(where the development is done). You could also use the @code{maint} branch
instead, where the release versions are published, just replace @code{master}
with @code{maint} in the description below.
We @b{strongly recommend} to stick to a single installation method.
@itemize @bullet
@item Change into (@code{cd}) the Org repository.
@item Run @code{git checkout master}
to switch to the @code{master} branch of the Org repository.
@item Run @code{make help}
and then check and edit the file @file{local.mk}. You must set the name of
the Emacs binary (likely either @file{emacs} or @file{xemacs}), and the paths
to the directories where local Lisp and Info files will be installed. If the
Emacs binary is not in your path, you must give the full path to the
executable. Avoid spaces in any path names.
@item Run @code{make config}
to check the configuration.
@item Optionally run @code{make test}
to build Org mode and then run the full testsuite.
@item Run @code{make update2} or @code{make up2}
to update the Git repository and build and install Org mode. The latter
invocation runs the complete test suite before installation and installs only
if the build passes all tests.
@end itemize
@subsubheading Using Emacs packaging system
If you don't have access to the system-wide directories and you don't want to
install somewhere into your home directory, you can run Org directly from the
distribution directory or Org repository by compiling Org mode in place:
Recent Emacs distributions include a packaging system which lets you install
Elisp libraries. You can install Org with @kbd{M-x package-install RET org}.
To make sure your Org configuration is well taken into account, initialize
the package system with @code{(package-initialize)} before setting any Org
option. If you want to use Org's package repository, check out the
@uref{http://orgmode.org/elpa.html, Org ELPA page}.
@itemize @bullet
@item Change into (@code{cd}) the Org repository.
@item Run @code{git checkout master}
to switch to the @code{master} branch of the Org repository.
@item Run @code{make compile}
@end itemize
@subsubheading Downloading Org as an archive
Last but not least you can also run Org mode directly from an Org repository
without any compilation. Simply replace the last step in the recipe above
with @code{make uncompiled}.
Then add the following line to @file{.emacs}:
You can download Org latest release from @uref{http://orgmode.org/, Org's
website}. In this case, make sure you set the load-path correctly in your
@file{.emacs}:
@example
(add-to-list 'load-path "~/path/to/orgdir/lisp")
@end example
@noindent
If you plan to use code from the @file{contrib} subdirectory without
compiling them, do a similar step for this directory:
The downloaded archive contains contributed libraries that are not included
in Emacs. If you want to use them, add the @file{contrib} directory to your
load-path:
@example
(add-to-list 'load-path "~/path/to/orgdir/contrib/lisp" t)
@end example
If you want to include those files with the build and install, please
customize the variable @code{ORG_ADD_CONTRIB} instead in your @code{local.mk}
file, for more details please see this
@uref{http://orgmode.org/worg/dev/org-build-system.html#sec-4-1-2,
description on Worg}.
Optionally, you can compile the files and/or install them in your system.
Run @code{make help} to list compilation and installation options.
Installing Info files is system dependent, because of differences in the
@file{install-info} program. The Info documentation is installed together
with the rest of Org mode. If you don't install Org mode, it is possible to
install the Info documentation separately (you need to have
install-info@footnote{The output from install-info (if any) is system
dependent. In particular Debian and its derivatives use two different
versions of install-info and you may see the message:
@subsubheading Using Org's git repository
You can clone Org's repository and install Org like this:
@example
This is not dpkg install-info anymore, but GNU install-info
See the man page for ginstall-info for command line arguments
$ cd ~/src/
$ git clone git://orgmode.org/org-mode.git
$ make autoloads
@end example
@noindent which can be safely ignored.}
on your system).
Note that @code{make autoloads} is mandatory: it defines Org's version and
Org's autoloaded functions, respectively in @file{org-version.el} and in
@file{org-loaddefs.el}.
@example
make install-info
@end example
Remember to add the correct load-path as described in the method above.
Do not forget to activate Org as described in the following section.
@page
You can also compile and install Org from this git repository: check
@code{make help} to get the list of compilation/installation options.
For more detailed explanations on Org's build system, please check the Org
Build System page on @uref{http://orgmode.org/worg/dev/org-build-system.html, Worg}.
@node Activation, Feedback, Installation, Introduction
@section Activation
@ -1470,6 +1421,13 @@ Move subtree up (swap with previous subtree of same
level).
@orgcmd{M-S-@key{down},org-move-subtree-down}
Move subtree down (swap with next subtree of same level).
@orgcmd{M-h,org-mark-element}
Mark the element at point. Hitting repeatedly will mark subsequent elements
of the one just marked. E.g. hitting @key{M-h} on a paragraph will mark it,
hitting @key{M-h} immediately again will mark the next one.
@orgcmd{C-c @@,org-mark-subtree}
Mark the subtree at point. Hitting repeatedly will mark subsequent subtrees
of the same level than the marked subtree.
@orgcmd{C-c C-x C-w,org-cut-subtree}
Kill subtree, i.e., remove it from buffer but save in kill ring.
With a numeric prefix argument N, kill N sequential subtrees.
@ -3027,7 +2985,7 @@ lines will be left alone by this command.
Selects this line for global recalculation with @kbd{C-u C-c *}, but
not for automatic recalculation. Use this when automatic
recalculation slows down editing too much.
@item @
@item @w{ }
Unmarked lines are exempt from recalculation with @kbd{C-u C-c *}.
All lines that should be recalculated should be marked with @samp{#}
or @samp{*}.
@ -3377,13 +3335,16 @@ be the description@footnote{If the headline contains a timestamp, it will be
removed from the link and result in a wrong link---you should avoid putting
timestamp in the headline.}.
@vindex org-link-to-org-use-id
@vindex org-id-link-to-org-use-id
@cindex property, CUSTOM_ID
@cindex property, ID
If the headline has a @code{CUSTOM_ID} property, a link to this custom ID
will be stored. In addition or alternatively (depending on the value of
@code{org-link-to-org-use-id}), a globally unique @code{ID} property will be
created and/or used to construct a link. So using this command in Org
@code{org-id-link-to-org-use-id}), a globally unique @code{ID} property will
be created and/or used to construct a link@footnote{The library @code{org-id}
must first be loaded, either through @code{org-customize} by enabling
@code{id} in @code{org-modules} , or by adding @code{(require 'org-id)} in
your @file{.emacs}.}. So using this command in Org
buffers will potentially create two links: a human-readable from the custom
ID, and one that is globally unique and works even if the entry is moved from
file to file. Later, when inserting the link, you need to decide which one
@ -3747,6 +3708,8 @@ The most important commands to work with TODO entries are:
@table @kbd
@orgcmd{C-c C-t,org-todo}
@cindex cycling, of TODO states
@vindex org-use-fast-todo-selection
Rotate the TODO state of the current item among
@example
@ -3754,14 +3717,19 @@ Rotate the TODO state of the current item among
'--------------------------------'
@end example
The same rotation can also be done ``remotely'' from the timeline and
agenda buffers with the @kbd{t} command key (@pxref{Agenda commands}).
If TODO keywords have fast access keys (see @ref{Fast access to TODO
states}), you will be prompted for a TODO keyword through the fast selection
interface; this is the default behavior when
@var{org-use-fast-todo-selection} is @code{non-nil}.
The same rotation can also be done ``remotely'' from the timeline and agenda
buffers with the @kbd{t} command key (@pxref{Agenda commands}).
@orgkey{C-u C-c C-t}
Select a specific keyword using completion or (if it has been set up)
the fast selection interface. For the latter, you need to assign keys
to TODO states, see @ref{Per-file keywords}, and @ref{Setting tags}, for
more information.
When TODO keywords have no selection keys, select a specific keyword using
completion; otherwise force cycling through TODO states with no prompt. When
@var{org-use-fast-todo-selection} is set to @code{prefix}, use the fast
selection interface.
@kindex S-@key{right}
@kindex S-@key{left}
@ -4617,9 +4585,8 @@ changes in the line.}:
@noindent
@vindex org-use-tag-inheritance
@vindex org-tags-exclude-from-inheritance
To limit tag inheritance to specific tags, or to turn it off entirely, use
the variables @code{org-use-tag-inheritance} and
@code{org-tags-exclude-from-inheritance}.
To limit tag inheritance to specific tags, use @code{org-tags-exclude-from-inheritance}.
To turn it off entirely, use @code{org-use-tag-inheritance}.
@vindex org-tags-match-list-sublevels
When a headline matches during a tags search while tag inheritance is turned
@ -4630,6 +4597,15 @@ of matches may then become very long. If you only want to see the first tags
match in a subtree, configure the variable
@code{org-tags-match-list-sublevels} (not recommended).
@vindex org-agenda-use-tag-inheritance
Tag inheritance is relevant when the agenda search tries to match a tag,
either in the @code{tags} or @code{tags-todo} agenda types. In other agenda
types, @code{org-use-tag-inheritance} has no effect. Still, you may want to
have your tags correctly set in the agenda, so that tag filtering works fine,
with inherited tags. Set @code{org-agenda-use-tag-inheritance} to control
this: the default value includes all agenda types, but setting this to nil
can really speed up agenda generation.
@node Setting tags, Tag searches, Tag inheritance, Tags
@section Setting tags
@cindex setting tags
@ -5050,7 +5026,7 @@ FILE @r{The filename the entry is located in.}
To create sparse trees and special lists with selection based on properties,
the same commands are used as for tag searches (@pxref{Tag searches}).
@table @kbd
@orgcmdkkc{C-c / m,C-c @backslashchar{},org-match-sparse-tree}
@orgcmdkkc{C-c / m,C-c \\,org-match-sparse-tree}
Create a sparse tree with all matching entries. With a
@kbd{C-u} prefix argument, ignore headlines that are not a TODO line.
@orgcmd{C-c a m,org-tags-view}
@ -5512,7 +5488,7 @@ example with optional time
@example
* 22:00-23:00 The nerd meeting on every 2nd Thursday of the month
<%%(org-float t 4 2)>
<%%(diary-float t 4 2)>
@end example
@item Time/Date range
@ -5850,7 +5826,7 @@ entries. Org mode will issue early and late warnings based on the
assumption that the timestamp represents the @i{nearest instance} of
the repeater. However, the use of diary sexp entries like
@c
@code{<%%(org-float t 42)>}
@code{<%%(diary-float t 42)>}
@c
in scheduling and deadline timestamps is limited. Org mode does not
know enough about the internals of each sexp function to issue early and
@ -6539,7 +6515,7 @@ suggestion.} for capturing new material.
@table @kbd
@orgcmd{C-c c,org-capture}
Call the command @code{org-capture}. Note that this keybinding is global and
not active by default; you need to install it. If you have templates
not active by default: you need to install it. If you have templates
@cindex date tree
defined @pxref{Capture templates}, it will offer these templates for
selection or use a new Org outline node as the default template. It will
@ -8621,6 +8597,13 @@ buffer, or a sparse tree (the latter covering of course only the current
buffer).
@kindex C-c a C
@vindex org-agenda-custom-commands
@cindex agenda views, main example
@cindex tags, as an agenda view
@cindex todo, as an agenda view
@cindex tags-todo
@cindex todo-tree
@cindex occur-tree
@cindex tags-tree
Custom commands are configured in the variable
@code{org-agenda-custom-commands}. You can customize this variable, for
@ -8681,6 +8664,9 @@ additional key (@kbd{l}, @kbd{p} or @kbd{k}) to select a name (Lisa,
Peter, or Kim) as additional tag to match.
@end table
Note that the @code{*-tree} agenda views need to be called from an
Org buffer as they operate on the current buffer only.
@node Block agenda, Setting Options, Storing searches, Custom agenda views
@subsection Block agenda
@cindex block agenda
@ -16537,14 +16523,18 @@ to the directory @code{org-mobile-directory}. By default this list contains
all agenda files (as listed in @code{org-agenda-files}), but additional files
can be included by customizing @code{org-mobile-files}. File names will be
staged with paths relative to @code{org-directory}, so all files should be
inside this directory. The push operation also creates a special Org file
@file{agendas.org} with all custom agenda view defined by the
user@footnote{While creating the agendas, Org mode will force ID properties
on all referenced entries, so that these entries can be uniquely identified
if @i{MobileOrg} flags them for further action. If you do not want to get
these properties in so many entries, you can set the variable
@code{org-mobile-force-id-on-agenda-items} to @code{nil}. Org mode will then
rely on outline paths, in the hope that these will be unique enough.}.
inside this directory@footnote{Symbolic links in @code{org-directory} need to
have the same name than their targets.}.
The push operation also creates a special Org file @file{agendas.org} with
all custom agenda view defined by the user@footnote{While creating the
agendas, Org mode will force ID properties on all referenced entries, so that
these entries can be uniquely identified if @i{MobileOrg} flags them for
further action. If you do not want to get these properties in so many
entries, you can set the variable @code{org-mobile-force-id-on-agenda-items}
to @code{nil}. Org mode will then rely on outline paths, in the hope that
these will be unique enough.}.
Finally, Org writes the file @file{index.org}, containing links to all other
files. @i{MobileOrg} first reads this file from the server, and then
downloads all agendas and Org files listed in it. To speed up the download,

View file

@ -2,9 +2,9 @@
@include gnus-overrides.texi
@set VERSION 0.1
@setfilename ../../info/pgg
@set VERSION 0.1
@settitle PGG @value{VERSION}
@copying

View file

@ -1279,8 +1279,8 @@ example, if you always have to use the user @samp{john} in the domain
@end lisp
@noindent
See the documentation for the variable
@code{tramp-default-user-alist} for more details.
See the documentation for the variable @code{tramp-default-user-alist}
for more details.
One trap to fall in must be known. If @value{tramp} finds a default
user, this user will be passed always to the connection command as
@ -1338,6 +1338,18 @@ Note, however, that the most simplification @samp{/::} won't work,
because @samp{/:} is the prefix for quoted file names.
@end ifset
@vindex tramp-default-host-alist
Like with methods and users, you can also specify different default
hosts for certain method/user combinations via the variable
@code{tramp-default-host-alist}. Usually, this isn't necessary,
because @code{tramp-default-host} should be sufficient. For some
methods, like @code{adb}, that default value must be overwritten,
which is already the initial value of @code{tramp-default-host-alist}.
@noindent
See the documentation for the variable @code{tramp-default-host-alist}
for more details.
@node Multi-hops
@section Connecting to a remote host using multiple hops

View file

@ -85,7 +85,7 @@
2012-10-01 Eric Ludlam <zappo@gnu.org>
* srecode/cc.srt, srecode/ede-autoconf.srt: New files.
* srecode/c.srt, srecode/ede-autoconf.srt: New files.
* srecode/cpp.srt: Move parts to c.srt.

View file

@ -31,6 +31,13 @@ configure option `--without-acl'.
* Startup Changes in Emacs 24.4
* Changes in Emacs 24.4
+++
** `apropos-variable' is now `apropos-user-option'
`apropos-user-option' shows all user options while `apropos-variable'
shows all variables. When called with a universal prefix argument,
the two commands swap their behaviors. When `apropos-do-all' is
non-nil, they output the same results.
+++
** `eval-defun' on an already defined defcustom calls the :set function,
if there is one.
@ -51,6 +58,8 @@ entries of a file. On GNU/Linux, the POSIX ACL interface is used via
libacl. On MS-Windows, the NT Security APIs are used to emulate the
POSIX ACL interfaces.
** New option `scroll-bar-adjust-thumb-portion'.
* Editing Changes in Emacs 24.4
** New commands `toggle-frame-fullscreen' and `toggle-frame-maximized',
@ -59,6 +68,11 @@ bound to <f11> and M-<f10>, respectively.
* Changes in Specialized Modes and Packages in Emacs 24.4
** jit-lock-debug-mode lets you use the debuggers on code run via jit-lock.
** completing-read-multiple's separator can now be a regexp.
The default separator is changed to allow surrounding spaces around the comma.
** Battery
*** Battery information via the BSD `apm' utility is now supported.
@ -198,6 +212,9 @@ property using the supplied face spec.
*** Face specs set via Custom themes now replace the `defface' spec
rather than inheriting from it (as do face specs set via Customize).
*** New face characteristic (supports :underline (:style wave))
specifies whether or not the terminal can display a wavy line.
** time-to-seconds is not obsolete any more.
** New function special-form-p.
** Docstrings can be made dynamic by adding a `dynamic-docstring-function'

View file

@ -1,10 +1,54 @@
ORG NEWS -- history of user-visible changes. -*- org -*-
#+LINK: doc http://orgmode.org/worg/doc.html#%s
Copyright (C) 2012-2013 Free Software Foundation, Inc.
See the end of the file for license conditions.
Please send Org bug reports to emacs-orgmode@gnu.org.
* Version 7.9.3
** New option [[doc::org-agenda-use-tag-inheritance][org-agenda-use-tag-inheritance]]
[[doc::org-use-tag-inheritance][org-use-tag-inheritance]] controls whether tags are inherited when
org-tags-view is called (either in =tags=, =tags-tree= or =tags-todo=
agenda views.)
When generating other agenda types such as =agenda=, =todo= and
=todo-tree=, tags inheritance is not used when selecting the entries
to display. Still, you might want to have all tag information correct
in the agenda buffer, e.g. for tag filtering. In that case, add the
agenda type to this variable.
Setting this variable to nil should considerably speeds up the agenda
generation.
Note that the default was to display inherited tags in the agenda
lines even if `org-use-tag-inheritance' was nil. The default is now
to *never* display inherited tags in agenda lines, but to /know/ about
them when the agenda type is listed in [[doc::org-agenda-use-tag-inheritance][org-agenda-use-tag-inheritance]].
** New default value nil for [[doc::org-agenda-dim-blocked-tasks][org-agenda-dim-blocked-tasks]]
Using `nil' as the default value speeds up the agenda generation. You
can hit `#' (or `C-u #') in agenda buffers to temporarily dim (or turn
invisible) blocked tasks.
** New speedy keys for [[doc::org-speed-commands-default][org-speed-commands-default]]
You can now use `:' (instead of `;') for setting tags---this is
consistent with using the `:' key in agenda view.
You can now use `=' for [[doc::org-columns][org-columns]].
** =org-float= is now obsolete, use =diary-float= instead
** Enhanced compatibility with Emacs 22 and XEmacs
Thanks to Achim for his work on enhancing Org's compatibility with
various Emacsen. Things may not be perfect, but Org should work okay
in most environments.
* Version 7.9.2
** New ELPA repository for Org packages

Binary file not shown.

View file

@ -1,6 +1,6 @@
% Reference Card for Org Mode
\def\orgversionnumber{7.9.2}
\def\versionyear{2012} % latest update
\def\orgversionnumber{7.9.3}
\def\versionyear{2013} % latest update
\input emacsver.tex
%**start of header

View file

@ -1,3 +1,9 @@
2013-01-15 Paul Eggert <eggert@cs.ucla.edu>
* make-docfile.c (write_globals): Make it a bit clearer (Bug#13448).
This pacifies GCC 4.7.2 when Emacs is configured with
--enable-link-time-optimization and --enable-gcc-warnings.
2013-01-01 Juanma Barranquero <lekktu@gmail.com>
* makefile.w32-in (lisp1): Add macroexp.elc (bug#13320).

View file

@ -624,7 +624,7 @@ write_globals (void)
qsort (globals, num_globals, sizeof (struct global), compare_globals);
for (i = 0; i < num_globals; ++i)
{
char const *type;
char const *type = 0;
switch (globals[i].type)
{
@ -649,7 +649,7 @@ write_globals (void)
fatal ("not a recognized DEFVAR_", 0);
}
if (globals[i].type != FUNCTION)
if (type)
{
fprintf (outfile, " %s f_%s;\n", type, globals[i].name);
fprintf (outfile, "#define %s globals.f_%s\n",

View file

@ -49,7 +49,9 @@
linkers. */
#if defined __GETOPT_PREFIX && !defined __need_getopt
# if !@HAVE_GETOPT_H@
# define __need_system_stdlib_h
# include <stdlib.h>
# undef __need_system_stdlib_h
# include <stdio.h>
# include <unistd.h>
# endif

View file

@ -1,6 +1,6 @@
/* Declarations for getopt.
Copyright (C) 1989-1994, 1996-1999, 2001, 2003-2007, 2009-2013 Free
Software Foundation, Inc.
Copyright (C) 1989-1994, 1996-1999, 2001, 2003-2007, 2009-2013 Free Software
Foundation, Inc.
This file is part of the GNU C Library.
This program is free software: you can redistribute it and/or modify
@ -53,7 +53,9 @@
linkers. */
#if defined __GETOPT_PREFIX && !defined __need_getopt
# if !HAVE_GETOPT_H
# define __need_system_stdlib_h
# include <stdlib.h>
# undef __need_system_stdlib_h
# include <stdio.h>
# include <unistd.h>
# endif
@ -128,7 +130,7 @@
/* The definition of _GL_ARG_NONNULL is copied here. */
/* A C macro for declaring that specific arguments must not be NULL.
Copyright (C) 2009-2012 Free Software Foundation, Inc.
Copyright (C) 2009-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published

View file

@ -39,7 +39,7 @@
Ideally we should test __BIONIC__ here, but it is only defined after
<sys/cdefs.h> has been included; hence test __ANDROID__ instead. */
#if defined __ANDROID__ \
&& defined _SYS_TYPES_H_ && !defined _SSIZE_T_DEFINED_
&& defined _SYS_TYPES_H_ && !defined __need_size_t
# @INCLUDE_NEXT@ @NEXT_STDINT_H@
#else

View file

@ -20,8 +20,9 @@
#endif
@PRAGMA_COLUMNS@
#if defined __need_malloc_and_calloc
/* Special invocation convention inside glibc header files. */
#if defined __need_system_stdlib_h || defined __need_malloc_and_calloc
/* Special invocation conventions inside some gnulib header files,
and inside some glibc header files, respectively. */
#@INCLUDE_NEXT@ @NEXT_STDLIB_H@

View file

@ -208,7 +208,14 @@ extern char *tzname[];
else if (to_uppcase) \
fwrite_uppcase (p, (s), _n); \
else \
fwrite (s, _n, 1, p); \
{ \
/* Ignore the value of fwrite. The caller can determine whether \
an error occurred by inspecting ferror (P). All known fwrite \
implementations set the stream's error indicator when they \
fail due to ENOMEM etc., even though C11 and POSIX.1-2008 do \
not require this. */ \
fwrite (s, _n, 1, p); \
} \
} \
while (0) \
)

View file

@ -79,7 +79,9 @@
/* Solaris declares getcwd not only in <unistd.h> but also in <stdlib.h>. */
/* But avoid namespace pollution on glibc systems. */
#ifndef __GLIBC__
# define __need_system_stdlib_h
# include <stdlib.h>
# undef __need_system_stdlib_h
#endif
/* Native Windows platforms declare chdir, getcwd, rmdir in

View file

@ -1,3 +1,480 @@
2013-01-15 Stefan Monnier <monnier@iro.umontreal.ca>
* emacs-lisp/nadvice.el (advice--tweak): Make it possible for `tweak'
to return an explicit nil.
(advice--remove-function): Change accordingly.
* emacs-lisp/advice.el (ad-preactivate-advice): Adjust the cleanup to
the use of nadvice.el.
* progmodes/which-func.el (which-function): Silence imenu errors
(bug#13433).
2013-01-15 Michael R. Mauger <mmaug@yahoo.com>
* progmodes/sql.el: (sql-imenu-generic-expression):
(sql-mode-font-lock-object-name): Match schema qualified names.
(sql-connect): Use string keys.
(sql-product-interactive): Wait for interpreter prompt.
(sql-comint-oracle): Set process coding based on NLS_LANG.
2013-01-15 Michael R. Mauger <mmaug@yahoo.com>
* progmodes/sql.el (sql-output-to-send): Remove, unused.
(sql-interactive-remove-continuation-prompt):
(sql-send-magic-terminator, sql-interactive-mode): Remove references.
2013-01-14 Leo Liu <sdl.web@gmail.com>
* calendar/calendar.el (calendar-redraw): Sync window-point and point.
(Bug#13420)
2013-01-14 Glenn Morris <rgm@gnu.org>
* progmodes/compile.el (compilation-error-regexp-alist-alist):
Fix interpretation of gnu line.col1-col2 format. (Bug#13335)
2013-01-13 Fabián Ezequiel Gallina <fgallina@cuca>
* progmodes/python.el (python-nav-end-of-statement):
Fix cornercase when handling multiline strings.
2013-01-13 Richard Stallman <rms@gnu.org>
* mail/sendmail.el (mail-position-on-field): Add doc string.
* mail/rmailmm.el (rmail-insert-mime-forwarded-message):
Get current message boundaries and pass them to
message-forward-make-body-mime. Minor style changes.
2013-01-13 Eli Zaretskii <eliz@gnu.org>
* cus-start.el (all): Avoid warnings about
scroll-bar-adjust-thumb-portion on platforms where it is not defined.
2013-01-11 Jan Djärv <jan.h.d@swipnet.se>
* cus-start.el (all): Add scroll-bar-adjust-thumb-portion.
2013-01-13 Stefan Monnier <monnier@iro.umontreal.ca>
* jit-lock.el (jit-lock-debug-mode): New minor mode.
(jit-lock--debug-fontifying): New var.
(jit-lock--debug-fontify): New function.
* subr.el (condition-case-unless-debug): Don't prevent catching the
error, just let the debbugger run.
* emacs-lisp/timer.el (timer-event-handler): Don't prevent debugging
timer code and don't drop errors silently.
2013-01-12 Michael Albinus <michael.albinus@gmx.de>
* autorevert.el (auto-revert-notify-watch-descriptor): Give it
`permanent-local' property.
(auto-revert-notify-handler): Use `file-equal-p'.
2013-01-12 Eli Zaretskii <eliz@gnu.org>
* autorevert.el (auto-revert-notify-handler): Fix filtering of
file notification by ACTION. For filtering by file name, compare
only the non-directory part of the file name.
2013-01-12 Stefan Monnier <monnier@iro.umontreal.ca>
* autorevert.el: Use cl-lib instead of cl.
* vc/vc-bzr.el (vc-bzr--sanitize-header): New function (bug#13307).
(vc-bzr-checkin): Use it.
* vc/log-edit.el (log-edit-extract-headers): Don't presume FUNCTION
will preserve match-data.
2013-01-11 Felix H. Dahlke <fhd@ubercode.de>
* progmodes/js.el: Fix multiline declarations's indentation (bug#8576).
(js--declaration-keyword-re): New var.
(js--multi-line-declaration-indentation): New function.
(js--proper-indentation): Use it.
2013-01-11 Aaron S. Hawley <Aaron.Hawley@vtinfo.com>
* calc/calc.el (calc-highlight-selections-with-faces)
(calc-dispatch):
* comint.el (comint-history-isearch-message):
* emacs-lisp/edebug.el (edebug-read, edebug-eval-defun):
* ffap.el (ffap-string-at-point-region, ffap-next)
(ffap-string-at-point, ffap-string-around)
(ffap-copy-string-as-kill, ffap-highlight-overlay)
(ffap-literally):
* font-lock.el (font-lock-keywords-alist)
(font-lock-removed-keywords-alist):
* help-mode.el (help-xref-symbol-regexp):
* info.el (Info-find-emacs-command-nodes):
* international/mule.el (add-to-coding-system-list):
* isearch.el (isearch-message-function, isearch-fail-pos):
* misearch.el (multi-isearch-next-buffer-function):
* newcomment.el (comment-box):
* printing.el (pr-txt-printer-alist, pr-ps-printer-alist)
(pr-setting-database):
* progmodes/cc-fonts.el (c-font-lock-keywords-3)
(c++-font-lock-keywords-3, objc-font-lock-keywords-3)
(java-font-lock-keywords-3, idl-font-lock-keywords-3)
(pike-font-lock-keywords-3):
* progmodes/compile.el (compile):
* progmodes/etags.el (tags-table-files)
(tags-table-files-function, tags-included-tables-function):
* progmodes/gdb-mi.el (gdb, gdb-setup-windows)
(gdb-restore-windows):
* ps-print.el (ps-even-or-odd-pages, ps-spool-buffer-with-faces)
(ps-n-up-filling-database):
* server.el (server-buffer, server-log):
* simple.el (newline, delete-backward-char, delete-forward-char)
(minibuffer-history-isearch-message, kill-line, track-eol)
(temporary-goal-column):
* textmodes/flyspell.el (flyspell-mark-duplications-flag)
(flyspell-default-deplacement-commands):
* textmodes/ispell.el (ispell-accept-output):
* textmodes/sgml-mode.el (html-tag-help):
* vc/compare-w.el (compare-ignore-whitespace)
(compare-ignore-case, compare-windows-dehighlight):
* vc/diff.el (diff):
* whitespace.el (whitespace-point)
(whitespace-font-lock-refontify, whitespace-bob-marker)
(whitespace-eob-marker): Fix ambiguous doc string cross-reference(s).
2013-01-11 Michael Albinus <michael.albinus@gmx.de>
* autorevert.el (top): Require 'cl in order to pacify byte compiler.
(auto-revert-notify-rm-watch): Ignore errors.
(auto-revert-notify-add-watch): Ignore errors. Use '(modify) for
inotify, and '(size last-write-time) for w32notify.
Set buffer-local `auto-revert-use-notify' to nil when adding a file
watch fails - this is a fallback to the file modification check.
(auto-revert-notify-event-p, auto-revert-notify-event-descriptor)
(auto-revert-notify-event-action)
(auto-revert-notify-event-file-name): New defuns.
(auto-revert-notify-handler): Use them. Implement first
plausibility checks.
(auto-revert-handler): Handle also `auto-revert-tail-mode'.
2013-01-11 Julien Danjou <julien@danjou.info>
* color.el (color-rgb-to-hsv): Fix conversion computing in case min and
max are almost equal. Also return the correct value for V which is
already between 0 and 1.
2013-01-11 Dmitry Antipov <dmantipov@yandex.ru>
* emacs-lisp/ert.el (ert-run-test): Use point-max-marker.
2013-01-11 Eli Zaretskii <eliz@gnu.org>
* autorevert.el (auto-revert-notify-rm-watch)
(auto-revert-notify-add-watch): Fix typos in w32notify function
names.
2013-01-10 Michael Albinus <michael.albinus@gmx.de>
* autorevert.el (auto-revert-notify-enabled): Move up.
(auto-revert-use-notify): New defcustom.
(auto-revert-mode, global-auto-revert-mode)
(auto-revert-notify-add-watch, auto-revert-handler)
(auto-revert-buffers): Use `auto-revert-use-notify' instead of
`auto-revert-notify-enabled'.
2013-01-10 Elias Pipping <pipping@exherbo.org>
* files.el (auto-mode-alist): Use doc-view for djvu files (bug#13164).
* doc-view.el (doc-view-document->bitmap):
Use doc-view-single-page-converter-function instead of
single-page-converter arg; adjust callers.
2013-01-10 Feng Li <fengli@gmail.com> (tiny change)
* progmodes/which-func.el (which-function): Understand Semantic's use
of overlays in imenu--index-alist.
2013-01-10 Wolfgang Jenkner <wjenkner@inode.at>
* man.el: Handle different "man -k" behaviors (bug#13160). Use utf-8.
(Man-man-k-use-anchor): New var.
(Man-parse-man-k): New function.
(Man-completion-table): Use it.
(man): Flush the completion cache between uses.
2013-01-10 Michael Albinus <michael.albinus@gmx.de>
* autorevert.el: Add file watch support.
(auto-revert-notify-enabled): New defconst.
(auto-revert-notify-watch-descriptor-hash-list)
(auto-revert-notify-watch-descriptor)
(auto-revert-notify-modified-p): New defvars.
(auto-revert-notify-rm-watch, auto-revert-notify-add-watch)
(auto-revert-notify-handler): New defuns.
(auto-revert-mode, global-auto-revert-mode): Remove file watches
when mode is disabled.
(auto-revert-handler): Check for `auto-revert-notify-modified-p'.
(auto-revert-buffers): Add file watches for active buffers.
2013-01-10 Dmitry Antipov <dmantipov@yandex.ru>
* cus-start.el (toplevel): Only allow float values for
scroll-up-aggressively and scroll-down-aggressively.
Allow any number for line-spacing.
2013-01-10 Stefan Monnier <monnier@iro.umontreal.ca>
* doc-view.el (doc-view-pdfdraw-program): Allow "pdfdraw" name.
(doc-view-pdf->png-converter-function): Use mupdf if available.
(doc-view-djvu->png-converter-function)
(doc-view-ps->png-converter-function): Remove.
(doc-view--image-file-pattern): Replace doc-view--image-file-extension.
(doc-view-goto-page, doc-view-convert-current-doc, doc-view-display)
(doc-view-already-converted-p): Adjust accordingly.
(doc-view-mode-p): Simplify.
(doc-view-enlarge): Use setq-local.
(doc-view-pdf->png-converter-ghostscript)
(doc-view-djvu->png-converter-ddjvu)
(doc-view-pdf->png-converter-mupdf): Rework to call
doc-view-start-process directly.
(doc-view-pdf/ps->png): Simplify accordingly.
(doc-view-pdf->png-1, doc-view-djvu->png-1): Remove.
(doc-view-document->bitmap): Rename from doc-view-document->png.
(doc-view-convert-current-doc): Merge pdf and djvu cases.
(doc-view-set-slice-from-bounding-box): Fix completion table.
(doc-view-mode): Use add-hook for after-revert-hook.
2013-01-10 Glenn Morris <rgm@gnu.org>
* emacs-lisp/authors.el (authors-ignored-files)
(authors-valid-file-names, authors-renamed-files-alist):
Add some more entries.
2013-01-10 Stefan Monnier <monnier@iro.umontreal.ca>
* image-mode.el (image-mode-winprops): Don't throw away the fallback
`t' pseudo-window entry.
2013-01-10 Alan Mackenzie <acm@muc.de>
Fix bugs in the c-parse-state mechanism. Reuse some markers
instead of continually generating new ones.
* progmodes/cc-engine.el (c-state-old-cpp-beg-marker)
(c-state-old-cpp-end-marker): New variables.
(c-append-lower-brace-pair-to-state-cache): Start a backward
search for "}" definitively outside CPP constructs.
(c-remove-stale-state-cache): Inform the caller of a need to
search back for a brace pair in certain circumstances.
(c-state-maybe-marker): New macro.
(c-parse-state): Reuse markers when appropriate.
2013-01-10 Glenn Morris <rgm@gnu.org>
* simple.el (execute-extended-command): Doc fix.
Bind prefix-arg around read-extended-command, for prompt. (Bug#13395)
2013-01-10 Chong Yidong <cyd@gnu.org>
* faces.el (read-face-name): Doc fix.
2013-01-10 Roland Winkler <winkler@gnu.org>
* emacs-lisp/crm.el: Allow any regexp for separators.
(crm-default-separator): All spaces around the default comma separator.
(crm--completion-command): New macro.
(crm-completion-help, crm-complete, crm-complete-word): Use it.
(crm-complete-and-exit): Handle non-single-char separators.
2013-01-09 Elias Pipping <pipping@lavabit.com>
* doc-view.el: Add support for DjVu (bug#13164).
(doc-view-djvu->png-converter-function): New config var.
(doc-view-single-page-converter-function, doc-view--image-type)
(doc-view--image-file-extension): New vars.
(doc-view-mode): Initialize them.
(doc-view-goto-page): Use them.
(doc-view-mode-p): Add support for ddjvu.
(doc-view-djvu->png-converter-ddjvu, doc-view-djvu->png-1)
(doc-view-set-up-single-converter): New funs.
(doc-view-pdf/ps->png): Extend for djvu.
(doc-view-document->png): Rename from doc-view-pdf->png.
(doc-view-convert-current-doc): Handle djvu.
(doc-view-insert-image, doc-view-display)
(doc-view-already-converted-p): Don't hardcode png.
(doc-view-set-doc-type): Recognize djvu docs.
2013-01-09 Elias Pipping <pipping@lavabit.com>
* doc-view.el: Add support for mupdf converter (bug#13164).
(doc-view-pdfdraw-program, doc-view-pdf->png-converter-function)
(doc-view-ps->png-converter-function): New config vars.
(doc-view-pdf->png-converter-ghostscript)
(doc-view-ps->png-converter-ghostscript)
(doc-view-pdf->png-converter-mupdf): New functions.
(doc-view-pdf/ps->png, doc-view-pdf->png-1): Use them.
2013-01-09 Jürgen Hötzel <juergen@archlinux.org>
* net/tramp.el (tramp-eshell-directory-change): Check remote-path
first in session cache: When `tramp-own-remote-path' is in
`tramp-remote-path', the remote path is only set in the session
cache.
2013-01-09 Glenn Morris <rgm@gnu.org>
* emacs-lisp/trace.el (trace-function-foreground)
(trace-function-background): Doc fix.
2013-01-09 Juri Linkov <juri@jurta.org>
* international/mule-cmds.el (read-char-by-name): Move let-binding
of completion-ignore-case around completing-read to fix regression
exhibited by the test case `C-x 8 RET *acc TAB' and caused by
`string-match-p' using the nil value of `case-fold-search' and
`completion-ignore-case' in `completion-pcm--all-completions'.
(Bug#12615).
2013-01-09 Glenn Morris <rgm@gnu.org>
* progmodes/compile.el (compilation-parse-errors):
Fix typo. (Bug#13369)
2013-01-09 Vitalie Spinu <spinuvit@gmail.com> (tiny change)
* comint.el (comint-send-input): Check size of buffer before
waiting for process output, in case already accepted. (Bug#13290)
2013-01-09 Paul Eggert <eggert@cs.ucla.edu>
Spelling fixes.
* net/tramp-adb.el (tramp-adb-get-toolbox):
Fix misspelling of 'unknown'.
2013-01-08 Juri Linkov <juri@jurta.org>
* textmodes/flyspell.el (flyspell-incorrect, flyspell-duplicate):
* progmodes/flymake.el (flymake-errline, flymake-warnline):
Use underline style wave on terminals that support it. (Bug#13000)
2013-01-08 Stefan Monnier <monnier@iro.umontreal.ca>
* emacs-lisp/pcase.el (pcase--split-equal): Also take advantage if
the predicate returns nil.
* simple.el: Use lexical-binding.
(primitive-undo): Use pcase.
(minibuffer-history-isearch-push-state): Use a closure.
2013-01-08 Aaron S. Hawley <aaron.s.hawley@gmail.com>
* simple.el (primitive-undo): Move from undo.c.
2013-01-08 Stefan Monnier <monnier@iro.umontreal.ca>
* vc/pcvs.el (cvs-cleanup-collection): Extend meaning of `rm-handled'.
(cvs-mode-remove-handled): Use it (bug#13380).
* emacs-lisp/nadvice.el (advice--tweak): New function.
(advice--remove-function, advice--subst-main): Use it.
* emacs-lisp/advice.el: Update commentary.
2013-01-08 Michael Albinus <michael.albinus@gmx.de>
* net/tramp-adb.el (tramp-adb-file-name-handler-alist):
Remove spurious entry.
2013-01-08 Glenn Morris <rgm@gnu.org>
* net/tramp.el (tramp-default-host-alist): Add :version.
2013-01-08 Juri Linkov <juri@jurta.org>
* info.el (Info-read-node-name-2): Don't duplicate suffixes for
single completion. (Bug#12456)
(info--manual-names): Expand node completions into an explicit list
before appending it to another list. Filter out internal buffers
with the leading space in the buffer name. (Bug#10771)
2013-01-08 Juri Linkov <juri@jurta.org>
* info.el (Info-read-node-name-1): Allow empty node name in (FILENAME)
that defaults to the Top node.
(Info-goto-node, Info-read-node-name): Doc fix to mention that
the short format (FILENAME) goes to the Top node.
(Info-build-node-completions): Rename arg `file' to `filename'.
(Bug#13365)
2013-01-07 Bastien Guerry <bzg@gnu.org>
* menu-bar.el (menu-bar-search-documentation-menu):
Use `apropos-user-option' and fix the help message.
2013-01-07 Bastien Guerry <bzg@gnu.org>
* apropos.el (apropos-do-all): Update docstring.
(apropos-user-option-button): New face.
(apropos-user-option): Rename from `apropos-variable' and update
docstring.
(apropos-variable): Rewrite, now show all variables by default.
(apropos-print): Mention "User option" instead of "Variable" when
printing doc for user options. (Bug#13276)
2013-01-07 Jürgen Hötzel <juergen@archlinux.org>
* net/tramp-adb.el (tramp-do-parse-file-attributes-with-ls):
Handle filename correctly, when parsing "source -> target" symlink
output.
(tramp-adb-handle-set-file-times): New defun.
2013-01-07 Stefan Monnier <monnier@iro.umontreal.ca>
* emacs-lisp/advice.el (ad-activate-advised-definition): Refresh the
advice list when the interactive-spec of ad-Advice-* changes.
2013-01-07 Katsumi Yamaoka <yamaoka@jpl.org>
* wid-edit.el (widget-default-get): Work for inlined elements.
(Bug#12670)
2013-01-07 Michael Albinus <michael.albinus@gmx.de>
* net/tramp.el (tramp-default-host-alist): New defcustom.
(tramp-find-host): Use it.
(tramp-eshell-directory-change): Move from tramp-sh.el. Add to
`eshell-directory-change-hook'.
* net/tramp-adb.el (top): Add adb specific entry in
`tramp-default-host-alist'.
(tramp-adb-file-name-host): Remove function.
(tramp-adb-execute-adb-command, tramp-adb-maybe-open-connection):
Use `tramp-file-name-host' instead of `tramp-adb-file-name-host'.
* net/tramp-sh.el: Move eshell integration code to tramp.el.
2013-01-06 Jürgen Hötzel <juergen@archlinux.org>
* net/tramp-adb.el (tramp-methods): Add `tramp-tmpdir' entry.
2013-01-06 Michael Albinus <michael.albinus@gmx.de>
* net/tramp-adb.el (tramp-adb-ls-toolbox-regexp): The file size can
consist of more than one digit.
(tramp-adb-file-name-handler-alist):
Use `tramp-handle-file-exists-p' consistently.
(tramp-adb-file-name-handler): Don't tweak `tramp-default-host'.
(tramp-adb-handle-file-exists-p): Remove function.
(tramp-adb-file-name-host): New defun.
(tramp-adb-execute-adb-command, tramp-adb-maybe-open-connection):
Use it.
(tramp-adb-maybe-open-connection): Set "remote-path" property.
2013-01-06 Chong Yidong <cyd@gnu.org>
* vc/vc.el (vc-next-action): Detect buffer modifications
conflicting with locking VCS operation (Bug#11490).
* vc/vc-hooks.el (vc-after-save): DTRT for locking VCSes.
2013-01-05 Michael Albinus <michael.albinus@gmx.de>
* net/tramp-adb.el (tramp-do-parse-file-attributes-with-ls):
@ -117,8 +594,8 @@
(tramp-do-copy-or-rename-file): Ignore errors when calling
`set-file-extended-attributes'.
* net/tramp-smb.el (tramp-smb-file-name-handler-alist): Add
handler for `file-acl'.
* net/tramp-smb.el (tramp-smb-file-name-handler-alist):
Add handler for `file-acl'.
(tramp-smb-handle-file-acl): New defun.
2013-01-02 Jay Belanger <jay.p.belanger@gmail.com>
@ -310,7 +787,7 @@
* net/tramp-adb.el (tramp-adb-get-ls-command): New defun.
Suppress coloring, if possible (required for BusyBox based systems like
CynagenMod).
CyanogenMod).
(tramp-adb-handle-file-attributes)
(tramp-adb-handle-insert-directory)
(tramp-adb-handle-file-name-all-completions): Use it.
@ -5754,7 +6231,7 @@
2012-08-08 Fabián Ezequiel Gallina <fgallina@cuca>
* progmodes/python.el Fixed defsubst warning.
* progmodes/python.el: Fix defsubst warning.
(python-syntax-context) Rename from python-info-ppss-context.
(python-syntax-context-type): Rename from
python-info-ppss-context-type.
@ -11483,7 +11960,7 @@
2012-03-16 Alan Mackenzie <acm@muc.de>
Further optimise the handling of large macros.
Further optimize the handling of large macros.
* progmodes/cc-engine.el (c-crosses-statement-barrier-p): Use a
limit to a call of `c-literal-limits'.
@ -13135,7 +13612,7 @@
2012-01-08 Alan Mackenzie <acm@muc.de>
Optimise font locking in long enum definitions.
Optimize font locking in long enum definitions.
* progmodes/cc-fonts.el (c-font-lock-declarations): Add an extra
arm to a cond form to handle enums.

View file

@ -69,7 +69,7 @@
"Non nil means apropos commands will search more extensively.
This may be slower. This option affects the following commands:
`apropos-variable' will search all variables, not just user variables.
`apropos-user-option' will search all variables, not just user options.
`apropos-command' will also search non-interactive functions.
`apropos' will search all symbols, not just functions, variables, faces,
and those with property lists.
@ -115,6 +115,12 @@ include key-binding information in its output."
:group 'apropos
:version "24.3")
(defface apropos-user-option-button
'((t (:inherit (font-lock-variable-name-face button))))
"Button face indicating a user option in Apropos."
:group 'apropos
:version "24.4")
(defface apropos-misc-button
'((t (:inherit (font-lock-constant-face button))))
"Button face indicating a miscellaneous object type in Apropos."
@ -261,6 +267,15 @@ term, and the rest of the words are alternative terms.")
'action (lambda (button)
(describe-variable (button-get button 'apropos-symbol))))
(define-button-type 'apropos-user-option
'apropos-label "User option"
'apropos-short-label "o"
'face 'apropos-user-option-button
'help-echo "mouse-2, RET: Display more help on this user option"
'follow-link t
'action (lambda (button)
(describe-variable (button-get button 'apropos-symbol))))
(define-button-type 'apropos-face
'apropos-label "Face"
'apropos-short-label "F"
@ -461,15 +476,15 @@ This requires that at least 2 keywords (unless only one was given)."
This is used to decide whether to print the result's type or not.")
;;;###autoload
(defun apropos-variable (pattern &optional do-all)
"Show user variables that match PATTERN.
(defun apropos-user-option (pattern &optional do-all)
"Show user options that match PATTERN.
PATTERN can be a word, a list of words (separated by spaces),
or a regexp (using some regexp special characters). If it is a word,
search for matches for that word as a substring. If it is a list of words,
search for matches for any two (or more) of those words.
With \\[universal-argument] prefix, or if `apropos-do-all' is non-nil, also show
normal variables."
variables, not just user options."
(interactive (list (apropos-read-pattern
(if (or current-prefix-arg apropos-do-all)
"variable" "user option"))
@ -481,6 +496,17 @@ normal variables."
(get symbol 'variable-documentation)))
'custom-variable-p)))
;;;###autoload
(defun apropos-variable (pattern &optional do-not-all)
"Show variables that match PATTERN.
When DO-NOT-ALL is not-nil, show user options only, i.e. behave
like `apropos-user-option'."
(interactive (list (apropos-read-pattern
(if current-prefix-arg "user option" "variable"))
current-prefix-arg))
(let ((apropos-do-all (if do-not-all nil t)))
(apropos-user-option pattern)))
;; For auld lang syne:
;;;###autoload
(defalias 'command-apropos 'apropos-command)
@ -1099,7 +1125,11 @@ If non-nil TEXT is a string that will be printed as a heading."
'apropos-macro
'apropos-function))
(not nosubst))
(apropos-print-doc 3 'apropos-variable (not nosubst))
(apropos-print-doc 3
(if (custom-variable-p symbol)
'apropos-user-option
'apropos-variable)
(not nosubst))
(apropos-print-doc 7 'apropos-group t)
(apropos-print-doc 6 'apropos-face t)
(apropos-print-doc 5 'apropos-widget t)

View file

@ -48,6 +48,11 @@
;; Emacs. You should never even notice that this package is active
;; (except that your buffers will be reverted, of course).
;;
;; If Emacs is compiled with file watch support, notifications are
;; used instead of checking the time stamp of the files. You can
;; disable this by setting the user option `auto-revert-use-notify' to
;; nil.
;;
;; After reverting a file buffer, Auto Revert Mode normally puts point
;; at the same position that a regular manual revert would. However,
;; there is one exception to this rule. If point is at the end of the
@ -92,6 +97,7 @@
;; Dependencies:
(eval-when-compile (require 'cl-lib))
(require 'timer)
;; Custom Group:
@ -254,6 +260,28 @@ buffers. CPU usage depends on the version control system."
This variable becomes buffer local when set in any fashion.")
(make-variable-buffer-local 'global-auto-revert-ignore-buffer)
(defconst auto-revert-notify-enabled
(or (featurep 'inotify) (featurep 'w32notify))
"Non-nil when Emacs has been compiled with file watch support.")
(defcustom auto-revert-use-notify auto-revert-notify-enabled
"If non-nil Auto Revert Mode uses file watch functions.
This requires Emacs being compiled with file watch support (see
`auto-revert-notify-enabled'). You should set this variable
through Custom only."
:group 'auto-revert
:type 'boolean
:set (lambda (variable value)
(set-default variable (and auto-revert-notify-enabled value))
(if (symbol-value variable)
(add-hook 'kill-buffer-hook 'auto-revert-notify-rm-watch)
(remove-hook 'kill-buffer-hook 'auto-revert-notify-rm-watch)
(when auto-revert-notify-enabled
(dolist (buf (buffer-list))
(with-current-buffer buf
(auto-revert-notify-rm-watch))))))
:version "24.4")
;; Internal variables:
(defvar auto-revert-buffer-list ()
@ -276,6 +304,20 @@ the list of old buffers.")
(set (make-local-variable 'auto-revert-tail-pos)
(nth 7 (file-attributes buffer-file-name)))))
(defvar auto-revert-notify-watch-descriptor-hash-list
(make-hash-table :test 'equal)
"A hash table collecting all file watch descriptors.
Hash key is a watch descriptor, hash value is the corresponding buffer.")
(defvar auto-revert-notify-watch-descriptor nil
"The file watch descriptor active for the current buffer.")
(put 'auto-revert-notify-watch-descriptor 'permanent-local t)
(defvar auto-revert-notify-modified-p nil
"Non-nil when file has been modified on the file system.
This has been reported by a file watch event.")
(make-variable-buffer-local 'auto-revert-notify-modified-p)
;; Functions:
;;;###autoload
@ -296,6 +338,7 @@ without being changed in the part that is already in the buffer."
(if auto-revert-mode
(if (not (memq (current-buffer) auto-revert-buffer-list))
(push (current-buffer) auto-revert-buffer-list))
(when auto-revert-use-notify (auto-revert-notify-rm-watch))
(setq auto-revert-buffer-list
(delq (current-buffer) auto-revert-buffer-list)))
(auto-revert-set-timer)
@ -399,9 +442,12 @@ It displays the text that `global-auto-revert-mode-text'
specifies in the mode line."
:global t :group 'auto-revert :lighter global-auto-revert-mode-text
(auto-revert-set-timer)
(when global-auto-revert-mode
(auto-revert-buffers)))
(if global-auto-revert-mode
(auto-revert-buffers)
(when auto-revert-use-notify
(dolist (buf (buffer-list))
(with-current-buffer buf
(auto-revert-notify-rm-watch))))))
(defun auto-revert-set-timer ()
"Restart or cancel the timer used by Auto-Revert Mode.
@ -418,6 +464,83 @@ will use an up-to-date value of `auto-revert-interval'"
auto-revert-interval
'auto-revert-buffers))))
(defun auto-revert-notify-rm-watch ()
"Disable file watch for current buffer's associated file."
(when auto-revert-notify-watch-descriptor
(ignore-errors
(funcall (if (fboundp 'inotify-rm-watch)
'inotify-rm-watch 'w32notify-rm-watch)
auto-revert-notify-watch-descriptor))
(remhash auto-revert-notify-watch-descriptor
auto-revert-notify-watch-descriptor-hash-list))
(setq auto-revert-notify-watch-descriptor nil
auto-revert-notify-modified-p nil))
(defun auto-revert-notify-add-watch ()
"Enable file watch for current buffer's associated file."
(when (and buffer-file-name auto-revert-use-notify)
(auto-revert-notify-rm-watch)
(let ((func (if (fboundp 'inotify-add-watch)
'inotify-add-watch 'w32notify-add-watch))
(aspect (if (fboundp 'inotify-add-watch)
'(modify) '(size last-write-time))))
(setq auto-revert-notify-watch-descriptor
(ignore-errors
(funcall
func buffer-file-name aspect 'auto-revert-notify-handler)))
(if auto-revert-notify-watch-descriptor
(puthash auto-revert-notify-watch-descriptor
(current-buffer)
auto-revert-notify-watch-descriptor-hash-list)
;; Fallback to file checks.
(set (make-local-variable 'auto-revert-use-notify) nil)))))
(defun auto-revert-notify-event-p (event)
"Check that event is a file watch event."
(cond ((featurep 'inotify)
(and (listp event) (= (length event) 4)))
((featurep 'w32notify)
(and (listp event) (= (length event) 3) (stringp (nth 2 event))))))
(defun auto-revert-notify-event-descriptor (event)
"Return watch descriptor of notification event, or nil."
(and (auto-revert-notify-event-p event) (car event)))
(defun auto-revert-notify-event-action (event)
"Return action of notification event, or nil."
(and (auto-revert-notify-event-p event) (nth 1 event)))
(defun auto-revert-notify-event-file-name (event)
"Return file name of notification event, or nil."
(and (auto-revert-notify-event-p event)
(cond ((featurep 'inotify) (nth 3 event))
((featurep 'w32notify) (nth 2 event)))))
(defun auto-revert-notify-handler (event)
"Handle an event returned from file watch."
(when (auto-revert-notify-event-p event)
(let* ((descriptor (auto-revert-notify-event-descriptor event))
(action (auto-revert-notify-event-action event))
(file (auto-revert-notify-event-file-name event))
(buffer (gethash descriptor
auto-revert-notify-watch-descriptor-hash-list)))
(ignore-errors
;; Check, that event is meant for us.
;; TODO: Filter events which stop watching, like `move' or `removed'.
(cl-assert descriptor)
(when (featurep 'inotify) (cl-assert (memq 'modify action)))
(when (featurep 'w32notify) (cl-assert (eq 'modified action)))
(cl-assert (bufferp buffer))
(with-current-buffer buffer
(when (and (stringp file) (stringp buffer-file-name))
;; w32notify returns the basename of the file without its
;; leading directories; inotify returns its full absolute
;; file name.
(cl-assert (file-equal-p file buffer-file-name)))
;; Mark buffer modified.
(setq auto-revert-notify-modified-p t))))))
(defun auto-revert-active-p ()
"Check if auto-revert is active (in current buffer or globally)."
(or auto-revert-mode
@ -435,6 +558,8 @@ This is an internal function used by Auto-Revert Mode."
(let* ((buffer (current-buffer)) size
(revert
(or (and buffer-file-name
(or (not auto-revert-use-notify)
auto-revert-notify-modified-p)
(if auto-revert-tail-mode
;; Tramp caches the file attributes. Setting
;; `remote-file-name-inhibit-cache' forces Tramp
@ -456,6 +581,7 @@ This is an internal function used by Auto-Revert Mode."
(funcall buffer-stale-function t))))
eob eoblist)
(when revert
(setq auto-revert-notify-modified-p nil)
(when (and auto-revert-verbose
(not (eq revert 'fast)))
(message "Reverting buffer `%s'." (buffer-name)))
@ -561,7 +687,12 @@ the timer when no buffers need to be checked."
(memq buf auto-revert-buffer-list))
(setq auto-revert-buffer-list
(delq buf auto-revert-buffer-list)))
(when (auto-revert-active-p) (auto-revert-handler)))
(when (auto-revert-active-p)
;; Enable file watches.
(when (and auto-revert-use-notify buffer-file-name
(not auto-revert-notify-watch-descriptor)
(auto-revert-notify-add-watch)))
(auto-revert-handler)))
;; Remove dead buffer from `auto-revert-buffer-list'.
(setq auto-revert-buffer-list
(delq buf auto-revert-buffer-list))))

View file

@ -435,9 +435,9 @@ when converting units."
(defcustom calc-highlight-selections-with-faces
nil
"If non-nil, use a separate face to indicate selected sub-formulas.
If `calc-show-selections' is non-nil, then selected sub-formulas are shown
by displaying the rest of the formula in `calc-nonselected-face'.
If `calc-show-selections' is nil, then selected sub-formulas are shown
If option `calc-show-selections' is non-nil, then selected sub-formulas are
shown by displaying the rest of the formula in `calc-nonselected-face'.
If option `calc-show-selections' is nil, then selected sub-formulas are shown
by displaying the sub-formula in `calc-selected-face'."
:version "24.1"
:group 'calc
@ -1183,7 +1183,7 @@ Used by `calc-user-invocation'.")
;;;###autoload
(defun calc-dispatch (&optional arg)
"Invoke the GNU Emacs Calculator. See `calc-dispatch-help' for details."
"Invoke the GNU Emacs Calculator. See \\[calc-dispatch-help] for details."
(interactive "P")
; (sit-for echo-keystrokes)
(condition-case err ; look for other keys bound to calc-dispatch

View file

@ -1562,11 +1562,13 @@ line."
(defun calendar-redraw ()
"Redraw the calendar display, if `calendar-buffer' is live."
(interactive)
(if (get-buffer calendar-buffer)
(with-current-buffer calendar-buffer
(let ((cursor-date (calendar-cursor-to-nearest-date)))
(calendar-generate-window displayed-month displayed-year)
(calendar-cursor-to-visible-date cursor-date)))))
(when (get-buffer calendar-buffer)
(with-current-buffer calendar-buffer
(let ((cursor-date (calendar-cursor-to-nearest-date)))
(calendar-generate-window displayed-month displayed-year)
(calendar-cursor-to-visible-date cursor-date))
(when (window-live-p (get-buffer-window))
(set-window-point (get-buffer-window) (point))))))
(defvar calendar-mode-map
(let ((map (make-keymap)))

View file

@ -130,7 +130,7 @@ inclusive."
(max (max r g b))
(min (min r g b)))
(if (< (- max min) 1e-8)
(list 0.0 0.0 0.0)
(list 0.0 0.0 min)
(list
(/ (* 2 float-pi
(cond ((and (= r g) (= g b)) 0)
@ -146,7 +146,7 @@ inclusive."
(+ 240 (* 60 (/ (- r g) (- max min)))))))
360)
(if (= max 0) 0 (- 1 (/ min max)))
(/ max 255.0)))))
max))))
(defun color-rgb-to-hsl (red green blue)
"Convert RGB colors to their HSL representation.

View file

@ -1521,7 +1521,7 @@ Intended to be added to `isearch-mode-hook' in `comint-mode'."
If there are no search errors, this function displays an overlay with
the Isearch prompt which replaces the original comint prompt.
Otherwise, it displays the standard Isearch message returned from
`isearch-message'."
the function `isearch-message'."
(if (not (and isearch-success (not isearch-error)))
;; Use standard function `isearch-message' when not in comint prompt,
;; or search fails, or has an error (like incomplete regexp).
@ -1847,9 +1847,9 @@ Similarly for Soar, Scheme, etc."
(let ((echo-len (- comint-last-input-end
comint-last-input-start)))
;; Wait for all input to be echoed:
(while (and (accept-process-output proc)
(> (+ comint-last-input-end echo-len)
(while (and (> (+ comint-last-input-end echo-len)
(point-max))
(accept-process-output proc)
(zerop
(compare-buffer-substrings
nil comint-last-input-start

View file

@ -115,12 +115,12 @@ Leaving \"Default\" unchecked is equivalent with specifying a default of
(const :tag "On the right" (down . right))))
(other :tag "On left, no arrows" t)))
(scroll-up-aggressively windows
(choice (const :tag "off" nil) number)
(choice (const :tag "off" nil) float)
"21.1")
(scroll-down-aggressively windows
(choice (const :tag "off" nil) number)
(choice (const :tag "off" nil) float)
"21.1")
(line-spacing display (choice (const :tag "none" nil) integer)
(line-spacing display (choice (const :tag "none" nil) number)
"22.1")
(cursor-in-non-selected-windows
cursor boolean nil
@ -513,6 +513,7 @@ since it could result in memory overflow and make Emacs crash."
(x-use-underline-position-properties display boolean "22.1")
(x-underline-at-descent-line display boolean "22.1")
(x-stretch-cursor display boolean "21.1")
(scroll-bar-adjust-thumb-portion windows boolean "24.4")
;; xselect.c
(x-select-enable-clipboard-manager killing boolean "24.1")
;; xsettings.c
@ -575,6 +576,9 @@ since it could result in memory overflow and make Emacs crash."
(symbol-name symbol))
;; Any function from fontset.c will do.
(fboundp 'new-fontset))
((equal "scroll-bar-adjust-thumb-portion"
(symbol-name symbol))
(featurep 'x))
(t t))))
(if (not (boundp symbol))
;; If variables are removed from C code, give an error here!

View file

@ -145,7 +145,7 @@
;;;; Customization Options
(defgroup doc-view nil
"In-buffer viewer for PDF, PostScript and DVI files."
"In-buffer viewer for PDF, PostScript, DVI, and DJVU files."
:link '(function-link doc-view)
:version "22.2"
:group 'applications
@ -158,6 +158,27 @@
:type 'file
:group 'doc-view)
(defcustom doc-view-pdfdraw-program
(cond
((executable-find "pdfdraw") "pdfdraw")
(t "mudraw"))
"Name of MuPDF's program to convert PDF files to PNG."
:type 'file
:version "24.4")
(defcustom doc-view-pdf->png-converter-function
(if (executable-find doc-view-pdfdraw-program)
#'doc-view-pdf->png-converter-mupdf
#'doc-view-pdf->png-converter-ghostscript)
"Function to call to convert a PDF file into a PNG file."
:type '(radio
(function-item doc-view-pdf->png-converter-ghostscript
:doc "Use ghostscript")
(function-item doc-view-pdf->png-converter-mupdf
:doc "Use mupdf")
function)
:version "24.4")
(defcustom doc-view-ghostscript-options
'("-dSAFER" ;; Avoid security problems when rendering files from untrusted
;; sources.
@ -320,6 +341,19 @@ the (uncompressed, extracted) file residing in
"The type of document in the current buffer.
Can be `dvi', `pdf', or `ps'.")
(defvar doc-view-single-page-converter-function nil
"Function to call to convert a single page of the document to a bitmap file.
May operate on the source document or on some intermediate (typically PDF)
conversion of it.")
(defvar-local doc-view--image-type nil
"The type of image in the current buffer.
Can be `png' or `tiff'.")
(defvar-local doc-view--image-file-pattern nil
"The `format' pattern of image file names.
Typically \"page-%s.png\".")
;;;; DocView Keymaps
(defvar doc-view-mode-map
@ -458,24 +492,26 @@ Can be `dvi', `pdf', or `ps'.")
;; We used to find the file name from doc-view-current-files but
;; that's not right if the pages are not generated sequentially
;; or if the page isn't in doc-view-current-files yet.
(let ((file (expand-file-name (format "page-%d.png" page)
(doc-view-current-cache-dir))))
(let ((file (expand-file-name
(format doc-view--image-file-pattern page)
(doc-view-current-cache-dir))))
(doc-view-insert-image file :pointer 'arrow)
(set-window-hscroll (selected-window) hscroll)
(when (and (not (file-exists-p file))
doc-view-current-converter-processes)
;; The PNG file hasn't been generated yet.
(doc-view-pdf->png-1 doc-view-buffer-file-name file page
(let ((win (selected-window)))
(lambda ()
(and (eq (current-buffer) (window-buffer win))
;; If we changed page in the mean
;; time, don't mess things up.
(eq (doc-view-current-page win) page)
;; Make sure we don't infloop.
(file-readable-p file)
(with-selected-window win
(doc-view-goto-page page))))))))
(funcall doc-view-single-page-converter-function
doc-view-buffer-file-name file page
(let ((win (selected-window)))
(lambda ()
(and (eq (current-buffer) (window-buffer win))
;; If we changed page in the mean
;; time, don't mess things up.
(eq (doc-view-current-page win) page)
;; Make sure we don't infloop.
(file-readable-p file)
(with-selected-window win
(doc-view-goto-page page))))))))
(overlay-put (doc-view-current-overlay)
'help-echo (doc-view-current-info))))
@ -659,14 +695,16 @@ OpenDocument format)."
(executable-find doc-view-dvipdf-program))
(and doc-view-dvipdfm-program
(executable-find doc-view-dvipdfm-program)))))
((or (eq type 'postscript) (eq type 'ps) (eq type 'eps)
(eq type 'pdf))
((memq type '(postscript ps eps pdf))
;; FIXME: allow mupdf here
(and doc-view-ghostscript-program
(executable-find doc-view-ghostscript-program)))
((eq type 'odf)
(and doc-view-unoconv-program
(executable-find doc-view-unoconv-program)
(doc-view-mode-p 'pdf)))
((eq type 'djvu)
(executable-find "ddjvu"))
(t ;; unknown image type
nil))))
@ -683,13 +721,13 @@ OpenDocument format)."
;; ImageMagick supports on-the-fly-rescaling.
(let ((new (ceiling (* factor doc-view-image-width))))
(unless (equal new doc-view-image-width)
(set (make-local-variable 'doc-view-image-width) new)
(setq-local doc-view-image-width new)
(doc-view-insert-image
(plist-get (cdr (doc-view-current-image)) :file)
:width doc-view-image-width)))
(let ((new (ceiling (* factor doc-view-resolution))))
(unless (equal new doc-view-resolution)
(set (make-local-variable 'doc-view-resolution) new)
(setq-local doc-view-resolution new)
(doc-view-reconvert-doc)))))
(defun doc-view-shrink (factor)
@ -826,6 +864,45 @@ Should be invoked when the cached images aren't up-to-date."
(list "-o" pdf dvi)
callback)))
(defun doc-view-pdf->png-converter-ghostscript (pdf png page callback)
(doc-view-start-process
"pdf/ps->png" doc-view-ghostscript-program
`(,@doc-view-ghostscript-options
,(format "-r%d" (round doc-view-resolution))
,@(if page `(,(format "-dFirstPage=%d" page)))
,@(if page `(,(format "-dLastPage=%d" page)))
,(concat "-sOutputFile=" png)
,pdf)
callback))
(defalias 'doc-view-ps->png-converter-ghostscript
'doc-view-pdf->png-converter-ghostscript)
(defun doc-view-djvu->tiff-converter-ddjvu (djvu tiff page callback)
"Convert PAGE of a DJVU file to bitmap(s) asynchronously.
Call CALLBACK with no arguments when done.
If PAGE is nil, convert the whole document."
(doc-view-start-process
"djvu->tiff" "ddjvu"
`("-format=tiff"
;; ddjvu only accepts the range 1-999.
,(format "-scale=%d" (round doc-view-resolution))
;; -eachpage was only added after djvulibre-3.5.25.3!
,@(unless page '("-eachpage"))
,@(if page `(,(format "-page=%d" page)))
,djvu
,tiff)
callback))
(defun doc-view-pdf->png-converter-mupdf (pdf png page callback)
(doc-view-start-process
"pdf->png" doc-view-pdfdraw-program
`(,(concat "-o" png)
,(format "-r%d" (round doc-view-resolution))
,pdf
,@(if page `(,(format "%d" page))))
callback))
(defun doc-view-odf->pdf (odf callback)
"Convert ODF to PDF asynchronously and call CALLBACK when finished.
The converted PDF is put into the current cache directory, and it
@ -835,13 +912,14 @@ is named like ODF with the extension turned to pdf."
callback))
(defun doc-view-pdf/ps->png (pdf-ps png)
;; FIXME: Fix name and docstring to account for djvu&tiff.
"Convert PDF-PS to PNG asynchronously."
(doc-view-start-process
"pdf/ps->png" doc-view-ghostscript-program
(append doc-view-ghostscript-options
(list (format "-r%d" (round doc-view-resolution))
(concat "-sOutputFile=" png)
pdf-ps))
(funcall
(pcase doc-view-doc-type
(`pdf doc-view-pdf->png-converter-function)
(`djvu #'doc-view-djvu->tiff-converter-ddjvu)
(_ #'doc-view-ps->png-converter-ghostscript))
pdf-ps png nil
(let ((resolution doc-view-resolution))
(lambda ()
;; Only create the resolution file when it's all done, so it also
@ -854,6 +932,7 @@ is named like ODF with the extension turned to pdf."
(cancel-timer doc-view-current-timer)
(setq doc-view-current-timer nil))
(doc-view-display (current-buffer) 'force))))
;; Update the displayed pages as soon as they're done generating.
(when doc-view-conversion-refresh-interval
(setq doc-view-current-timer
@ -861,25 +940,10 @@ is named like ODF with the extension turned to pdf."
'doc-view-display
(current-buffer)))))
(defun doc-view-pdf->png-1 (pdf png page callback)
"Convert a PAGE of a PDF file to PNG asynchronously.
Call CALLBACK with no arguments when done."
(doc-view-start-process
"pdf->png-1" doc-view-ghostscript-program
(append doc-view-ghostscript-options
(list (format "-r%d" (round doc-view-resolution))
;; Sadly, `gs' only supports the page-range
;; for PDF files.
(format "-dFirstPage=%d" page)
(format "-dLastPage=%d" page)
(concat "-sOutputFile=" png)
pdf))
callback))
(declare-function clear-image-cache "image.c" (&optional filter))
(defun doc-view-pdf->png (pdf png pages)
"Convert a PDF file to PNG asynchronously.
(defun doc-view-document->bitmap (pdf png pages)
"Convert a document file to bitmap images asynchronously.
Start by converting PAGES, and then the rest."
(if (null pages)
(doc-view-pdf/ps->png pdf png)
@ -888,11 +952,11 @@ Start by converting PAGES, and then the rest."
;; a single page anyway, and of the remaining 1%, few cases will have
;; consecutive pages, it's not worth the trouble.
(let ((rest (cdr pages)))
(doc-view-pdf->png-1
pdf (format png (car pages)) (car pages)
(funcall doc-view-single-page-converter-function
pdf (format png (car pages)) (car pages)
(lambda ()
(if rest
(doc-view-pdf->png pdf png rest)
(doc-view-document->bitmap pdf png rest)
;; Yippie, the important pages are done, update the display.
(clear-image-cache)
;; For the windows that have a message (like "Welcome to
@ -900,8 +964,8 @@ Start by converting PAGES, and then the rest."
;; not sufficient.
(dolist (win (get-buffer-window-list (current-buffer) nil 'visible))
(with-selected-window win
(when (stringp (get-char-property (point-min) 'display))
(doc-view-goto-page (doc-view-current-page)))))
(when (stringp (get-char-property (point-min) 'display))
(doc-view-goto-page (doc-view-current-page)))))
;; Convert the rest of the pages.
(doc-view-pdf/ps->png pdf png)))))))
@ -971,8 +1035,9 @@ Those files are saved in the directory given by the function
;; preserves the horizontal/vertical scroll settings (which are otherwise
;; resets during the redisplay).
(setq doc-view-pending-cache-flush t)
(let ((png-file (expand-file-name "page-%d.png"
(doc-view-current-cache-dir))))
(let ((png-file (expand-file-name
(format doc-view--image-file-pattern "%d")
(doc-view-current-cache-dir))))
(make-directory (doc-view-current-cache-dir) t)
(pcase doc-view-doc-type
(`dvi
@ -985,11 +1050,12 @@ Those files are saved in the directory given by the function
;; ODF files have to be converted to PDF before Ghostscript can
;; process it.
(let ((pdf (doc-view-current-cache-doc-pdf))
(opdf (expand-file-name (concat (file-name-base doc-view-buffer-file-name)
".pdf")
doc-view-current-cache-dir))
(opdf (expand-file-name
(concat (file-name-base doc-view-buffer-file-name)
".pdf")
doc-view-current-cache-dir))
(png-file png-file))
;; The unoconv tool only supports a output directory, but no
;; The unoconv tool only supports an output directory, but no
;; file name. It's named like the input file with the
;; extension replaced by pdf.
(doc-view-odf->pdf doc-view-buffer-file-name
@ -997,10 +1063,10 @@ Those files are saved in the directory given by the function
;; Rename to doc.pdf
(rename-file opdf pdf)
(doc-view-pdf/ps->png pdf png-file)))))
(`pdf
((or `pdf `djvu)
(let ((pages (doc-view-active-pages)))
;; Convert PDF to PNG images starting with the active pages.
(doc-view-pdf->png doc-view-buffer-file-name png-file pages)))
;; Convert doc to bitmap images starting with the active pages.
(doc-view-document->bitmap doc-view-buffer-file-name png-file pages)))
(_
;; Convert to PNG images.
(doc-view-pdf/ps->png doc-view-buffer-file-name png-file)))))
@ -1111,9 +1177,10 @@ much more accurate than could be done manually using
(let* ((is (image-size (doc-view-current-image) t))
(iw (car is))
(ih (cdr is))
(ps (or (and (null force-paper-size) (doc-view-guess-paper-size iw ih))
(ps (or (and (null force-paper-size)
(doc-view-guess-paper-size iw ih))
(intern (completing-read "Paper size: "
(mapcar #'car doc-view-paper-sizes)
doc-view-paper-sizes
nil t))))
(bb (doc-view-scale-bounding-box ps iw ih bb))
(x1 (nth 0 bb))
@ -1144,7 +1211,7 @@ ARGS is a list of image descriptors."
(image (if (and file (file-readable-p file))
(if (not (and doc-view-scale-internally
(fboundp 'imagemagick-types)))
(apply 'create-image file 'png nil args)
(apply 'create-image file doc-view--image-type nil args)
(unless (member :width args)
(setq args `(,@args :width ,doc-view-image-width)))
(apply 'create-image file 'imagemagick nil args))))
@ -1194,13 +1261,16 @@ have the page we want to view."
(let ((prev-pages doc-view-current-files))
(setq doc-view-current-files
(sort (directory-files (doc-view-current-cache-dir) t
"page-[0-9]+\\.png" t)
(format doc-view--image-file-pattern
"[0-9]+")
t)
'doc-view-sort))
(dolist (win (or (get-buffer-window-list buffer nil t)
(list t)))
(let* ((page (doc-view-current-page win))
(pagefile (expand-file-name (format "page-%d.png" page)
(doc-view-current-cache-dir))))
(pagefile (expand-file-name
(format doc-view--image-file-pattern page)
(doc-view-current-cache-dir))))
(when (or force
(and (not (member pagefile prev-pages))
(member pagefile doc-view-current-files)))
@ -1265,7 +1335,7 @@ For now these keys are useful:
(doc-view-kill-proc)
(setq buffer-read-only nil)
(remove-overlays (point-min) (point-max) 'doc-view t)
(set (make-local-variable 'image-mode-winprops-alist) t)
(setq-local image-mode-winprops-alist t)
;; Switch to the previously used major mode or fall back to
;; normal mode.
(doc-view-fallback-mode)
@ -1393,12 +1463,13 @@ If BACKWARD is non-nil, jump to the previous match."
;; the conversion is incomplete.
(file-readable-p (expand-file-name "resolution.el"
(doc-view-current-cache-dir)))
(> (length (directory-files (doc-view-current-cache-dir)
nil "\\.png\\'"))
(> (length (directory-files
(doc-view-current-cache-dir)
nil (format doc-view--image-file-pattern "[0-9]+")))
0)))
(defun doc-view-initiate-display ()
;; Switch to image display if possible
;; Switch to image display if possible.
(if (doc-view-mode-p doc-view-doc-type)
(progn
(doc-view-buffer-message)
@ -1406,7 +1477,7 @@ If BACKWARD is non-nil, jump to the previous match."
(if (doc-view-already-converted-p)
(progn
(message "DocView: using cached files!")
;; Load the saved resolution
;; Load the saved resolution.
(let* ((res-file (expand-file-name "resolution.el"
(doc-view-current-cache-dir)))
(res
@ -1415,7 +1486,7 @@ If BACKWARD is non-nil, jump to the previous match."
(insert-file-contents res-file)
(read (current-buffer))))))
(when (numberp res)
(set (make-local-variable 'doc-view-resolution) res)))
(setq-local doc-view-resolution res)))
(doc-view-display (current-buffer) 'force))
(doc-view-convert-current-doc))
(message
@ -1467,6 +1538,8 @@ If BACKWARD is non-nil, jump to the previous match."
("pdf" pdf) ("epdf" pdf)
;; PostScript
("ps" ps) ("eps" ps)
;; DjVu
("djvu" djvu)
;; OpenDocument formats
("odt" odf) ("ods" odf) ("odp" odf) ("odg" odf)
("odc" odf) ("odi" odf) ("odm" odf) ("ott" odf)
@ -1481,14 +1554,25 @@ If BACKWARD is non-nil, jump to the previous match."
(cond
((looking-at "%!") '(ps))
((looking-at "%PDF") '(pdf))
((looking-at "\367\002") '(dvi))))))
(set (make-local-variable 'doc-view-doc-type)
(car (or (doc-view-intersection name-types content-types)
(when (and name-types content-types)
(error "Conflicting types: name says %s but content says %s"
name-types content-types))
name-types content-types
(error "Cannot determine the document type"))))))
((looking-at "\367\002") '(dvi))
((looking-at "AT&TFORM") '(djvu))))))
(setq-local doc-view-doc-type
(car (or (doc-view-intersection name-types content-types)
(when (and name-types content-types)
(error "Conflicting types: name says %s but content says %s"
name-types content-types))
name-types content-types
(error "Cannot determine the document type"))))))
(defun doc-view-set-up-single-converter ()
"Find the right single-page converter for the current document type"
(pcase-let ((`(,conv-function ,type ,extension)
(pcase doc-view-doc-type
(`djvu (list #'doc-view-djvu->tiff-converter-ddjvu 'tiff "tif"))
(_ (list doc-view-pdf->png-converter-function 'png "png")))))
(setq-local doc-view-single-page-converter-function conv-function)
(setq-local doc-view--image-type type)
(setq-local doc-view--image-file-pattern (concat "page-%s." extension))))
;;;###autoload
(defun doc-view-mode ()
@ -1513,8 +1597,7 @@ toggle between displaying the document or editing it as text.
(unless (eq major-mode 'fundamental-mode)
major-mode))))
(kill-all-local-variables)
(set (make-local-variable 'doc-view-previous-major-mode)
prev-major-mode))
(setq-local doc-view-previous-major-mode prev-major-mode))
(dolist (var doc-view-saved-settings)
(set (make-local-variable (car var)) (cdr var)))
@ -1522,10 +1605,11 @@ toggle between displaying the document or editing it as text.
;; Figure out the document type.
(unless doc-view-doc-type
(doc-view-set-doc-type))
(doc-view-set-up-single-converter)
(doc-view-make-safe-dir doc-view-cache-directory)
;; Handle compressed files, remote files, files inside archives
(set (make-local-variable 'doc-view-buffer-file-name)
(setq-local doc-view-buffer-file-name
(cond
(jka-compr-really-do-compress
;; FIXME: there's a risk of name conflicts here.
@ -1564,20 +1648,19 @@ toggle between displaying the document or editing it as text.
'doc-view-new-window-function nil t)
(image-mode-setup-winprops)
(set (make-local-variable 'mode-line-position)
'(" P" (:eval (number-to-string (doc-view-current-page)))
"/" (:eval (number-to-string (doc-view-last-page-number)))))
(setq-local mode-line-position
'(" P" (:eval (number-to-string (doc-view-current-page)))
"/" (:eval (number-to-string (doc-view-last-page-number)))))
;; Don't scroll unless the user specifically asked for it.
(set (make-local-variable 'auto-hscroll-mode) nil)
(set (make-local-variable 'mwheel-scroll-up-function)
'doc-view-scroll-up-or-next-page)
(set (make-local-variable 'mwheel-scroll-down-function)
'doc-view-scroll-down-or-previous-page)
(set (make-local-variable 'cursor-type) nil)
(setq-local auto-hscroll-mode nil)
(setq-local mwheel-scroll-up-function #'doc-view-scroll-up-or-next-page)
(setq-local mwheel-scroll-down-function
#'doc-view-scroll-down-or-previous-page)
(setq-local cursor-type nil)
(use-local-map doc-view-mode-map)
(set (make-local-variable 'after-revert-hook) 'doc-view-reconvert-doc)
(set (make-local-variable 'bookmark-make-record-function)
'doc-view-bookmark-make-record)
(add-hook 'after-revert-hook 'doc-view-reconvert-doc nil t)
(setq-local bookmark-make-record-function
#'doc-view-bookmark-make-record)
(setq mode-name "DocView"
buffer-read-only t
major-mode 'doc-view-mode)
@ -1586,7 +1669,7 @@ toggle between displaying the document or editing it as text.
;; canonical view mode for PDF/PS/DVI files. This could be
;; switched on automatically depending on the value of
;; `view-read-only'.
(set (make-local-variable 'view-read-only) nil)
(setq-local view-read-only nil)
(run-mode-hooks 'doc-view-mode-hook)))
(defun doc-view-fallback-mode ()

View file

@ -589,13 +589,11 @@
;; Advice implements forward advice mainly via the following: 1) Separation
;; of advice definition and activation that makes it possible to accumulate
;; advice information without having the original function already defined,
;; 2) special versions of the built-in functions `fset/defalias' which check
;; for advice information whenever they define a function. If advice
;; information was found then the advice will immediately get activated when
;; the function gets defined.
;; 2) Use of the `defalias-fset-function' symbol property which lets
;; us advise the function when it gets defined.
;; Automatic advice activation means, that whenever a function gets defined
;; with either `defun', `defmacro', `fset' or by loading a byte-compiled
;; with either `defun', `defmacro', `defalias' or by loading a byte-compiled
;; file, and the function has some advice-info stored with it then that
;; advice will get activated right away.
@ -2868,10 +2866,8 @@ advised definition from scratch."
(defun ad-preactivate-advice (function advice class position)
"Preactivate FUNCTION and returns the constructed cache."
(let* ((function-defined-p (fboundp function))
(old-definition
(if function-defined-p
(symbol-function function)))
(let* ((advicefunname (ad-get-advice-info-field function 'advicefunname))
(old-advice (symbol-function advicefunname))
(old-advice-info (ad-copy-advice-info function))
(ad-advised-functions ad-advised-functions))
(unwind-protect
@ -2885,10 +2881,9 @@ advised definition from scratch."
(list (ad-get-cache-definition function)
(ad-get-cache-id function))))
(ad-set-advice-info function old-advice-info)
;; Don't `fset' function to nil if it was previously unbound:
(if function-defined-p
(fset function old-definition)
(fmakunbound function)))))
(advice-remove function advicefunname)
(fset advicefunname old-advice)
(if old-advice (advice-add function :around advicefunname)))))
;; @@ Activation and definition handling:
@ -2917,13 +2912,18 @@ If COMPILE is nil then the result depends on the value of
"Redefine FUNCTION with its advised definition from cache or scratch.
The resulting FUNCTION will be compiled if `ad-should-compile' returns t.
The current definition and its cache-id will be put into the cache."
(let ((verified-cached-definition
(if (ad-verify-cache-id function)
(ad-get-cache-definition function)))
(advicefunname (ad-get-advice-info-field function 'advicefunname)))
(let* ((verified-cached-definition
(if (ad-verify-cache-id function)
(ad-get-cache-definition function)))
(advicefunname (ad-get-advice-info-field function 'advicefunname))
(old-ispec (interactive-form advicefunname)))
(fset advicefunname
(or verified-cached-definition
(ad-make-advised-definition function)))
(unless (equal (interactive-form advicefunname) old-ispec)
;; If the interactive-spec of advicefunname has changed, force nadvice to
;; refresh its copy.
(advice-remove function advicefunname))
(advice-add function :around advicefunname)
(if (ad-should-compile function compile)
(ad-compile-function function))

View file

@ -295,6 +295,14 @@ Changes to files matching one of the regexps in this list are not listed.")
"calc/INSTALL" "calc/Makefile"
"vms-pp.trans" "_emacs" "batcomp.com" "notes/cpp" ; admin/
"emacsver.texi.in"
"vpath.sed"
"Cocoa/Emacs.base/Contents/Info.plist"
"Cocoa/Emacs.base/Contents/Resources/English.lproj/InfoPlist.strings"
"GNUstep/Emacs.base/Resources/Info-gnustep.plist"
"GNUstep/Emacs.base/Resources/Emacs.desktop"
"Cocoa/Emacs.base/Contents/Resources/English.lproj"
;; Only existed briefly, then deleted:
"coccinelle/overlay.cocci" "coccinelle/symbol.cocci"
;; MH-E stuff not in Emacs:
"import-emacs" "release-utils"
;; Erc stuff not in Emacs:
@ -540,6 +548,7 @@ Changes to files in this list are not listed.")
"makedist.bat"
"makefile.def"
"makefile.nt"
"ns.mk"
"debug.bat.in" "emacs.bat.in"
".gdbinit-union"
"alloca.s"
@ -553,15 +562,17 @@ Changes to files in this list are not listed.")
"ymakefile"
"permute-index" "index.perm"
"ibmrs6000.inp"
"b2m.c" "b2m.1" "b2m.pl"
"b2m.c" "b2m.1" "b2m.pl" "rcs-checkin.1"
"emacs.bash" "emacs.csh" "ms-kermit"
"emacs.ico"
"emacs21.ico"
"emacs.py" "emacs2.py" "emacs3.py"
"BABYL" "LPF" "LEDIT" "OTHER.EMACSES"
"emacs16_mac.png" "emacs24_mac.png"
"emacs256_mac.png" "emacs32_mac.png"
"emacs48_mac.png" "emacs512_mac.png"
"revdiff" ; admin/
"vcdiff" "rcs-checkin" "tindex.pl"
"mainmake" "sed1.inp" "sed2.inp" "sed3.inp" ; msdos/
"mac-fix-env.m"
;; Deleted vms stuff:
@ -580,6 +591,7 @@ in the repository.")
("s/windowsnt.h" . "s/ms-w32.h")
("s/ms-w32.h" . "inc/ms-w32.h")
("winnt.el" . "w32-fns.el")
("emacs.manifest" . "emacs-x86.manifest")
("config.emacs" . "configure")
("configure.in" . "configure.ac")
("config.h.dist" . "config.in")
@ -616,6 +628,8 @@ in the repository.")
("build-install" . "build-ins.in")
("build-install.in" . "build-ins.in")
("unidata/Makefile" . "unidata/Makefile.in")
("move-if-change" . "build-aux/move-if-change")
("update-subdirs" . "build-aux/update-subdirs")
;; Not renamed, but we only have the latter in the Emacs repo.
("trampver.texi.in" . "trampver.texi")
("e/eterm" . "e/eterm-color")

View file

@ -30,12 +30,12 @@
;; a single prompt, optionally using completion.
;; Multiple strings are specified by separating each of the strings
;; with a prespecified separator character. For example, if the
;; separator character is a comma, the strings 'alice', 'bob', and
;; with a prespecified separator regexp. For example, if the
;; separator regexp is ",", the strings 'alice', 'bob', and
;; 'eve' would be specified as 'alice,bob,eve'.
;; The default value for the separator character is the value of
;; `crm-default-separator' (comma). The separator character may be
;; The default value for the separator regexp is the value of
;; `crm-default-separator' (comma). The separator regexp may be
;; changed by modifying the value of `crm-separator'.
;; Contiguous strings of non-separator-characters are referred to as
@ -96,14 +96,14 @@
;; first revamped version
;;; Code:
(defconst crm-default-separator ","
"Default separator for `completing-read-multiple'.")
(defconst crm-default-separator "[ \t]*,[ \t]*"
"Default separator regexp for `completing-read-multiple'.")
(defvar crm-separator crm-default-separator
"Separator used for separating strings in `completing-read-multiple'.
It should be a single character string that doesn't appear in the list of
completion candidates. Modify this value to make `completing-read-multiple'
use a separator other than `crm-default-separator'.")
"Separator regexp used for separating strings in `completing-read-multiple'.
It should be a regexp that does not match the list of completion candidates.
Modify this value to make `completing-read-multiple' use a separator other
than `crm-default-separator'.")
(defvar crm-local-completion-map
(let ((map (make-sparse-keymap)))
@ -173,13 +173,17 @@ Place an overlay on the element, with a `field' property, and return it."
(overlay-put ol 'field (make-symbol "crm"))
ol))
(defmacro crm--completion-command (command)
"Make COMMAND a completion command for `completing-read-multiple'."
`(let ((ol (crm--select-current-element)))
(unwind-protect
,command
(delete-overlay ol))))
(defun crm-completion-help ()
"Display a list of possible completions of the current minibuffer element."
(interactive)
(let ((ol (crm--select-current-element)))
(unwind-protect
(minibuffer-completion-help)
(delete-overlay ol)))
(crm--completion-command (minibuffer-completion-help))
nil)
(defun crm-complete ()
@ -188,19 +192,13 @@ If no characters can be completed, display a list of possible completions.
Return t if the current element is now a valid match; otherwise return nil."
(interactive)
(let ((ol (crm--select-current-element)))
(unwind-protect
(minibuffer-complete)
(delete-overlay ol))))
(crm--completion-command (minibuffer-complete)))
(defun crm-complete-word ()
"Complete the current element at most a single word.
Like `minibuffer-complete-word' but for `completing-read-multiple'."
(interactive)
(let ((ol (crm--select-current-element)))
(unwind-protect
(minibuffer-complete-word)
(delete-overlay ol))))
(crm--completion-command (minibuffer-complete-word)))
(defun crm-complete-and-exit ()
"If all of the minibuffer elements are valid completions then exit.
@ -222,9 +220,10 @@ This function is modeled after `minibuffer-complete-and-exit'."
(setq doexit nil))
(goto-char (overlay-end ol))
(delete-overlay ol))
(not (eobp))))
(not (eobp)))
(looking-at crm-separator))
;; Skip to the next element.
(forward-char 1))
(goto-char (match-end 0)))
(if doexit (exit-minibuffer))))
(defun crm--choose-completion-string (choice buffer base-position
@ -248,12 +247,12 @@ By using this functionality, a user may specify multiple strings at a
single prompt, optionally using completion.
Multiple strings are specified by separating each of the strings with
a prespecified separator character. For example, if the separator
character is a comma, the strings 'alice', 'bob', and 'eve' would be
a prespecified separator regexp. For example, if the separator
regexp is \",\", the strings 'alice', 'bob', and 'eve' would be
specified as 'alice,bob,eve'.
The default value for the separator character is the value of
`crm-default-separator' (comma). The separator character may be
The default value for the separator regexp is the value of
`crm-default-separator' (comma). The separator regexp may be
changed by modifying the value of `crm-separator'.
Contiguous strings of non-separator-characters are referred to as
@ -282,8 +281,8 @@ INHERIT-INPUT-METHOD."
(map (if require-match
crm-local-must-match-map
crm-local-completion-map))
;; If the user enters empty input, read-from-minibuffer returns
;; the empty string, not DEF.
;; If the user enters empty input, `read-from-minibuffer'
;; returns the empty string, not DEF.
(input (read-from-minibuffer
prompt initial-input map
nil hist def inherit-input-method)))

View file

@ -461,8 +461,8 @@ STREAM or the value of `standard-input' may be:
This version, from Edebug, maybe instruments the expression. But the
STREAM must be the current buffer to do so. Whether it instruments is
also dependent on the values of `edebug-all-defs' and
`edebug-all-forms'."
also dependent on the values of the option `edebug-all-defs' and
the option `edebug-all-forms'."
(or stream (setq stream standard-input))
(if (eq stream (current-buffer))
(edebug-read-and-maybe-wrap-form)
@ -484,8 +484,8 @@ similarly. Reinitialize the face according to `defface' specification.
With a prefix argument, instrument the code for Edebug.
Setting `edebug-all-defs' to a non-nil value reverses the meaning of
the prefix argument. Code is then instrumented when this function is
Setting option `edebug-all-defs' to a non-nil value reverses the meaning
of the prefix argument. Code is then instrumented when this function is
invoked without a prefix argument
If acting on a `defun' for FUNCTION, and the function was instrumented,

View file

@ -937,7 +937,7 @@ Returns the result and stores it in ERT-TEST's `most-recent-result' slot."
(cl-block error
(let ((begin-marker
(with-current-buffer (get-buffer-create "*Messages*")
(set-marker (make-marker) (point-max)))))
(point-max-marker))))
(unwind-protect
(let ((info (make-ert--test-execution-info
:test ert-test

View file

@ -167,20 +167,27 @@ WHERE is a symbol to select an entry in `advice--where-alist'."
(setq definition (advice--cdr definition))))
found))
(defun advice--tweak (flist tweaker)
(if (not (advice--p flist))
(funcall tweaker nil flist nil)
(let ((first (advice--car flist))
(rest (advice--cdr flist))
(props (advice--props flist)))
(let ((val (funcall tweaker first rest props)))
(if val (car val)
(let ((nrest (advice--tweak rest tweaker)))
(if (eq rest nrest) flist
(advice--make-1 (aref flist 1) (aref flist 3)
first nrest props))))))))
;;;###autoload
(defun advice--remove-function (flist function)
(if (not (advice--p flist))
flist
(let ((first (advice--car flist))
(props (advice--props flist)))
(if (or (equal function first)
(equal function (cdr (assq 'name props))))
(advice--cdr flist)
(let* ((rest (advice--cdr flist))
(nrest (advice--remove-function rest function)))
(if (eq rest nrest) flist
(advice--make-1 (aref flist 1) (aref flist 3)
first nrest props)))))))
(advice--tweak flist
(lambda (first rest props)
(cond ((not first) rest)
((or (equal function first)
(equal function (cdr (assq 'name props))))
(list rest))))))
(defvar advice--buffer-local-function-sample nil)
@ -269,15 +276,8 @@ of the piece of advice."
;;;; Specific application of add-function to `symbol-function' for advice.
(defun advice--subst-main (old new)
(if (not (advice--p old))
new
(let* ((first (advice--car old))
(rest (advice--cdr old))
(props (advice--props old))
(nrest (advice--subst-main rest new)))
(if (equal rest nrest) old
(advice--make-1 (aref old 1) (aref old 3)
first nrest props)))))
(advice--tweak old
(lambda (first _rest _props) (if (not first) new))))
(defun advice--normalize (symbol def)
(cond

View file

@ -431,30 +431,31 @@ MATCH is the pattern that needs to be matched, of the form:
(match ,symd . ,(pcase--upat (cdr qpat))))
:pcase--fail)))
;; A QPattern but not for a cons, can only go to the `else' side.
((eq (car-safe pat) '\`) (cons :pcase--fail nil))
((eq (car-safe pat) '\`) '(:pcase--fail . nil))
((and (eq (car-safe pat) 'pred)
(or (member (cons 'consp (cadr pat))
pcase-mutually-exclusive-predicates)
(member (cons (cadr pat) 'consp)
pcase-mutually-exclusive-predicates)))
(cons :pcase--fail nil))))
'(:pcase--fail . nil))))
(defun pcase--split-equal (elem pat)
(cond
;; The same match will give the same result.
((and (eq (car-safe pat) '\`) (equal (cadr pat) elem))
(cons :pcase--succeed :pcase--fail))
'(:pcase--succeed . :pcase--fail))
;; A different match will fail if this one succeeds.
((and (eq (car-safe pat) '\`)
;; (or (integerp (cadr pat)) (symbolp (cadr pat))
;; (consp (cadr pat)))
)
(cons :pcase--fail nil))
'(:pcase--fail . nil))
((and (eq (car-safe pat) 'pred)
(symbolp (cadr pat))
(get (cadr pat) 'side-effect-free)
(funcall (cadr pat) elem))
(cons :pcase--succeed nil))))
(get (cadr pat) 'side-effect-free))
(if (funcall (cadr pat) elem)
'(:pcase--succeed . nil)
'(:pcase--fail . nil)))))
(defun pcase--split-member (elems pat)
;; Based on pcase--split-equal.
@ -462,7 +463,7 @@ MATCH is the pattern that needs to be matched, of the form:
;; The same match (or a match of membership in a superset) will
;; give the same result, but we don't know how to check it.
;; (???
;; (cons :pcase--succeed nil))
;; '(:pcase--succeed . nil))
;; A match for one of the elements may succeed or fail.
((and (eq (car-safe pat) '\`) (member (cadr pat) elems))
nil)
@ -471,7 +472,7 @@ MATCH is the pattern that needs to be matched, of the form:
;; (or (integerp (cadr pat)) (symbolp (cadr pat))
;; (consp (cadr pat)))
)
(cons :pcase--fail nil))
'(:pcase--fail . nil))
((and (eq (car-safe pat) 'pred)
(symbolp (cadr pat))
(get (cadr pat) 'side-effect-free)
@ -479,21 +480,21 @@ MATCH is the pattern that needs to be matched, of the form:
(dolist (elem elems)
(unless (funcall p elem) (setq all nil)))
all))
(cons :pcase--succeed nil))))
'(:pcase--succeed . nil))))
(defun pcase--split-pred (upat pat)
;; FIXME: For predicates like (pred (> a)), two such predicates may
;; actually refer to different variables `a'.
(let (test)
(cond
((equal upat pat) (cons :pcase--succeed :pcase--fail))
((equal upat pat) '(:pcase--succeed . :pcase--fail))
((and (eq 'pred (car upat))
(eq 'pred (car-safe pat))
(or (member (cons (cadr upat) (cadr pat))
pcase-mutually-exclusive-predicates)
(member (cons (cadr pat) (cadr upat))
pcase-mutually-exclusive-predicates)))
(cons :pcase--fail nil))
'(:pcase--fail . nil))
((and (eq 'pred (car upat))
(eq '\` (car-safe pat))
(symbolp (cadr upat))
@ -502,8 +503,8 @@ MATCH is the pattern that needs to be matched, of the form:
(ignore-errors
(setq test (list (funcall (cadr upat) (cadr pat))))))
(if (car test)
(cons nil :pcase--fail)
(cons :pcase--fail nil))))))
'(nil . :pcase--fail)
'(:pcase--fail . nil))))))
(defun pcase--fgrep (vars sexp)
"Check which of the symbols VARS appear in SEXP."

View file

@ -307,13 +307,13 @@ This function is called, by name, directly by the C code."
;; Run handler.
;; We do this after rescheduling so that the handler function
;; can cancel its own timer successfully with cancel-timer.
(condition-case nil
(condition-case-unless-debug err
;; Timer functions should not change the current buffer.
;; If they do, all kinds of nasty surprises can happen,
;; and it can be hellish to track down their source.
(save-current-buffer
(apply (timer--function timer) (timer--args timer)))
(error nil))
(error (message "Error in timer: %S" err)))
(if retrigger
(setf (timer--triggered timer) nil)))
(error "Bogus timer event"))))

View file

@ -38,11 +38,6 @@
;; generation of trace output won't interfere with what you are currently
;; doing.
;; Requirement:
;; ============
;; trace.el needs advice.el version 2.0 or later which you can get from the
;; same place from where you got trace.el.
;; Restrictions:
;; =============
;; - Traced subrs when called interactively will always show nil as the
@ -55,17 +50,6 @@
;; + Macros that were expanded during compilation
;; - All the restrictions that apply to advice.el
;; Installation:
;; =============
;; Put this file together with advice.el (version 2.0 or later) somewhere
;; into your Emacs `load-path', byte-compile it/them for efficiency, and
;; put the following autoload declarations into your .emacs
;;
;; (autoload 'trace-function "trace" "Trace a function" t)
;; (autoload 'trace-function-background "trace" "Trace a function" t)
;;
;; or explicitly load it with (require 'trace) or (load "trace").
;; Usage:
;; ======
;; - To trace a function say `M-x trace-function' which will ask you for the
@ -183,6 +167,8 @@ some global variables)."
(mapconcat 'char-to-string (make-string (1- level) ?|) " ")
(if (> level 1) " " "")
level
;; FIXME: Make it so we can click the function name to jump to its
;; definition and/or untrace it.
(cons function args)
context)))
@ -282,21 +268,17 @@ and return values will be inserted into BUFFER. This function generates the
trace advice for FUNCTION and activates it together with any other advice
there might be!! The trace BUFFER will popup whenever FUNCTION is called.
Do not use this to trace functions that switch buffers or do any other
display oriented stuff, use `trace-function-background' instead."
display oriented stuff, use `trace-function-background' instead.
To untrace a function, use `untrace-function' or `untrace-all'."
(interactive (trace--read-args "Trace function: "))
(trace-function-internal function buffer nil context))
;;;###autoload
(defun trace-function-background (function &optional buffer context)
"Traces FUNCTION with trace output going quietly to BUFFER.
When this tracing is enabled, every call to FUNCTION writes
a Lisp-style trace message (showing the arguments and return value)
into BUFFER. This function generates advice to trace FUNCTION
and activates it together with any other advice there might be.
The trace output goes to BUFFER quietly, without changing
the window or buffer configuration.
BUFFER defaults to `trace-buffer'."
Like `trace-function-foreground' but without popping up the trace BUFFER or
changing the window configuration."
(interactive (trace--read-args "Trace function in background: "))
(trace-function-internal function buffer t context))

View file

@ -1,3 +1,8 @@
2013-01-11 Dmitry Antipov <dmantipov@yandex.ru>
* erc-dcc.el (erc-dcc-send-file): Use point-min-marker.
(erc-dcc-chat-setup): Use point-max-marker.
2013-01-04 Glenn Morris <rgm@gnu.org>
* erc-backend.el (312): Fix typo. (Bug#13235)

View file

@ -897,7 +897,7 @@ other client."
(let* ((buffer (erc-dcc-find-file file))
(size (buffer-size buffer))
(start (with-current-buffer buffer
(set-marker (make-marker) (point-min))))
(point-min-marker)))
(sproc (erc-dcc-server "dcc-send"
'erc-dcc-send-filter
'erc-dcc-send-sentinel))
@ -1166,7 +1166,7 @@ other client."
(setq erc-dcc-from nick)
(setq erc-dcc-entry-data entry)
(setq erc-dcc-unprocessed-output "")
(setq erc-insert-marker (set-marker (make-marker) (point-max)))
(setq erc-insert-marker (point-max-marker))
(setq erc-input-marker (make-marker))
(erc-display-prompt buffer (point-max))
(set-process-buffer proc buffer)

View file

@ -929,27 +929,29 @@ of the default face. Value is FACE."
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defun read-face-name (prompt &optional default multiple)
"Read a face, defaulting to the face or faces at point.
If the text at point has the property `read-face-name', that
overrides the `face' property for determining the default.
"Read one or more face names, defaulting to the face(s) at point.
PROMPT should be a prompt string; it should not end in a space or
a colon.
PROMPT should be a string that describes what the caller will do
with the face; it should not end in a space.
The optional argument DEFAULT specifies the default face name(s)
to return if the user just types RET. If its value is non-nil,
it should be a list of face names (symbols); in that case, the
default return value is the `car' of DEFAULT (if the argument
MULTIPLE is non-nil), or DEFAULT (if MULTIPLE is nil). See below
for the meaning of MULTIPLE.
If DEFAULT is nil, the list of default face names is taken from
the `read-face-name' property of the text at point, or, if that
is nil, from the `face' property of the text at point.
This function uses `completing-read-multiple' with \",\" as the
separator character, i.e.
The optional argument DEFAULT provides the value to display in the
minibuffer prompt that is returned if the user just types RET
unless DEFAULT is a string (in which case nil is returned).
If MULTIPLE is non-nil, return a list of faces (possibly only one).
Otherwise, return a single face."
separator character. Thus, the user may enter multiple face
names, separated by commas. The optional argument MULTIPLE
specifies the form of the return value. If MULTIPLE is non-nil,
return a list of face names; if the user entered just one face
name, the return value would be a list of one face name.
Otherwise, return a single face name; if the user entered more
than one face name, return only the first one."
(let ((faceprop (or (get-char-property (point) 'read-face-name)
(get-char-property (point) 'face)))
(aliasfaces nil)

View file

@ -321,7 +321,7 @@ disable FFAP most of the time."
"Last value returned by `ffap-next-guess'.")
(defvar ffap-string-at-point-region '(1 1)
"List (BEG END), last region returned by `ffap-string-at-point'.")
"List (BEG END), last region returned by the function `ffap-string-at-point'.")
(defun ffap-next-guess (&optional back lim)
"Move point to next file or URL, and return it as a string.
@ -346,7 +346,7 @@ Optional argument BACK says to search backwards.
Optional argument WRAP says to try wrapping around if necessary.
Interactively: use a single prefix to search backwards,
double prefix to wrap forward, triple to wrap backwards.
Actual search is done by `ffap-next-guess'."
Actual search is done by the function `ffap-next-guess'."
(interactive
(cdr (assq (prefix-numeric-value current-prefix-arg)
'((1) (4 t) (16 nil t) (64 t t)))))
@ -1028,14 +1028,14 @@ If a given RFC isn't in these then `ffap-rfc-path' is offered."
"Alist of \(MODE CHARS BEG END\), where MODE is a symbol,
possibly a major-mode name, or one of the symbol
`file', `url', `machine', and `nocolon'.
`ffap-string-at-point' uses the data fields as follows:
Function `ffap-string-at-point' uses the data fields as follows:
1. find a maximal string of CHARS around point,
2. strip BEG chars before point from the beginning,
3. Strip END chars after point from the end.")
(defvar ffap-string-at-point nil
;; Added at suggestion of RHOGEE (for ff-paths), 7/24/95.
"Last string returned by `ffap-string-at-point'.")
"Last string returned by the function `ffap-string-at-point'.")
(defun ffap-string-at-point (&optional mode)
"Return a string of characters from around point.
@ -1043,7 +1043,8 @@ MODE (defaults to value of `major-mode') is a symbol used to look up string
syntax parameters in `ffap-string-at-point-mode-alist'.
If MODE is not found, we use `file' instead of MODE.
If the region is active, return a string from the region.
Sets `ffap-string-at-point' and `ffap-string-at-point-region'."
Sets the variable `ffap-string-at-point' and the variable
`ffap-string-at-point-region'."
(let* ((args
(cdr
(or (assq (or mode major-mode) ffap-string-at-point-mode-alist)
@ -1068,7 +1069,8 @@ Sets `ffap-string-at-point' and `ffap-string-at-point-region'."
(defun ffap-string-around ()
;; Sometimes useful to decide how to treat a string.
"Return string of two chars around last `ffap-string-at-point'.
"Return string of two chars around last result of function
`ffap-string-at-point'.
Assumes the buffer has not changed."
(save-excursion
(format "%c%c"
@ -1082,7 +1084,7 @@ Assumes the buffer has not changed."
(defun ffap-copy-string-as-kill (&optional mode)
;; Requested by MCOOK. Useful?
"Call `ffap-string-at-point', and copy result to `kill-ring'."
"Call function `ffap-string-at-point', and copy result to `kill-ring'."
(interactive)
(let ((str (ffap-string-at-point mode)))
(if (equal "" str)
@ -1364,7 +1366,7 @@ which may actually result in an URL rather than a filename."
:version "22.1")
(defvar ffap-highlight-overlay nil
"Overlay used by `ffap-highlight'.")
"Overlay used by function `ffap-highlight'.")
(defun ffap-highlight (&optional remove)
"If `ffap-highlight' is set, highlight the guess in this buffer.
@ -1734,7 +1736,7 @@ Only intended for interactive use."
(call-interactively 'ffap)))
(defun ffap-literally ()
"Like `ffap' and `find-file-literally'.
"Like `ffap' and command `find-file-literally'.
Only intended for interactive use."
(interactive)
(let ((ffap-file-finder 'find-file-literally))

View file

@ -2357,7 +2357,7 @@ ARC\\|ZIP\\|LZH\\|LHA\\|ZOO\\|[JEW]AR\\|XPI\\|RAR\\|7Z\\)\\'" . archive-mode)
("\\.\\(diffs?\\|patch\\|rej\\)\\'" . diff-mode)
("\\.\\(dif\\|pat\\)\\'" . diff-mode) ; for MSDOG
("\\.[eE]?[pP][sS]\\'" . ps-mode)
("\\.\\(?:PDF\\|DVI\\|OD[FGPST]\\|DOCX?\\|XLSX?\\|PPTX?\\|pdf\\|dvi\\|od[fgpst]\\|docx?\\|xlsx?\\|pptx?\\)\\'" . doc-view-mode-maybe)
("\\.\\(?:PDF\\|DVI\\|OD[FGPST]\\|DOCX?\\|XLSX?\\|PPTX?\\|pdf\\|djvu\\|dvi\\|od[fgpst]\\|docx?\\|xlsx?\\|pptx?\\)\\'" . doc-view-mode-maybe)
("configure\\.\\(ac\\|in\\)\\'" . autoconf-mode)
("\\.s\\(v\\|iv\\|ieve\\)\\'" . sieve-mode)
("BROWSE\\'" . ebrowse-tree-mode)

View file

@ -469,7 +469,7 @@ optimized.")
"Alist of additional `font-lock-keywords' elements for major modes.
Each element has the form (MODE KEYWORDS . HOW).
`font-lock-set-defaults' adds the elements in the list KEYWORDS to
Function `font-lock-set-defaults' adds the elements in the list KEYWORDS to
`font-lock-keywords' when Font Lock is turned on in major mode MODE.
If HOW is nil, KEYWORDS are added at the beginning of
@ -484,7 +484,7 @@ This is normally set via `font-lock-add-keywords' and
(defvar font-lock-removed-keywords-alist nil
"Alist of `font-lock-keywords' elements to be removed for major modes.
Each element has the form (MODE . KEYWORDS). `font-lock-set-defaults'
Each element has the form (MODE . KEYWORDS). Function `font-lock-set-defaults'
removes the elements in the list KEYWORDS from `font-lock-keywords'
when Font Lock is turned on in major mode MODE.

View file

@ -1,3 +1,62 @@
2013-01-16 Glenn Morris <rgm@gnu.org>
* smiley.el (smiley-style): Make the file loadable in batch mode.
2013-01-15 Stefan Monnier <monnier@iro.umontreal.ca>
* nnimap.el (nnimap-keepalive): Don't throw an error if there's no more
imap process running.
2013-01-14 Julien Danjou <julien@danjou.info>
* gnus-sum.el (gnus-summary-from-or-to-or-newsgroups):
Compare addresses against addresses, not against the full From field.
2013-01-13 Richard Stallman <rms@gnu.org>
* message.el (message-forward-make-body-mime): New args BEG, END
specify what part of FORWARD-BUFFER to use. Do the work directly
instead of calling `mml-insert-buffer'.
2013-01-11 Aaron S. Hawley <Aaron.Hawley@vtinfo.com>
* gnus-start.el (gnus-check-new-newsgroups): Fix ambiguous doc string
cross-reference(s).
* gnus-sum.el (gnus-summary-newsgroup-prefix): Fix ambiguous doc string
cross-reference(s).
2013-01-11 Dmitry Antipov <dmantipov@yandex.ru>
* gnus-art.el (gnus-mime-display-security): Use point-min-marker
and point-max-marker.
* gnus-async.el (gnus-async-article-callback): Use point-max-marker.
2013-01-10 Uwe Brauer <oub@mat.ucm.es> (tiny change)
* mml-smime.el (mml-smime-encrypt-to-self): New user option analogous
to mml2015-encrypt-to-self.
(mml-smime-epg-encrypt): Respect mml-smime-encrypt-to-self.
2013-01-09 Daiki Ueno <ueno@gnu.org>
* mml-smime.el (epg-sub-key-fingerprint): Autoload for
mml-smime-epg-find-usable-secret-key.
2013-01-08 Glenn Morris <rgm@gnu.org>
* mml-smime.el (mml-smime-sign-with-sender): Add :version.
2013-01-07 Daiki Ueno <ueno@gnu.org>
* mml-smime.el: Support signing by sender.
Requested by Uwe Brauer.
(mml-smime-sign-with-sender): New user option analogous
to mml2015-sign-with-sender.
(mml-smime-epg-sign): Respect mml-smime-sign-with-sender.
(mml-smime-epg-find-usable-secret-key): New helper function copied from
mml2015.el.
2012-12-31 Lars Magne Ingebrigtsen <larsi@gnus.org>
* gnus-msg.el (gnus-inews-insert-gcc): Don't insert Gcc headers if Gnus
@ -128,8 +187,8 @@
the `face' property with a list whose car is the face specified in the
format string and whose cdr is (nil).
* lisp/gnus-util.el
(gnus-put-text-property-excluding-characters-with-faces): Change
accordingly.
(gnus-put-text-property-excluding-characters-with-faces):
Change accordingly.
(gnus-get-text-property-excluding-characters-with-faces): New function.
* lisp/gnus-sum.el (gnus-summary-highlight-line):
* lisp/gnus-salt.el (gnus-tree-highlight-node):
@ -177,8 +236,8 @@
2012-12-22 Philipp Haselwarter <philipp@haselwarter.org>
* gnus-sync.el (gnus-sync-file-encrypt-to, gnus-sync-save): Set
epa-file-encrypt-to from variable to avoid querying.
* gnus-sync.el (gnus-sync-file-encrypt-to, gnus-sync-save):
Set epa-file-encrypt-to from variable to avoid querying.
2012-12-14 Akinori MUSHA <knu@iDaemons.org> (tiny change)

View file

@ -8688,9 +8688,7 @@ For example:
gnus-mime-security-button-end-line-format))
(gnus-insert-mime-security-button handle)))
(mm-set-handle-multipart-parameter
handle 'gnus-region
(cons (set-marker (make-marker) (point-min))
(set-marker (make-marker) (point-max))))
handle 'gnus-region (cons (point-min-marker) (point-max-marker)))
(goto-char (point-max))))
(defun gnus-mime-security-run-function (function)

View file

@ -254,7 +254,7 @@ that was fetched."
gnus-async-article-alist
(cons (list (intern (format "%s-%d" group article)
gnus-async-hashtb)
mark (set-marker (make-marker) (point-max))
mark (point-max-marker)
group article)
gnus-async-article-alist))))
(if (not (gnus-buffer-live-p summary))

View file

@ -110,7 +110,7 @@ ask the servers (primary, secondary, and archive servers) to list new
groups since the last time it checked:
1. This variable is `ask-server'.
2. This variable is a list of select methods (see below).
3. `gnus-read-active-file' is nil or `some'.
3. Option `gnus-read-active-file' is nil or `some'.
4. A prefix argument is given to `gnus-find-new-newsgroups' interactively.
Thus, if this variable is `ask-server' or a list of select methods or

View file

@ -1167,7 +1167,7 @@ using `gnus-ignored-from-addresses'."
(defcustom gnus-summary-newsgroup-prefix "=> "
"*String prefixed to the Newsgroup field in the summary
line when using `gnus-ignored-from-addresses'."
line when using the option `gnus-ignored-from-addresses'."
:version "22.1"
:group 'gnus-summary
:type 'string)
@ -3651,17 +3651,18 @@ buffer that was in action when the last article was fetched."
(or (car (funcall gnus-extract-address-components from))
from))
(defun gnus-summary-from-or-to-or-newsgroups (header gnus-tmp-from)
(defun gnus-summary-from-or-to-or-newsgroups (header from)
(let ((mail-parse-charset gnus-newsgroup-charset)
(ignored-from-addresses (gnus-ignored-from-addresses))
; Is it really necessary to do this next part for each summary line?
; Luckily, doesn't seem to slow things down much.
(mail-parse-ignored-charsets
(with-current-buffer gnus-summary-buffer
gnus-newsgroup-ignored-charsets)))
(ignored-from-addresses (gnus-ignored-from-addresses))
;; Is it really necessary to do this next part for each summary line?
;; Luckily, doesn't seem to slow things down much.
(mail-parse-ignored-charsets
(with-current-buffer gnus-summary-buffer
gnus-newsgroup-ignored-charsets))
(address (cadr (gnus-extract-address-components from))))
(or
(and ignored-from-addresses
(string-match ignored-from-addresses gnus-tmp-from)
(string-match ignored-from-addresses address)
(let ((extra-headers (mail-header-extra header))
to
newsgroups)
@ -3680,9 +3681,7 @@ buffer that was in action when the last article was fetched."
gnus-newsgroup-name)) 'nntp)
(gnus-group-real-name gnus-newsgroup-name))))
(concat gnus-summary-newsgroup-prefix newsgroups)))))
(gnus-string-mark-left-to-right
(inline
(gnus-summary-extract-address-component gnus-tmp-from))))))
(gnus-string-mark-left-to-right (gnus-summary-extract-address-component from)))))
(defun gnus-summary-insert-line (gnus-tmp-header
gnus-tmp-level gnus-tmp-current

View file

@ -7376,12 +7376,13 @@ Optional DIGEST will use digest to forward."
(dolist (elem ignored)
(message-remove-header elem t))))))
(defun message-forward-make-body-mime (forward-buffer)
(defun message-forward-make-body-mime (forward-buffer &optional beg end)
(let ((b (point)))
(insert "\n\n<#part type=message/rfc822 disposition=inline raw=t>\n")
(save-restriction
(narrow-to-region (point) (point))
(mml-insert-buffer forward-buffer)
(insert-buffer-substring forward-buffer beg end)
(mml-quote-region (point-min) (point-max))
(goto-char (point-min))
(when (looking-at "From ")
(replace-match "X-From-Line: "))

View file

@ -74,6 +74,18 @@ Whether the passphrase is cached at all is controlled by
:group 'mime-security
:type '(repeat (string :tag "Key ID")))
(defcustom mml-smime-sign-with-sender nil
"If t, use message sender so find a key to sign with."
:group 'mime-security
:version "24.4"
:type 'boolean)
(defcustom mml-smime-encrypt-to-self nil
"If t, add your own key ID to recipient list when encryption."
:group 'mime-security
:version "24.4"
:type 'boolean)
(defun mml-smime-sign (cont)
(let ((func (nth 1 (assq mml-smime-use mml-smime-function-alist))))
(if func
@ -323,6 +335,7 @@ Whether the passphrase is cached at all is controlled by
(autoload 'epg-encrypt-string "epg")
(autoload 'epg-passphrase-callback-function "epg")
(autoload 'epg-context-set-passphrase-callback "epg")
(autoload 'epg-sub-key-fingerprint "epg")
(autoload 'epg-configuration "epg-config")
(autoload 'epg-expand-group "epg-config")
(autoload 'epa-select-keys "epa"))
@ -366,6 +379,24 @@ Whether the passphrase is cached at all is controlled by
(setq pointer (cdr pointer))))
(setq keys (cdr keys)))))
;; XXX: since gpg --list-secret-keys does not return validity of each
;; key, `mml-smime-epg-find-usable-key' defined above is not enough for
;; secret keys. The function `mml-smime-epg-find-usable-secret-key'
;; below looks at appropriate public keys to check usability.
(defun mml-smime-epg-find-usable-secret-key (context name usage)
(let ((secret-keys (epg-list-keys context name t))
secret-key)
(while (and (not secret-key) secret-keys)
(if (mml-smime-epg-find-usable-key
(epg-list-keys context (epg-sub-key-fingerprint
(car (epg-key-sub-key-list
(car secret-keys)))))
usage)
(setq secret-key (car secret-keys)
secret-keys nil)
(setq secret-keys (cdr secret-keys))))
secret-key))
(autoload 'mml-compute-boundary "mml")
;; We require mm-decode, which requires mm-bodies, which autoloads
@ -376,29 +407,36 @@ Whether the passphrase is cached at all is controlled by
(let* ((inhibit-redisplay t)
(context (epg-make-context 'CMS))
(boundary (mml-compute-boundary cont))
(sender (message-options-get 'message-sender))
(signer-names (or mml-smime-signers
(if (and mml-smime-sign-with-sender sender)
(list (concat "<" sender ">")))))
signer-key
(signers
(or (message-options-get 'mml-smime-epg-signers)
(message-options-set
'mml-smime-epg-signers
(if (eq mm-sign-option 'guided)
(epa-select-keys context "\
'mml-smime-epg-signers
(if (eq mm-sign-option 'guided)
(epa-select-keys context "\
Select keys for signing.
If no one is selected, default secret key is used. "
mml-smime-signers t)
(if mml-smime-signers
(mapcar
(lambda (signer)
(setq signer-key (mml-smime-epg-find-usable-key
(epg-list-keys context signer t)
'sign))
(unless (or signer-key
(y-or-n-p
(format "No secret key for %s; skip it? "
signer-names
t)
(if (or sender mml-smime-signers)
(delq nil
(mapcar
(lambda (signer)
(setq signer-key
(mml-smime-epg-find-usable-secret-key
context signer 'sign))
(unless (or signer-key
(y-or-n-p
(format
"No secret key for %s; skip it? "
signer)))
(error "No secret key for %s" signer))
signer-key)
mml-smime-signers))))))
(error "No secret key for %s" signer))
signer-key)
signer-names)))))))
signature micalg)
(epg-context-set-signers context signers)
(if mml-smime-cache-passphrase
@ -443,13 +481,17 @@ Content-Disposition: attachment; filename=smime.p7s
(goto-char (point-max))))
(defun mml-smime-epg-encrypt (cont)
(let ((inhibit-redisplay t)
(context (epg-make-context 'CMS))
(config (epg-configuration))
(recipients (message-options-get 'mml-smime-epg-recipients))
cipher signers
(boundary (mml-compute-boundary cont))
recipient-key)
(let* ((inhibit-redisplay t)
(context (epg-make-context 'CMS))
(config (epg-configuration))
(recipients (message-options-get 'mml-smime-epg-recipients))
cipher signers
(sender (message-options-get 'message-sender))
(signer-names (or mml-smime-signers
(if (and mml-smime-sign-with-sender sender)
(list (concat "<" sender ">")))))
(boundary (mml-compute-boundary cont))
recipient-key)
(unless recipients
(setq recipients
(apply #'nconc
@ -462,6 +504,10 @@ Content-Disposition: attachment; filename=smime.p7s
(message-options-set 'message-recipients
(read-string "Recipients: ")))
"[ \f\t\n\r\v,]+"))))
(when mml-smime-encrypt-to-self
(unless signer-names
(error "Neither message sender nor mml-smime-signers are set"))
(setq recipients (nconc recipients signer-names)))
(if (eq mm-encrypt-option 'guided)
(setq recipients
(epa-select-keys context "\

View file

@ -339,7 +339,8 @@ textual parts.")
(nnimap-last-command-time nnimap-object)))
;; More than five minutes since the last command.
(* 5 60)))
(nnimap-send-command "NOOP")))))))
(ignore-errors ;E.g. "buffer foo has no process".
(nnimap-send-command "NOOP"))))))))
(defun nnimap-open-connection (buffer)
;; Be backwards-compatible -- the earlier value of nnimap-stream was
@ -367,7 +368,7 @@ textual parts.")
(defun nnimap-open-connection-1 (buffer)
(unless nnimap-keepalive-timer
(setq nnimap-keepalive-timer (run-at-time (* 60 15) (* 60 15)
'nnimap-keepalive)))
#'nnimap-keepalive)))
(with-current-buffer (nnimap-make-process-buffer buffer)
(let* ((coding-system-for-read 'binary)
(coding-system-for-write 'binary)

View file

@ -59,7 +59,10 @@
(defcustom smiley-style
(if (or (and (fboundp 'face-attribute)
(>= (face-attribute 'default :height) 160))
;; In batch mode, attributes can be unspecified.
(condition-case nil
(>= (face-attribute 'default :height) 160)
(error nil)))
(and (fboundp 'face-height)
(>= (face-height 'default) 14)))
'medium

View file

@ -322,7 +322,7 @@ Commands:
(defconst help-xref-symbol-regexp
(purecopy (concat "\\(\\<\\(\\(variable\\|option\\)\\|" ; Link to var
"\\(function\\|command\\)\\|" ; Link to function
"\\(function\\|command\\|call\\)\\|" ; Link to function
"\\(face\\)\\|" ; Link to face
"\\(symbol\\|program\\|property\\)\\|" ; Don't link
"\\(source \\(?:code \\)?\\(?:of\\|for\\)\\)\\)"

View file

@ -63,8 +63,9 @@ otherwise it defaults to t, used for times when the buffer is not displayed."
(when cleanup
(setq image-mode-winprops-alist
(delq nil (mapcar (lambda (winprop)
(if (window-live-p (car-safe winprop))
winprop))
(let ((w (car-safe winprop)))
(if (or (not (windowp w)) (window-live-p w))
winprop)))
image-mode-winprops-alist))))
(let ((winprops (assq window image-mode-winprops-alist)))
;; For new windows, set defaults from the latest.

View file

@ -447,6 +447,8 @@ Don't move point."
Simple elements in the alist look like (INDEX-NAME . POSITION).
POSITION is the buffer position of the item; to go to the item
is simply to move point to that position.
POSITION is passed to `imenu-default-goto-function', so it can be a non-number
if that variable has been changed (e.g. Semantic uses overlays for POSITIONs).
Special elements look like (INDEX-NAME POSITION FUNCTION ARGUMENTS...).
To \"go to\" a special element means applying FUNCTION

View file

@ -1703,7 +1703,9 @@ escaped (\\\",\\\\)."
If NODENAME is of the form (FILENAME)NODENAME, the node is in the Info file
FILENAME; otherwise, NODENAME should be in the current Info file (or one of
its sub-files).
Completion is available, but only for node names in the current Info file.
Completion is available for node names in the current Info file as well as
in the Info file FILENAME after the closing parenthesis in (FILENAME).
Empty NODENAME in (FILENAME) defaults to the Top node.
If FORK is non-nil (interactively with a prefix arg), show the node in
a new Info buffer.
If FORK is a string, it is the name to use for the new buffer."
@ -1740,6 +1742,7 @@ list of valid filename suffixes for Info files. See
(when (file-name-absolute-p string)
(setq dirs (list (file-name-directory string))))
(let ((names nil)
(names-sans-suffix nil)
(suffix (concat (regexp-opt suffixes t) "\\'"))
(string-dir (file-name-directory string)))
(dolist (dir dirs)
@ -1762,7 +1765,14 @@ list of valid filename suffixes for Info files. See
;; add the unsuffixed name as a completion option.
(when (string-match suffix file)
(setq file (substring file 0 (match-beginning 0)))
(push (if string-dir (concat string-dir file) file) names)))))
(push (if string-dir (concat string-dir file) file)
names-sans-suffix)))))
;; If there is just one file, don't duplicate it with suffixes,
;; so `Info-read-node-name-1' will be able to complete a single
;; candidate and to add the terminating ")".
(if (and (= (length names) 1) (= (length names-sans-suffix) 1))
(setq names names-sans-suffix)
(setq names (append names-sans-suffix names)))
(complete-with-action action names string pred)))
(defun Info-read-node-name-1 (string predicate code)
@ -1784,16 +1794,19 @@ See `completing-read' for a description of arguments and usage."
((string-match "\\`(\\([^)]+\\))" string)
(let ((file0 (match-string 0 string))
(file1 (match-string 1 string))
(node (substring string (match-end 0))))
(completion-table-with-context
file0
(apply-partially
(lambda (string pred action)
(complete-with-action
action
(Info-build-node-completions (Info-find-file file1))
string pred)))
node predicate code)))
(nodename (substring string (match-end 0))))
(if (and (equal nodename "") (eq code 'lambda))
;; Empty node name is permitted that means "Top".
t
(completion-table-with-context
file0
(apply-partially
(lambda (string pred action)
(complete-with-action
action
(Info-build-node-completions (Info-find-file file1))
string pred)))
nodename predicate code))))
;; Otherwise use Info-read-node-completion-table.
(t (complete-with-action
code Info-read-node-completion-table string predicate))))
@ -1802,7 +1815,9 @@ See `completing-read' for a description of arguments and usage."
(defun Info-read-node-name (prompt)
"Read an Info node name with completion, prompting with PROMPT.
A node name can have the form \"NODENAME\", referring to a node
in the current Info file, or \"(FILENAME)NODENAME\"."
in the current Info file, or \"(FILENAME)NODENAME\", referring to
a node in FILENAME. \"(FILENAME)\" is a short format to go to
the Top node in FILENAME."
(let* ((completion-ignore-case t)
(Info-read-node-completion-table (Info-build-node-completions))
(nodename (completing-read prompt 'Info-read-node-name-1 nil t)))
@ -1810,14 +1825,14 @@ in the current Info file, or \"(FILENAME)NODENAME\"."
(Info-read-node-name prompt)
nodename)))
(defun Info-build-node-completions (&optional file)
(if file
(or (cdr (assoc file Info-file-completions))
(defun Info-build-node-completions (&optional filename)
(if filename
(or (cdr (assoc filename Info-file-completions))
(with-temp-buffer
(Info-mode)
(Info-goto-node (format "(%s)Top" file))
(Info-goto-node (format "(%s)Top" filename))
(Info-build-node-completions-1)
(push (cons file Info-current-file-completions) Info-file-completions)
(push (cons filename Info-current-file-completions) Info-file-completions)
Info-current-file-completions))
(or Info-current-file-completions
(Info-build-node-completions-1))))
@ -4298,7 +4313,7 @@ If the element is just a file name, the file name also serves as the prefix.")
The `info-file' property of COMMAND says which Info manual to search.
If COMMAND has no property, the variable `Info-file-list-for-emacs'
defines heuristics for which Info manual to try.
The locations are of the format used in `Info-history', i.e.
The locations are of the format used in the variable `Info-history', i.e.
\(FILENAME NODENAME BUFFERPOS), where BUFFERPOS is the line number
in the first element of the returned list (which is treated specially in
`Info-goto-emacs-command-node'), and 0 for the rest elements of a list."
@ -5167,13 +5182,16 @@ Otherwise, visit the manual in a new Info buffer."
(with-current-buffer buffer
(and (eq major-mode 'Info-mode)
(stringp Info-current-file)
(not (string= (substring (buffer-name) 0 1) " "))
(push (file-name-sans-extension
(file-name-nondirectory Info-current-file))
names))))
(delete-dups (append (nreverse names)
(apply-partially 'Info-read-node-name-2
Info-directory-list
(mapcar 'car Info-suffix-list))))))
(all-completions
""
(apply-partially 'Info-read-node-name-2
Info-directory-list
(mapcar 'car Info-suffix-list)))))))
(provide 'info)

View file

@ -2946,14 +2946,14 @@ This function also accepts a hexadecimal number of Unicode code
point or a number in hash notation, e.g. #o21430 for octal,
#x2318 for hex, or #10r8984 for decimal."
(let* ((enable-recursive-minibuffers t)
(completion-ignore-case t)
(input
(completing-read
prompt
(lambda (string pred action)
(let ((completion-ignore-case t))
(if (eq action 'metadata)
'(metadata (category . unicode-name))
(complete-with-action action (ucs-names) string pred))))))
(if (eq action 'metadata)
'(metadata (category . unicode-name))
(complete-with-action action (ucs-names) string pred)))))
(char
(cond
((string-match-p "\\`[0-9a-fA-F]+\\'" input)

View file

@ -891,7 +891,7 @@ or one is an alias of the other."
(and (vectorp eol-type-1) (vectorp eol-type-2)))))))
(defun add-to-coding-system-list (coding-system)
"Add CODING-SYSTEM to `coding-system-list' while keeping it sorted."
"Add CODING-SYSTEM to variable `coding-system-list' while keeping it sorted."
(if (or (null coding-system-list)
(coding-system-lessp coding-system (car coding-system-list)))
(setq coding-system-list (cons coding-system coding-system-list))

View file

@ -176,7 +176,7 @@ is non-nil if the user quits the search.")
(defvar isearch-message-function nil
"Function to call to display the search prompt.
If nil, use `isearch-message'.")
If nil, use function `isearch-message'.")
(defvar isearch-wrap-function nil
"Function to call to wrap the search when search is failed.
@ -1101,7 +1101,7 @@ nonincremental search instead via `isearch-edit-string'."
(defun isearch-fail-pos (&optional msg)
"Return position of first mismatch in search string, or nil if none.
If MSG is non-nil, use `isearch-message', otherwise `isearch-string'."
If MSG is non-nil, use variable `isearch-message', otherwise `isearch-string'."
(let ((cmds isearch-cmds)
(curr-msg (if msg isearch-message isearch-string))
succ-msg)

View file

@ -257,6 +257,47 @@ the variable `jit-lock-stealth-nice'."
(remove-hook 'after-change-functions 'jit-lock-after-change t)
(remove-hook 'fontification-functions 'jit-lock-function))))
(define-minor-mode jit-lock-debug-mode
"Minor mode to help debug code run from jit-lock.
When this minor mode is enabled, jit-lock runs as little code as possible
during redisplay and moves the rest to a timer, where things
like `debug-on-error' and Edebug can be used."
:global t
(when jit-lock-defer-timer
(cancel-timer jit-lock-defer-timer)
(setq jit-lock-defer-timer nil))
(when jit-lock-debug-mode
(setq jit-lock-defer-timer
(run-with-idle-timer 0 t #'jit-lock--debug-fontify))))
(defvar jit-lock--debug-fontifying nil)
(defun jit-lock--debug-fontify ()
"Fontify what was deferred for debugging."
(when (and (not jit-lock--debug-fontifying)
jit-lock-defer-buffers (not memory-full))
(let ((jit-lock--debug-fontifying t)
(inhibit-debugger nil)) ;FIXME: Not sufficient!
;; Mark the deferred regions back to `fontified = nil'
(dolist (buffer jit-lock-defer-buffers)
(when (buffer-live-p buffer)
(with-current-buffer buffer
;; (message "Jit-Debug %s" (buffer-name))
(with-buffer-prepared-for-jit-lock
(let ((pos (point-min)))
(while
(progn
(when (eq (get-text-property pos 'fontified) 'defer)
(let ((beg pos)
(end (setq pos (next-single-property-change
pos 'fontified
nil (point-max)))))
(put-text-property beg end 'fontified nil)
(jit-lock-fontify-now beg end)))
(setq pos (next-single-property-change
pos 'fontified)))))))))
(setq jit-lock-defer-buffers nil))))
(defun jit-lock-register (fun &optional contextual)
"Register FUN as a fontification function to be called in this buffer.
FUN will be called with two arguments START and END indicating the region
@ -504,7 +545,8 @@ non-nil in a repeated invocation of this function."
pos (setq pos (next-single-property-change
pos 'fontified nil (point-max)))
'fontified nil))
(setq pos (next-single-property-change pos 'fontified)))))))))
(setq pos (next-single-property-change
pos 'fontified)))))))))
(setq jit-lock-defer-buffers nil)
;; Force fontification of the visible parts.
(let ((jit-lock-defer-timer nil))

View file

@ -4647,7 +4647,7 @@ With prefix argument N moves forward N messages with these labels.
;;;***
;;;### (autoloads (rmail-mime) "rmailmm" "rmailmm.el" "1f33964668345a1a1f3119fece148227")
;;;### (autoloads (rmail-mime) "rmailmm" "rmailmm.el" "93951f748e43e1015da1b485088970ca")
;;; Generated autoloads from rmailmm.el
(autoload 'rmail-mime "rmailmm" "\

View file

@ -1365,14 +1365,15 @@ The arguments ARG and STATE have no effect in this case."
(defun rmail-insert-mime-forwarded-message (forward-buffer)
"Insert the message in FORWARD-BUFFER as a forwarded message.
This is the usual value of `rmail-insert-mime-forwarded-message-function'."
(let ((message-buffer
(with-current-buffer forward-buffer
(if rmail-buffer-swapped
rmail-view-buffer
forward-buffer))))
(save-restriction
(narrow-to-region (point) (point))
(message-forward-make-body-mime message-buffer))))
(let (contents-buffer start end)
(with-current-buffer forward-buffer
(setq contents-buffer
(if rmail-buffer-swapped
rmail-view-buffer
forward-buffer)
start (rmail-msgbeg rmail-current-message)
end (rmail-msgend rmail-current-message)))
(message-forward-make-body-mime contents-buffer start end)))
(setq rmail-insert-mime-forwarded-message-function
'rmail-insert-mime-forwarded-message)

View file

@ -1493,6 +1493,9 @@ just append to the file, in Babyl format if necessary."
(insert "\nMail-Followup-To: "))))
(defun mail-position-on-field (field &optional soft)
"Move to the start of the contents of header field FIELD.
If there is none, insert one, unless SOFT is non-nil.
If there are multiple FIELD fields, this goes to the first."
(let (end
(case-fold-search t))
(setq end (mail-header-end))

View file

@ -1,4 +1,4 @@
;;; man.el --- browse UNIX manual pages -*- coding: iso-8859-1 -*-
;;; man.el --- browse UNIX manual pages -*- coding: utf-8 -*-
;; Copyright (C) 1993-1994, 1996-1997, 2001-2013 Free Software
;; Foundation, Inc.
@ -276,7 +276,7 @@ Used in `bookmark-set' to get the default bookmark name."
:type 'hook
:group 'man)
(defvar Man-name-regexp "[-a-zA-Z0-9_­+][-a-zA-Z0-9_.:­+]*"
(defvar Man-name-regexp "[-a-zA-Z0-9_­+][-a-zA-Z0-9_.:­+]*"
"Regular expression describing the name of a manpage (without section).")
(defvar Man-section-regexp "[0-9][a-zA-Z0-9+]*\\|[LNln]"
@ -780,6 +780,59 @@ POS defaults to `point'."
;; but apparently that's not the case in all cases, so let's add a cache.
"Cache of completion table of the form (PREFIX . TABLE).")
(defvar Man-man-k-use-anchor
;; man-db or man-1.*
(memq system-type '(gnu gnu/linux gnu/kfreebsd))
"If non-nil prepend ^ to the prefix passed to \"man -k\" for completion.
The value should be nil if \"man -k ^PREFIX\" may omit some man
pages whose names start with PREFIX.
Currently, the default value depends on `system-type' and is
non-nil where the standard man programs are known to behave
properly. Setting the value to nil always gives correct results
but computing the list of completions may take a bit longer.")
(defun Man-parse-man-k ()
"Parse \"man -k\" output and return the list of page names.
The current buffer should contain the output of a command of the
form \"man -k keyword\", which is traditionally also available with
apropos(1).
While POSIX man(1p) is a bit vague about what to expect here,
this function tries to parse some commonly used formats, which
can be described in the following informal way, with square brackets
indicating optional parts and whitespace being interpreted
somewhat loosely.
foo[, bar [, ...]] [other stuff] (sec) - description
foo(sec)[, bar(sec) [, ...]] [other stuff] - description
For more details and some regression tests, please see
test/automated/man-tests.el in the emacs bzr repository."
(goto-char (point-min))
;; See man-tests for data about which systems use which format (hopefully we
;; will be able to simplify the code if/when some of those formats aren't
;; used any more).
(let (table)
(while (search-forward-regexp "^\\([^ \t,\n]+\\)\\(.*?\\)\
\\(?:[ \t]\\(([^ \t,\n]+?)\\)\\)?\\(?:[ \t]+- ?\\(.*\\)\\)?$" nil t)
(let ((section (match-string 3))
(description (match-string 4))
(bound (match-end 2)))
(goto-char (match-end 1))
(while
(progn
;; The first regexp grouping may already match the section
;; tacked on to the name, which is ok since for the formats we
;; claim to support the third (non-shy) grouping does not
;; match in this case, i.e., section is nil.
(push (propertize (concat (match-string 1) section)
'help-echo description)
table)
(search-forward-regexp "\\=, *\\([^ \t,]+\\)" bound t)))))
(nreverse table)))
(defun Man-completion-table (string pred action)
(cond
;; This ends up returning t for pretty much any string, and hence leads to
@ -811,16 +864,15 @@ POS defaults to `point'."
;; run differently in Man-getpage-in-background, an error
;; here may not necessarily mean that we'll also get an
;; error later.
(ignore-errors
(call-process manual-program nil '(t nil) nil
"-k" (concat "^" prefix))))
(goto-char (point-min))
(while (re-search-forward "^\\([^ \t\n]+\\)\\(?: ?\\((.+?)\\)\\(?:[ \t]+- \\(.*\\)\\)?\\)?" nil t)
(push (propertize (concat (match-string 1) (match-string 2))
'help-echo (match-string 3))
table)))
;; Cache the table for later reuse.
(setq Man-completion-cache (cons prefix table)))
(ignore-errors
(call-process manual-program nil '(t nil) nil
"-k" (concat (when (or Man-man-k-use-anchor
(string-equal prefix ""))
"^")
prefix))))
(setq table (Man-parse-man-k)))
;; Cache the table for later reuse.
(setq Man-completion-cache (cons prefix table)))
;; The table may contain false positives since the match is made
;; by "man -k" not just on the manpage's name.
(if section
@ -891,6 +943,7 @@ names or descriptions. The pattern argument is usually an
;; ("man -k" is case-insensitive similarly, so the
;; table has everything available to complete)
(completion-ignore-case t)
Man-completion-cache ;Don't cache across calls.
(input (completing-read
(format "Manual entry%s"
(if (string= default-entry "")
@ -1395,7 +1448,7 @@ The following key bindings are currently in effect in the buffer:
;; Update len, in case a reference spans
;; more than two lines (paranoia).
len (1- (length word))))
(if (memq (aref word len) '(?- ?­))
(if (memq (aref word len) '(?- ?­))
(setq hyphenated (substring word 0 len)))
(and (string-match Man-reference-regexp word)
(not (member word Man--refpages))

View file

@ -1637,8 +1637,8 @@ key, a click, or a menu-item"))
'(menu-item "Find Options by Value..." apropos-value
:help "Find variables whose values match a regexp"))
(bindings--define-key menu [find-options-by-name]
'(menu-item "Find Options by Name..." apropos-variable
:help "Find variables whose names match a regexp"))
'(menu-item "Find Options by Name..." apropos-user-option
:help "Find user options whose names match a regexp"))
(bindings--define-key menu [find-commands-by-name]
'(menu-item "Find Commands by Name..." apropos-command
:help "Find commands whose names match a regexp"))

View file

@ -73,7 +73,7 @@ end of the search space).
The first argument of this function is the current buffer where the
search is currently searching. It defines the base buffer relative to
which this function should find the next buffer. When the isearch
direction is backward (when `isearch-forward' is nil), this function
direction is backward (when option `isearch-forward' is nil), this function
should return the previous buffer to search.
If the second argument of this function WRAP is non-nil, then it

View file

@ -61,12 +61,17 @@
"^[[:space:]]*\\([-[:alpha:]]+\\)" ; \1 permissions
"[[:space:]]*\\([^[:space:]]+\\)" ; \2 username
"[[:space:]]+\\([^[:space:]]+\\)" ; \3 group
"[[:space:]]+\\([[:digit:]]\\)" ; \4 size
"[[:space:]]+\\([[:digit:]]+\\)" ; \4 size
"[[:space:]]+\\([-[:digit:]]+[[:space:]][:[:digit:]]+\\)" ; \5 date
"[[:space:]]+\\(.*\\)$")) ; \6 filename
;;;###tramp-autoload
(add-to-list 'tramp-methods `(,tramp-adb-method))
(add-to-list 'tramp-methods
`(,tramp-adb-method
(tramp-tmpdir "/data/local/tmp")))
;;;###tramp-autoload
(add-to-list 'tramp-default-host-alist `(,tramp-adb-method nil ""))
;;;###tramp-autoload
(eval-after-load 'tramp
@ -95,8 +100,8 @@
(file-directory-p . tramp-adb-handle-file-directory-p)
(file-symlink-p . tramp-handle-file-symlink-p)
;; FIXME: This is too sloppy.
(file-executable-p . file-exists-p)
(file-exists-p . tramp-adb-handle-file-exists-p)
(file-executable-p . tramp-handle-file-exists-p)
(file-exists-p . tramp-handle-file-exists-p)
(file-readable-p . tramp-handle-file-exists-p)
(file-writable-p . tramp-adb-handle-file-writable-p)
(file-local-copy . tramp-adb-handle-file-local-copy)
@ -106,7 +111,6 @@
(directory-files . tramp-handle-directory-files)
(directory-files-and-attributes
. tramp-adb-handle-directory-files-and-attributes)
(file-name-all-completions . tramp-sh-handle-file-name-all-completions)
(make-directory . tramp-adb-handle-make-directory)
(delete-directory . tramp-adb-handle-delete-directory)
(delete-file . tramp-adb-handle-delete-file)
@ -118,7 +122,7 @@
(vc-registered . ignore) ;no vc control files on Android devices
(write-region . tramp-adb-handle-write-region)
(set-file-modes . tramp-adb-handle-set-file-modes)
(set-file-times . ignore)
(set-file-times . tramp-adb-handle-set-file-times)
(copy-file . tramp-adb-handle-copy-file)
(rename-file . tramp-adb-handle-rename-file)
(process-file . tramp-adb-handle-process-file)
@ -139,13 +143,7 @@
"Invoke the ADB handler for OPERATION.
First arg specifies the OPERATION, second arg is a list of arguments to
pass to the OPERATION."
(let ((fn (assoc operation tramp-adb-file-name-handler-alist))
;; `tramp-default-host's default value is (system-name). Not
;; useful for us.
(tramp-default-host
(unless (equal (eval (car (get 'tramp-default-host 'standard-value)))
tramp-default-host)
tramp-default-host)))
(let ((fn (assoc operation tramp-adb-file-name-handler-alist)))
(if fn
(save-match-data (apply (cdr fn) args))
(tramp-run-real-handler operation args))))
@ -312,7 +310,9 @@ pass to the OPERATION."
(and is-symlink
(cadr (split-string name "\\( -> \\|\n\\)")))))
(push (list
name
(if is-symlink
(car (split-string name "\\( -> \\|\n\\)"))
name)
(or is-dir symlink-target)
1 ;link-count
;; no way to handle numeric ids in Androids ash
@ -372,14 +372,14 @@ pass to the OPERATION."
"ls")))
(defun tramp-adb-get-toolbox (vec)
"Get shell toolbox implementation: `toolbox' for orginal distributions
or `busybox' for CynagenMode based distributions"
"Get shell toolbox implementation: `toolbox' for original distributions
or `busybox' for CyanogenMod based distributions"
(with-tramp-connection-property vec "toolbox"
(tramp-message vec 5 "Checking shell toolbox implementation")
(cond
((zerop (tramp-adb-command-exit-status vec "busybox")) 'busybox)
((zerop (tramp-adb-command-exit-status vec "toolbox")) 'toolbox)
(t 'unkown))))
(t 'unknown))))
(defun tramp-adb--gnu-switches-to-ash
(switches)
@ -616,6 +616,19 @@ But handle the case, if the \"test\" command is not available."
v (format "chmod %s %s" (tramp-compat-decimal-to-octal mode) localname)
"Error while changing file's mode %s" filename)))
(defun tramp-adb-handle-set-file-times (filename &optional time)
"Like `set-file-times' for Tramp files."
(with-parsed-tramp-file-name filename nil
(tramp-flush-file-property v localname)
(let ((time (if (or (null time) (equal time '(0 0)))
(current-time)
time)))
(tramp-adb-command-exit-status
;; use shell arithmetic because of Emacs integer size limit
v (format "touch -t $(( %d * 65536 + %d )) %s"
(car time) (cadr time)
(tramp-shell-quote-argument localname))))))
(defun tramp-adb-handle-copy-file
(filename newname &optional ok-if-already-exists keep-date
preserve-uid-gid preserve-extended-attributes)
@ -940,19 +953,11 @@ PRESERVE-UID-GID and PRESERVE-EXTENDED-ATTRIBUTES are completely ignored."
(tramp-set-connection-property v "process-name" nil)
(tramp-set-connection-property v "process-buffer" nil)))))
;; Android < 4 doesn't provide test command.
(defun tramp-adb-handle-file-exists-p (filename)
"Like `file-exists-p' for Tramp files."
(with-parsed-tramp-file-name filename nil
(with-tramp-file-property v localname "file-exists-p"
(file-attributes filename))))
;; Helper functions.
(defun tramp-adb-execute-adb-command (vec &rest args)
"Returns nil on success error-output on failure."
(when (tramp-file-name-host vec)
(when (> (length (tramp-file-name-host vec)) 0)
(setq args (append (list "-s" (tramp-file-name-host vec)) args)))
(with-temp-buffer
(prog1
@ -1054,6 +1059,7 @@ Does not do anything if a connection is already open, but re-opens the
connection if a previous connection has died for some reason."
(let* ((buf (tramp-get-connection-buffer vec))
(p (get-buffer-process buf))
(host (tramp-file-name-host vec))
(devices (mapcar 'cadr (tramp-adb-parse-device-names nil))))
(unless
(and p (processp p) (memq (process-status p) '(run open)))
@ -1061,21 +1067,17 @@ connection if a previous connection has died for some reason."
(when (and p (processp p)) (delete-process p))
(if (not devices)
(tramp-error vec 'file-error "No device connected"))
(if (and (tramp-file-name-host vec)
(not (member (tramp-file-name-host vec) devices)))
(tramp-error
vec 'file-error
"Device %s not connected" (tramp-file-name-host vec)))
(if (and (not (eq (length devices) 1))
(not (tramp-file-name-host vec)))
(if (and (> (length host) 0) (not (member host devices)))
(tramp-error vec 'file-error "Device %s not connected" host))
(if (and (> (length devices) 1) (zerop (length host)))
(tramp-error
vec 'file-error
"Multiple Devices connected: No Host/Device specified"))
(with-tramp-progress-reporter vec 3 "Opening adb shell connection"
(let* ((coding-system-for-read 'utf-8-dos) ;is this correct?
(process-connection-type tramp-process-connection-type)
(args (if (tramp-file-name-host vec)
(list "-s" (tramp-file-name-host vec) "shell")
(args (if (> (length host) 0)
(list "-s" host "shell")
(list "shell")))
(p (let ((default-directory
(tramp-compat-temporary-file-directory)))
@ -1111,7 +1113,19 @@ connection if a previous connection has died for some reason."
vec 3
"Connection reset, because remote host changed from `%s' to `%s'"
old-getprop new-getprop)
(tramp-adb-maybe-open-connection vec)))))))))
(tramp-adb-maybe-open-connection vec)))
;; Set "remote-path" connection property. This is needed
;; for eshell.
(tramp-adb-send-command vec "echo \\\"$PATH\\\"")
(tramp-set-connection-property
vec "remote-path"
(split-string
(with-current-buffer (tramp-get-connection-buffer vec)
;; Read the expression.
(goto-char (point-min))
(read (current-buffer)))
":" 'omit-nulls))))))))
(provide 'tramp-adb)
;;; tramp-adb.el ends here

View file

@ -5181,34 +5181,6 @@ function cell is returned to be applied on a buffer."
(t
(format "%s <%%s" coding)))))))
;;; Integration of eshell.el:
(eval-when-compile
(defvar eshell-path-env))
;; eshell.el keeps the path in `eshell-path-env'. We must change it
;; when `default-directory' points to another host.
(defun tramp-eshell-directory-change ()
"Set `eshell-path-env' to $PATH of the host related to `default-directory'."
(setq eshell-path-env
(if (file-remote-p default-directory)
(with-parsed-tramp-file-name default-directory nil
(mapconcat
'identity
(tramp-get-remote-path v)
":"))
(getenv "PATH"))))
(eval-after-load "esh-util"
'(progn
(tramp-eshell-directory-change)
(add-hook 'eshell-directory-change-hook
'tramp-eshell-directory-change)
(add-hook 'tramp-unload-hook
(lambda ()
(remove-hook 'eshell-directory-change-hook
'tramp-eshell-directory-change)))))
(add-hook 'tramp-unload-hook
(lambda ()
(unload-feature 'tramp-sh 'force)))

View file

@ -381,6 +381,23 @@ Useful for su and sudo methods mostly."
:group 'tramp
:type 'string)
;;;###tramp-autoload
(defcustom tramp-default-host-alist nil
"Default host to use for specific method/user pairs.
This is an alist of items (METHOD USER HOST). The first matching item
specifies the host to use for a file name which does not specify a
host. METHOD and HOST are regular expressions or nil, which is
interpreted as a regular expression which always matches. If no entry
matches, the variable `tramp-default-host' takes effect.
If the file name does not specify the method, lookup is done using the
empty string for the method name."
:group 'tramp
:version "24.4"
:type '(repeat (list (choice :tag "Method regexp" regexp sexp)
(choice :tag " User regexp" regexp sexp)
(choice :tag " Host name" string (const nil)))))
(defcustom tramp-default-proxies-alist nil
"Route to be followed for specific host/user pairs.
This is an alist of items (HOST USER PROXY). The first matching
@ -918,7 +935,7 @@ See `tramp-file-name-structure' for more explanations.")
This regexp should match partial Tramp file names only.
Please note that the entry in `file-name-handler-alist' is made when
this file (tramp.el) is loaded. This means that this variable must be set
this file \(tramp.el\) is loaded. This means that this variable must be set
before loading tramp.el. Alternatively, `file-name-handler-alist' can be
updated after changing this variable.
@ -1163,6 +1180,15 @@ This is USER, if non-nil. Otherwise, do a lookup in
"Return the right host string to use.
This is HOST, if non-nil. Otherwise, it is `tramp-default-host'."
(or (and (> (length host) 0) host)
(let ((choices tramp-default-host-alist)
lhost item)
(while choices
(setq item (pop choices))
(when (and (string-match (or (nth 0 item) "") (or method ""))
(string-match (or (nth 1 item) "") (or user "")))
(setq lhost (nth 2 item))
(setq choices nil)))
lhost)
tramp-default-host))
(defun tramp-dissect-file-name (name &optional nodefault)
@ -3861,6 +3887,39 @@ Only works for Bourne-like shells."
t t result)))
result))))
;;; Integration of eshell.el:
(eval-when-compile
(defvar eshell-path-env))
;; eshell.el keeps the path in `eshell-path-env'. We must change it
;; when `default-directory' points to another host.
(defun tramp-eshell-directory-change ()
"Set `eshell-path-env' to $PATH of the host related to `default-directory'."
(setq eshell-path-env
(if (file-remote-p default-directory)
(with-parsed-tramp-file-name default-directory nil
(mapconcat
'identity
(or
;; When `tramp-own-remote-path' is in `tramp-remote-path',
;; the remote path is only set in the session cache.
(tramp-get-connection-property
(tramp-get-connection-process v) "remote-path" nil)
(tramp-get-connection-property v "remote-path" nil))
":"))
(getenv "PATH"))))
(eval-after-load "esh-util"
'(progn
(tramp-eshell-directory-change)
(add-hook 'eshell-directory-change-hook
'tramp-eshell-directory-change)
(add-hook 'tramp-unload-hook
(lambda ()
(remove-hook 'eshell-directory-change-hook
'tramp-eshell-directory-change)))))
;; Checklist for `tramp-unload-hook'
;; - Unload all `tramp-*' packages
;; - Reset `file-name-handler-alist'

View file

@ -1206,7 +1206,8 @@ changed with `comment-style'."
(defun comment-box (beg end &optional arg)
"Comment out the BEG .. END region, putting it inside a box.
The numeric prefix ARG specifies how many characters to add to begin- and
end- comment markers additionally to what `comment-add' already specifies."
end- comment markers additionally to what variable `comment-add' already
specifies."
(interactive "*r\np")
(comment-normalize-vars)
(let ((comment-style (if (cadr (assoc comment-style comment-styles))

View file

@ -1,3 +1,380 @@
2013-01-13 Bastien Guerry <bzg@gnu.org>
* org-compat.el (org-condition-case-unless-debug): Delete.
* org-odt.el (org-odt-cleanup-xml-buffers): Use
`condition-case' instead of `org-condition-case-unless-debug',
which is now deleted.
* org-capture.el (org-capture-templates-contexts):
* org-agenda.el (org-agenda-custom-commands-contexts):
Docstring fix.
* org.el (org-get-tags-at): Remove duplicate inherited tags.
* org-agenda.el (org-agenda-show-inherited-tags): Allow to be set
to 'always or to a list of agenda types.
(org-agenda-finalize): Rework conditions under which inherited
tags should be made available even when not displayed.
(org-search-view, org-agenda-get-todos)
(org-agenda-get-timestamps, org-agenda-get-sexps)
(org-agenda-get-progress, org-agenda-get-scheduled)
(org-agenda-get-blocks): Use new possible values of
`org-agenda-show-inherited-tags'.
* org.el (org-open-at-point): Fix opening all links at point.
* org-agenda.el (org-get-entries-from-diary): Turn off
`diary-file-name-prefix' instead of
`diary-file-name-prefix-function', the former is checked before
the latter.
* org.el (org-edit-special): Check for table.el before checking
for Org tables.
2013-01-13 Michael Albinus <michael.albinus@gmx.de>
* ob-eval.el (org-babel-shell-command-on-region): Use
`executable-find' for local `shell-file-name'.
2013-01-09 Achim Gratz <Stromeko@Stromeko.de>
* org-faces.el: Define face alias mode-line for XEmacs (it's
called modeline there).
* org-compat.el (org-no-popups): New wrapper macro which let-binds
the correct variables to suppress popup windows depending on the
Emacs version in use. This is a compile-time decision when
byte-compiling.
* org.el (org-get-location, org-switch-to-buffer-other-window):
Use the wrapper `org-no-popups' to let-bind the correct variables
for suppression of popup windows.
* org-compat.el (user-error): Defalias to `error' for Emacsen that
don't have it.
* org-agenda.el (org-agenda-write): Use org-called-interactively-p
instead of called-interactively-p.
* org.el (org-find-invisible-foreground): Do not use the value of
variables `default-frame-alist', `initial-frame-alist' and
`window-system-default-frame-alist' when their symbol is not bound.
2013-01-09 Bastien Guerry <bzg@gnu.org>
* org-src.el (org-edit-src-code): Fix bug when trying to edit a
table.el table.
* org-agenda.el (org-agenda-finalize): Inhibit readonly for the
whole function.
* org.el (org-entry-get): Speed up by let-binding some variables
only if needed. Also fix a bug: consider an empty drawer as no drawer.
* org-agenda.el (org-search-view, org-agenda-get-todos)
(org-agenda-get-timestamps, org-agenda-get-sexps)
(org-agenda-get-progress, org-agenda-get-deadlines)
(org-agenda-get-scheduled, org-agenda-get-blocks)
(org-agenda-change-all-lines): Get local tags only.
(org-agenda-use-tag-inheritance): New option.
(org-agenda-finalize): When `org-agenda-use-tag-inheritance'
is non-nil, possibly reset tags in the agenda buffer.
(org-agenda-check-type): Enhance docstring.
* org.el (org-use-tag-inheritance): Fix typo in docstring.
* org-agenda.el (org-float): Don't alias `org-float'.
* org.el (org-scan-tags): The skipper already checks for archived
entries.
* org.el (org-refresh-properties): Rename from
`org-refresh-effort-properties' and use two new parameters.
(org-agenda-prepare-buffers): Use `org-refresh-properties'.
Also refresh the 'org-appt-warntime text property.
* org-clock.el (org-clock-in): Use the renamed defun.
* org-icalendar.el (org-icalendar-print-entries):
Refresh the 'org-appt-warntime property.
(org-icalendar-print-entries):
* org-agenda.el (org-agenda-get-timestamps)
(org-agenda-get-sexps, org-agenda-get-deadlines)
(org-agenda-get-scheduled): Do not use `org-entry-get' to get the
"APPT_WARNTIME" property value.
* org.el (org-id-link-to-org-use-id): Fix compiler warning.
* org-agenda.el (org-agenda-format-item): Do not use
`org-get-effort' to get the effort text property.
(org-agenda-get-sexps): Use `org-back-to-heading' when setting tags.
* org-clock.el (org-clock-in): Refresh effort properties.
* org.el (org-refresh-effort-properties): New defun.
(org-get-effort): Delete.
(org-set-effort):
(org-property-next-allowed-value): Set the 'org-effort text property.
(org-agenda-prepare-buffers): Refresh effort properties.
* org.el (org-read-date): Let-bind `mouse-autoselect-window' to
nil so that the mouse doesn't jump when the option is set to t globally.
* org-agenda.el (org-agenda-dim-blocked-tasks): Default to nil.
(org-agenda-dim-blocked-tasks): Make interactive and allow an
optional parameter 'invisible to hide blocked tasks instead of
just dimming them.
(org-agenda-mode-map): Bind `org-agenda-dim-blocked-tasks' to "#".
* org-agenda.el (org-agenda-finalize): Don't try to align tags
when there are no tags. Only try to draw the habit consistency
graph when there is a habit in the buffer. Only mark clocking
task when there is one.
* org.el (org-adaptive-fill-function): DTRT in `message-mode'.
* org.el (org-get-priority): Save match data even when using
`org-get-priority-function'.
* org-mobile.el (org-mobile-create-index-file):
Possibly normalize `org-todo-keywords'.
* org-mobile.el (org-mobile-push): Use the correct agenda buffer names.
* org.el (org-store-link): Use `org-id-link-to-org-use-id' instead
of the obsolete variable name.
* org.el (org-fontify-meta-lines-and-blocks-1):
Fix bug when fontifying keywords with no value.
* org.el (org-goto-auto-isearch): Enhance docstring.
(org-goto-map): Make a defun, so that the customized value of
org-goto-auto-isearch is correctly initialized.
(org-goto): Initialize the keymap with `org-goto-map'.
(org-get-location): Use *Org Help* as a temporary buffer.
Tell whether auto-isearch is on or off.
* org-exp.el (org-export-as-org): Remove useless argument.
* org-docbook.el (org-export-as-docbook-batch)
(org-export-region-as-docbook, org-export-as-docbook-pdf):
Fix the number of arguments.
(org-export-as-docbook): Remove useless argument.
* org.el (org-speed-commands-default): Use ":" instead of ";" for
`org-set-tags-command', which is consistent with ":" in agenda
view. Use "=" for `org-columns".
* org.el (org-sparse-tree): Fix redundant information in prompt.
* org-exp.el (org-export-string): Fix number of arguments passed
to the org-export-as-* functions.
* org-latex.el (org-export-as-latex): Fix typo in docstring.
* org-list.el (org-cycle-include-plain-lists): Docstring enhancement.
* org.el (org-fontify-meta-lines-and-blocks-1): Fix fontification
bug when fontifying a keyword with no associated value.
(org-cycle-internal-local): Don't run hooks when cycling a plain
list before first headline.
(org-ctrl-c-ctrl-c): Throw a user error when trying to toggle a
blocked checkbox.
(org-indent-line): Fix table formulas indenting.
* org-agenda.el (org-agenda-open-link): Fix bug when no link is
matched. Return a message instead of an error.
(org-agenda-priority): Remove useless parameter and fix showing
priority in agenda buffers.
* org-macs.el (org-with-buffer-modified-unmodified): New macro.
* org.el (org-entry-blocked-p): Use the new macro.
* org-src.el (org-edit-src-exit): Don't comma-escape the content
of a fixed width region.
* org.el (org-blocker-hook): Update the docstring to mention that
functions in this hook should not modify the buffer.
(org-trigger-hook): Small docstring fix.
(org-entry-blocked-p): Use `with-buffer-modified-unmodified'
so that the function never modifies the buffer.
* org-agenda.el (org-agenda-open-link): Allow to open an internal
link by using the new `org-offer-links-in-entry' function.
* org.el (org-offer-links-in-entry): Do not open the link directly
through `org-open-link-from-string', only offer to select a link
and return a cons with the link (as a string) and the end of entry.
(org-open-at-point): Use `org-offer-links-in-entry' correctly.
* org.el (org-cycle-internal-local):
Fix bug: allow headings with leading blank characters.
* org-clock.el (org-clock-persist):
Docstring fix: document the 'history value.
* org.el (org-insert-link): Fix bug when inserting links to
headlines containing the ">" character.
* org-crypt.el (org-at-encrypted-entry-p): Fix search boundary.
* org-compat.el (org-delete-directory): New compatibility function
for Emacs 22, where `delete-directory' does not support recursive
deletion.
* org-odt.el (org-odt-cleanup-xml-buffers):
Use the new compatibility function.
* org.el (org-table-map-tables): Fix allowed blocks.
* org.el (org-edit-special):
* org-src.el (org-edit-src-code): Fix regression: allow editing
HTML and LaTeX source blocks again.
* org.el (org-nonsticky-props): Add `htmlize-link'.
(org-nonsticky-props): Add `htmlize-link'.
* org.el (org-edit-special):
* org-src.el (org-edit-src-code): Don't edit in verbatim blocks.
* org-table.el (org-table-fedit-lisp-indent)
(orgtbl-self-insert-command): Use `org-delete-backward-char'
instead of `backward-delete-char'.
* org-src.el (org-edit-src-code): Fix another bug about editing
special blocks "example" and "verbatim".
* org.el (org-structure-template-alist): Add verbatim.
(org-edit-special): Fix bug about editing special blocks
"example" and "verbatim".
* org.el (org-delete-backward-char, org-delete-char):
Save match data, `delete-backward-char' and `delete-char' don't.
* org.el (org-enable-table-editor, org-insert-heading)
(org-remove-timestamp-with-keyword, org-self-insert-command):
* org-table.el (org-table-fedit-lisp-indent)
(orgtbl-self-insert-command):
* org-latex.el (org-export-latex-subcontent):
* org-clock.el (org-clocktable-write-default):
* org-ascii.el (org-export-ascii-preprocess):
Use `delete-backward-char' instead of `backward-delete-char'.
* org.el (org-todo): Ignore the comment string when changing the
TODO state of a headline.
(org-edit-special): Fix docstring.
(org-in-src-block-p): Small enhancement.
* org-publish.el (org-publish-org-to): Call `org-export-as-*'
functions with the correct list of arguments.
* org-html.el (org-export-as-html): Delete obsolete arg `hidden'.
(org-export-as-html-and-open, org-export-as-html-batch)
(org-export-region-as-html): Don't use obsolete arg.
* org-ascii.el (org-export-as-ascii): Delete obsolete arg `hidden'.
(org-export-as-ascii-to-buffer): Don't use obsolete arg.
* org.el (org-in-fixed-width-region-p): Save match data.
(org-in-src-block-p): Use case-folding for searching the block
boundaries.
(org-activate-plain-links, org-activate-angle-links)
(org-activate-bracket-links): Prevent link activation in
source code blocks.
* org-odt.el (org-odt-cleanup-xml-buffers): Fix Emacs Bug#13197 by
setting the correct buffer before marking it unmodified to
silently kill him.
* org.el (org-set-font-lock-defaults): Don't activate links in
source code blocks and fixed-width regions.
* org-agenda.el (org-agenda-finalize): Fix links activation.
* org.el (org-open-at-point): Throw the correct error on
non-links. Use `user-error' instead of `error'.
* org.el (org-in-fixed-width-region-p): Define before use.
* org-src.el (org-in-src-block-p): Declare function.
* org-compat.el: Fix bug: don't use `eval-when-compile' when
aliasing `user-error'.
* org-agenda.el (org-agenda-skip): Only check if point is
inside a code block, not at a code block.
* org.el (org-in-fixed-width-region-p):
Rewrite using org-element.el.
* org.el (org-fill-paragraph): Fill correctly in source code block.
* org.el (org-in-fixed-width-region-p): New function.
(org-edit-special): Fix bug: make sure to DTRT in every
special environment. Also use the new function to check
against fixed-width environment.
* org-src.el (org-edit-src-code): Check if we are in a source code
block with `org-in-src-block-p'. Slightly reformat the docstring.
* org.el (org-in-src-block-p): Return t when point is at the
#+BEGIN_SRC/#+END_SRC lines unless the new optional parameter
'inside is set to t.
* ob-exp.el (obe-marker): Delete useless var.
* org-src.el (org-edit-src-code): Fix bug triggered by the sexp
(copy-marker nil) on Emacs <24.1.
2013-01-09 Dmitry Antipov <dmantipov@yandex.ru>
* org-agenda.el (org-agenda-get-restriction-and-command):
* org-capture.el (org-capture-place-template):
* org-colview.el (org-dblock-write:columnview):
* org-mobile.el (org-mobile-locate-entry):
* org-table.el (org-table-convert-region):
* org.el (org-update-statistics-cookies): Use `point-marker'.
2013-01-09 Eric Schulte <eric.schulte@gmx.com>
* org-exp.el (org-export-string): Pass the dir option on through
to any subsequent export functions.
2013-01-09 Henning Weiss <hdweiss@gmail.com> (tiny change)
* org-mobile.el (org-mobile-sumo-agenda-command): Remove match
description from block agendas when they have a title.
2013-01-09 Jambunathan K <kjambunathan@gmail.com>
* org-odt.el (org-export-as-odt-batch): Init `org-odt-zip-dir'.
Fix Emacs Bug#13254.
* org-odt.el (org-odt-format-org-link): Add check for presence of
description in headline links.
2013-01-09 Michael Gauland <mike_gauland@stanfordalumni.org> (tiny change)
* org-src.el: Create a marker to pass to copy-marker.
2013-01-09 Nicolas Goaziou <n.goaziou@gmail.com>
* org.el (org-setup-filling): Set `auto-fill-inhibit-regexp' to
nil because `org-adaptive-fill-function' already determines which
lines should be filled.
* org.el (org-fill-paragraph): Small refactoring.
* org-element.el (org-element--parse-elements)
(org-element-at-point): Fix parsing of a list in a block in a list.
2013-01-09 Sebastien Vauban <wxhgmqzgwmuf-geNee64TY+gS+FvcfC7Uqw@public.gmane.org>
* org.el (org-copy-subtree, org-paste-subtree):
Fix whitespace handling when copying/pasting a subtree.
2012-12-20 Michael Albinus <michael.albinus@gmx.de>
* ob.el (org-babel-temp-file): Fix setting of
@ -129,9 +506,8 @@
* ob-haskell.el (org-export-as-latex): Don't use the obsoleted
argument `hidden'.
* org.el (org-refile): Run within `with-demoted-errors' so
that a corrupted bookmark file does not stop the refile
process.
* org.el (org-refile): Run within `with-demoted-errors' so that a
corrupted bookmark file does not stop the refile process.
* org-capture.el (org-capture-bookmark-last-stored-position):
Ditto for the capture process.

View file

@ -30,6 +30,7 @@
(eval-when-compile (require 'cl))
(defvar org-babel-error-buffer-name "*Org-Babel Error Output*")
(declare-function org-babel-temp-file "ob-core" (prefix &optional suffix))
(defun org-babel-eval-error-notify (exit-code stderr)
"Open a buffer to display STDERR and a message with the value of EXIT-CODE."
@ -136,12 +137,23 @@ specifies the value of ERROR-BUFFER."
t)))
(let ((input-file (org-babel-temp-file "input-"))
(error-file (if error-buffer (org-babel-temp-file "scor-") nil))
;; Unfortunately, `executable-find' does not support file name
;; handlers. Therefore, we could use it in the local case
;; only.
(shell-file-name
(if (file-executable-p
(concat (file-remote-p default-directory) shell-file-name))
shell-file-name
"/bin/sh"))
(cond ((and (not (file-remote-p default-directory))
(executable-find shell-file-name))
shell-file-name)
((file-executable-p
(concat (file-remote-p default-directory) shell-file-name))
shell-file-name)
("/bin/sh")))
exit-status)
;; There is an error in `process-file' when `error-file' exists.
;; This is fixed in Emacs trunk as of 2012-12-21; let's use this
;; workaround for now.
(unless (file-remote-p default-directory)
(delete-file error-file))
(if (or replace
(and output-buffer
(not (or (bufferp output-buffer) (stringp output-buffer)))))

View file

@ -28,7 +28,6 @@
(eval-when-compile
(require 'cl))
(defvar obe-marker nil)
(defvar org-current-export-file)
(defvar org-babel-lob-one-liner-regexp)
(defvar org-babel-ref-split-regexp)

View file

@ -840,7 +840,7 @@ entry, the rest of the entry will not be searched."
:group 'org-agenda-daily/weekly
:type 'boolean)
(defcustom org-agenda-dim-blocked-tasks t
(defcustom org-agenda-dim-blocked-tasks nil
"Non-nil means dim blocked tasks in the agenda display.
This causes some overhead during agenda construction, but if you
have turned on `org-enforce-todo-dependencies',
@ -857,6 +857,7 @@ that is blocked because of checkboxes will never be made invisible, it
will only be dimmed."
:group 'org-agenda-daily/weekly
:group 'org-agenda-todo-list
:version "24.3"
:type '(choice
(const :tag "Do not dim" nil)
(const :tag "Dim to a gray face" t)
@ -1647,9 +1648,53 @@ When non-nil, this must be the number of minutes, e.g. 60 for one hour."
(const :tag "No default duration")))
(defcustom org-agenda-show-inherited-tags t
"Non-nil means show inherited tags in each agenda line."
"Non-nil means show inherited tags in each agenda line.
When this option is set to 'always, it take precedences over
`org-agenda-use-tag-inheritance' and inherited tags are shown
in every agenda.
When this option is set to t (the default), inherited tags are
shown when they are available, i.e. when the value of
`org-agenda-use-tag-inheritance' has been taken into account.
This can be set to a list of agenda types in which the agenda
must display the inherited tags. Available types are 'todo,
'agenda, 'search and 'timeline.
When set to nil, never show inherited tags in agenda lines."
:group 'org-agenda-line-format
:type 'boolean)
:group 'org-agenda
:version "24.3"
:type '(choice
(const :tag "Show inherited tags when available" t)
(const :tag "Always show inherited tags" 'always)
(repeat :tag "Show inherited tags only in selected agenda types"
(symbol :tag "Agenda type"))))
(defcustom org-agenda-use-tag-inheritance '(todo search timeline agenda)
"List of agenda view types where to use tag inheritance.
In tags/tags-todo/tags-tree agenda views, tag inheritance is
controlled by `org-use-tag-inheritance'. In other agenda types,
`org-use-tag-inheritance' is not used for the selection of the
agenda entries. Still, you may want the agenda to be aware of
the inherited tags anyway, e.g. for later tag filtering.
Allowed value are 'todo, 'search, 'timeline and 'agenda.
This variable has no effect if `org-agenda-show-inherited-tags'
is set to 'always. In that case, the agenda is aware of those
tags.
The default value sets tags in every agenda type. Setting this
option to nil will speed up non-tags agenda view a lot."
:group 'org-agenda
:version "24.3"
:type '(choice
(const :tag "Use tag inheritance in all agenda types" t)
(repeat :tag "Use tag inheritance in selected agenda types"
(symbol :tag "Agenda type"))))
(defcustom org-agenda-hide-tags-regexp nil
"Regular expression used to filter away specific tags in agenda views.
@ -2012,6 +2057,7 @@ The following commands are available:
(org-defkey org-agenda-mode-map "\C-c\C-w" 'org-agenda-refile)
(org-defkey org-agenda-mode-map "m" 'org-agenda-bulk-mark)
(org-defkey org-agenda-mode-map "*" 'org-agenda-bulk-mark-all)
(org-defkey org-agenda-mode-map "#" 'org-agenda-dim-blocked-tasks)
(org-defkey org-agenda-mode-map "%" 'org-agenda-bulk-mark-regexp)
(org-defkey org-agenda-mode-map "u" 'org-agenda-bulk-unmark)
(org-defkey org-agenda-mode-map "U" 'org-agenda-bulk-unmark-all)
@ -2344,7 +2390,7 @@ For example, if you have a custom agenda command \"p\" and you
want this command to be accessible only from plain text files,
use this:
'((\"p\" (in-file . \"\\.txt\")))
'((\"p\" ((in-file . \"\\.txt\"))))
Here are the available contexts definitions:
@ -2360,7 +2406,7 @@ accessible if there is at least one valid check.
You can also bind a key to another agenda custom command
depending on contextual rules.
'((\"p\" \"q\" (in-file . \"\\.txt\")))
'((\"p\" \"q\" ((in-file . \"\\.txt\"))))
Here it means: in .txt files, use \"p\" as the key for the
agenda command otherwise associated with \"q\". (The command
@ -2664,7 +2710,7 @@ L Timeline for current buffer # List stuck projects (!=configure)
(add-text-properties (match-beginning 2) (match-end 2)
'(face bold) header))
header)))
(setq header-end (move-marker (make-marker) (point)))
(setq header-end (point-marker))
(while t
(setq custom1 custom)
(when (eq rmheader t)
@ -3194,7 +3240,7 @@ If AGENDA-BUFFER-NAME, use this as the buffer name for the agenda to write."
(kill-buffer (current-buffer))
(message "Plain text written to %s" file))))))))
(set-buffer (or agenda-bufname
(and (called-interactively-p 'any) (buffer-name))
(and (org-called-interactively-p 'any) (buffer-name))
org-agenda-buffer-name)))
(when open (org-open-file file)))
@ -3514,44 +3560,66 @@ generating a new one."
(save-excursion
(let ((inhibit-read-only t))
(goto-char (point-min))
(while (org-activate-bracket-links (point-max))
(add-text-properties (match-beginning 0) (match-end 0)
'(face org-link)))
(while (org-activate-plain-links (point-max))
(add-text-properties (match-beginning 0) (match-end 0)
'(face org-link)))
(org-agenda-align-tags)
(save-excursion
(while (org-activate-bracket-links (point-max))
(add-text-properties (match-beginning 0) (match-end 0)
'(face org-link))))
(save-excursion
(while (org-activate-plain-links (point-max))
(add-text-properties (match-beginning 0) (match-end 0)
'(face org-link))))
(unless (eq org-agenda-remove-tags t)
(org-agenda-align-tags))
(unless org-agenda-with-colors
(remove-text-properties (point-min) (point-max) '(face nil))))
(if (and (boundp 'org-agenda-overriding-columns-format)
org-agenda-overriding-columns-format)
(org-set-local 'org-agenda-overriding-columns-format
org-agenda-overriding-columns-format))
(if (and (boundp 'org-agenda-view-columns-initially)
org-agenda-view-columns-initially)
(org-agenda-columns))
(when org-agenda-fontify-priorities
(org-agenda-fontify-priorities))
(when (and org-agenda-dim-blocked-tasks org-blocker-hook)
(org-agenda-dim-blocked-tasks))
;; We need to widen when `org-agenda-finalize' is called from
;; `org-agenda-change-all-lines' (e.g. in `org-agenda-clock-in')
(save-restriction
(widen)
(org-agenda-mark-clocking-task))
(when org-agenda-entry-text-mode
(org-agenda-entry-text-hide)
(org-agenda-entry-text-show))
(if (functionp 'org-habit-insert-consistency-graphs)
(org-habit-insert-consistency-graphs))
(let ((inhibit-read-only t))
(run-hooks 'org-agenda-finalize-hook))
(setq org-agenda-type (org-get-at-bol 'org-agenda-type))
(when (or org-agenda-tag-filter (get 'org-agenda-tag-filter :preset-filter))
(org-agenda-filter-apply org-agenda-tag-filter 'tag))
(when (or org-agenda-category-filter (get 'org-agenda-category-filter :preset-filter))
(org-agenda-filter-apply org-agenda-category-filter 'category))
(org-add-hook 'kill-buffer-hook 'org-agenda-reset-markers 'append 'local))))
(remove-text-properties (point-min) (point-max) '(face nil)))
(if (and (boundp 'org-agenda-overriding-columns-format)
org-agenda-overriding-columns-format)
(org-set-local 'org-agenda-overriding-columns-format
org-agenda-overriding-columns-format))
(if (and (boundp 'org-agenda-view-columns-initially)
org-agenda-view-columns-initially)
(org-agenda-columns))
(when org-agenda-fontify-priorities
(org-agenda-fontify-priorities))
(when (and org-agenda-dim-blocked-tasks org-blocker-hook)
(org-agenda-dim-blocked-tasks))
;; We need to widen when `org-agenda-finalize' is called from
;; `org-agenda-change-all-lines' (e.g. in `org-agenda-clock-in')
(when org-clock-current-task
(save-restriction
(widen)
(org-agenda-mark-clocking-task)))
(when org-agenda-entry-text-mode
(org-agenda-entry-text-hide)
(org-agenda-entry-text-show))
(if (and (functionp 'org-habit-insert-consistency-graphs)
(save-excursion (next-single-property-change (point-min) 'org-habit-p)))
(org-habit-insert-consistency-graphs))
(setq org-agenda-type (org-get-at-bol 'org-agenda-type))
(unless (or (eq org-agenda-show-inherited-tags 'always)
(and (listp org-agenda-show-inherited-tags)
(memq org-agenda-type org-agenda-show-inherited-tags))
(and (eq org-agenda-show-inherited-tags t)
(or (eq org-agenda-use-tag-inheritance t)
(and (listp org-agenda-use-tag-inheritance)
(not (memq org-agenda-type
org-agenda-use-tag-inheritance))))))
(let (mrk)
(save-excursion
(goto-char (point-min))
(while (equal (forward-line) 0)
(when (setq mrk (or (get-text-property (point) 'org-hd-marker)
(get-text-property (point) 'org-hd-marker)))
(put-text-property (point-at-bol) (point-at-eol)
'tags (org-with-point-at mrk
(delete-dups
(mapcar 'downcase (org-get-tags-at))))))))))
(run-hooks 'org-agenda-finalize-hook)
(when (or org-agenda-tag-filter (get 'org-agenda-tag-filter :preset-filter))
(org-agenda-filter-apply org-agenda-tag-filter 'tag))
(when (or org-agenda-category-filter (get 'org-agenda-category-filter :preset-filter))
(org-agenda-filter-apply org-agenda-category-filter 'category))
(org-add-hook 'kill-buffer-hook 'org-agenda-reset-markers 'append 'local)))))
(defun org-agenda-mark-clocking-task ()
"Mark the current clock entry in the agenda if it is present."
@ -3607,15 +3675,18 @@ generating a new one."
((equal p h) 'bold)))
(overlay-put ov 'org-type 'org-priority)))))
(defun org-agenda-dim-blocked-tasks ()
(defun org-agenda-dim-blocked-tasks (&optional invisible)
(interactive "P")
"Dim currently blocked TODO's in the agenda display."
(message "Dim or hide blocked tasks...")
(mapc (lambda (o) (if (eq (overlay-get o 'org-type) 'org-blocked-todo)
(delete-overlay o)))
(overlays-in (point-min) (point-max)))
(save-excursion
(let ((inhibit-read-only t)
(org-depend-tag-blocked nil)
(invis (eq org-agenda-dim-blocked-tasks 'invisible))
(invis (or (not (null invisible))
(eq org-agenda-dim-blocked-tasks 'invisible)))
org-blocked-by-checkboxes
invis1 b e p ov h l)
(goto-char (point-min))
@ -3636,7 +3707,8 @@ generating a new one."
(if invis1
(overlay-put ov 'invisible t)
(overlay-put ov 'face 'org-agenda-dimmed-todo-face))
(overlay-put ov 'org-type 'org-blocked-todo)))))))
(overlay-put ov 'org-type 'org-blocked-todo))))))
(message "Dim or hide blocked tasks...done"))
(defvar org-agenda-skip-function nil
"Function to be called at each match during agenda construction.
@ -3656,7 +3728,7 @@ A good way to set it is through options in `org-agenda-custom-commands'.")
Also moves point to the end of the skipped region, so that search can
continue from there."
(let ((p (point-at-bol)) to)
(when (org-in-src-block-p) (throw :skip t))
(when (org-in-src-block-p t) (throw :skip t))
(and org-agenda-skip-archived-trees (not org-agenda-archives-mode)
(get-text-property p :org-archived)
(org-end-of-subtree t)
@ -4251,7 +4323,7 @@ in `org-agenda-text-search-extra-files'."
'help-echo (format "mouse-2 or RET jump to location")))
(full-words org-agenda-search-view-force-full-words)
(org-agenda-text-search-extra-files org-agenda-text-search-extra-files)
regexp rtn rtnall files file pos
regexp rtn rtnall files file pos inherited-tags
marker category category-pos tags c neg re boolean
ee txt beg end words regexps+ regexps- hdl-only buffer beg1 str)
(unless (and (not edit-at)
@ -4405,7 +4477,13 @@ in `org-agenda-text-search-extra-files'."
(setq marker (org-agenda-new-marker (point))
category (org-get-category)
category-pos (get-text-property (point) 'org-category-position)
tags (org-get-tags-at (point))
inherited-tags
(or (eq org-agenda-show-inherited-tags 'always)
(memq 'todo org-agenda-show-inherited-tags)
(and (eq org-agenda-show-inherited-tags t)
(or (eq org-agenda-use-tag-inheritance t)
(memq 'todo org-agenda-use-tag-inheritance))))
tags (org-get-tags-at nil (not inherited-tags))
txt (org-agenda-format-item
""
(buffer-substring-no-properties
@ -4935,7 +5013,7 @@ of what a project is and how to check if it stuck, customize the variable
(pop-up-frames nil)
(diary-list-entries-hook
(cons 'org-diary-default-entry diary-list-entries-hook))
(diary-file-name-prefix-function nil) ; turn this feature off
(diary-file-name-prefix nil) ; turn this feature off
(diary-modify-entry-list-string-function 'org-modify-diary-entry-string)
entries
(org-disable-agenda-to-diary t))
@ -5211,7 +5289,7 @@ the documentation of `org-diary'."
"\\|") "\\)"))
(t org-not-done-regexp))))
marker priority category category-pos tags todo-state
ee txt beg end)
ee txt beg end inherited-tags)
(goto-char (point-min))
(while (re-search-forward regexp nil t)
(catch :skip
@ -5229,7 +5307,14 @@ the documentation of `org-diary'."
category-pos (get-text-property (point) 'org-category-position)
txt (org-trim
(buffer-substring (match-beginning 2) (match-end 0)))
tags (org-get-tags-at (point))
inherited-tags
(or (eq org-agenda-show-inherited-tags 'always)
(and (listp org-agenda-show-inherited-tags)
(memq 'todo org-agenda-show-inherited-tags))
(and (eq org-agenda-show-inherited-tags t)
(or (eq org-agenda-use-tag-inheritance t)
(memq 'todo org-agenda-use-tag-inheritance))))
tags (org-get-tags-at nil (not inherited-tags))
txt (org-agenda-format-item "" txt category tags t)
priority (1+ (org-get-priority txt))
todo-state (org-get-todo-state))
@ -5356,7 +5441,8 @@ Do we have a reason to ignore this TODO entry because it has a time stamp?
"\\|\\(<%%\\(([^>\n]+)\\)>\\)"))
marker hdmarker deadlinep scheduledp clockp closedp inactivep
donep tmp priority category category-pos ee txt timestr tags
b0 b3 e3 head todo-state end-of-match show-all warntime habitp)
b0 b3 e3 head todo-state end-of-match show-all warntime habitp
inherited-tags)
(goto-char (point-min))
(while (setq end-of-match (re-search-forward regexp nil t))
(setq b0 (match-beginning 0)
@ -5389,7 +5475,7 @@ Do we have a reason to ignore this TODO entry because it has a time stamp?
clockp (and org-agenda-include-inactive-timestamps
(or (string-match org-clock-string tmp)
(string-match "]-+\\'" tmp)))
warntime (org-entry-get (point) "APPT_WARNTIME")
warntime (get-text-property (point) 'org-appt-warntime)
donep (member todo-state org-done-keywords))
(if (or scheduledp deadlinep closedp clockp
(and donep org-agenda-skip-timestamp-if-done))
@ -5408,7 +5494,14 @@ Do we have a reason to ignore this TODO entry because it has a time stamp?
(assoc (point) deadline-position-alist))
(throw :skip nil))
(setq hdmarker (org-agenda-new-marker)
tags (org-get-tags-at))
inherited-tags
(or (eq org-agenda-show-inherited-tags 'always)
(and (listp org-agenda-show-inherited-tags)
(memq 'agenda org-agenda-show-inherited-tags))
(and (eq org-agenda-show-inherited-tags t)
(or (eq org-agenda-use-tag-inheritance t)
(memq 'agenda org-agenda-use-tag-inheritance))))
tags (org-get-tags-at nil (not inherited-tags)))
(looking-at "\\*+[ \t]+\\([^\r\n]+\\)")
(setq head (or (match-string 1) ""))
(setq txt (org-agenda-format-item
@ -5440,7 +5533,7 @@ Do we have a reason to ignore this TODO entry because it has a time stamp?
(abbreviate-file-name buffer-file-name))))
(regexp "^&?%%(")
marker category extra category-pos ee txt tags entry
result beg b sexp sexp-entry todo-state warntime)
result beg b sexp sexp-entry todo-state warntime inherited-tags)
(goto-char (point-min))
(while (re-search-forward regexp nil t)
(catch :skip
@ -5458,10 +5551,16 @@ Do we have a reason to ignore this TODO entry because it has a time stamp?
(setq marker (org-agenda-new-marker beg)
category (org-get-category beg)
category-pos (get-text-property beg 'org-category-position)
tags (save-excursion (org-backward-heading-same-level 0)
(org-get-tags-at))
inherited-tags
(or (eq org-agenda-show-inherited-tags 'always)
(and (listp org-agenda-show-inherited-tags)
(memq 'agenda org-agenda-show-inherited-tags))
(and (eq org-agenda-show-inherited-tags t)
(or (eq org-agenda-use-tag-inheritance t)
(memq 'agenda org-agenda-use-tag-inheritance))))
tags (org-get-tags-at nil (not inherited-tags))
todo-state (org-get-todo-state)
warntime (org-entry-get (point) "APPT_WARNTIME")
warntime (get-text-property (point) 'org-appt-warntime)
extra nil)
(dolist (r (if (stringp result)
@ -5510,7 +5609,6 @@ Do we have a reason to ignore this TODO entry because it has a time stamp?
(org-no-warnings
(let ((calendar-date-style 'european) (european-calendar-style t))
(diary-date day month year mark))))
(defalias 'org-float 'diary-float)
;; Define the` org-class' function
(defun org-class (y1 m1 d1 y2 m2 d2 dayname &rest skip-weeks)
@ -5591,7 +5689,7 @@ please use `org-class' instead."
1 11))))
(org-agenda-search-headline-for-time nil)
marker hdmarker priority category category-pos tags closedp
statep clockp state ee txt extra timestr rest clocked)
statep clockp state ee txt extra timestr rest clocked inherited-tags)
(goto-char (point-min))
(while (re-search-forward regexp nil t)
(catch :skip
@ -5629,7 +5727,14 @@ please use `org-class' instead."
(setq txt org-agenda-no-heading-message)
(goto-char (match-beginning 0))
(setq hdmarker (org-agenda-new-marker)
tags (org-get-tags-at))
inherited-tags
(or (eq org-agenda-show-inherited-tags 'always)
(and (listp org-agenda-show-inherited-tags)
(memq 'todo org-agenda-show-inherited-tags))
(and (eq org-agenda-show-inherited-tags t)
(or (eq org-agenda-use-tag-inheritance t)
(memq 'todo org-agenda-use-tag-inheritance))))
tags (org-get-tags-at nil (not inherited-tags)))
(looking-at "\\*+[ \t]+\\([^\r\n]+\\)")
(setq txt (match-string 1))
(when extra
@ -5833,13 +5938,13 @@ See also the user option `org-agenda-clock-consistency-checks'."
(not (= diff 0))))
(setq txt nil)
(setq category (org-get-category)
warntime (org-entry-get (point) "APPT_WARNTIME")
warntime (get-text-property (point) 'org-appt-warntime)
category-pos (get-text-property (point) 'org-category-position))
(if (not (re-search-backward "^\\*+[ \t]+" nil t))
(setq txt org-agenda-no-heading-message)
(goto-char (match-end 0))
(setq pos1 (match-beginning 0))
(setq tags (org-get-tags-at pos1))
(setq tags (org-get-tags-at pos1 t))
(setq head (buffer-substring-no-properties
(point)
(progn (skip-chars-forward "^\r\n")
@ -5907,7 +6012,7 @@ FRACTION is what fraction of the head-warning time has passed."
deadline-results))
d2 diff pos pos1 category category-pos tags donep
ee txt head pastschedp todo-state face timestr s habitp show-all
did-habit-check-p warntime)
did-habit-check-p warntime inherited-tags)
(goto-char (point-min))
(while (re-search-forward regexp nil t)
(catch :skip
@ -5923,7 +6028,7 @@ FRACTION is what fraction of the head-warning time has passed."
(match-string 1) d1 'past show-all
(current-buffer) pos)
diff (- d2 d1)
warntime (org-entry-get (point) "APPT_WARNTIME"))
warntime (get-text-property (point) 'org-appt-warntime))
(setq pastschedp (and todayp (< diff 0)))
(setq did-habit-check-p nil)
;; When to show a scheduled item in the calendar:
@ -5969,7 +6074,14 @@ FRACTION is what fraction of the head-warning time has passed."
pastschedp))
(setq mm (assoc pos1 deadline-position-alist)))
(throw :skip nil)))
(setq tags (org-get-tags-at))
(setq inherited-tags
(or (eq org-agenda-show-inherited-tags 'always)
(and (listp org-agenda-show-inherited-tags)
(memq 'agenda org-agenda-show-inherited-tags))
(and (eq org-agenda-show-inherited-tags t)
(or (eq org-agenda-use-tag-inheritance t)
(memq 'agenda org-agenda-use-tag-inheritance))))
tags (org-get-tags-at nil (not inherited-tags)))
(setq head (buffer-substring-no-properties
(point)
(progn (skip-chars-forward "^\r\n") (point))))
@ -6024,7 +6136,7 @@ FRACTION is what fraction of the head-warning time has passed."
(regexp org-tr-regexp)
(d0 (calendar-absolute-from-gregorian date))
marker hdmarker ee txt d1 d2 s1 s2 category category-pos
todo-state tags pos head donep)
todo-state tags pos head donep inherited-tags)
(goto-char (point-min))
(while (re-search-forward regexp nil t)
(catch :skip
@ -6050,8 +6162,15 @@ FRACTION is what fraction of the head-warning time has passed."
(if (not (re-search-backward org-outline-regexp-bol nil t))
(setq txt org-agenda-no-heading-message)
(goto-char (match-beginning 0))
(setq hdmarker (org-agenda-new-marker (point)))
(setq tags (org-get-tags-at))
(setq hdmarker (org-agenda-new-marker (point))
inherited-tags
(or (eq org-agenda-show-inherited-tags 'always)
(and (listp org-agenda-show-inherited-tags)
(memq 'agenda org-agenda-show-inherited-tags))
(and (eq org-agenda-show-inherited-tags t)
(or (eq org-agenda-use-tag-inheritance t)
(memq 'agenda org-agenda-use-tag-inheritance))))
tags (org-get-tags-at nil (not inherited-tags)))
(looking-at "\\*+[ \t]+\\([^\r\n]+\\)")
(setq head (match-string 1))
(let ((remove-re
@ -6212,12 +6331,7 @@ Any match of REMOVE-RE will be removed from TXT."
(match-string 2 txt))
t t txt))))
(when (derived-mode-p 'org-mode)
(setq effort
(condition-case nil
(org-get-effort
(or (get-text-property 0 'org-hd-marker txt)
(get-text-property 0 'org-marker txt)))
(error nil)))
(setq effort (ignore-errors (get-text-property 0 'org-effort txt)))
(when effort
(setq neffort (org-duration-string-to-minutes effort)
effort (setq effort (concat "[" effort "]")))))
@ -6735,7 +6849,8 @@ in the file. Otherwise, restriction will be to the current subtree."
(defun org-agenda-check-type (error &rest types)
"Check if agenda buffer is of allowed type.
If ERROR is non-nil, throw an error, otherwise just return nil."
If ERROR is non-nil, throw an error, otherwise just return nil.
Allowed types are 'agenda 'timeline 'todo 'tags 'search."
(if (not org-agenda-type)
(error "No Org agenda currently displayed")
(if (memq org-agenda-type types)
@ -7890,29 +8005,45 @@ If this information is not given, the function uses the tree at point."
(unless no-update (org-agenda-redo))))
(defun org-agenda-open-link (&optional arg)
"Follow the link in the current line, if any.
This looks for a link in the displayed line in the agenda. It also looks
at the text of the entry itself."
"Open the link(s) in the current entry, if any.
This looks for a link in the displayed line in the agenda.
It also looks at the text of the entry itself."
(interactive "P")
(let* ((marker (or (org-get-at-bol 'org-hd-marker)
(org-get-at-bol 'org-marker)))
(buffer (and marker (marker-buffer marker)))
(prefix (buffer-substring
(point-at-bol) (point-at-eol))))
(point-at-bol) (point-at-eol)))
(lkall (org-offer-links-in-entry buffer marker arg prefix))
(lk (car lkall))
(lkend (cdr lkall))
trg)
(cond
(buffer
((and buffer (stringp lk))
(with-current-buffer buffer
(save-excursion
(save-restriction
(widen)
(goto-char marker)
(org-offer-links-in-entry arg prefix)))))
(setq trg (and (string-match org-bracket-link-regexp lk)
(match-string 1 lk)))
(if (or (not trg) (string-match org-any-link-re trg))
(save-excursion
(save-restriction
(widen)
(goto-char marker)
(when (search-forward lk nil lkend)
(goto-char (match-beginning 0))
(org-open-at-point))))
;; This is an internal link, widen the buffer
(switch-to-buffer-other-window buffer)
(widen)
(goto-char marker)
(when (search-forward lk nil lkend)
(goto-char (match-beginning 0))
(org-open-at-point)))))
((or (org-in-regexp (concat "\\(" org-bracket-link-regexp "\\)"))
(save-excursion
(beginning-of-line 1)
(looking-at (concat ".*?\\(" org-bracket-link-regexp "\\)"))))
(org-open-link-from-string (match-string 1)))
(t (error "No link to open here")))))
(t (message "No link to open here")))))
(defun org-agenda-copy-local-variable (var)
"Get a variable from a referenced buffer and install it here."
@ -8313,35 +8444,37 @@ If FORCE-TAGS is non nil, the car of it returns the new tags."
(interactive)
(org-agenda-priority 'down))
(defun org-agenda-priority (&optional force-direction show)
(defun org-agenda-priority (&optional force-direction)
"Set the priority of line at point, also in Org-mode file.
This changes the line at point, all other lines in the agenda referring to
the same tree node, and the headline of the tree node in the Org-mode file."
the same tree node, and the headline of the tree node in the Org-mode file.
Called with a universal prefix arg, show the priority instead of setting it."
(interactive "P")
(if (equal force-direction '(4)) (setq show t))
(unless org-enable-priority-commands
(error "Priority commands are disabled"))
(org-agenda-check-no-diary)
(let* ((marker (or (org-get-at-bol 'org-marker)
(org-agenda-error)))
(hdmarker (org-get-at-bol 'org-hd-marker))
(buffer (marker-buffer hdmarker))
(pos (marker-position hdmarker))
(inhibit-read-only t)
newhead)
(org-with-remote-undo buffer
(with-current-buffer buffer
(widen)
(goto-char pos)
(org-show-context 'agenda)
(save-excursion
(and (outline-next-heading)
(org-flag-heading nil))) ; show the next heading
(funcall 'org-priority force-direction show)
(end-of-line 1)
(setq newhead (org-get-heading)))
(org-agenda-change-all-lines newhead hdmarker)
(beginning-of-line 1))))
(if (equal force-direction '(4))
(org-show-priority)
(unless org-enable-priority-commands
(error "Priority commands are disabled"))
(org-agenda-check-no-diary)
(let* ((marker (or (org-get-at-bol 'org-marker)
(org-agenda-error)))
(hdmarker (org-get-at-bol 'org-hd-marker))
(buffer (marker-buffer hdmarker))
(pos (marker-position hdmarker))
(inhibit-read-only t)
newhead)
(org-with-remote-undo buffer
(with-current-buffer buffer
(widen)
(goto-char pos)
(org-show-context 'agenda)
(save-excursion
(and (outline-next-heading)
(org-flag-heading nil))) ; show the next heading
(funcall 'org-priority force-direction)
(end-of-line 1)
(setq newhead (org-get-heading)))
(org-agenda-change-all-lines newhead hdmarker)
(beginning-of-line 1)))))
;; FIXME: should fix the tags property of the agenda line.
(defun org-agenda-set-tags (&optional tag onoff)

View file

@ -131,7 +131,7 @@ utf8 Use all UTF-8 characters")
"Call `org-export-as-ascii` with output to a temporary buffer.
No file is created. The prefix ARG is passed through to `org-export-as-ascii'."
(interactive "P")
(org-export-as-ascii arg nil nil "*Org ASCII Export*")
(org-export-as-ascii arg nil "*Org ASCII Export*")
(when org-export-show-temporary-export-buffer
(switch-to-buffer-other-window "*Org ASCII Export*")))
@ -183,23 +183,19 @@ in a window. A non-interactive call will only return the buffer."
(goto-char end)
(set-mark (point)) ;; to activate the region
(goto-char beg)
(setq rtn (org-export-as-ascii
nil nil ext-plist
buffer body-only))
(setq rtn (org-export-as-ascii nil ext-plist buffer body-only))
(if (fboundp 'deactivate-mark) (deactivate-mark))
(if (and (org-called-interactively-p 'any) (bufferp rtn))
(switch-to-buffer-other-window rtn)
rtn)))
;;;###autoload
(defun org-export-as-ascii (arg &optional hidden ext-plist
to-buffer body-only pub-dir)
(defun org-export-as-ascii (arg &optional ext-plist to-buffer body-only pub-dir)
"Export the outline as a pretty ASCII file.
If there is an active region, export only the region.
The prefix ARG specifies how many levels of the outline should become
underlined headlines, default is 3. Lower levels will become bulleted
lists. When HIDDEN is non-nil, don't display the ASCII buffer.
EXT-PLIST is a property list with external parameters overriding
lists. EXT-PLIST is a property list with external parameters overriding
org-mode's default settings, but still inferior to file-local
settings. When TO-BUFFER is non-nil, create a buffer with that
name and export to that buffer. If TO-BUFFER is the symbol

View file

@ -451,7 +451,7 @@ For example, if you have a capture template \"c\" and you want
this template to be accessible only from `message-mode' buffers,
use this:
'((\"c\" (in-mode . \"message-mode\")))
'((\"c\" ((in-mode . \"message-mode\"))))
Here are the available contexts definitions:
@ -467,11 +467,11 @@ accessible if there is at least one valid check.
You can also bind a key to another agenda custom command
depending on contextual rules.
'((\"c\" \"d\" (in-mode . \"message-mode\")))
'((\"c\" \"d\" ((in-mode . \"message-mode\"))))
Here it means: in `message-mode buffers', use \"d\" as the
Here it means: in `message-mode buffers', use \"c\" as the
key for the capture template otherwise associated with \"d\".
\(The template originally associated with \"q\" is not displayed
\(The template originally associated with \"d\" is not displayed
to avoid duplicates.)"
:version "24.3"
:group 'org-capture
@ -979,7 +979,7 @@ it. When it is a variable, retrieve the value. Return whatever we get."
(show-all)
(goto-char (org-capture-get :pos))
(org-set-local 'org-capture-target-marker
(move-marker (make-marker) (point)))
(point-marker))
(org-set-local 'outline-level 'org-outline-level)
(let* ((template (org-capture-get :template))
(type (org-capture-get :type)))

View file

@ -35,6 +35,7 @@
(declare-function calendar-absolute-from-iso "cal-iso" (&optional date))
(declare-function notifications-notify "notifications" (&rest params))
(declare-function org-pop-to-buffer-same-window "org-compat" (&optional buffer-or-name norecord label))
(declare-function org-refresh-properties "org" (dprop tprop))
(defvar org-time-stamp-formats)
(defvar org-ts-what)
(defvar org-frame-title-format-backup frame-title-format)
@ -159,12 +160,15 @@ the clock can be resumed from that point."
The clock is resumed when Emacs restarts.
When this is t, both the running clock, and the entire clock
history are saved. When this is the symbol `clock', only the
running clock is saved.
running clock is saved. When this is the symbol `history', only
the clock history is saved.
When Emacs restarts with saved clock information, the file containing the
running clock as well as all files mentioned in the clock history will
be visited.
All this depends on running `org-clock-persistence-insinuate' in .emacs"
When Emacs restarts with saved clock information, the file containing
the running clock as well as all files mentioned in the clock history
will be visited.
All this depends on running `org-clock-persistence-insinuate' in your
Emacs initialization file."
:group 'org-clock
:type '(choice
(const :tag "Just the running clock" clock)
@ -1078,6 +1082,7 @@ time as the start time \(see `org-clock-continuously' to
make this the default behavior.)"
(interactive "P")
(setq org-clock-notification-was-shown nil)
(org-refresh-properties org-effort-property 'org-effort)
(catch 'abort
(let ((interrupting (and (not org-clock-resolving-clocks-due-to-idleness)
(org-clocking-p)))
@ -1199,7 +1204,7 @@ make this the default behavior.)"
(setq org-clock-start-time
(apply 'encode-time
(org-parse-time-string (match-string 1))))
(setq org-clock-effort (org-get-effort))
(setq org-clock-effort (get-text-property (point) 'org-effort))
(setq org-clock-total-time (org-clock-sum-current-item
(org-clock-get-sum-start))))
((eq org-clock-in-resume 'auto-restart)
@ -1219,7 +1224,7 @@ make this the default behavior.)"
(beginning-of-line 1)
(org-indent-line-to (- (org-get-indentation) 2)))
(insert org-clock-string " ")
(setq org-clock-effort (org-get-effort))
(setq org-clock-effort (get-text-property (point) 'org-effort))
(setq org-clock-total-time (org-clock-sum-current-item
(org-clock-get-sum-start)))
(setq org-clock-start-time

View file

@ -1243,7 +1243,7 @@ PARAMS is a property list of parameters:
:skip-empty-rows
When t, skip rows where all specifiers other than ITEM are empty.
:format When non-nil, specify the column view format to use."
(let ((pos (move-marker (make-marker) (point)))
(let ((pos (point-marker))
(hlines (plist-get params :hlines))
(vlines (plist-get params :vlines))
(maxlevel (plist-get params :maxlevel))

View file

@ -195,9 +195,8 @@ passed through to `fit-window-to-buffer'. If SHRINK-ONLY is set, call
ignored in this case."
(cond ((if (fboundp 'window-full-width-p)
(not (window-full-width-p window))
(> (frame-width) (window-width window)))
;; do nothing if another window would suffer
)
;; do nothing if another window would suffer
(> (frame-width) (window-width window))))
((and (fboundp 'fit-window-to-buffer) (not shrink-only))
(fit-window-to-buffer window max-height min-height))
((fboundp 'shrink-window-if-larger-than-buffer)
@ -257,7 +256,6 @@ Works on both Emacs and XEmacs."
(when (boundp 'zmacs-regions)
(setq zmacs-regions t)))))
;; Invisibility compatibility
(defun org-remove-from-invisibility-spec (arg)
@ -372,6 +370,20 @@ TIME defaults to the current time."
(time-to-seconds (or time (current-time)))
(float-time time)))
;; `user-error' is only available from 24.2.50 on
(unless (fboundp 'user-error)
(defalias 'user-error 'error))
(defmacro org-no-popups (&rest body)
"Suppress popup windows.
Let-bind some variables to nil around BODY to achieve the desired
effect, which variables to use depends on the Emacs version."
(if (org-version-check "24.2.50" "" :predicate)
`(let (pop-up-frames display-buffer-alist)
,@body)
`(let (pop-up-frames special-display-buffer-names special-display-regexps special-display-function)
,@body)))
(if (fboundp 'string-match-p)
(defalias 'org-string-match-p 'string-match-p)
(defun org-string-match-p (regexp string &optional start)
@ -384,7 +396,7 @@ TIME defaults to the current time."
(save-match-data
(apply 'looking-at args))))
; XEmacs does not have `looking-back'.
;; XEmacs does not have `looking-back'.
(if (fboundp 'looking-back)
(defalias 'org-looking-back 'looking-back)
(defun org-looking-back (regexp &optional limit greedy)
@ -433,14 +445,26 @@ With two arguments, return floor and remainder of their quotient."
'pop-to-buffer-same-window buffer-or-name norecord)
(funcall 'switch-to-buffer buffer-or-name norecord)))
;; `condition-case-unless-debug' has been introduced in Emacs 24.1
;; `condition-case-no-debug' has been introduced in Emacs 23.1
(defalias 'org-condition-case-unless-debug
(or (and (fboundp 'condition-case-unless-debug)
'condition-case-unless-debug)
(and (fboundp 'condition-case-no-debug)
'condition-case-no-debug)
'condition-case))
;; RECURSIVE has been introduced with Emacs 23.2.
;; This is copying and adapted from `tramp-compat-delete-directory'
(defun org-delete-directory (directory &optional recursive)
"Compatibility function for `delete-directory'."
(if (null recursive)
(delete-directory directory)
(condition-case nil
(funcall 'delete-directory directory recursive)
;; This Emacs version does not support the RECURSIVE flag. We
;; use the implementation from Emacs 23.2.
(wrong-number-of-arguments
(setq directory (directory-file-name (expand-file-name directory)))
(if (not (file-symlink-p directory))
(mapc (lambda (file)
(if (eq t (car (file-attributes file)))
(org-delete-directory file recursive)
(delete-file file)))
(directory-files
directory 'full "^\\([^.]\\|\\.\\([^.]\\|\\..\\)\\).*")))
(delete-directory directory)))))
;;;###autoload
(defmacro org-check-version ()

View file

@ -1,6 +1,6 @@
;;; org-crypt.el --- Public key encryption for org-mode entries
;; Copyright (C) 2007, 2009-2013 Free Software Foundation, Inc.
;; Copyright (C) 2007-2013 Free Software Foundation, Inc.
;; Emacs Lisp Archive Entry
;; Filename: org-crypt.el
@ -258,7 +258,7 @@ See `org-crypt-disable-auto-save'."
(save-excursion
(org-back-to-heading t)
(search-forward "-----BEGIN PGP MESSAGE-----"
(save-excursion (org-end-of-subtree t)) t))))
(save-excursion (outline-next-heading)) t))))
(defun org-crypt-use-before-save-magic ()
"Add a hook to automatically encrypt entries before a file is saved to disk."

View file

@ -274,14 +274,14 @@ For example:
$ emacs --batch
--load=$HOME/lib/emacs/org.el
--visit=MyOrgFile.org --funcall org-export-as-docbook-batch"
(org-export-as-docbook 'hidden))
(org-export-as-docbook))
;;;###autoload
(defun org-export-as-docbook-to-buffer ()
"Call `org-export-as-docbook' with output to a temporary buffer.
No file is created."
(interactive)
(org-export-as-docbook nil nil "*Org DocBook Export*")
(org-export-as-docbook nil "*Org DocBook Export*")
(when org-export-show-temporary-export-buffer
(switch-to-buffer-other-window "*Org DocBook Export*")))
@ -334,17 +334,14 @@ in a window. A non-interactive call will only return the buffer."
(goto-char end)
(set-mark (point)) ;; To activate the region
(goto-char beg)
(setq rtn (org-export-as-docbook
nil nil
buffer body-only))
(setq rtn (org-export-as-docbook nil buffer body-only))
(if (fboundp 'deactivate-mark) (deactivate-mark))
(if (and (org-called-interactively-p 'any) (bufferp rtn))
(switch-to-buffer-other-window rtn)
rtn)))
;;;###autoload
(defun org-export-as-docbook-pdf (&optional hidden ext-plist
to-buffer body-only pub-dir)
(defun org-export-as-docbook-pdf (&optional ext-plist to-buffer body-only pub-dir)
"Export as DocBook XML file, and generate PDF file."
(interactive "P")
(if (or (not org-export-docbook-xslt-proc-command)
@ -360,8 +357,7 @@ in a window. A non-interactive call will only return the buffer."
(org-combine-plists (org-default-export-plist)
ext-plist
(org-infile-export-plist))))
(docbook-buf (org-export-as-docbook hidden ext-plist
to-buffer body-only pub-dir))
(docbook-buf (org-export-as-docbook ext-plist to-buffer body-only pub-dir))
(filename (buffer-file-name docbook-buf))
(base (file-name-sans-extension filename))
(fofile (concat base ".fo"))
@ -398,8 +394,7 @@ in a window. A non-interactive call will only return the buffer."
(defvar org-heading-keyword-regexp-format) ; defined in org.el
;;;###autoload
(defun org-export-as-docbook (&optional hidden ext-plist
to-buffer body-only pub-dir)
(defun org-export-as-docbook (&optional ext-plist to-buffer body-only pub-dir)
"Export the current buffer as a DocBook file.
If there is an active region, export only the region. When
HIDDEN is obsolete and does nothing. EXT-PLIST is a

View file

@ -3808,7 +3808,8 @@ Elements are accumulated into ACC."
'section))
(plain-list 'item)
(table 'table-row))
(org-element-property :structure element)
(and (memq type '(item plain-list))
(org-element-property :structure element))
granularity visible-only element))
;; ELEMENT has contents. Parse objects inside, if
;; GRANULARITY allows it.
@ -4249,8 +4250,11 @@ first element of current section."
(plain-list
(setq special-flag 'item
struct (org-element-property :structure element)))
(table (setq special-flag 'table-row))
(otherwise (setq special-flag nil)))
(item (setq special-flag nil))
(property-drawer
(setq special-flag 'node-property struct nil))
(table (setq special-flag 'table-row struct nil))
(otherwise (setq special-flag nil struct nil)))
(setq end cend)
(goto-char cbeg)))))))))))

View file

@ -3047,12 +3047,11 @@ to the value of `temporary-file-directory'."
(eval ;; convert to fmt -- mimicking `org-run-like-in-org-mode'
(list 'let org-local-vars
(list (intern (format "org-export-as-%s" fmt))
nil nil nil ''string t))))
nil nil ''string t dir))))
(delete-file tmp-file))))
;;;###autoload
(defun org-export-as-org (arg &optional hidden ext-plist
to-buffer body-only pub-dir)
(defun org-export-as-org (arg &optional ext-plist to-buffer body-only pub-dir)
"Make a copy with not-exporting stuff removed.
The purpose of this function is to provide a way to export the source
Org file of a webpage in Org format, but with sensitive and/or irrelevant

View file

@ -44,6 +44,9 @@
(set-face-doc-string new-face docstring)))))
(put 'org-copy-face 'lisp-indent-function 2)
(when (featurep 'xemacs)
(put 'mode-line 'face-alias 'modeline))
(defgroup org-faces nil
"Faces in Org-mode."
:tag "Org Faces"

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