aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoakim Verona2013-02-08 00:03:56 +0100
committerJoakim Verona2013-02-08 00:03:56 +0100
commite38ad9acca0c806654313993728f9fabd1090f4f (patch)
tree58e69bc5c3eb17fe9761c2150d622144755c91fd
parentc1f14e5219537daed5ecf420ca6ba3070bdf1142 (diff)
parent9a9d91d9c247adefa7137338d7609d81734f888d (diff)
downloademacs-e38ad9acca0c806654313993728f9fabd1090f4f.tar.gz
emacs-e38ad9acca0c806654313993728f9fabd1090f4f.zip
auto upstream
-rw-r--r--doc/misc/ChangeLog27
-rw-r--r--doc/misc/cl.texi5
-rw-r--r--doc/misc/ede.texi104
-rw-r--r--doc/misc/org.texi27
-rw-r--r--lisp/ChangeLog31
-rw-r--r--lisp/gnus/ChangeLog9
-rw-r--r--lisp/gnus/auth-source.el2
-rw-r--r--lisp/mail/rmail.el2
-rw-r--r--lisp/mouse.el2
-rw-r--r--lisp/org/ChangeLog117
-rw-r--r--lisp/org/ob-python.el6
-rw-r--r--lisp/org/org-agenda.el109
-rw-r--r--lisp/org/org-bibtex.el2
-rw-r--r--lisp/org/org-clock.el163
-rw-r--r--lisp/org/org-element.el87
-rw-r--r--lisp/org/org-exp.el3
-rw-r--r--lisp/org/org-footnote.el3
-rw-r--r--lisp/org/org-html.el11
-rw-r--r--lisp/org/org-indent.el123
-rw-r--r--lisp/org/org-install.el10
-rw-r--r--lisp/org/org-list.el4
-rw-r--r--lisp/org/org-macs.el2
-rw-r--r--lisp/org/org-version.el4
-rw-r--r--lisp/org/org.el121
-rw-r--r--lisp/progmodes/cc-engine.el317
-rw-r--r--lisp/vc/vc-hooks.el6
-rw-r--r--nt/INSTALL12
-rw-r--r--src/ChangeLog8
-rw-r--r--src/coding.c2
-rw-r--r--src/fns.c9
-rw-r--r--src/w32fns.c4
-rw-r--r--src/xselect.c7
32 files changed, 812 insertions, 527 deletions
diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog
index d4dde056461..7ebaa5534d1 100644
--- a/doc/misc/ChangeLog
+++ b/doc/misc/ChangeLog
@@ -1,3 +1,30 @@
12013-02-07 Bastien Guerry <bzg@gnu.org>
2
3 * org.texi (References): Clarify an example.
4 (Installation): Fix instructions.
5 (Org-Plot): Fix link.
6 (Checkboxes, Radio lists): Fix typos.
7
82013-02-07 Glenn Morris <rgm@gnu.org>
9
10 * cl.texi (Equality Predicates): Mention memql.
11
122013-02-07 Eric Ludlam <zappo@gnu.org>
13
14 * doc/misc/ede.texi (Creating a project): Make ede-new doc less
15 specific, and only about items it supports, indicating that there
16 might be more. Remove refs to simple project and direct automake
17 from ede new.
18 (Simple projects): Re-write to not talk about ede-simple-project
19 which is deprecated, and instead use the term to mean projects
20 that don't do much management, just project wrapping. Add
21 ede-generic-project link.
22 (ede-generic-project): New node (bug#11441).
23
242013-02-07 Glenn Morris <rgm@gnu.org>
25
26 * cl.texi (Equality Predicates): Fix eq/eql pedantry.
27
12013-02-01 Glenn Morris <rgm@gnu.org> 282013-02-01 Glenn Morris <rgm@gnu.org>
2 29
3 * calc.texi (Help Commands): Update calc-view-news description. 30 * calc.texi (Help Commands): Update calc-view-news description.
diff --git a/doc/misc/cl.texi b/doc/misc/cl.texi
index c3657415078..8da6032d728 100644
--- a/doc/misc/cl.texi
+++ b/doc/misc/cl.texi
@@ -817,8 +817,9 @@ not compare strings against vectors of integers.
817Also note that the Common Lisp functions @code{member} and @code{assoc} 817Also note that the Common Lisp functions @code{member} and @code{assoc}
818use @code{eql} to compare elements, whereas Emacs Lisp follows the 818use @code{eql} to compare elements, whereas Emacs Lisp follows the
819MacLisp tradition and uses @code{equal} for these two functions. 819MacLisp tradition and uses @code{equal} for these two functions.
820In Emacs, use @code{memq} (or @code{cl-member}) and @code{assq} (or 820The functions @code{cl-member} and @code{cl-assoc} use @code{eql},
821@code{cl-assoc}) to get functions which use @code{eql} for comparisons. 821as in Common Lisp. The standard Emacs Lisp functions @code{memq} and
822@code{assq} use @code{eq}, and the standard @code{memql} uses @code{eql}.
822 823
823@node Control Structure 824@node Control Structure
824@chapter Control Structure 825@chapter Control Structure
diff --git a/doc/misc/ede.texi b/doc/misc/ede.texi
index cadd815025c..ddee7e6b5d5 100644
--- a/doc/misc/ede.texi
+++ b/doc/misc/ede.texi
@@ -450,9 +450,11 @@ ede-new}, or click on the @samp{Create Project} item in the
450 450
451The @command{ede-new} command prompts for the type of project you 451The @command{ede-new} command prompts for the type of project you
452would like to create. Each project type has its own benefits or 452would like to create. Each project type has its own benefits or
453language specific enhancements. @ede{} supports four different 453language specific enhancements. Not all projects that @ede{} supports
454project types: @samp{Make}, @samp{Automake}, @samp{direct Automake}, 454also allow creating a new project. Projects such as @code{emacs}
455and @samp{Simple}. 455or @code{linux} are designed to recognize existing projects only.
456Project types such as @samp{Make} and @samp{Automake} do support
457creating new project types with @command{ede-new}.
456 458
457@itemize 459@itemize
458@item 460@item
@@ -468,21 +470,6 @@ Unlike a @samp{Make} project, this project autogenerates a
468@file{Makefile.am} file. @ede{} handles the Automake bootstrapping 470@file{Makefile.am} file. @ede{} handles the Automake bootstrapping
469routines, which import and maintain a @file{configure.am} script and 471routines, which import and maintain a @file{configure.am} script and
470other required files. 472other required files.
471
472@item
473For the @samp{direct Automake} project type, @ede{} reads directly
474from the Automake files.
475
476You cannot create direct Automake projects with the @command{ede-new}
477command. Instead, when you visit a project with existing Automake
478files, @ede{} automatically detects them.
479
480@item
481The @samp{Simple} project type provides light-weight constructs for
482identifying a project root and looking up files. If you already have
483a non-@ede{} project infrastructure, you can use a @samp{Simple}
484project to provide other Emacs packages, such as Semantic, with some
485information about the project. @xref{Simple projects}.
486@end itemize 473@end itemize
487 474
488A subproject is merely a project in a subdirectory of another project. 475A subproject is merely a project in a subdirectory of another project.
@@ -795,24 +782,19 @@ able to find your SDK and compile your programs.
795@node Simple projects 782@node Simple projects
796@section Simple Projects 783@section Simple Projects
797 784
798There is a wide array of Simple projects. The root for simple 785There is a wide array of simple projects. In this case a simple
799projects is the class @code{ede-simple-project}. This handles the 786project is one that detects, or is directed to identify a directory as
800infrastructure of storing a .ede file if needed. 787belonging to a project, but doesn't provide many features of a typical
801 788@ede{} project. Having the project however allows tools such as
802The class @code{ede-simple-project} is designed to be subclassed. 789@semantic{} to find sources and perform project level completions.
803Then key @ede{} methods can be overridden to provide a quick wrapper
804over any project.
805 790
806A second project type is @code{ede-cpp-root}. This project type is
807designed to be created for a directory hierarchy full of C/C++ code.
808It can be configured with minimal lisp knowledge to do header file
809lookup for @semantic{}, improving code completion performance.
810 791
811@menu 792@menu
812* ede-cpp-root:: This project marks the root of a C/C++ code project. 793* ede-cpp-root:: This project marks the root of a C/C++ code project.
813* ede-java-root:: This project marks the root of a Java project. 794* ede-java-root:: This project marks the root of a Java project.
814* ede-emacs:: A project for working with Emacs. 795* ede-emacs:: A project for working with Emacs.
815* ede-linux:: A project for working with Linux kernels. 796* ede-linux:: A project for working with Linux kernels.
797* ede-generic-project:: A project type for wrapping build systems with EDE.
816* Custom Locate:: Customizing how to locate files in a simple project 798* Custom Locate:: Customizing how to locate files in a simple project
817@end menu 799@end menu
818 800
@@ -1045,7 +1027,7 @@ tree, and enables EDE project mode for it.
1045It pre-populates the C Preprocessor symbol map for correct parsing, 1027It pre-populates the C Preprocessor symbol map for correct parsing,
1046and has an optimized include file identification function. 1028and has an optimized include file identification function.
1047 1029
1048@node ede-linux, Custom Locate, ede-emacs, Simple projects 1030@node ede-linux, ede-generic-project, ede-emacs, Simple projects
1049@subsection ede-linux 1031@subsection ede-linux
1050 1032
1051The @code{ede-linux} project will automatically identify a Linux 1033The @code{ede-linux} project will automatically identify a Linux
@@ -1054,7 +1036,60 @@ Kernel source tree, and enable EDE project mode for it.
1054It pre-populates the C Preprocessor symbol map for reasonable parsing, 1036It pre-populates the C Preprocessor symbol map for reasonable parsing,
1055and has an optimized include file identification function. 1037and has an optimized include file identification function.
1056 1038
1057@node Custom Locate, , ede-linux, Simple projects 1039@node ede-generic-project, Custom Locate, ede-linux, Simple projects
1040@subsection ede-generic-project
1041
1042The @code{ede-generic-project} is a project system that makes it easy
1043to wrap up different kinds of build systems as an EDE project.
1044Projects such as @ref{ede-emacs} require coding skills to create.
1045Generic projects also require writing Emacs Lisp code, but the
1046requirements are minimal. You can then use
1047@command{customize-project} to configure build commands, includes, and
1048other options for that project. The configuration is saved in
1049@file{EDEConfig.el}.
1050
1051Generic projects are disabled by default because they have the
1052potential to interfere with other projects. To use the generic
1053project sytem to start detecting projects, you need to enable it.
1054
1055@deffn Command ede-enable-generic-projects
1056Enable generic project loaders.
1057
1058This enables generic loaders for projects that are detected using
1059either a @file{Makefile}, @file{SConstruct}, or @file{CMakeLists}.
1060
1061You do not need to use this command if you create your own generic
1062project type.
1063@end deffn
1064
1065If you want to create your own generic project loader, you need to
1066define your own project and target classes, and create an autoloader.
1067The example for Makefiles looks like this:
1068
1069@example
1070;;; MAKEFILE
1071
1072(defclass ede-generic-makefile-project (ede-generic-project)
1073 ((buildfile :initform "Makefile")
1074 )
1075 "Generic Project for makefiles.")
1076
1077(defmethod ede-generic-setup-configuration ((proj ede-generic-makefile-project) config)
1078 "Setup a configuration for Make."
1079 (oset config build-command "make -k")
1080 (oset config debug-command "gdb ")
1081 )
1082
1083(ede-generic-new-autoloader "generic-makefile" "Make"
1084 "Makefile" 'ede-generic-makefile-project)
1085@end example
1086
1087This example project will detect any directory with the file
1088@file{Makefile} in it as belonging to this project type.
1089Customization of the project will allow you to make build and debug
1090commands more precise.
1091
1092@node Custom Locate, , ede-generic-project, Simple projects
1058@subsection Custom Locate 1093@subsection Custom Locate
1059 1094
1060The various simple project styles all have one major drawback, which 1095The various simple project styles all have one major drawback, which
@@ -1062,8 +1097,6 @@ is that the files in the project are not completely known to EDE@.
1062When the EDE API is used to try and file files by some reference name 1097When the EDE API is used to try and file files by some reference name
1063in the project, then that could fail. 1098in the project, then that could fail.
1064 1099
1065@@TODO - Add ID Utils and CScope examples
1066
1067@ede{} can therefore use some external locate commands, such as the unix 1100@ede{} can therefore use some external locate commands, such as the unix
1068``locate'' command, or ``GNU Global''. 1101``locate'' command, or ``GNU Global''.
1069 1102
@@ -1093,6 +1126,11 @@ You can add your own locate tool but subclassing from
1093methods. See the code in @file{ede-locate.el} for GNU Global as a 1126methods. See the code in @file{ede-locate.el} for GNU Global as a
1094simple example. 1127simple example.
1095 1128
1129@@TODO - Add ID Utils and CScope examples
1130
1131More on idutils and cscope is in the CEDET manual, and they each have
1132their own section.
1133
1096@node Extending EDE, GNU Free Documentation License, Miscellaneous commands, Top 1134@node Extending EDE, GNU Free Documentation License, Miscellaneous commands, Top
1097@chapter Extending @ede{} 1135@chapter Extending @ede{}
1098 1136
diff --git a/doc/misc/org.texi b/doc/misc/org.texi
index d41d2848cc6..7b880fc386c 100644
--- a/doc/misc/org.texi
+++ b/doc/misc/org.texi
@@ -2,7 +2,7 @@
2@c %**start of header 2@c %**start of header
3@setfilename ../../info/org 3@setfilename ../../info/org
4@settitle The Org Manual 4@settitle The Org Manual
5@set VERSION 7.9.3d (GNU Emacs 24.3) 5@set VERSION 7.9.3e (GNU Emacs 24.3)
6 6
7@c Use proper quote and backtick for code sections in PDF output 7@c Use proper quote and backtick for code sections in PDF output
8@c Cf. Texinfo manual 14.2 8@c Cf. Texinfo manual 14.2
@@ -903,17 +903,20 @@ $ git clone git://orgmode.org/org-mode.git
903$ make autoloads 903$ make autoloads
904@end example 904@end example
905 905
906Note that @code{make autoloads} is mandatory: it defines Org's version and 906Note that in this case, @code{make autoloads} is mandatory: it defines Org's
907Org's autoloaded functions, respectively in @file{org-version.el} and in 907version in @file{org-version.el} and Org's autoloads in
908@file{org-loaddefs.el}. 908@file{org-loaddefs.el}.
909 909
910Remember to add the correct load-path as described in the method above. 910Remember to add the correct load-path as described in the method above.
911 911
912You can also compile and install Org from this git repository: check 912You can also compile with @code{make}, generate the documentation with
913@code{make help} to get the list of compilation/installation options. 913@code{make doc}, create a local configuration with @code{make config} and
914install Org with @code{make install}. Please run @code{make help} to get
915the list of compilation/installation options.
914 916
915For more detailed explanations on Org's build system, please check the Org 917For more detailed explanations on Org's build system, please check the Org
916Build System page on @uref{http://orgmode.org/worg/dev/org-build-system.html, Worg}. 918Build System page on @uref{http://orgmode.org/worg/dev/org-build-system.html,
919Worg}.
917 920
918@node Activation, Feedback, Installation, Introduction 921@node Activation, Feedback, Installation, Introduction
919@section Activation 922@section Activation
@@ -2444,7 +2447,7 @@ $1..$3 @r{first three fields in the current row}
2444$P..$Q @r{range, using column names (see under Advanced)} 2447$P..$Q @r{range, using column names (see under Advanced)}
2445$<<<..$>> @r{start in third column, continue to the one but last} 2448$<<<..$>> @r{start in third column, continue to the one but last}
2446@@2$1..@@4$3 @r{6 fields between these two fields (same as @code{A2..C4})} 2449@@2$1..@@4$3 @r{6 fields between these two fields (same as @code{A2..C4})}
2447@@-1$-2..@@-1 @r{3 numbers from the column to the left, 2 up to current row} 2450@@-1$-2..@@-1 @r{in the first row up, 3 fields from 2 columns on the left}
2448@@I..II @r{between first and second hline, short for @code{@@I..@@II}} 2451@@I..II @r{between first and second hline, short for @code{@@I..@@II}}
2449@end example 2452@end example
2450 2453
@@ -3023,9 +3026,9 @@ functions.
3023 3026
3024Org-Plot can produce 2D and 3D graphs of information stored in org tables 3027Org-Plot can produce 2D and 3D graphs of information stored in org tables
3025using @file{Gnuplot} @uref{http://www.gnuplot.info/} and @file{gnuplot-mode} 3028using @file{Gnuplot} @uref{http://www.gnuplot.info/} and @file{gnuplot-mode}
3026@uref{http://cars9.uchicago.edu/~ravel/software/gnuplot-mode.html}. To see 3029@uref{http://xafs.org/BruceRavel/GnuplotMode}. To see this in action, ensure
3027this in action, ensure that you have both Gnuplot and Gnuplot mode installed 3030that you have both Gnuplot and Gnuplot mode installed on your system, then
3028on your system, then call @code{org-plot/gnuplot} on the following table. 3031call @code{org-plot/gnuplot} on the following table.
3029 3032
3030@example 3033@example
3031@group 3034@group
@@ -4486,7 +4489,7 @@ off a box while there are unchecked boxes above it.
4486@orgcmd{C-c C-c,org-toggle-checkbox} 4489@orgcmd{C-c C-c,org-toggle-checkbox}
4487Toggle checkbox status or (with prefix arg) checkbox presence at point. 4490Toggle checkbox status or (with prefix arg) checkbox presence at point.
4488With a single prefix argument, add an empty checkbox or remove the current 4491With a single prefix argument, add an empty checkbox or remove the current
4489one@footnote{`C-u C-c C-c' on the @emph{first} item of a list with no checkbox 4492one@footnote{@kbd{C-u C-c C-c} on the @emph{first} item of a list with no checkbox
4490will add checkboxes to the rest of the list.}. With a double prefix argument, set it to @samp{[-]}, which is 4493will add checkboxes to the rest of the list.}. With a double prefix argument, set it to @samp{[-]}, which is
4491considered to be an intermediate state. 4494considered to be an intermediate state.
4492@orgcmd{C-c C-x C-b,org-toggle-checkbox} 4495@orgcmd{C-c C-x C-b,org-toggle-checkbox}
@@ -15987,7 +15990,7 @@ Here is a @LaTeX{} example. Let's say that you have this in your
15987\end@{comment@} 15990\end@{comment@}
15988@end example 15991@end example
15989 15992
15990Pressing `C-c C-c' on @code{a new house} and will insert the converted 15993Pressing @kbd{C-c C-c} on @code{a new house} and will insert the converted
15991@LaTeX{} list between the two marker lines. 15994@LaTeX{} list between the two marker lines.
15992 15995
15993@node Dynamic blocks, Special agenda views, Tables in arbitrary syntax, Hacking 15996@node Dynamic blocks, Special agenda views, Tables in arbitrary syntax, Hacking
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index f87bdddacda..4211901d64f 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,32 @@
12013-02-07 Michael Albinus <michael.albinus@gmx.de>
2
3 * vc/vc-hooks.el (vc-find-file-hook): `buffer-file-truename' can
4 be nil. Handle this. (Bug#13636)
5
62013-02-07 Richard Stallman <rms@gnu.org>
7
8 * mail/rmail.el (rmail-variables): Specify `no-conversion' for
9 `save-buffer-coding-system'.
10
112013-02-07 Alan Mackenzie <acm@muc.de>
12
13 Fix bug in state cache mechanism. Remove 'BOD "strategy". Refactor.
14 * progmodes/cc-engine.el (c-get-fallback-scan-pos): Remove.
15 (c-parse-state-get-strategy): Don't return 'BOD any more.
16 (c-append-lower-brace-pair-to-state-cache):
17 Extra parameter HERE instead of narrowing.
18 Widen to top of buffer before searching backwards for a brace pair.
19 (c-state-push-any-brace-pair): Add HERE parameter to function call.
20 (c-append-to-state-cache): Extra parameter HERE in place of narrowing.
21 Narrow to parameter HERE, in place of being called narrowed.
22 (c-remove-stale-state-cache): Extra parameter HERE in place of
23 narrowing. Check there's an open brace in the cache before
24 searching for its match.
25 (c-invalidate-state-cache-1): Add HERE parameter to function call.
26 (c-parse-state-1): Don't narrow here for 'forward strategy,
27 instead passing extra parameter HERE to several functions.
28 Remove 'BOD strategy.
29
12013-02-06 Nicolas Richard <theonewiththeevillook@yahoo.fr> (tiny change) 302013-02-06 Nicolas Richard <theonewiththeevillook@yahoo.fr> (tiny change)
2 31
3 * emacs-lisp/package.el (describe-package-1): Tell what archive is 32 * emacs-lisp/package.el (describe-package-1): Tell what archive is
@@ -12165,7 +12194,7 @@
12165 * server.el (server--on-display-p): New function. 12194 * server.el (server--on-display-p): New function.
12166 (server--on-display-p): Use it. 12195 (server--on-display-p): Use it.
12167 12196
121682012-04-04 Gabor Vida <vidagabor@gmail.com> (tiny change) 121972012-04-04 Gábor Vida <vidagabor@gmail.com> (tiny change)
12169 12198
12170 * ido.el (ido-wide-find-dirs-or-files): Use file-name-absolute-p 12199 * ido.el (ido-wide-find-dirs-or-files): Use file-name-absolute-p
12171 (bug#11145). 12200 (bug#11145).
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index 7cb278f2a6f..57eec01bad5 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,3 +1,8 @@
12013-02-07 Gábor Vida <gabor.v.vida@ericsson.com> (tiny change)
2
3 * auth-source.el (auth-source-format-prompt): Don't get confused by
4 any "\" in replacement text. (Bug#13637)
5
12013-01-30 Christopher Schmidt <christopher@ch.ristopher.com> 62013-01-30 Christopher Schmidt <christopher@ch.ristopher.com>
2 7
3 * gnus-int.el (gnus-backend-trace-elapsed): New variable. 8 * gnus-int.el (gnus-backend-trace-elapsed): New variable.
@@ -1449,7 +1454,7 @@
1449 (nnimap-request-move-article): Delete the message from the correct IMAP 1454 (nnimap-request-move-article): Delete the message from the correct IMAP
1450 server. 1455 server.
1451 1456
14522012-02-19 Vida Gábor <vidagabor@gmail.com> (tiny change) 14572012-02-19 Gábor Vida <vidagabor@gmail.com> (tiny change)
1453 1458
1454 * gnus-demon.el (gnus-demon-init): Don't multiply time twice. 1459 * gnus-demon.el (gnus-demon-init): Don't multiply time twice.
1455 Reported by Peter Münster. 1460 Reported by Peter Münster.
@@ -1659,7 +1664,7 @@
1659 * shr.el (shr-browse-url): Fix the name of the `browse-url-mail' 1664 * shr.el (shr-browse-url): Fix the name of the `browse-url-mail'
1660 function call. 1665 function call.
1661 1666
16622012-01-27 Vida Gábor <vidagabor@gmail.com> (tiny change) 16672012-01-27 Gábor Vida <vidagabor@gmail.com> (tiny change)
1663 1668
1664 * gnus-demon.el (gnus-demon-run-callback, gnus-demon-init): Convert to 1669 * gnus-demon.el (gnus-demon-run-callback, gnus-demon-init): Convert to
1665 seconds, and make the repeat clause with HH:MM specs work as 1670 seconds, and make the repeat clause with HH:MM specs work as
diff --git a/lisp/gnus/auth-source.el b/lisp/gnus/auth-source.el
index ac16200adb2..e94904bf175 100644
--- a/lisp/gnus/auth-source.el
+++ b/lisp/gnus/auth-source.el
@@ -913,7 +913,7 @@ while \(:host t) would find all host entries."
913 (when (and c v) 913 (when (and c v)
914 (setq prompt (replace-regexp-in-string (format "%%%c" c) 914 (setq prompt (replace-regexp-in-string (format "%%%c" c)
915 (format "%s" v) 915 (format "%s" v)
916 prompt))))) 916 prompt nil t)))))
917 prompt) 917 prompt)
918 918
919(defun auth-source-ensure-strings (values) 919(defun auth-source-ensure-strings (values)
diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el
index c6385498dcd..96d341c30d2 100644
--- a/lisp/mail/rmail.el
+++ b/lisp/mail/rmail.el
@@ -1507,6 +1507,8 @@ If so restore the actual mbox message collection."
1507 (setq file-precious-flag t) 1507 (setq file-precious-flag t)
1508 (make-local-variable 'desktop-save-buffer) 1508 (make-local-variable 'desktop-save-buffer)
1509 (setq desktop-save-buffer t) 1509 (setq desktop-save-buffer t)
1510 (make-local-variable 'save-buffer-coding-system)
1511 (setq save-buffer-coding-system 'no-conversion)
1510 (setq next-error-move-function 'rmail-next-error-move)) 1512 (setq next-error-move-function 'rmail-next-error-move))
1511 1513
1512;; Handle M-x revert-buffer done in an rmail-mode buffer. 1514;; Handle M-x revert-buffer done in an rmail-mode buffer.
diff --git a/lisp/mouse.el b/lisp/mouse.el
index a1aa104495a..bd7242e3b20 100644
--- a/lisp/mouse.el
+++ b/lisp/mouse.el
@@ -865,6 +865,8 @@ DO-MOUSE-DRAG-REGION-POST-PROCESS should only be used by
865 865
866 ;; Find its binding. 866 ;; Find its binding.
867 (let* ((fun (key-binding (vector (car event)))) 867 (let* ((fun (key-binding (vector (car event))))
868 ;; FIXME This doesn't make sense, because
869 ;; event-click-count always returns something >= 1.
868 (do-multi-click (and (> (event-click-count event) 0) 870 (do-multi-click (and (> (event-click-count event) 0)
869 (functionp fun) 871 (functionp fun)
870 (not (memq fun '(mouse-set-point 872 (not (memq fun '(mouse-set-point
diff --git a/lisp/org/ChangeLog b/lisp/org/ChangeLog
index 56a76c7d680..16d456ed51f 100644
--- a/lisp/org/ChangeLog
+++ b/lisp/org/ChangeLog
@@ -1,3 +1,120 @@
12013-02-07 Bastien Guerry <bzg@gnu.org>
2
3 * org-agenda.el (org-agenda-get-deadlines)
4 (org-agenda-get-scheduled): Fix bug: use text properties for the
5 headline text since we rely on properties to get e.g. the effort.
6
7 * org-exp.el (org-export-normalize-links): Don't match links
8 within tags.
9
10 * org-html.el (org-export-html-preamble-format)
11 (org-export-html-postamble-format): Mention that
12 org-export-html-preamble/postamble need to be `t' in order for
13 these variables to have any effect.
14
15 * org-html.el (org-html-handle-links): When the link description
16 is an image and the attribute is "width", pass the attribute to
17 the <img ...> tag.
18
19 * org.el (org-mode): Always honor `org-startup-indented', even
20 when `org-inhibit-startup' is non-nil.
21
22 * org-indent.el (org-indent-mode): Don't check
23 `org-inhibit-startup'.
24
25 * org.el (org-fontify-meta-lines-and-blocks-1): Don't try to add
26 text properties outside of the buffer.
27
28 * org.el (org-agenda-inhibit-startup): Rename from
29 `org-agenda-inhibit-startup-visibility-cycling'.
30 (org-agenda-prepare-buffers): Bind `org-inhibit-startup' to
31 `org-agenda-inhibit-startup'.
32
33 * org.el (org-mode): Don't initialize `org-beamer-mode' when
34 `org-inhibit-startup' is non-nil.
35
36 * org-footnote.el (org-footnote-create-definition): Prevent
37 `electric-indent-mode' from inserting the definition at the wrong
38 place.
39
40 * org-agenda.el (org-agenda-no-heading-message): Delete.
41 (org-agenda-get-timestamps, org-agenda-get-progress)
42 (org-agenda-get-deadlines, org-agenda-get-scheduled)
43 (org-agenda-get-blocks): Don't use
44 `org-agenda-no-heading-message', skip the entry.
45
46 * org.el (org-agenda-inhibit-startup-visibility-cycling): New
47 option.
48 (org-agenda-prepare-buffers): Use it to speed up the agenda
49 generation.
50
51 * org-agenda.el (org-agenda-skip): Fix bug by correctly skipping
52 commented scheduled/deadline lines.
53
54 * org-clock.el (org-clock-in): Fix bug when fetching the effort
55 value.
56
57 * ob-python.el (org-babel-python-command): Fix docstring.
58 (org-babel-python-initiate-session-by-key): Fix bug: `run-python'
59 from Emacs >24.1 requires a python command as an argument.
60
61 * org-element.el (org-element-at-point): Fix typo in docstring.
62
63 * org-agenda.el (org-agenda-get-deadlines): Fix bug: use
64 `org-agenda-show-inherited-tags'.
65
66 * org-agenda.el (org-agenda-skip): Correctly handle commented out
67 scheduled/deadline lines. Refactor.
68
69 * org-install.el: Do not warn users.
70
71 * org.el (org-adaptive-fill-function): In message-mode, don't
72 lines in the message header, nor table lines in the body.
73 Correctly fill lines starting with `org-outline-regexp' in the
74 body.
75
76 * org-agenda.el (org-agenda-open-link): Fix bug with opening all
77 links.
78
792013-02-07 Francesco Pizzolante <fpz-djc/iPCCuDYQheJpep6IedvLeJWuRmrY@public.gmane.org> (tiny change)
80
81 * org-clock.el (org-clock-sum): Protect with `org-unmodified'.
82
83 * org-macs.el (org-unmodified): Inhibit modification hooks.
84
852013-02-07 John K. Luebs <jkluebs@luebsphoto.com> (tiny change)
86
87 * org.el (org-get-wdays): Handle matching a lead time specified in
88 hours.
89
902013-02-07 Muchenxuan Tong <demon386@gmail.com> (tiny change)
91
92 * org-agenda.el (org-agenda-quit): Delete indirect buffer's window
93 only when it exists.
94
952013-02-07 Nicolas Goaziou <n.goaziou@gmail.com>
96
97 * org-element.el (org-element-macro-parser): Fix error when last
98 argument ends with a protected comma.
99
100 * org-element.el (org-element-parse-buffer, org-element-map)
101 (org-element-at-point, org-element-context): Be more verbose in
102 docstrings. Also fix typos.
103
104 * org-list.el (org-list-struct-fix-box): When a checkbox has to be
105 resetted because of a non-nil ORDERED property value, make sure it
106 had a checkbox already.
107
1082013-02-07 Tokuya Kameshima <kametoku@gmail.com> (tiny change)
109
110 * org-agenda.el (org-search-view): Fix checking
111 `org-agenda-show-inherited-tags'.
112
1132013-02-07 racin <racin@free.fr> (tiny change)
114
115 * org-bibtex.el (org-bibtex-search): Don't throw an error when
116 `org-bibtex-prefix' is nil.
117
12013-01-13 Bastien Guerry <bzg@gnu.org> 1182013-01-13 Bastien Guerry <bzg@gnu.org>
2 119
3 * org-compat.el (org-condition-case-unless-debug): Delete. 120 * org-compat.el (org-condition-case-unless-debug): Delete.
diff --git a/lisp/org/ob-python.el b/lisp/org/ob-python.el
index 55dd1c7cdab..79cc53ea0fa 100644
--- a/lisp/org/ob-python.el
+++ b/lisp/org/ob-python.el
@@ -44,7 +44,7 @@
44(defvar org-babel-default-header-args:python '()) 44(defvar org-babel-default-header-args:python '())
45 45
46(defvar org-babel-python-command "python" 46(defvar org-babel-python-command "python"
47 "Name of command for executing Python code.") 47 "Name of the command for executing Python code.")
48 48
49(defvar org-babel-python-mode (if (featurep 'xemacs) 'python-mode 'python) 49(defvar org-babel-python-mode (if (featurep 'xemacs) 'python-mode 'python)
50 "Preferred python mode for use in running python interactively. 50 "Preferred python mode for use in running python interactively.
@@ -143,7 +143,9 @@ then create. Return the initialized session."
143 (cond 143 (cond
144 ((and (eq 'python org-babel-python-mode) 144 ((and (eq 'python org-babel-python-mode)
145 (fboundp 'run-python)) ; python.el 145 (fboundp 'run-python)) ; python.el
146 (run-python)) 146 (if (version< "24.1" emacs-version)
147 (run-python org-babel-python-command)
148 (run-python)))
147 ((and (eq 'python-mode org-babel-python-mode) 149 ((and (eq 'python-mode org-babel-python-mode)
148 (fboundp 'py-shell)) ; python-mode.el 150 (fboundp 'py-shell)) ; python-mode.el
149 ;; Make sure that py-which-bufname is initialized, as otherwise 151 ;; Make sure that py-which-bufname is initialized, as otherwise
diff --git a/lisp/org/org-agenda.el b/lisp/org/org-agenda.el
index ca8459ca33d..9b6dcaed8c2 100644
--- a/lisp/org/org-agenda.el
+++ b/lisp/org/org-agenda.el
@@ -530,7 +530,7 @@ This is a list of four items:
530 the project is considered to be not stuck. If you specify \"*\" as 530 the project is considered to be not stuck. If you specify \"*\" as
531 a tag, any tag will mark the project unstuck. Note that this is about 531 a tag, any tag will mark the project unstuck. Note that this is about
532 the explicit presence of a tag somewhere in the subtree, inherited 532 the explicit presence of a tag somewhere in the subtree, inherited
533 tags to not count here. If inherited tags make a project not stuck, 533 tags do not count here. If inherited tags make a project not stuck,
534 use \"-TAG\" in the tags part of the matcher under (1.) above. 534 use \"-TAG\" in the tags part of the matcher under (1.) above.
5354. An arbitrary regular expression matching non-stuck projects. 5354. An arbitrary regular expression matching non-stuck projects.
536 536
@@ -3728,19 +3728,18 @@ A good way to set it is through options in `org-agenda-custom-commands'.")
3728Also moves point to the end of the skipped region, so that search can 3728Also moves point to the end of the skipped region, so that search can
3729continue from there." 3729continue from there."
3730 (let ((p (point-at-bol)) to) 3730 (let ((p (point-at-bol)) to)
3731 (when (org-in-src-block-p t) (throw :skip t)) 3731 (when (or
3732 (and org-agenda-skip-archived-trees (not org-agenda-archives-mode) 3732 (save-excursion (goto-char p) (looking-at comment-start-skip))
3733 (get-text-property p :org-archived) 3733 (and org-agenda-skip-archived-trees (not org-agenda-archives-mode)
3734 (org-end-of-subtree t) 3734 (get-text-property p :org-archived)
3735 (throw :skip t)) 3735 (org-end-of-subtree t))
3736 (and org-agenda-skip-comment-trees 3736 (and org-agenda-skip-comment-trees
3737 (get-text-property p :org-comment) 3737 (get-text-property p :org-comment)
3738 (org-end-of-subtree t) 3738 (org-end-of-subtree t))
3739 (throw :skip t)) 3739 (and (setq to (or (org-agenda-skip-eval org-agenda-skip-function-global)
3740 (if (equal (char-after p) ?#) (throw :skip t)) 3740 (org-agenda-skip-eval org-agenda-skip-function)))
3741 (when (setq to (or (org-agenda-skip-eval org-agenda-skip-function-global) 3741 (goto-char to))
3742 (org-agenda-skip-eval org-agenda-skip-function))) 3742 (org-in-src-block-p t))
3743 (goto-char to)
3744 (throw :skip t)))) 3743 (throw :skip t))))
3745 3744
3746(defun org-agenda-skip-eval (form) 3745(defun org-agenda-skip-eval (form)
@@ -4479,7 +4478,8 @@ in `org-agenda-text-search-extra-files'."
4479 category-pos (get-text-property (point) 'org-category-position) 4478 category-pos (get-text-property (point) 'org-category-position)
4480 inherited-tags 4479 inherited-tags
4481 (or (eq org-agenda-show-inherited-tags 'always) 4480 (or (eq org-agenda-show-inherited-tags 'always)
4482 (memq 'todo org-agenda-show-inherited-tags) 4481 (and (listp org-agenda-show-inherited-tags)
4482 (memq 'todo org-agenda-show-inherited-tags))
4483 (and (eq org-agenda-show-inherited-tags t) 4483 (and (eq org-agenda-show-inherited-tags t)
4484 (or (eq org-agenda-use-tag-inheritance t) 4484 (or (eq org-agenda-use-tag-inheritance t)
4485 (memq 'todo org-agenda-use-tag-inheritance)))) 4485 (memq 'todo org-agenda-use-tag-inheritance))))
@@ -5406,9 +5406,6 @@ Do we have a reason to ignore this TODO entry because it has a time stamp?
5406 5406
5407\(fn &optional END)" nil nil) 5407\(fn &optional END)" nil nil)
5408 5408
5409(defconst org-agenda-no-heading-message
5410 "No heading for this item in buffer or region.")
5411
5412(defun org-agenda-get-timestamps (&optional deadline-results) 5409(defun org-agenda-get-timestamps (&optional deadline-results)
5413 "Return the date stamp information for agenda display." 5410 "Return the date stamp information for agenda display."
5414 (let* ((props (list 'face 'org-agenda-calendar-event 5411 (let* ((props (list 'face 'org-agenda-calendar-event
@@ -5488,7 +5485,7 @@ Do we have a reason to ignore this TODO entry because it has a time stamp?
5488 category-pos (get-text-property b0 'org-category-position)) 5485 category-pos (get-text-property b0 'org-category-position))
5489 (save-excursion 5486 (save-excursion
5490 (if (not (re-search-backward org-outline-regexp-bol nil t)) 5487 (if (not (re-search-backward org-outline-regexp-bol nil t))
5491 (setq txt org-agenda-no-heading-message) 5488 (throw :skip nil)
5492 (goto-char (match-beginning 0)) 5489 (goto-char (match-beginning 0))
5493 (if (and (eq t org-agenda-skip-timestamp-if-deadline-is-shown) 5490 (if (and (eq t org-agenda-skip-timestamp-if-deadline-is-shown)
5494 (assoc (point) deadline-position-alist)) 5491 (assoc (point) deadline-position-alist))
@@ -5724,7 +5721,7 @@ please use `org-class' instead."
5724 (and (looking-at ".*\n[ \t]*-[ \t]+\\([^-\n \t].*?\\)[ \t]*$") 5721 (and (looking-at ".*\n[ \t]*-[ \t]+\\([^-\n \t].*?\\)[ \t]*$")
5725 (match-string 1))))) 5722 (match-string 1)))))
5726 (if (not (re-search-backward org-outline-regexp-bol nil t)) 5723 (if (not (re-search-backward org-outline-regexp-bol nil t))
5727 (setq txt org-agenda-no-heading-message) 5724 (throw :skip nil)
5728 (goto-char (match-beginning 0)) 5725 (goto-char (match-beginning 0))
5729 (setq hdmarker (org-agenda-new-marker) 5726 (setq hdmarker (org-agenda-new-marker)
5730 inherited-tags 5727 inherited-tags
@@ -5892,7 +5889,7 @@ See also the user option `org-agenda-clock-consistency-checks'."
5892 (d1 (calendar-absolute-from-gregorian date)) ; DATE bound by calendar 5889 (d1 (calendar-absolute-from-gregorian date)) ; DATE bound by calendar
5893 d2 diff dfrac wdays pos pos1 category category-pos 5890 d2 diff dfrac wdays pos pos1 category category-pos
5894 tags suppress-prewarning ee txt head face s todo-state 5891 tags suppress-prewarning ee txt head face s todo-state
5895 show-all upcomingp donep timestr warntime) 5892 show-all upcomingp donep timestr warntime inherited-tags)
5896 (goto-char (point-min)) 5893 (goto-char (point-min))
5897 (while (re-search-forward regexp nil t) 5894 (while (re-search-forward regexp nil t)
5898 (setq suppress-prewarning nil) 5895 (setq suppress-prewarning nil)
@@ -5941,11 +5938,18 @@ See also the user option `org-agenda-clock-consistency-checks'."
5941 warntime (get-text-property (point) 'org-appt-warntime) 5938 warntime (get-text-property (point) 'org-appt-warntime)
5942 category-pos (get-text-property (point) 'org-category-position)) 5939 category-pos (get-text-property (point) 'org-category-position))
5943 (if (not (re-search-backward "^\\*+[ \t]+" nil t)) 5940 (if (not (re-search-backward "^\\*+[ \t]+" nil t))
5944 (setq txt org-agenda-no-heading-message) 5941 (throw :skip nil)
5945 (goto-char (match-end 0)) 5942 (goto-char (match-end 0))
5946 (setq pos1 (match-beginning 0)) 5943 (setq pos1 (match-beginning 0))
5947 (setq tags (org-get-tags-at pos1 t)) 5944 (setq inherited-tags
5948 (setq head (buffer-substring-no-properties 5945 (or (eq org-agenda-show-inherited-tags 'always)
5946 (and (listp org-agenda-show-inherited-tags)
5947 (memq 'agenda org-agenda-show-inherited-tags))
5948 (and (eq org-agenda-show-inherited-tags t)
5949 (or (eq org-agenda-use-tag-inheritance t)
5950 (memq 'agenda org-agenda-use-tag-inheritance))))
5951 tags (org-get-tags-at pos1 (not inherited-tags)))
5952 (setq head (buffer-substring
5949 (point) 5953 (point)
5950 (progn (skip-chars-forward "^\r\n") 5954 (progn (skip-chars-forward "^\r\n")
5951 (point)))) 5955 (point))))
@@ -6059,7 +6063,7 @@ FRACTION is what fraction of the head-warning time has passed."
6059 (setq category (org-get-category) 6063 (setq category (org-get-category)
6060 category-pos (get-text-property (point) 'org-category-position)) 6064 category-pos (get-text-property (point) 'org-category-position))
6061 (if (not (re-search-backward "^\\*+[ \t]+" nil t)) 6065 (if (not (re-search-backward "^\\*+[ \t]+" nil t))
6062 (setq txt org-agenda-no-heading-message) 6066 (throw :skip nil)
6063 (goto-char (match-end 0)) 6067 (goto-char (match-end 0))
6064 (setq pos1 (match-beginning 0)) 6068 (setq pos1 (match-beginning 0))
6065 (if habitp 6069 (if habitp
@@ -6082,7 +6086,7 @@ FRACTION is what fraction of the head-warning time has passed."
6082 (or (eq org-agenda-use-tag-inheritance t) 6086 (or (eq org-agenda-use-tag-inheritance t)
6083 (memq 'agenda org-agenda-use-tag-inheritance)))) 6087 (memq 'agenda org-agenda-use-tag-inheritance))))
6084 tags (org-get-tags-at nil (not inherited-tags))) 6088 tags (org-get-tags-at nil (not inherited-tags)))
6085 (setq head (buffer-substring-no-properties 6089 (setq head (buffer-substring
6086 (point) 6090 (point)
6087 (progn (skip-chars-forward "^\r\n") (point)))) 6091 (progn (skip-chars-forward "^\r\n") (point))))
6088 (if (string-match " \\([012]?[0-9]:[0-9][0-9]\\)" s) 6092 (if (string-match " \\([012]?[0-9]:[0-9][0-9]\\)" s)
@@ -6160,7 +6164,7 @@ FRACTION is what fraction of the head-warning time has passed."
6160 (setq category (org-get-category) 6164 (setq category (org-get-category)
6161 category-pos (get-text-property (point) 'org-category-position)) 6165 category-pos (get-text-property (point) 'org-category-position))
6162 (if (not (re-search-backward org-outline-regexp-bol nil t)) 6166 (if (not (re-search-backward org-outline-regexp-bol nil t))
6163 (setq txt org-agenda-no-heading-message) 6167 (throw :skip nil)
6164 (goto-char (match-beginning 0)) 6168 (goto-char (match-beginning 0))
6165 (setq hdmarker (org-agenda-new-marker (point)) 6169 (setq hdmarker (org-agenda-new-marker (point))
6166 inherited-tags 6170 inherited-tags
@@ -6892,7 +6896,10 @@ Allowed types are 'agenda 'timeline 'todo 'tags 'search."
6892 (interactive) 6896 (interactive)
6893 (if (and (eq org-indirect-buffer-display 'other-window) 6897 (if (and (eq org-indirect-buffer-display 'other-window)
6894 org-last-indirect-buffer) 6898 org-last-indirect-buffer)
6895 (delete-window (get-buffer-window org-last-indirect-buffer))) 6899 (let ((org-last-indirect-window
6900 (get-buffer-window org-last-indirect-buffer)))
6901 (if org-last-indirect-window
6902 (delete-window org-last-indirect-window))))
6896 (if org-agenda-columns-active 6903 (if org-agenda-columns-active
6897 (org-columns-quit) 6904 (org-columns-quit)
6898 (if org-agenda-sticky 6905 (if org-agenda-sticky
@@ -8012,32 +8019,34 @@ It also looks at the text of the entry itself."
8012 (let* ((marker (or (org-get-at-bol 'org-hd-marker) 8019 (let* ((marker (or (org-get-at-bol 'org-hd-marker)
8013 (org-get-at-bol 'org-marker))) 8020 (org-get-at-bol 'org-marker)))
8014 (buffer (and marker (marker-buffer marker))) 8021 (buffer (and marker (marker-buffer marker)))
8015 (prefix (buffer-substring 8022 (prefix (buffer-substring (point-at-bol) (point-at-eol)))
8016 (point-at-bol) (point-at-eol)))
8017 (lkall (org-offer-links-in-entry buffer marker arg prefix)) 8023 (lkall (org-offer-links-in-entry buffer marker arg prefix))
8018 (lk (car lkall)) 8024 (lk0 (car lkall))
8025 (lk (if (stringp lk0) (list lk0) lk0))
8019 (lkend (cdr lkall)) 8026 (lkend (cdr lkall))
8020 trg) 8027 trg)
8021 (cond 8028 (cond
8022 ((and buffer (stringp lk)) 8029 ((and buffer lk)
8023 (with-current-buffer buffer 8030 (mapcar (lambda(l)
8024 (setq trg (and (string-match org-bracket-link-regexp lk) 8031 (with-current-buffer buffer
8025 (match-string 1 lk))) 8032 (setq trg (and (string-match org-bracket-link-regexp l)
8026 (if (or (not trg) (string-match org-any-link-re trg)) 8033 (match-string 1 l)))
8027 (save-excursion 8034 (if (or (not trg) (string-match org-any-link-re trg))
8028 (save-restriction 8035 (save-excursion
8029 (widen) 8036 (save-restriction
8030 (goto-char marker) 8037 (widen)
8031 (when (search-forward lk nil lkend) 8038 (goto-char marker)
8032 (goto-char (match-beginning 0)) 8039 (when (search-forward l nil lkend)
8033 (org-open-at-point)))) 8040 (goto-char (match-beginning 0))
8034 ;; This is an internal link, widen the buffer 8041 (org-open-at-point))))
8035 (switch-to-buffer-other-window buffer) 8042 ;; This is an internal link, widen the buffer
8036 (widen) 8043 (switch-to-buffer-other-window buffer)
8037 (goto-char marker) 8044 (widen)
8038 (when (search-forward lk nil lkend) 8045 (goto-char marker)
8039 (goto-char (match-beginning 0)) 8046 (when (search-forward l nil lkend)
8040 (org-open-at-point))))) 8047 (goto-char (match-beginning 0))
8048 (org-open-at-point)))))
8049 lk))
8041 ((or (org-in-regexp (concat "\\(" org-bracket-link-regexp "\\)")) 8050 ((or (org-in-regexp (concat "\\(" org-bracket-link-regexp "\\)"))
8042 (save-excursion 8051 (save-excursion
8043 (beginning-of-line 1) 8052 (beginning-of-line 1)
diff --git a/lisp/org/org-bibtex.el b/lisp/org/org-bibtex.el
index 36530a80c05..6ed6abc42b5 100644
--- a/lisp/org/org-bibtex.el
+++ b/lisp/org/org-bibtex.el
@@ -678,7 +678,7 @@ This function relies `org-search-view' to locate results."
678 (org-agenda-search-view-always-boolean t)) 678 (org-agenda-search-view-always-boolean t))
679 (org-search-view nil 679 (org-search-view nil
680 (format "%s +{:%s%s:}" 680 (format "%s +{:%s%s:}"
681 string org-bibtex-prefix 681 string (or org-bibtex-prefix "")
682 org-bibtex-type-property-name)))) 682 org-bibtex-type-property-name))))
683 683
684(provide 'org-bibtex) 684(provide 'org-bibtex)
diff --git a/lisp/org/org-clock.el b/lisp/org/org-clock.el
index c043dd19e11..bc0c431ddd3 100644
--- a/lisp/org/org-clock.el
+++ b/lisp/org/org-clock.el
@@ -1204,7 +1204,7 @@ make this the default behavior.)"
1204 (setq org-clock-start-time 1204 (setq org-clock-start-time
1205 (apply 'encode-time 1205 (apply 'encode-time
1206 (org-parse-time-string (match-string 1)))) 1206 (org-parse-time-string (match-string 1))))
1207 (setq org-clock-effort (get-text-property (point) 'org-effort)) 1207 (setq org-clock-effort (org-entry-get (point) org-effort-property))
1208 (setq org-clock-total-time (org-clock-sum-current-item 1208 (setq org-clock-total-time (org-clock-sum-current-item
1209 (org-clock-get-sum-start)))) 1209 (org-clock-get-sum-start))))
1210 ((eq org-clock-in-resume 'auto-restart) 1210 ((eq org-clock-in-resume 'auto-restart)
@@ -1224,7 +1224,7 @@ make this the default behavior.)"
1224 (beginning-of-line 1) 1224 (beginning-of-line 1)
1225 (org-indent-line-to (- (org-get-indentation) 2))) 1225 (org-indent-line-to (- (org-get-indentation) 2)))
1226 (insert org-clock-string " ") 1226 (insert org-clock-string " ")
1227 (setq org-clock-effort (get-text-property (point) 'org-effort)) 1227 (setq org-clock-effort (org-entry-get (point) org-effort-property))
1228 (setq org-clock-total-time (org-clock-sum-current-item 1228 (setq org-clock-total-time (org-clock-sum-current-item
1229 (org-clock-get-sum-start))) 1229 (org-clock-get-sum-start)))
1230 (setq org-clock-start-time 1230 (setq org-clock-start-time
@@ -1675,86 +1675,85 @@ each headline in the time range with point at the headline. Headlines for
1675which HEADLINE-FILTER returns nil are excluded from the clock summation. 1675which HEADLINE-FILTER returns nil are excluded from the clock summation.
1676PROPNAME lets you set a custom text property instead of :org-clock-minutes." 1676PROPNAME lets you set a custom text property instead of :org-clock-minutes."
1677 (interactive) 1677 (interactive)
1678 (let* ((bmp (buffer-modified-p)) 1678 (org-unmodified
1679 (re (concat "^\\(\\*+\\)[ \t]\\|^[ \t]*" 1679 (let* ((re (concat "^\\(\\*+\\)[ \t]\\|^[ \t]*"
1680 org-clock-string 1680 org-clock-string
1681 "[ \t]*\\(?:\\(\\[.*?\\]\\)-+\\(\\[.*?\\]\\)\\|=>[ \t]+\\([0-9]+\\):\\([0-9]+\\)\\)")) 1681 "[ \t]*\\(?:\\(\\[.*?\\]\\)-+\\(\\[.*?\\]\\)\\|=>[ \t]+\\([0-9]+\\):\\([0-9]+\\)\\)"))
1682 (lmax 30) 1682 (lmax 30)
1683 (ltimes (make-vector lmax 0)) 1683 (ltimes (make-vector lmax 0))
1684 (t1 0) 1684 (t1 0)
1685 (level 0) 1685 (level 0)
1686 ts te dt 1686 ts te dt
1687 time) 1687 time)
1688 (if (stringp tstart) (setq tstart (org-time-string-to-seconds tstart))) 1688 (if (stringp tstart) (setq tstart (org-time-string-to-seconds tstart)))
1689 (if (stringp tend) (setq tend (org-time-string-to-seconds tend))) 1689 (if (stringp tend) (setq tend (org-time-string-to-seconds tend)))
1690 (if (consp tstart) (setq tstart (org-float-time tstart))) 1690 (if (consp tstart) (setq tstart (org-float-time tstart)))
1691 (if (consp tend) (setq tend (org-float-time tend))) 1691 (if (consp tend) (setq tend (org-float-time tend)))
1692 (remove-text-properties (point-min) (point-max) 1692 (remove-text-properties (point-min) (point-max)
1693 `(,(or propname :org-clock-minutes) t 1693 `(,(or propname :org-clock-minutes) t
1694 :org-clock-force-headline-inclusion t)) 1694 :org-clock-force-headline-inclusion t))
1695 (save-excursion 1695 (save-excursion
1696 (goto-char (point-max)) 1696 (goto-char (point-max))
1697 (while (re-search-backward re nil t) 1697 (while (re-search-backward re nil t)
1698 (cond 1698 (cond
1699 ((match-end 2) 1699 ((match-end 2)
1700 ;; Two time stamps 1700 ;; Two time stamps
1701 (setq ts (match-string 2) 1701 (setq ts (match-string 2)
1702 te (match-string 3) 1702 te (match-string 3)
1703 ts (org-float-time 1703 ts (org-float-time
1704 (apply 'encode-time (org-parse-time-string ts))) 1704 (apply 'encode-time (org-parse-time-string ts)))
1705 te (org-float-time 1705 te (org-float-time
1706 (apply 'encode-time (org-parse-time-string te))) 1706 (apply 'encode-time (org-parse-time-string te)))
1707 ts (if tstart (max ts tstart) ts) 1707 ts (if tstart (max ts tstart) ts)
1708 te (if tend (min te tend) te) 1708 te (if tend (min te tend) te)
1709 dt (- te ts) 1709 dt (- te ts)
1710 t1 (if (> dt 0) (+ t1 (floor (/ dt 60))) t1))) 1710 t1 (if (> dt 0) (+ t1 (floor (/ dt 60))) t1)))
1711 ((match-end 4) 1711 ((match-end 4)
1712 ;; A naked time 1712 ;; A naked time
1713 (setq t1 (+ t1 (string-to-number (match-string 5)) 1713 (setq t1 (+ t1 (string-to-number (match-string 5))
1714 (* 60 (string-to-number (match-string 4)))))) 1714 (* 60 (string-to-number (match-string 4))))))
1715 (t ;; A headline 1715 (t ;; A headline
1716 ;; Add the currently clocking item time to the total 1716 ;; Add the currently clocking item time to the total
1717 (when (and org-clock-report-include-clocking-task 1717 (when (and org-clock-report-include-clocking-task
1718 (equal (org-clocking-buffer) (current-buffer)) 1718 (equal (org-clocking-buffer) (current-buffer))
1719 (equal (marker-position org-clock-hd-marker) (point)) 1719 (equal (marker-position org-clock-hd-marker) (point))
1720 tstart 1720 tstart
1721 tend 1721 tend
1722 (>= (org-float-time org-clock-start-time) tstart) 1722 (>= (org-float-time org-clock-start-time) tstart)
1723 (<= (org-float-time org-clock-start-time) tend)) 1723 (<= (org-float-time org-clock-start-time) tend))
1724 (let ((time (floor (- (org-float-time) 1724 (let ((time (floor (- (org-float-time)
1725 (org-float-time org-clock-start-time)) 60))) 1725 (org-float-time org-clock-start-time)) 60)))
1726 (setq t1 (+ t1 time)))) 1726 (setq t1 (+ t1 time))))
1727 (let* ((headline-forced 1727 (let* ((headline-forced
1728 (get-text-property (point) 1728 (get-text-property (point)
1729 :org-clock-force-headline-inclusion)) 1729 :org-clock-force-headline-inclusion))
1730 (headline-included 1730 (headline-included
1731 (or (null headline-filter) 1731 (or (null headline-filter)
1732 (save-excursion 1732 (save-excursion
1733 (save-match-data (funcall headline-filter)))))) 1733 (save-match-data (funcall headline-filter))))))
1734 (setq level (- (match-end 1) (match-beginning 1))) 1734 (setq level (- (match-end 1) (match-beginning 1)))
1735 (when (or (> t1 0) (> (aref ltimes level) 0)) 1735 (when (or (> t1 0) (> (aref ltimes level) 0))
1736 (when (or headline-included headline-forced) 1736 (when (or headline-included headline-forced)
1737 (if headline-included 1737 (if headline-included
1738 (loop for l from 0 to level do 1738 (loop for l from 0 to level do
1739 (aset ltimes l (+ (aref ltimes l) t1)))) 1739 (aset ltimes l (+ (aref ltimes l) t1))))
1740 (setq time (aref ltimes level)) 1740 (setq time (aref ltimes level))
1741 (goto-char (match-beginning 0)) 1741 (goto-char (match-beginning 0))
1742 (put-text-property (point) (point-at-eol) 1742 (put-text-property (point) (point-at-eol)
1743 (or propname :org-clock-minutes) time) 1743 (or propname :org-clock-minutes) time)
1744 (if headline-filter 1744 (if headline-filter
1745 (save-excursion 1745 (save-excursion
1746 (save-match-data 1746 (save-match-data
1747 (while 1747 (while
1748 (> (funcall outline-level) 1) 1748 (> (funcall outline-level) 1)
1749 (outline-up-heading 1 t) 1749 (outline-up-heading 1 t)
1750 (put-text-property 1750 (put-text-property
1751 (point) (point-at-eol) 1751 (point) (point-at-eol)
1752 :org-clock-force-headline-inclusion t)))))) 1752 :org-clock-force-headline-inclusion t))))))
1753 (setq t1 0) 1753 (setq t1 0)
1754 (loop for l from level to (1- lmax) do 1754 (loop for l from level to (1- lmax) do
1755 (aset ltimes l 0))))))) 1755 (aset ltimes l 0)))))))
1756 (setq org-clock-file-total-minutes (aref ltimes 0))) 1756 (setq org-clock-file-total-minutes (aref ltimes 0))))))
1757 (set-buffer-modified-p bmp)))
1758 1757
1759(defun org-clock-sum-current-item (&optional tstart) 1758(defun org-clock-sum-current-item (&optional tstart)
1760 "Return time, clocked on current item in total." 1759 "Return time, clocked on current item in total."
diff --git a/lisp/org/org-element.el b/lisp/org/org-element.el
index c8096aa3963..6a0b8eee45c 100644
--- a/lisp/org/org-element.el
+++ b/lisp/org/org-element.el
@@ -2893,10 +2893,13 @@ Assume point is at the macro."
2893 (end (point)) 2893 (end (point))
2894 (args (let ((args (org-match-string-no-properties 3)) args2) 2894 (args (let ((args (org-match-string-no-properties 3)) args2)
2895 (when args 2895 (when args
2896 (setq args (org-split-string args ",")) 2896 ;; Do not use `org-split-string' since empty
2897 ;; strings are meaningful here.
2898 (setq args (split-string args ","))
2897 (while args 2899 (while args
2898 (while (string-match "\\\\\\'" (car args)) 2900 (while (string-match "\\\\\\'" (car args))
2899 ;; Repair bad splits. 2901 ;; Repair bad splits, when comma is protected,
2902 ;; and thus not a real separator.
2900 (setcar (cdr args) (concat (substring (car args) 0 -1) 2903 (setcar (cdr args) (concat (substring (car args) 0 -1)
2901 "," (nth 1 args))) 2904 "," (nth 1 args)))
2902 (pop args)) 2905 (pop args))
@@ -3611,7 +3614,32 @@ recursion. It can be set to the following symbols:
3611When VISIBLE-ONLY is non-nil, don't parse contents of hidden 3614When VISIBLE-ONLY is non-nil, don't parse contents of hidden
3612elements. 3615elements.
3613 3616
3614Assume buffer is in Org mode." 3617An element or an objects is represented as a list with the
3618pattern (TYPE PROPERTIES CONTENTS), where :
3619
3620 TYPE is a symbol describing the element or object. See
3621 `org-element-all-elements' and `org-element-all-objects' for an
3622 exhaustive list of such symbols. One can retrieve it with
3623 `org-element-type' function.
3624
3625 PROPERTIES is the list of attributes attached to the element or
3626 object, as a plist. Although most of them are specific to the
3627 element or object type, all types share `:begin', `:end',
3628 `:post-blank' and `:parent' properties, which respectively
3629 refer to buffer position where the element or object starts,
3630 ends, the number of white spaces or blank lines after it, and
3631 the element or object containing it. Properties values can be
3632 obtained by using `org-element-property' function.
3633
3634 CONTENTS is a list of elements, objects or raw strings
3635 contained in the current element or object, when applicable.
3636 One can access them with `org-element-contents' function.
3637
3638The Org buffer has `org-data' as type and nil as properties.
3639`org-element-map' function can be used to find specific elements
3640or objects within the parse tree.
3641
3642This function assumes that current major mode is `org-mode'."
3615 (save-excursion 3643 (save-excursion
3616 (goto-char (point-min)) 3644 (goto-char (point-min))
3617 (org-skip-whitespace) 3645 (org-skip-whitespace)
@@ -3640,11 +3668,12 @@ containing the secondary string. It is used to set correctly
3640(defun org-element-map (data types fun &optional info first-match no-recursion) 3668(defun org-element-map (data types fun &optional info first-match no-recursion)
3641 "Map a function on selected elements or objects. 3669 "Map a function on selected elements or objects.
3642 3670
3643DATA is the parsed tree, as returned by, i.e, 3671DATA is an Org buffer parse tree, as returned by, i.e,
3644`org-element-parse-buffer'. TYPES is a symbol or list of symbols 3672`org-element-parse-buffer'. TYPES is a symbol or list of symbols
3645of elements or objects types. FUN is the function called on the 3673of elements or objects types (see `org-element-all-elements' and
3646matching element or object. It must accept one arguments: the 3674`org-element-all-objects' for a complete list of types). FUN is
3647element or object itself. 3675the function called on the matching element or object. It has to
3676accept one argument: the element or object itself.
3648 3677
3649When optional argument INFO is non-nil, it should be a plist 3678When optional argument INFO is non-nil, it should be a plist
3650holding export options. In that case, parts of the parse tree 3679holding export options. In that case, parts of the parse tree
@@ -3658,7 +3687,37 @@ representing elements or objects types. `org-element-map' won't
3658enter any recursive element or object whose type belongs to that 3687enter any recursive element or object whose type belongs to that
3659list. Though, FUN can still be applied on them. 3688list. Though, FUN can still be applied on them.
3660 3689
3661Nil values returned from FUN do not appear in the results." 3690Nil values returned from FUN do not appear in the results.
3691
3692
3693Examples:
3694--------
3695
3696Assuming TREE is a variable containing an Org buffer parse tree,
3697the following example will return a flat list of all `src-block'
3698and `example-block' elements in it:
3699
3700 \(org-element-map tree '(example-block src-block) 'identity)
3701
3702The following snippet will find the first headline with a level
3703of 1 and a \"phone\" tag, and will return its beginning position:
3704
3705 \(org-element-map
3706 tree 'headline
3707 \(lambda (hl)
3708 \(and (= (org-element-property :level hl) 1)
3709 \(member \"phone\" (org-element-property :tags hl))
3710 \(org-element-property :begin hl)))
3711 nil t)
3712
3713Eventually, this last example will return a flat list of all
3714`bold' type objects containing a `latex-snippet' type object:
3715
3716 \(org-element-map
3717 tree 'bold
3718 \(lambda (b)
3719 \(and (org-element-map b 'latex-snippet 'identity nil t)
3720 b)))"
3662 ;; Ensure TYPES and NO-RECURSION are a list, even of one element. 3721 ;; Ensure TYPES and NO-RECURSION are a list, even of one element.
3663 (unless (listp types) (setq types (list types))) 3722 (unless (listp types) (setq types (list types)))
3664 (unless (listp no-recursion) (setq no-recursion (list no-recursion))) 3723 (unless (listp no-recursion) (setq no-recursion (list no-recursion)))
@@ -4168,8 +4227,8 @@ of the element and PROPS a plist of properties associated to the
4168element. 4227element.
4169 4228
4170Possible types are defined in `org-element-all-elements'. 4229Possible types are defined in `org-element-all-elements'.
4171Properties depend on element or object type, but always 4230Properties depend on element or object type, but always include
4172include :begin, :end, :parent and :post-blank properties. 4231`:begin', `:end', `:parent' and `:post-blank' properties.
4173 4232
4174As a special case, if point is at the very beginning of a list or 4233As a special case, if point is at the very beginning of a list or
4175sub-list, returned element will be that list instead of the first 4234sub-list, returned element will be that list instead of the first
@@ -4178,8 +4237,8 @@ row of a table, returned element will be the table instead of the
4178first row. 4237first row.
4179 4238
4180If optional argument KEEP-TRAIL is non-nil, the function returns 4239If optional argument KEEP-TRAIL is non-nil, the function returns
4181a list of of elements leading to element at point. The list's 4240a list of elements leading to element at point. The list's CAR
4182CAR is always the element at point. Following positions contain 4241is always the element at point. The following positions contain
4183element's siblings, then parents, siblings of parents, until the 4242element's siblings, then parents, siblings of parents, until the
4184first element of current section." 4243first element of current section."
4185 (org-with-wide-buffer 4244 (org-with-wide-buffer
@@ -4268,8 +4327,8 @@ associated to it.
4268 4327
4269Possible types are defined in `org-element-all-elements' and 4328Possible types are defined in `org-element-all-elements' and
4270`org-element-all-objects'. Properties depend on element or 4329`org-element-all-objects'. Properties depend on element or
4271object type, but always include :begin, :end, :parent 4330object type, but always include `:begin', `:end', `:parent' and
4272and :post-blank properties." 4331`:post-blank'."
4273 (org-with-wide-buffer 4332 (org-with-wide-buffer
4274 (let* ((origin (point)) 4333 (let* ((origin (point))
4275 (element (org-element-at-point)) 4334 (element (org-element-at-point))
diff --git a/lisp/org/org-exp.el b/lisp/org/org-exp.el
index 82b9003e4fd..5ccaec3e67f 100644
--- a/lisp/org/org-exp.el
+++ b/lisp/org/org-exp.el
@@ -2113,7 +2113,8 @@ Also, store forced alignment information found in such lines."
2113 (put-text-property (match-beginning 0) (match-end 0) 'org-normalized-link t)) 2113 (put-text-property (match-beginning 0) (match-end 0) 'org-normalized-link t))
2114 (goto-char (point-min)) 2114 (goto-char (point-min))
2115 (while (re-search-forward re-plain-link nil t) 2115 (while (re-search-forward re-plain-link nil t)
2116 (unless (get-text-property (match-beginning 0) 'org-normalized-link) 2116 (unless (or (get-text-property (match-beginning 0) 'org-normalized-link)
2117 (assoc :tags (org-context)))
2117 (goto-char (1- (match-end 0))) 2118 (goto-char (1- (match-end 0)))
2118 (org-if-unprotected-at (1+ (match-beginning 0)) 2119 (org-if-unprotected-at (1+ (match-beginning 0))
2119 (let* ((s (concat (match-string 1) 2120 (let* ((s (concat (match-string 1)
diff --git a/lisp/org/org-footnote.el b/lisp/org/org-footnote.el
index 269ea8ebf9c..4cde24bf57f 100644
--- a/lisp/org/org-footnote.el
+++ b/lisp/org/org-footnote.el
@@ -486,7 +486,8 @@ or new, let the user edit the definition of the footnote."
486(defun org-footnote-create-definition (label) 486(defun org-footnote-create-definition (label)
487 "Start the definition of a footnote with label LABEL." 487 "Start the definition of a footnote with label LABEL."
488 (interactive "sLabel: ") 488 (interactive "sLabel: ")
489 (let ((label (org-footnote-normalize-label label))) 489 (let ((label (org-footnote-normalize-label label))
490 electric-indent-mode) ;; Prevent wrong indentation
490 (cond 491 (cond
491 ;; In an Org file. 492 ;; In an Org file.
492 ((derived-mode-p 'org-mode) 493 ((derived-mode-p 'org-mode)
diff --git a/lisp/org/org-html.el b/lisp/org/org-html.el
index 493d8a28afb..ca90f855aab 100644
--- a/lisp/org/org-html.el
+++ b/lisp/org/org-html.el
@@ -464,6 +464,9 @@ precedence over this variable."
464(defcustom org-export-html-preamble-format '(("en" "")) 464(defcustom org-export-html-preamble-format '(("en" ""))
465 "Alist of languages and format strings for the HTML preamble. 465 "Alist of languages and format strings for the HTML preamble.
466 466
467To enable the HTML exporter to use these formats, you need to set
468`org-export-html-preamble' to `t'.
469
467The first element of each list is the language code, as used for 470The first element of each list is the language code, as used for
468the #+LANGUAGE keyword. 471the #+LANGUAGE keyword.
469 472
@@ -510,6 +513,9 @@ precedence over this variable."
510")) 513"))
511 "Alist of languages and format strings for the HTML postamble. 514 "Alist of languages and format strings for the HTML postamble.
512 515
516To enable the HTML exporter to use these formats, you need to set
517`org-export-html-postamble' to `t'.
518
513The first element of each list is the language code, as used for 519The first element of each list is the language code, as used for
514the #+LANGUAGE keyword. 520the #+LANGUAGE keyword.
515 521
@@ -1030,7 +1036,10 @@ OPT-PLIST is the export options list."
1030 (if (string-match "^file:" desc) 1036 (if (string-match "^file:" desc)
1031 (setq desc (substring desc (match-end 0))))) 1037 (setq desc (substring desc (match-end 0)))))
1032 (setq desc (org-add-props 1038 (setq desc (org-add-props
1033 (concat "<img src=\"" desc "\" alt=\"" 1039 (concat "<img src=\"" desc "\" "
1040 (when (save-match-data (string-match "width=" attr))
1041 (prog1 (concat attr " ") (setq attr "")))
1042 "alt=\""
1034 (file-name-nondirectory desc) "\"/>") 1043 (file-name-nondirectory desc) "\"/>")
1035 '(org-protected t)))) 1044 '(org-protected t))))
1036 (cond 1045 (cond
diff --git a/lisp/org/org-indent.el b/lisp/org/org-indent.el
index 054ccb07302..d5f17b2cb69 100644
--- a/lisp/org/org-indent.el
+++ b/lisp/org/org-indent.el
@@ -159,69 +159,68 @@ properties, after each buffer modification, on the modified zone.
159 159
160The process is synchronous. Though, initial indentation of 160The process is synchronous. Though, initial indentation of
161buffer, which can take a few seconds on large buffers, is done 161buffer, which can take a few seconds on large buffers, is done
162during idle time." nil " Ind" nil 162during idle time."
163(cond 163 nil " Ind" nil
164 ((org-bound-and-true-p org-inhibit-startup) 164 (cond
165 (setq org-indent-mode nil)) 165 ((and org-indent-mode (featurep 'xemacs))
166 ((and org-indent-mode (featurep 'xemacs)) 166 (message "org-indent-mode does not work in XEmacs - refusing to turn it on")
167 (message "org-indent-mode does not work in XEmacs - refusing to turn it on") 167 (setq org-indent-mode nil))
168 (setq org-indent-mode nil)) 168 ((and org-indent-mode
169 ((and org-indent-mode 169 (not (org-version-check "23.1.50" "Org Indent mode" :predicate)))
170 (not (org-version-check "23.1.50" "Org Indent mode" :predicate))) 170 (message "org-indent-mode can crash Emacs 23.1 - refusing to turn it on!")
171 (message "org-indent-mode can crash Emacs 23.1 - refusing to turn it on!") 171 (ding)
172 (ding) 172 (sit-for 1)
173 (sit-for 1) 173 (setq org-indent-mode nil))
174 (setq org-indent-mode nil)) 174 (org-indent-mode
175 (org-indent-mode 175 ;; mode was turned on.
176 ;; mode was turned on. 176 (org-set-local 'indent-tabs-mode nil)
177 (org-set-local 'indent-tabs-mode nil) 177 (or org-indent-strings (org-indent-initialize))
178 (or org-indent-strings (org-indent-initialize)) 178 (org-set-local 'org-indent-initial-marker (copy-marker 1))
179 (org-set-local 'org-indent-initial-marker (copy-marker 1)) 179 (when org-indent-mode-turns-off-org-adapt-indentation
180 (when org-indent-mode-turns-off-org-adapt-indentation 180 (org-set-local 'org-adapt-indentation nil))
181 (org-set-local 'org-adapt-indentation nil)) 181 (when org-indent-mode-turns-on-hiding-stars
182 (when org-indent-mode-turns-on-hiding-stars 182 (org-set-local 'org-hide-leading-stars-before-indent-mode
183 (org-set-local 'org-hide-leading-stars-before-indent-mode 183 org-hide-leading-stars)
184 org-hide-leading-stars) 184 (org-set-local 'org-hide-leading-stars t))
185 (org-set-local 'org-hide-leading-stars t)) 185 (make-local-variable 'filter-buffer-substring-functions)
186 (make-local-variable 'filter-buffer-substring-functions) 186 (add-hook 'filter-buffer-substring-functions
187 (add-hook 'filter-buffer-substring-functions 187 (lambda (fun start end delete)
188 (lambda (fun start end delete) 188 (org-indent-remove-properties-from-string
189 (org-indent-remove-properties-from-string 189 (funcall fun start end delete))))
190 (funcall fun start end delete)))) 190 (org-add-hook 'after-change-functions 'org-indent-refresh-maybe nil 'local)
191 (org-add-hook 'after-change-functions 'org-indent-refresh-maybe nil 'local) 191 (org-add-hook 'before-change-functions
192 (org-add-hook 'before-change-functions 192 'org-indent-notify-modified-headline nil 'local)
193 'org-indent-notify-modified-headline nil 'local) 193 (and font-lock-mode (org-restart-font-lock))
194 (and font-lock-mode (org-restart-font-lock)) 194 (org-indent-remove-properties (point-min) (point-max))
195 (org-indent-remove-properties (point-min) (point-max)) 195 ;; Submit current buffer to initialize agent. If it's the first
196 ;; Submit current buffer to initialize agent. If it's the first 196 ;; buffer submitted, also start the agent. Current buffer is
197 ;; buffer submitted, also start the agent. Current buffer is 197 ;; pushed in both cases to avoid a race condition.
198 ;; pushed in both cases to avoid a race condition. 198 (if org-indent-agentized-buffers
199 (if org-indent-agentized-buffers 199 (push (current-buffer) org-indent-agentized-buffers)
200 (push (current-buffer) org-indent-agentized-buffers) 200 (push (current-buffer) org-indent-agentized-buffers)
201 (push (current-buffer) org-indent-agentized-buffers) 201 (setq org-indent-agent-timer
202 (setq org-indent-agent-timer 202 (run-with-idle-timer 0.2 t #'org-indent-initialize-agent))))
203 (run-with-idle-timer 0.2 t #'org-indent-initialize-agent)))) 203 (t
204 (t 204 ;; mode was turned off (or we refused to turn it on)
205 ;; mode was turned off (or we refused to turn it on) 205 (kill-local-variable 'org-adapt-indentation)
206 (kill-local-variable 'org-adapt-indentation) 206 (setq org-indent-agentized-buffers
207 (setq org-indent-agentized-buffers 207 (delq (current-buffer) org-indent-agentized-buffers))
208 (delq (current-buffer) org-indent-agentized-buffers)) 208 (when (markerp org-indent-initial-marker)
209 (when (markerp org-indent-initial-marker) 209 (set-marker org-indent-initial-marker nil))
210 (set-marker org-indent-initial-marker nil)) 210 (when (boundp 'org-hide-leading-stars-before-indent-mode)
211 (when (boundp 'org-hide-leading-stars-before-indent-mode) 211 (org-set-local 'org-hide-leading-stars
212 (org-set-local 'org-hide-leading-stars 212 org-hide-leading-stars-before-indent-mode))
213 org-hide-leading-stars-before-indent-mode)) 213 (remove-hook 'filter-buffer-substring-functions
214 (remove-hook 'filter-buffer-substring-functions 214 (lambda (fun start end delete)
215 (lambda (fun start end delete) 215 (org-indent-remove-properties-from-string
216 (org-indent-remove-properties-from-string 216 (funcall fun start end delete))))
217 (funcall fun start end delete)))) 217 (remove-hook 'after-change-functions 'org-indent-refresh-maybe 'local)
218 (remove-hook 'after-change-functions 'org-indent-refresh-maybe 'local) 218 (remove-hook 'before-change-functions
219 (remove-hook 'before-change-functions 219 'org-indent-notify-modified-headline 'local)
220 'org-indent-notify-modified-headline 'local) 220 (org-with-wide-buffer
221 (org-with-wide-buffer 221 (org-indent-remove-properties (point-min) (point-max)))
222 (org-indent-remove-properties (point-min) (point-max))) 222 (and font-lock-mode (org-restart-font-lock))
223 (and font-lock-mode (org-restart-font-lock)) 223 (redraw-display))))
224 (redraw-display))))
225 224
226(defun org-indent-indent-buffer () 225(defun org-indent-indent-buffer ()
227 "Add indentation properties to the accessible part of the buffer." 226 "Add indentation properties to the accessible part of the buffer."
diff --git a/lisp/org/org-install.el b/lisp/org/org-install.el
index aca019fb823..58359597363 100644
--- a/lisp/org/org-install.el
+++ b/lisp/org/org-install.el
@@ -1,10 +1,12 @@
1;;; org-install.el --- backward compatibility file for obsolete configuration 1;;; org-install.el --- backward compatibility file for obsolete configuration
2;; 2;;
3;;; Code: 3;;; Code:
4(warn "The file org-install is obsolete. 4;;
5It is provided here so that (require 'org-install) does not 5;; The file org-install is obsolete.
6trigger an error for users with obsolete Emacs configuration. 6;;
7You can safely remove (require 'org-install) from your config.") 7;; It is provided here so that (require 'org-install) does not
8;; trigger an error for users with obsolete Emacs configuration.
9;; You can safely remove (require 'org-install) from your config."
8 10
9(provide 'org-install) 11(provide 'org-install)
10 12
diff --git a/lisp/org/org-list.el b/lisp/org/org-list.el
index 78cb2a621c7..47476481625 100644
--- a/lisp/org/org-list.el
+++ b/lisp/org/org-list.el
@@ -1802,7 +1802,9 @@ This function modifies STRUCT."
1802 ;; There are boxes checked after an unchecked one: fix that. 1802 ;; There are boxes checked after an unchecked one: fix that.
1803 (when (member "[X]" after-unchecked) 1803 (when (member "[X]" after-unchecked)
1804 (let ((index (- (length struct) (length after-unchecked)))) 1804 (let ((index (- (length struct) (length after-unchecked))))
1805 (mapc (lambda (e) (org-list-set-checkbox e struct "[ ]")) 1805 (mapc (lambda (e)
1806 (when (org-list-get-checkbox e struct)
1807 (org-list-set-checkbox e struct "[ ]")))
1806 (nthcdr index all-items)) 1808 (nthcdr index all-items))
1807 ;; Verify once again the structure, without ORDERED. 1809 ;; Verify once again the structure, without ORDERED.
1808 (org-list-struct-fix-box struct parents prevs nil) 1810 (org-list-struct-fix-box struct parents prevs nil)
diff --git a/lisp/org/org-macs.el b/lisp/org/org-macs.el
index a44bdbe30fd..ceee30601bd 100644
--- a/lisp/org/org-macs.el
+++ b/lisp/org/org-macs.el
@@ -93,7 +93,7 @@ Also, do not record undo information."
93 `(set-buffer-modified-p 93 `(set-buffer-modified-p
94 (prog1 (buffer-modified-p) 94 (prog1 (buffer-modified-p)
95 (let ((buffer-undo-list t) 95 (let ((buffer-undo-list t)
96 before-change-functions after-change-functions) 96 (inhibit-modification-hooks t))
97 ,@body)))) 97 ,@body))))
98(def-edebug-spec org-unmodified (body)) 98(def-edebug-spec org-unmodified (body))
99 99
diff --git a/lisp/org/org-version.el b/lisp/org/org-version.el
index e62eba3cf83..1910d3f7b4f 100644
--- a/lisp/org/org-version.el
+++ b/lisp/org/org-version.el
@@ -5,13 +5,13 @@
5(defun org-release () 5(defun org-release ()
6 "The release version of org-mode. 6 "The release version of org-mode.
7 Inserted by installing org-mode or when a release is made." 7 Inserted by installing org-mode or when a release is made."
8 (let ((org-release "7.9.3d")) 8 (let ((org-release "7.9.3e"))
9 org-release)) 9 org-release))
10;;;###autoload 10;;;###autoload
11(defun org-git-version () 11(defun org-git-version ()
12 "The Git version of org-mode. 12 "The Git version of org-mode.
13 Inserted by installing org-mode or when a release is made." 13 Inserted by installing org-mode or when a release is made."
14 (let ((org-git-version "7.9.3d-GNU-Emacs-24-3 (commit e8f5b0ad)")) 14 (let ((org-git-version "7.9.3e-3-gb07a9b"))
15 org-git-version)) 15 org-git-version))
16;;;###autoload 16;;;###autoload
17(defvar org-odt-data-dir "/usr/share/emacs/etc/org" 17(defvar org-odt-data-dir "/usr/share/emacs/etc/org"
diff --git a/lisp/org/org.el b/lisp/org/org.el
index 9409feca178..bba52a8b63a 100644
--- a/lisp/org/org.el
+++ b/lisp/org/org.el
@@ -4915,6 +4915,7 @@ The following commands are available:
4915 (org-set-local 'calc-embedded-open-mode "# ") 4915 (org-set-local 'calc-embedded-open-mode "# ")
4916 (modify-syntax-entry ?@ "w") 4916 (modify-syntax-entry ?@ "w")
4917 (if org-startup-truncated (setq truncate-lines t)) 4917 (if org-startup-truncated (setq truncate-lines t))
4918 (when org-startup-indented (require 'org-indent) (org-indent-mode 1))
4918 (org-set-local 'font-lock-unfontify-region-function 4919 (org-set-local 'font-lock-unfontify-region-function
4919 'org-unfontify-region) 4920 'org-unfontify-region)
4920 ;; Activate before-change-function 4921 ;; Activate before-change-function
@@ -4970,9 +4971,6 @@ The following commands are available:
4970 (org-set-local 'outline-isearch-open-invisible-function 4971 (org-set-local 'outline-isearch-open-invisible-function
4971 (lambda (&rest ignore) (org-show-context 'isearch)))) 4972 (lambda (&rest ignore) (org-show-context 'isearch))))
4972 4973
4973 ;; Turn on org-beamer-mode?
4974 (and org-startup-with-beamer-mode (org-beamer-mode))
4975
4976 ;; Setup the pcomplete hooks 4974 ;; Setup the pcomplete hooks
4977 (set (make-local-variable 'pcomplete-command-completion-function) 4975 (set (make-local-variable 'pcomplete-command-completion-function)
4978 'org-pcomplete-initial) 4976 'org-pcomplete-initial)
@@ -4992,15 +4990,13 @@ The following commands are available:
4992 (= (point-min) (point-max))) 4990 (= (point-min) (point-max)))
4993 (insert "# -*- mode: org -*-\n\n")) 4991 (insert "# -*- mode: org -*-\n\n"))
4994 (unless org-inhibit-startup 4992 (unless org-inhibit-startup
4993 (and org-startup-with-beamer-mode (org-beamer-mode))
4995 (when org-startup-align-all-tables 4994 (when org-startup-align-all-tables
4996 (let ((bmp (buffer-modified-p))) 4995 (let ((bmp (buffer-modified-p)))
4997 (org-table-map-tables 'org-table-align 'quietly) 4996 (org-table-map-tables 'org-table-align 'quietly)
4998 (set-buffer-modified-p bmp))) 4997 (set-buffer-modified-p bmp)))
4999 (when org-startup-with-inline-images 4998 (when org-startup-with-inline-images
5000 (org-display-inline-images)) 4999 (org-display-inline-images))
5001 (when org-startup-indented
5002 (require 'org-indent)
5003 (org-indent-mode 1))
5004 (unless org-inhibit-startup-visibility-stuff 5000 (unless org-inhibit-startup-visibility-stuff
5005 (org-set-startup-visibility))) 5001 (org-set-startup-visibility)))
5006 ;; Try to set org-hide correctly 5002 ;; Try to set org-hide correctly
@@ -5422,7 +5418,7 @@ by a #."
5422 '(font-lock-fontified t invisible t) 5418 '(font-lock-fontified t invisible t)
5423 '(font-lock-fontified t face org-document-info-keyword))) 5419 '(font-lock-fontified t face org-document-info-keyword)))
5424 (add-text-properties 5420 (add-text-properties
5425 (match-beginning 6) (1+ (match-end 6)) 5421 (match-beginning 6) (min (point-max) (1+ (match-end 6)))
5426 (if (string-equal dc1 "+title:") 5422 (if (string-equal dc1 "+title:")
5427 '(font-lock-fontified t face org-document-title) 5423 '(font-lock-fontified t face org-document-title)
5428 '(font-lock-fontified t face org-document-info)))) 5424 '(font-lock-fontified t face org-document-info))))
@@ -15925,7 +15921,8 @@ Don't touch the rest."
15925 (floor (* (string-to-number (match-string 1 ts)) 15921 (floor (* (string-to-number (match-string 1 ts))
15926 (cdr (assoc (match-string 2 ts) 15922 (cdr (assoc (match-string 2 ts)
15927 '(("d" . 1) ("w" . 7) 15923 '(("d" . 1) ("w" . 7)
15928 ("m" . 30.4) ("y" . 365.25))))))) 15924 ("m" . 30.4) ("y" . 365.25)
15925 ("h" . 0.041667)))))))
15929 ;; go for the default. 15926 ;; go for the default.
15930 (t org-deadline-warning-days))) 15927 (t org-deadline-warning-days)))
15931 15928
@@ -16662,6 +16659,15 @@ effort string \"2hours\" is equivalent to 120 minutes."
16662 :type '(alist :key-type (string :tag "Modifier") 16659 :type '(alist :key-type (string :tag "Modifier")
16663 :value-type (number :tag "Minutes"))) 16660 :value-type (number :tag "Minutes")))
16664 16661
16662(defcustom org-agenda-inhibit-startup t
16663 "Inhibit startup when preparing agenda buffers.
16664When this variable is `t' (the default), the initialization of
16665the Org agenda buffers is inhibited: e.g. the visibility state
16666is not set, the tables are not re-aligned, etc."
16667 :type 'boolean
16668 :version "24.3"
16669 :group 'org-agenda)
16670
16665(defun org-duration-string-to-minutes (s &optional output-to-string) 16671(defun org-duration-string-to-minutes (s &optional output-to-string)
16666 "Convert a duration string S to minutes. 16672 "Convert a duration string S to minutes.
16667 16673
@@ -17001,6 +17007,7 @@ When a buffer is unmodified, it is just killed. When modified, it is saved
17001 (pc '(:org-comment t)) 17007 (pc '(:org-comment t))
17002 (pall '(:org-archived t :org-comment t)) 17008 (pall '(:org-archived t :org-comment t))
17003 (inhibit-read-only t) 17009 (inhibit-read-only t)
17010 (org-inhibit-startup org-agenda-inhibit-startup)
17004 (rea (concat ":" org-archive-tag ":")) 17011 (rea (concat ":" org-archive-tag ":"))
17005 bmp file re) 17012 bmp file re)
17006 (save-excursion 17013 (save-excursion
@@ -20984,58 +20991,62 @@ hierarchy of headlines by UP levels before marking the subtree."
20984 20991
20985(declare-function message-in-body-p "message" ()) 20992(declare-function message-in-body-p "message" ())
20986(defvar org-element--affiliated-re) ; From org-element.el 20993(defvar org-element--affiliated-re) ; From org-element.el
20994(defvar orgtbl-line-start-regexp) ; From org-table.el
20987(defun org-adaptive-fill-function () 20995(defun org-adaptive-fill-function ()
20988 "Compute a fill prefix for the current line. 20996 "Compute a fill prefix for the current line.
20989Return fill prefix, as a string, or nil if current line isn't 20997Return fill prefix, as a string, or nil if current line isn't
20990meant to be filled." 20998meant to be filled."
20991 (let (prefix) 20999 (let (prefix)
20992 (when (and (derived-mode-p 'message-mode) (message-in-body-p)) 21000 (catch 'exit
20993 (save-excursion 21001 (when (derived-mode-p 'message-mode)
20994 (beginning-of-line) 21002 (save-excursion
20995 (cond ((looking-at message-cite-prefix-regexp) 21003 (beginning-of-line)
20996 (setq prefix (match-string-no-properties 0))) 21004 (cond ((or (not (message-in-body-p))
20997 ((looking-at org-outline-regexp) 21005 (looking-at orgtbl-line-start-regexp))
20998 (setq prefix ""))))) 21006 (throw 'exit nil))
20999 (or prefix 21007 ((looking-at message-cite-prefix-regexp)
21000 (org-with-wide-buffer 21008 (throw 'exit (match-string-no-properties 0)))
21001 (let* ((p (line-beginning-position)) 21009 ((looking-at org-outline-regexp)
21002 (element (save-excursion (beginning-of-line) (org-element-at-point))) 21010 (throw 'exit (make-string (length (match-string 0)) ? ))))))
21003 (type (org-element-type element)) 21011 (org-with-wide-buffer
21004 (post-affiliated 21012 (let* ((p (line-beginning-position))
21005 (save-excursion 21013 (element (save-excursion (beginning-of-line) (org-element-at-point)))
21006 (goto-char (org-element-property :begin element)) 21014 (type (org-element-type element))
21007 (while (looking-at org-element--affiliated-re) (forward-line)) 21015 (post-affiliated
21008 (point)))) 21016 (save-excursion
21009 (unless (< p post-affiliated) 21017 (goto-char (org-element-property :begin element))
21010 (case type 21018 (while (looking-at org-element--affiliated-re) (forward-line))
21011 (comment (looking-at "[ \t]*# ?") (match-string 0)) 21019 (point))))
21012 (footnote-definition "") 21020 (unless (< p post-affiliated)
21013 ((item plain-list) 21021 (case type
21014 (make-string (org-list-item-body-column post-affiliated) ? )) 21022 (comment (looking-at "[ \t]*# ?") (match-string 0))
21015 (paragraph 21023 (footnote-definition "")
21016 ;; Fill prefix is usually the same as the current line, 21024 ((item plain-list)
21017 ;; except if the paragraph is at the beginning of an item. 21025 (make-string (org-list-item-body-column post-affiliated) ? ))
21018 (let ((parent (org-element-property :parent element))) 21026 (paragraph
21019 (cond ((eq (org-element-type parent) 'item) 21027 ;; Fill prefix is usually the same as the current line,
21020 (make-string (org-list-item-body-column 21028 ;; except if the paragraph is at the beginning of an item.
21021 (org-element-property :begin parent)) 21029 (let ((parent (org-element-property :parent element)))
21022 ? )) 21030 (cond ((eq (org-element-type parent) 'item)
21023 ((save-excursion (beginning-of-line) (looking-at "[ \t]+")) 21031 (make-string (org-list-item-body-column
21024 (match-string 0)) 21032 (org-element-property :begin parent))
21025 (t "")))) 21033 ? ))
21026 (comment-block 21034 ((save-excursion (beginning-of-line) (looking-at "[ \t]+"))
21027 ;; Only fill contents if P is within block boundaries. 21035 (match-string 0))
21028 (let* ((cbeg (save-excursion (goto-char post-affiliated) 21036 (t ""))))
21029 (forward-line) 21037 (comment-block
21030 (point))) 21038 ;; Only fill contents if P is within block boundaries.
21031 (cend (save-excursion 21039 (let* ((cbeg (save-excursion (goto-char post-affiliated)
21032 (goto-char (org-element-property :end element)) 21040 (forward-line)
21033 (skip-chars-backward " \r\t\n") 21041 (point)))
21034 (line-beginning-position)))) 21042 (cend (save-excursion
21035 (when (and (>= p cbeg) (< p cend)) 21043 (goto-char (org-element-property :end element))
21036 (if (save-excursion (beginning-of-line) (looking-at "[ \t]+")) 21044 (skip-chars-backward " \r\t\n")
21037 (match-string 0) 21045 (line-beginning-position))))
21038 ""))))))))))) 21046 (when (and (>= p cbeg) (< p cend))
21047 (if (save-excursion (beginning-of-line) (looking-at "[ \t]+"))
21048 (match-string 0)
21049 "")))))))))))
21039 21050
21040(declare-function message-goto-body "message" ()) 21051(declare-function message-goto-body "message" ())
21041(defvar message-cite-prefix-regexp) ; From message.el 21052(defvar message-cite-prefix-regexp) ; From message.el
diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el
index d4e4d6de483..977bc755e32 100644
--- a/lisp/progmodes/cc-engine.el
+++ b/lisp/progmodes/cc-engine.el
@@ -2477,20 +2477,6 @@ comment at the start of cc-engine.el for more info."
2477 2477
2478;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 2478;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2479;; Defuns which analyze the buffer, yet don't change `c-state-cache'. 2479;; Defuns which analyze the buffer, yet don't change `c-state-cache'.
2480(defun c-get-fallback-scan-pos (here)
2481 ;; Return a start position for building `c-state-cache' from
2482 ;; scratch. This will be at the top level, 2 defuns back.
2483 (save-excursion
2484 ;; Go back 2 bods, but ignore any bogus positions returned by
2485 ;; beginning-of-defun (i.e. open paren in column zero).
2486 (goto-char here)
2487 (let ((cnt 2))
2488 (while (not (or (bobp) (zerop cnt)))
2489 (c-beginning-of-defun-1) ; Pure elisp BOD.
2490 (if (eq (char-after) ?\{)
2491 (setq cnt (1- cnt)))))
2492 (point)))
2493
2494(defun c-state-balance-parens-backwards (here- here+ top) 2480(defun c-state-balance-parens-backwards (here- here+ top)
2495 ;; Return the position of the opening paren/brace/bracket before HERE- which 2481 ;; Return the position of the opening paren/brace/bracket before HERE- which
2496 ;; matches the outermost close p/b/b between HERE+ and TOP. Except when 2482 ;; matches the outermost close p/b/b between HERE+ and TOP. Except when
@@ -2548,47 +2534,23 @@ comment at the start of cc-engine.el for more info."
2548 ;; o - ('forward START-POINT) - scan forward from START-POINT, 2534 ;; o - ('forward START-POINT) - scan forward from START-POINT,
2549 ;; which is not less than the highest position in `c-state-cache' below here. 2535 ;; which is not less than the highest position in `c-state-cache' below here.
2550 ;; o - ('backward nil) - scan backwards (from HERE). 2536 ;; o - ('backward nil) - scan backwards (from HERE).
2551 ;; o - ('BOD START-POINT) - scan forwards from START-POINT, which is at the
2552 ;; top level.
2553 ;; o - ('IN-LIT nil) - point is inside the literal containing point-min. 2537 ;; o - ('IN-LIT nil) - point is inside the literal containing point-min.
2554 (let ((cache-pos (c-get-cache-scan-pos here)) ; highest position below HERE in cache (or 1) 2538 (let ((cache-pos (c-get-cache-scan-pos here)) ; highest position below HERE in cache (or 1)
2555 BOD-pos ; position of 2nd BOD before HERE. 2539 strategy ; 'forward, 'backward, or 'IN-LIT.
2556 strategy ; 'forward, 'backward, 'BOD, or 'IN-LIT. 2540 start-point)
2557 start-point
2558 how-far) ; putative scanning distance.
2559 (setq good-pos (or good-pos (c-state-get-min-scan-pos))) 2541 (setq good-pos (or good-pos (c-state-get-min-scan-pos)))
2560 (cond 2542 (cond
2561 ((< here (c-state-get-min-scan-pos)) 2543 ((< here (c-state-get-min-scan-pos))
2562 (setq strategy 'IN-LIT 2544 (setq strategy 'IN-LIT))
2563 start-point nil
2564 cache-pos nil
2565 how-far 0))
2566 ((<= good-pos here) 2545 ((<= good-pos here)
2567 (setq strategy 'forward 2546 (setq strategy 'forward
2568 start-point (max good-pos cache-pos) 2547 start-point (max good-pos cache-pos)))
2569 how-far (- here start-point)))
2570 ((< (- good-pos here) (- here cache-pos)) ; FIXME!!! ; apply some sort of weighting. 2548 ((< (- good-pos here) (- here cache-pos)) ; FIXME!!! ; apply some sort of weighting.
2571 (setq strategy 'backward 2549 (setq strategy 'backward))
2572 how-far (- good-pos here)))
2573 (t 2550 (t
2574 (setq strategy 'forward 2551 (setq strategy 'forward
2575 how-far (- here cache-pos) 2552 start-point cache-pos)))
2576 start-point cache-pos))) 2553 (list strategy (and (eq strategy 'forward) start-point))))
2577
2578 ;; Might we be better off starting from the top level, two defuns back,
2579 ;; instead? This heuristic no longer works well in C++, where
2580 ;; declarations inside namespace brace blocks are frequently placed at
2581 ;; column zero.
2582 (when (and (not (c-major-mode-is 'c++-mode))
2583 (> how-far c-state-cache-too-far))
2584 (setq BOD-pos (c-get-fallback-scan-pos here)) ; somewhat EXPENSIVE!!!
2585 (if (< (- here BOD-pos) how-far)
2586 (setq strategy 'BOD
2587 start-point BOD-pos)))
2588
2589 (list
2590 strategy
2591 (and (memq strategy '(forward BOD)) start-point))))
2592 2554
2593 2555
2594;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 2556;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@@ -2630,7 +2592,7 @@ comment at the start of cc-engine.el for more info."
2630 2592
2631 (setq c-state-point-min (point-min))) 2593 (setq c-state-point-min (point-min)))
2632 2594
2633(defun c-append-lower-brace-pair-to-state-cache (from &optional upper-lim) 2595(defun c-append-lower-brace-pair-to-state-cache (from here &optional upper-lim)
2634 ;; If there is a brace pair preceding FROM in the buffer, at the same level 2596 ;; If there is a brace pair preceding FROM in the buffer, at the same level
2635 ;; of nesting (not necessarily immediately preceding), push a cons onto 2597 ;; of nesting (not necessarily immediately preceding), push a cons onto
2636 ;; `c-state-cache' to represent it. FROM must not be inside a literal. If 2598 ;; `c-state-cache' to represent it. FROM must not be inside a literal. If
@@ -2654,8 +2616,7 @@ comment at the start of cc-engine.el for more info."
2654 ;; reduce the time wasted in repeated fruitless searches in brace deserts. 2616 ;; reduce the time wasted in repeated fruitless searches in brace deserts.
2655 (save-excursion 2617 (save-excursion
2656 (save-restriction 2618 (save-restriction
2657 (let* ((here (point-max)) 2619 (let* (new-cons
2658 new-cons
2659 (cache-pos (c-state-cache-top-lparen)) ; might be nil. 2620 (cache-pos (c-state-cache-top-lparen)) ; might be nil.
2660 (macro-start-or-from 2621 (macro-start-or-from
2661 (progn (goto-char from) 2622 (progn (goto-char from)
@@ -2690,7 +2651,6 @@ comment at the start of cc-engine.el for more info."
2690 ;; search bound, even though the algorithm below would skip 2651 ;; search bound, even though the algorithm below would skip
2691 ;; over the new paren pair. 2652 ;; over the new paren pair.
2692 (cache-lim (and cache-pos (< cache-pos from) cache-pos))) 2653 (cache-lim (and cache-pos (< cache-pos from) cache-pos)))
2693 (widen)
2694 (narrow-to-region 2654 (narrow-to-region
2695 (cond 2655 (cond
2696 ((and desert-lim cache-lim) 2656 ((and desert-lim cache-lim)
@@ -2698,7 +2658,9 @@ comment at the start of cc-engine.el for more info."
2698 (desert-lim) 2658 (desert-lim)
2699 (cache-lim) 2659 (cache-lim)
2700 ((point-min))) 2660 ((point-min)))
2701 (point-max))) 2661 ;; The top limit is EOB to ensure that `bra' is inside the
2662 ;; accessible part of the buffer at the next scan operation.
2663 (1+ (buffer-size))))
2702 2664
2703 ;; In the next pair of nested loops, the inner one moves back past a 2665 ;; In the next pair of nested loops, the inner one moves back past a
2704 ;; pair of (mis-)matching parens or brackets; the outer one moves 2666 ;; pair of (mis-)matching parens or brackets; the outer one moves
@@ -2765,25 +2727,24 @@ comment at the start of cc-engine.el for more info."
2765 (if (consp (car c-state-cache)) 2727 (if (consp (car c-state-cache))
2766 (cdr c-state-cache) 2728 (cdr c-state-cache)
2767 c-state-cache))) 2729 c-state-cache)))
2768 ;; N.B. This defsubst codes one method for the simple, normal case, 2730 ;; N.B. This defsubst codes one method for the simple, normal case,
2769 ;; and a more sophisticated, slower way for the general case. Don't 2731 ;; and a more sophisticated, slower way for the general case. Don't
2770 ;; eliminate this defsubst - it's a speed optimization. 2732 ;; eliminate this defsubst - it's a speed optimization.
2771 (c-append-lower-brace-pair-to-state-cache (1- bra+1))))) 2733 (c-append-lower-brace-pair-to-state-cache (1- bra+1) (point-max)))))
2772 2734
2773(defun c-append-to-state-cache (from) 2735(defun c-append-to-state-cache (from here)
2774 ;; Scan the buffer from FROM to (point-max), adding elements into 2736 ;; Scan the buffer from FROM to HERE, adding elements into `c-state-cache'
2775 ;; `c-state-cache' for braces etc. Return a candidate for 2737 ;; for braces etc. Return a candidate for `c-state-cache-good-pos'.
2776 ;; `c-state-cache-good-pos'.
2777 ;; 2738 ;;
2778 ;; FROM must be after the latest brace/paren/bracket in `c-state-cache', if 2739 ;; FROM must be after the latest brace/paren/bracket in `c-state-cache', if
2779 ;; any. Typically, it is immediately after it. It must not be inside a 2740 ;; any. Typically, it is immediately after it. It must not be inside a
2780 ;; literal. 2741 ;; literal.
2781 (let ((here-bol (c-point 'bol (point-max))) 2742 (let ((here-bol (c-point 'bol here))
2782 (macro-start-or-here 2743 (macro-start-or-here
2783 (save-excursion (goto-char (point-max)) 2744 (save-excursion (goto-char here)
2784 (if (c-beginning-of-macro) 2745 (if (c-beginning-of-macro)
2785 (point) 2746 (point)
2786 (point-max)))) 2747 here)))
2787 pa+1 ; pos just after an opening PAren (or brace). 2748 pa+1 ; pos just after an opening PAren (or brace).
2788 (ren+1 from) ; usually a pos just after an closing paREN etc. 2749 (ren+1 from) ; usually a pos just after an closing paREN etc.
2789 ; Is actually the pos. to scan for a (/{/[ from, 2750 ; Is actually the pos. to scan for a (/{/[ from,
@@ -2796,75 +2757,77 @@ comment at the start of cc-engine.el for more info."
2796 mstart) ; start of a macro. 2757 mstart) ; start of a macro.
2797 2758
2798 (save-excursion 2759 (save-excursion
2799 ;; Each time round the following loop, we enter a successively deeper 2760 (save-restriction
2800 ;; level of brace/paren nesting. (Except sometimes we "continue at 2761 (narrow-to-region (point-min) here)
2801 ;; the existing level".) `pa+1' is a pos inside an opening 2762 ;; Each time round the following loop, we enter a successively deeper
2802 ;; brace/paren/bracket, usually just after it. 2763 ;; level of brace/paren nesting. (Except sometimes we "continue at
2803 (while 2764 ;; the existing level".) `pa+1' is a pos inside an opening
2804 (progn 2765 ;; brace/paren/bracket, usually just after it.
2805 ;; Each time round the next loop moves forward over an opening then 2766 (while
2806 ;; a closing brace/bracket/paren. This loop is white hot, so it 2767 (progn
2807 ;; plays ugly tricks to go fast. DON'T PUT ANYTHING INTO THIS 2768 ;; Each time round the next loop moves forward over an opening then
2808 ;; LOOP WHICH ISN'T ABSOLUTELY NECESSARY!!! It terminates when a 2769 ;; a closing brace/bracket/paren. This loop is white hot, so it
2809 ;; call of `scan-lists' signals an error, which happens when there 2770 ;; plays ugly tricks to go fast. DON'T PUT ANYTHING INTO THIS
2810 ;; are no more b/b/p's to scan. 2771 ;; LOOP WHICH ISN'T ABSOLUTELY NECESSARY!!! It terminates when a
2811 (c-safe 2772 ;; call of `scan-lists' signals an error, which happens when there
2812 (while t 2773 ;; are no more b/b/p's to scan.
2813 (setq pa+1 (scan-lists ren+1 1 -1) ; Into (/{/[; might signal 2774 (c-safe
2814 paren+1s (cons pa+1 paren+1s)) 2775 (while t
2815 (setq ren+1 (scan-lists pa+1 1 1)) ; Out of )/}/]; might signal 2776 (setq pa+1 (scan-lists ren+1 1 -1) ; Into (/{/[; might signal
2816 (if (and (eq (char-before pa+1) ?{)) ; Check for a macro later. 2777 paren+1s (cons pa+1 paren+1s))
2817 (setq bra+1 pa+1)) 2778 (setq ren+1 (scan-lists pa+1 1 1)) ; Out of )/}/]; might signal
2818 (setcar paren+1s ren+1))) 2779 (if (and (eq (char-before pa+1) ?{)) ; Check for a macro later.
2819 2780 (setq bra+1 pa+1))
2820 (if (and pa+1 (> pa+1 ren+1)) 2781 (setcar paren+1s ren+1)))
2821 ;; We've just entered a deeper nesting level. 2782
2822 (progn 2783 (if (and pa+1 (> pa+1 ren+1))
2823 ;; Insert the brace pair (if present) and the single open 2784 ;; We've just entered a deeper nesting level.
2824 ;; paren/brace/bracket into `c-state-cache' It cannot be 2785 (progn
2825 ;; inside a macro, except one around point, because of what 2786 ;; Insert the brace pair (if present) and the single open
2826 ;; `c-neutralize-syntax-in-CPP' has done. 2787 ;; paren/brace/bracket into `c-state-cache' It cannot be
2827 (c-state-push-any-brace-pair bra+1 macro-start-or-here) 2788 ;; inside a macro, except one around point, because of what
2828 ;; Insert the opening brace/bracket/paren position. 2789 ;; `c-neutralize-syntax-in-CPP' has done.
2829 (setq c-state-cache (cons (1- pa+1) c-state-cache)) 2790 (c-state-push-any-brace-pair bra+1 macro-start-or-here)
2830 ;; Clear admin stuff for the next more nested part of the scan. 2791 ;; Insert the opening brace/bracket/paren position.
2831 (setq ren+1 pa+1 pa+1 nil bra+1 nil bra+1s nil) 2792 (setq c-state-cache (cons (1- pa+1) c-state-cache))
2832 t) ; Carry on the loop 2793 ;; Clear admin stuff for the next more nested part of the scan.
2833 2794 (setq ren+1 pa+1 pa+1 nil bra+1 nil bra+1s nil)
2834 ;; All open p/b/b's at this nesting level, if any, have probably 2795 t) ; Carry on the loop
2835 ;; been closed by matching/mismatching ones. We're probably 2796
2836 ;; finished - we just need to check for having found an 2797 ;; All open p/b/b's at this nesting level, if any, have probably
2837 ;; unmatched )/}/], which we ignore. Such a )/}/] can't be in a 2798 ;; been closed by matching/mismatching ones. We're probably
2838 ;; macro, due the action of `c-neutralize-syntax-in-CPP'. 2799 ;; finished - we just need to check for having found an
2839 (c-safe (setq ren+1 (scan-lists ren+1 1 1)))))) ; acts as loop control. 2800 ;; unmatched )/}/], which we ignore. Such a )/}/] can't be in a
2840 2801 ;; macro, due the action of `c-neutralize-syntax-in-CPP'.
2841 ;; Record the final, innermost, brace-pair if there is one. 2802 (c-safe (setq ren+1 (scan-lists ren+1 1 1)))))) ; acts as loop control.
2842 (c-state-push-any-brace-pair bra+1 macro-start-or-here) 2803
2843 2804 ;; Record the final, innermost, brace-pair if there is one.
2844 ;; Determine a good pos 2805 (c-state-push-any-brace-pair bra+1 macro-start-or-here)
2845 (while (and (setq paren+1 (car paren+1s)) 2806
2846 (> (if (> paren+1 macro-start-or-here) 2807 ;; Determine a good pos
2847 paren+1 2808 (while (and (setq paren+1 (car paren+1s))
2848 (goto-char paren+1) 2809 (> (if (> paren+1 macro-start-or-here)
2849 (setq mstart (and (c-beginning-of-macro) 2810 paren+1
2850 (point))) 2811 (goto-char paren+1)
2851 (or mstart paren+1)) 2812 (setq mstart (and (c-beginning-of-macro)
2852 here-bol)) 2813 (point)))
2853 (setq paren+1s (cdr paren+1s))) 2814 (or mstart paren+1))
2854 (cond 2815 here-bol))
2855 ((and paren+1 mstart) 2816 (setq paren+1s (cdr paren+1s)))
2856 (min paren+1 mstart)) 2817 (cond
2857 (paren+1) 2818 ((and paren+1 mstart)
2858 (t from))))) 2819 (min paren+1 mstart))
2820 (paren+1)
2821 (t from))))))
2859 2822
2860(defun c-remove-stale-state-cache (start-point pps-point) 2823(defun c-remove-stale-state-cache (start-point here pps-point)
2861 ;; Remove stale entries from the `c-cache-state', i.e. those which will 2824 ;; Remove stale entries from the `c-cache-state', i.e. those which will
2862 ;; not be in it when it is amended for position (point-max). 2825 ;; not be in it when it is amended for position HERE. Additionally, the
2863 ;; Additionally, the "outermost" open-brace entry before (point-max) 2826 ;; "outermost" open-brace entry before HERE will be converted to a cons if
2864 ;; will be converted to a cons if the matching close-brace is scanned. 2827 ;; the matching close-brace is scanned.
2865 ;; 2828 ;;
2866 ;; START-POINT is a "maximal" "safe position" - there must be no open 2829 ;; START-POINT is a "maximal" "safe position" - there must be no open
2867 ;; parens/braces/brackets between START-POINT and (point-max). 2830 ;; parens/braces/brackets between START-POINT and HERE.
2868 ;; 2831 ;;
2869 ;; As a second thing, calculate the result of parse-partial-sexp at 2832 ;; As a second thing, calculate the result of parse-partial-sexp at
2870 ;; PPS-POINT, w.r.t. START-POINT. The motivation here is that 2833 ;; PPS-POINT, w.r.t. START-POINT. The motivation here is that
@@ -2881,23 +2844,23 @@ comment at the start of cc-engine.el for more info."
2881 ;; last element to be removed from `c-state-cache', when that elt is a 2844 ;; last element to be removed from `c-state-cache', when that elt is a
2882 ;; cons, otherwise nil. 2845 ;; cons, otherwise nil.
2883 ;; o - PPS-STATE is the parse-partial-sexp state at PPS-POINT. 2846 ;; o - PPS-STATE is the parse-partial-sexp state at PPS-POINT.
2884 (save-restriction 2847 (save-excursion
2885 (narrow-to-region 1 (point-max)) 2848 (save-restriction
2886 (save-excursion 2849 (narrow-to-region 1 (point-max))
2887 (let* ((in-macro-start ; start of macro containing (point-max) or nil. 2850 (let* ((in-macro-start ; start of macro containing HERE or nil.
2888 (save-excursion 2851 (save-excursion
2889 (goto-char (point-max)) 2852 (goto-char here)
2890 (and (c-beginning-of-macro) 2853 (and (c-beginning-of-macro)
2891 (point)))) 2854 (point))))
2892 (start-point-actual-macro-start ; Start of macro containing 2855 (start-point-actual-macro-start ; Start of macro containing
2893 ; start-point or nil 2856 ; start-point or nil
2894 (and (< start-point (point-max)) 2857 (and (< start-point here)
2895 (save-excursion 2858 (save-excursion
2896 (goto-char start-point) 2859 (goto-char start-point)
2897 (and (c-beginning-of-macro) 2860 (and (c-beginning-of-macro)
2898 (point))))) 2861 (point)))))
2899 (start-point-actual-macro-end ; End of this macro, (maybe 2862 (start-point-actual-macro-end ; End of this macro, (maybe
2900 ; (point-max)), or nil. 2863 ; HERE), or nil.
2901 (and start-point-actual-macro-start 2864 (and start-point-actual-macro-start
2902 (save-excursion 2865 (save-excursion
2903 (goto-char start-point-actual-macro-start) 2866 (goto-char start-point-actual-macro-start)
@@ -2909,14 +2872,14 @@ comment at the start of cc-engine.el for more info."
2909 scan-back-pos 2872 scan-back-pos
2910 pair-beg pps-point-state target-depth) 2873 pair-beg pps-point-state target-depth)
2911 2874
2912 ;; Remove entries beyond (point-max). Also remove any entries inside 2875 ;; Remove entries beyond HERE. Also remove any entries inside
2913 ;; a macro, unless (point-max) is in the same macro. 2876 ;; a macro, unless HERE is in the same macro.
2914 (setq upper-lim 2877 (setq upper-lim
2915 (if (or (null c-state-old-cpp-beg) 2878 (if (or (null c-state-old-cpp-beg)
2916 (and (> (point-max) c-state-old-cpp-beg) 2879 (and (> here c-state-old-cpp-beg)
2917 (< (point-max) c-state-old-cpp-end))) 2880 (< here c-state-old-cpp-end)))
2918 (point-max) 2881 here
2919 (min (point-max) c-state-old-cpp-beg))) 2882 (min here c-state-old-cpp-beg)))
2920 (while (and c-state-cache (>= (c-state-cache-top-lparen) upper-lim)) 2883 (while (and c-state-cache (>= (c-state-cache-top-lparen) upper-lim))
2921 (setq scan-back-pos (car-safe (car c-state-cache))) 2884 (setq scan-back-pos (car-safe (car c-state-cache)))
2922 (setq c-state-cache (cdr c-state-cache))) 2885 (setq c-state-cache (cdr c-state-cache)))
@@ -2934,7 +2897,7 @@ comment at the start of cc-engine.el for more info."
2934 ;; time round; the corresponding elements in `c-state-cache' are 2897 ;; time round; the corresponding elements in `c-state-cache' are
2935 ;; removed. `pos' is just after the brace-pair or the open paren at 2898 ;; removed. `pos' is just after the brace-pair or the open paren at
2936 ;; (car c-state-cache). There can be no open parens/braces/brackets 2899 ;; (car c-state-cache). There can be no open parens/braces/brackets
2937 ;; between `start-point'/`start-point-actual-macro-start' and (point-max), 2900 ;; between `start-point'/`start-point-actual-macro-start' and HERE,
2938 ;; due to the interface spec to this function. 2901 ;; due to the interface spec to this function.
2939 (setq pos (if (and start-point-actual-macro-end 2902 (setq pos (if (and start-point-actual-macro-end
2940 (not (eq start-point-actual-macro-start 2903 (not (eq start-point-actual-macro-start
@@ -2944,7 +2907,9 @@ comment at the start of cc-engine.el for more info."
2944 start-point)) 2907 start-point))
2945 (goto-char pos) 2908 (goto-char pos)
2946 (while (and c-state-cache 2909 (while (and c-state-cache
2947 (< (point) (point-max))) 2910 (or (numberp (car c-state-cache)) ; Have we a { at all?
2911 (cdr c-state-cache))
2912 (< (point) here))
2948 (cond 2913 (cond
2949 ((null pps-state) ; first time through 2914 ((null pps-state) ; first time through
2950 (setq target-depth -1)) 2915 (setq target-depth -1))
@@ -2956,7 +2921,7 @@ comment at the start of cc-engine.el for more info."
2956 ;; Scan! 2921 ;; Scan!
2957 (setq pps-state 2922 (setq pps-state
2958 (parse-partial-sexp 2923 (parse-partial-sexp
2959 (point) (if (< (point) pps-point) pps-point (point-max)) 2924 (point) (if (< (point) pps-point) pps-point here)
2960 target-depth 2925 target-depth
2961 nil pps-state)) 2926 nil pps-state))
2962 2927
@@ -3209,7 +3174,7 @@ comment at the start of cc-engine.el for more info."
3209 ;; Do we need to add in an earlier brace pair, having lopped one off? 3174 ;; Do we need to add in an earlier brace pair, having lopped one off?
3210 (if (and dropped-cons 3175 (if (and dropped-cons
3211 (< too-high-pa (+ here c-state-cache-too-far))) 3176 (< too-high-pa (+ here c-state-cache-too-far)))
3212 (c-append-lower-brace-pair-to-state-cache too-high-pa here-bol)) 3177 (c-append-lower-brace-pair-to-state-cache too-high-pa here here-bol))
3213 (setq c-state-cache-good-pos (or (c-state-cache-after-top-paren) 3178 (setq c-state-cache-good-pos (or (c-state-cache-after-top-paren)
3214 (c-state-get-min-scan-pos))))) 3179 (c-state-get-min-scan-pos)))))
3215 3180
@@ -3285,47 +3250,39 @@ comment at the start of cc-engine.el for more info."
3285 strategy (car res) 3250 strategy (car res)
3286 start-point (cadr res)) 3251 start-point (cadr res))
3287 3252
3288 (when (eq strategy 'BOD)
3289 (setq c-state-cache nil
3290 c-state-cache-good-pos start-point))
3291
3292 ;; SCAN! 3253 ;; SCAN!
3293 (save-restriction 3254 (cond
3294 (cond 3255 ((eq strategy 'forward)
3295 ((memq strategy '(forward BOD)) 3256 (setq res (c-remove-stale-state-cache start-point here here-bopl))
3296 (narrow-to-region (point-min) here) 3257 (setq cache-pos (car res)
3297 (setq res (c-remove-stale-state-cache start-point here-bopl)) 3258 scan-backward-pos (cadr res)
3298 (setq cache-pos (car res) 3259 bopl-state (car (cddr res))) ; will be nil if (< here-bopl
3299 scan-backward-pos (cadr res)
3300 bopl-state (car (cddr res))) ; will be nil if (< here-bopl
3301 ; start-point) 3260 ; start-point)
3302 (if scan-backward-pos 3261 (if scan-backward-pos
3303 (c-append-lower-brace-pair-to-state-cache scan-backward-pos)) 3262 (c-append-lower-brace-pair-to-state-cache scan-backward-pos here))
3304 (setq good-pos 3263 (setq good-pos
3305 (c-append-to-state-cache cache-pos)) 3264 (c-append-to-state-cache cache-pos here))
3306 (setq c-state-cache-good-pos 3265 (setq c-state-cache-good-pos
3307 (if (and bopl-state 3266 (if (and bopl-state
3308 (< good-pos (- here c-state-cache-too-far))) 3267 (< good-pos (- here c-state-cache-too-far)))
3309 (c-state-cache-non-literal-place here-bopl bopl-state) 3268 (c-state-cache-non-literal-place here-bopl bopl-state)
3310 good-pos))) 3269 good-pos)))
3311 3270
3312 ((eq strategy 'backward) 3271 ((eq strategy 'backward)
3313 (setq res (c-remove-stale-state-cache-backwards here) 3272 (setq res (c-remove-stale-state-cache-backwards here)
3314 good-pos (car res) 3273 good-pos (car res)
3315 scan-backward-pos (cadr res) 3274 scan-backward-pos (cadr res)
3316 scan-forward-p (car (cddr res))) 3275 scan-forward-p (car (cddr res)))
3317 (if scan-backward-pos 3276 (if scan-backward-pos
3318 (c-append-lower-brace-pair-to-state-cache 3277 (c-append-lower-brace-pair-to-state-cache scan-backward-pos here))
3319 scan-backward-pos)) 3278 (setq c-state-cache-good-pos
3320 (setq c-state-cache-good-pos 3279 (if scan-forward-p
3321 (if scan-forward-p 3280 (c-append-to-state-cache good-pos here)
3322 (progn (narrow-to-region (point-min) here) 3281 good-pos)))
3323 (c-append-to-state-cache good-pos)) 3282
3324 good-pos))) 3283 (t ; (eq strategy 'IN-LIT)
3325 3284 (setq c-state-cache nil
3326 (t ; (eq strategy 'IN-LIT) 3285 c-state-cache-good-pos nil))))
3327 (setq c-state-cache nil
3328 c-state-cache-good-pos nil)))))
3329 3286
3330 c-state-cache) 3287 c-state-cache)
3331 3288
diff --git a/lisp/vc/vc-hooks.el b/lisp/vc/vc-hooks.el
index 818b37b3c34..5c8a4515b7e 100644
--- a/lisp/vc/vc-hooks.el
+++ b/lisp/vc/vc-hooks.el
@@ -858,8 +858,10 @@ current, and kill the buffer that visits the link."
858 (set (make-local-variable 'backup-inhibited) t)) 858 (set (make-local-variable 'backup-inhibited) t))
859 ;; Let the backend setup any buffer-local things he needs. 859 ;; Let the backend setup any buffer-local things he needs.
860 (vc-call-backend backend 'find-file-hook)) 860 (vc-call-backend backend 'find-file-hook))
861 ((let* ((truename (expand-file-name buffer-file-truename)) 861 ((let* ((truename (and buffer-file-truename
862 (link-type (and (not (equal buffer-file-name truename)) 862 (expand-file-name buffer-file-truename)))
863 (link-type (and truename
864 (not (equal buffer-file-name truename))
863 (vc-backend truename)))) 865 (vc-backend truename))))
864 (cond ((not link-type) nil) ;Nothing to do. 866 (cond ((not link-type) nil) ;Nothing to do.
865 ((eq vc-follow-symlinks nil) 867 ((eq vc-follow-symlinks nil)
diff --git a/nt/INSTALL b/nt/INSTALL
index 487e5ec0bf8..0c4b50f0c28 100644
--- a/nt/INSTALL
+++ b/nt/INSTALL
@@ -110,12 +110,14 @@
110 WinZip is known to create some subtle and hard to debug problems, 110 WinZip is known to create some subtle and hard to debug problems,
111 such as converting files to DOS CR-LF format, not creating empty 111 such as converting files to DOS CR-LF format, not creating empty
112 directories, etc. We suggest to use djtarnt.exe from the GNU FTP 112 directories, etc. We suggest to use djtarnt.exe from the GNU FTP
113 site. 113 site. For modern formats, such as .tar.xz, we suggest bsdtar.exe
114 from the libarchive package; its precompiled Windows binaries are
115 available from this site:
116
117 http://sourceforge.net/projects/ezwinports/files/
114 118
115 In addition to this file, you should also read INSTALL.BZR in the 119 In addition to this file, if you build a development snapshot, you
116 parent directory, and make sure that you have a version of 120 should also read INSTALL.BZR in the parent directory.
117 "touch.exe" in your path, and that it will create files that do not
118 yet exist.
119 121
120* Supported development environments 122* Supported development environments
121 123
diff --git a/src/ChangeLog b/src/ChangeLog
index dc0ae082ae9..9ffe133e758 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,11 @@
12013-02-07 Dmitry Antipov <dmantipov@yandex.ru>
2
3 * coding.c (Fdefine_coding_system_internal): Use AREF where
4 argument is known to be a vector.
5 * fns.c (Flocale_info): Likewise for ASET.
6 * xselect.c (selection_data_to_lisp_data): Likewise for ASET.
7 * w32fns.c (w32_parse_hot_key): Likewise for ASIZE and AREF.
8
12013-02-05 Jan Djärv <jan.h.d@swipnet.se> 92013-02-05 Jan Djärv <jan.h.d@swipnet.se>
2 10
3 * nsmenu.m (update_frame_tool_bar): Check for negative tool bar 11 * nsmenu.m (update_frame_tool_bar): Check for negative tool bar
diff --git a/src/coding.c b/src/coding.c
index 93da9db0d36..c7bfe25e0cc 100644
--- a/src/coding.c
+++ b/src/coding.c
@@ -9783,7 +9783,7 @@ usage: (define-coding-system-internal ...) */)
9783 CHECK_VECTOR (initial); 9783 CHECK_VECTOR (initial);
9784 for (i = 0; i < 4; i++) 9784 for (i = 0; i < 4; i++)
9785 { 9785 {
9786 val = Faref (initial, make_number (i)); 9786 val = AREF (initial, i);
9787 if (! NILP (val)) 9787 if (! NILP (val))
9788 { 9788 {
9789 struct charset *charset; 9789 struct charset *charset;
diff --git a/src/fns.c b/src/fns.c
index 860d295d5a0..ecd1a31335a 100644
--- a/src/fns.c
+++ b/src/fns.c
@@ -2807,9 +2807,8 @@ The data read from the system are decoded using `locale-coding-system'. */)
2807 val = build_unibyte_string (str); 2807 val = build_unibyte_string (str);
2808 /* Fixme: Is this coding system necessarily right, even if 2808 /* Fixme: Is this coding system necessarily right, even if
2809 it is consistent with CODESET? If not, what to do? */ 2809 it is consistent with CODESET? If not, what to do? */
2810 Faset (v, make_number (i), 2810 ASET (v, i, code_convert_string_norecord (val, Vlocale_coding_system,
2811 code_convert_string_norecord (val, Vlocale_coding_system, 2811 0));
2812 0));
2813 } 2812 }
2814 UNGCPRO; 2813 UNGCPRO;
2815 return v; 2814 return v;
@@ -2829,8 +2828,8 @@ The data read from the system are decoded using `locale-coding-system'. */)
2829 { 2828 {
2830 str = nl_langinfo (months[i]); 2829 str = nl_langinfo (months[i]);
2831 val = build_unibyte_string (str); 2830 val = build_unibyte_string (str);
2832 Faset (v, make_number (i), 2831 ASET (v, i, code_convert_string_norecord (val, Vlocale_coding_system,
2833 code_convert_string_norecord (val, Vlocale_coding_system, 0)); 2832 0));
2834 } 2833 }
2835 UNGCPRO; 2834 UNGCPRO;
2836 return v; 2835 return v;
diff --git a/src/w32fns.c b/src/w32fns.c
index 0841ad3468e..5fab2c9a3df 100644
--- a/src/w32fns.c
+++ b/src/w32fns.c
@@ -6484,12 +6484,12 @@ w32_parse_hot_key (Lisp_Object key)
6484 6484
6485 CHECK_VECTOR (key); 6485 CHECK_VECTOR (key);
6486 6486
6487 if (XFASTINT (Flength (key)) != 1) 6487 if (ASIZE (key) != 1)
6488 return Qnil; 6488 return Qnil;
6489 6489
6490 GCPRO1 (key); 6490 GCPRO1 (key);
6491 6491
6492 c = Faref (key, make_number (0)); 6492 c = AREF (key, 0);
6493 6493
6494 if (CONSP (c) && lucid_event_type_list_p (c)) 6494 if (CONSP (c) && lucid_event_type_list_p (c))
6495 c = Fevent_convert_list (c); 6495 c = Fevent_convert_list (c);
diff --git a/src/xselect.c b/src/xselect.c
index 37d2c753c5e..d769f86cdef 100644
--- a/src/xselect.c
+++ b/src/xselect.c
@@ -1673,8 +1673,7 @@ selection_data_to_lisp_data (Display *display, const unsigned char *data,
1673 Lisp_Object v = Fmake_vector (make_number (size / sizeof (int)), 1673 Lisp_Object v = Fmake_vector (make_number (size / sizeof (int)),
1674 make_number (0)); 1674 make_number (0));
1675 for (i = 0; i < size / sizeof (int); i++) 1675 for (i = 0; i < size / sizeof (int); i++)
1676 Faset (v, make_number (i), 1676 ASET (v, i, x_atom_to_symbol (display, (Atom) idata[i]));
1677 x_atom_to_symbol (display, (Atom) idata[i]));
1678 return v; 1677 return v;
1679 } 1678 }
1680 } 1679 }
@@ -1699,7 +1698,7 @@ selection_data_to_lisp_data (Display *display, const unsigned char *data,
1699 for (i = 0; i < size / 2; i++) 1698 for (i = 0; i < size / 2; i++)
1700 { 1699 {
1701 short j = ((short *) data) [i]; 1700 short j = ((short *) data) [i];
1702 Faset (v, make_number (i), make_number (j)); 1701 ASET (v, i, make_number (j));
1703 } 1702 }
1704 return v; 1703 return v;
1705 } 1704 }
@@ -1711,7 +1710,7 @@ selection_data_to_lisp_data (Display *display, const unsigned char *data,
1711 for (i = 0; i < size / X_LONG_SIZE; i++) 1710 for (i = 0; i < size / X_LONG_SIZE; i++)
1712 { 1711 {
1713 int j = ((int *) data) [i]; 1712 int j = ((int *) data) [i];
1714 Faset (v, make_number (i), INTEGER_TO_CONS (j)); 1713 ASET (v, i, INTEGER_TO_CONS (j));
1715 } 1714 }
1716 return v; 1715 return v;
1717 } 1716 }