aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris <[email protected]>2012-05-26 18:06:44 -0700
committerGlenn Morris <[email protected]>2012-05-26 18:06:44 -0700
commit33017fafd17d722e82a268e9b272f27df261e09d (patch)
tree9c34640f09d51059804961d697ed9b07e19571d3
parentcaf8a9b2b301aba06735d403317b75b41df59bfe (diff)
parented7bebbb489cf6f893fc35a2a6714b0d8e7e8a90 (diff)
Merge from emacs-24; up to 2012-04-24T08:35:[email protected]
-rw-r--r--doc/lispref/ChangeLog58
-rw-r--r--doc/lispref/commands.texi4
-rw-r--r--doc/lispref/compile.texi4
-rw-r--r--doc/lispref/debugging.texi4
-rw-r--r--doc/lispref/display.texi18
-rw-r--r--doc/lispref/files.texi8
-rw-r--r--doc/lispref/frames.texi8
-rw-r--r--doc/lispref/functions.texi8
-rw-r--r--doc/lispref/help.texi8
-rw-r--r--doc/lispref/markers.texi2
-rw-r--r--doc/lispref/minibuf.texi2
-rw-r--r--doc/lispref/modes.texi34
-rw-r--r--doc/lispref/os.texi4
-rw-r--r--doc/lispref/package.texi4
-rw-r--r--doc/lispref/processes.texi6
-rw-r--r--doc/lispref/text.texi10
-rw-r--r--doc/lispref/variables.texi21
-rw-r--r--doc/lispref/windows.texi4
-rw-r--r--doc/misc/ChangeLog7
-rw-r--r--doc/misc/org.texi10
-rw-r--r--etc/refcards/orgcard.pdfbin118982 -> 118438 bytes
-rw-r--r--etc/refcards/orgcard.tex2
-rw-r--r--lisp/ChangeLog15
-rw-r--r--lisp/gnus/ChangeLog5
-rw-r--r--lisp/gnus/gnus-msg.el1
-rw-r--r--lisp/help.el5
-rw-r--r--lisp/mail/sendmail.el3
-rw-r--r--lisp/net/gnutls.el18
-rw-r--r--lisp/org/ChangeLog103
-rw-r--r--lisp/org/ob-plantuml.el3
-rw-r--r--lisp/org/ob.el20
-rw-r--r--lisp/org/org-agenda.el4
-rw-r--r--lisp/org/org-bibtex.el5
-rw-r--r--lisp/org/org-exp-blocks.el8
-rw-r--r--lisp/org/org-list.el66
-rw-r--r--lisp/org/org-lparse.el3
-rw-r--r--lisp/org/org-odt.el7
-rw-r--r--lisp/org/org-protocol.el2
-rw-r--r--lisp/org/org-table.el50
-rw-r--r--lisp/org/org.el104
-rw-r--r--nt/ChangeLog6
-rwxr-xr-xnt/configure.bat22
-rw-r--r--src/ChangeLog31
-rw-r--r--src/callproc.c2
-rw-r--r--src/lisp.h9
-rw-r--r--src/msdos.c2
-rw-r--r--src/ralloc.c6
-rw-r--r--src/search.c22
-rw-r--r--src/xdisp.c12
49 files changed, 553 insertions, 207 deletions
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog
index c3b50dbdcd..fbc7d83dfe 100644
--- a/doc/lispref/ChangeLog
+++ b/doc/lispref/ChangeLog
@@ -1,3 +1,61 @@
+2012-05-27 Chong Yidong <[email protected]>
+
+ * functions.texi (Obsolete Functions):
+ Fix doc for set-advertised-calling-convention.
+
+ * modes.texi (Mode Help): Fix describe-mode.
+
+ * display.texi (Face Functions): Fix define-obsolete-face-alias.
+
+ * variables.texi (Variable Aliases): Fix make-obsolete-variable.
+
+2012-05-27 Martin Rudalics <[email protected]>
+
+ * commands.texi (Recursive Editing): recursive-edit is a command.
+
+ * compile.texi (Docs and Compilation):
+ byte-compile-dynamic-docstrings is an option.
+
+ * debugging.texi (Invoking the Debugger): debug is a command.
+
+ * display.texi (Progress): progress-reporter-update and
+ progress-reporter-force-update have VALUE argument optional.
+ (Animated Images): Use non-@code{nil} instead of non-nil.
+
+ * files.texi (Format Conversion Round-Trip):
+ Use non-@code{nil} instead of non-nil.
+
+ * frames.texi (Creating Frames): make-frame is a command.
+ (Input Focus): select-frame is a command.
+ (Pointer Shape): void-text-area-pointer is an option.
+
+ * help.texi (Describing Characters): read-kbd-macro is a command.
+ (Help Functions): describe-prefix-bindings is a command.
+
+ * markers.texi (Creating Markers): Both arguments of copy-marker
+ are optional.
+
+ * minibuf.texi (Reading File Names): Use @kbd instead of @code.
+
+ * modes.texi (Mode Line Variables): mode-line-remote and
+ mode-line-client are not options.
+ (Imenu): imenu-add-to-menubar is a command.
+ (SMIE Indentation Helpers): Use non-@code{nil} instead of non-nil.
+
+ * os.texi (Sound Output): play-sound-file is a command.
+
+ * package.texi (Package Archives): Use @key{RET} instead of @kbd{RET}.
+
+ * processes.texi (Signals to Processes):
+ Use @key{RET} instead of @code{RET}.
+ (Signals to Processes): signal-process is a command.
+
+ * text.texi (Clickable Text): Use @key{RET} instead of @kbd{RET}.
+ (Base 64): base64-encode-string is not a command while
+ base64-decode-region is.
+
+ * windows.texi (Switching Buffers): pop-to-buffer is a command.
+
2012-05-12 Glenn Morris <[email protected]>
* Makefile.in (MKDIR_P): New, set by configure.
diff --git a/doc/lispref/commands.texi b/doc/lispref/commands.texi
index 50c345b5b1..f0414429be 100644
--- a/doc/lispref/commands.texi
+++ b/doc/lispref/commands.texi
@@ -3210,7 +3210,7 @@ a recursive edit but also provides the other features of the debugger.
Recursive editing levels are also used when you type @kbd{C-r} in
@code{query-replace} or use @kbd{C-x q} (@code{kbd-macro-query}).
-@defun recursive-edit
+@deffn Command recursive-edit
@cindex suspend evaluation
This function invokes the editor command loop. It is called
automatically by the initialization of Emacs, to let the user begin
@@ -3237,7 +3237,7 @@ then type @kbd{C-M-c} to exit and continue executing @code{simple-rec}.
(simple-rec)
@result{} nil
@end example
-@end defun
+@end deffn
@deffn Command exit-recursive-edit
This function exits from the innermost recursive edit (including
diff --git a/doc/lispref/compile.texi b/doc/lispref/compile.texi
index c1e0706bb4..1ed06181e3 100644
--- a/doc/lispref/compile.texi
+++ b/doc/lispref/compile.texi
@@ -290,10 +290,10 @@ is by adding this string to the file's first line:
-*-byte-compile-dynamic-docstrings: nil;-*-
@end example
-@defvar byte-compile-dynamic-docstrings
+@defopt byte-compile-dynamic-docstrings
If this is non-@code{nil}, the byte compiler generates compiled files
that are set up for dynamic loading of documentation strings.
-@end defvar
+@end defopt
@node Dynamic Loading
@section Dynamic Loading of Individual Functions
diff --git a/doc/lispref/debugging.texi b/doc/lispref/debugging.texi
index 3c446b07f6..dc315764c7 100644
--- a/doc/lispref/debugging.texi
+++ b/doc/lispref/debugging.texi
@@ -447,7 +447,7 @@ erroneously show up in this list.
Here we describe in full detail the function @code{debug} that is used
to invoke the debugger.
-@defun debug &rest debugger-args
+@deffn Command debug &rest debugger-args
This function enters the debugger. It switches buffers to a buffer
named @file{*Backtrace*} (or @file{*Backtrace*<2>} if it is the second
recursive entry to the debugger, etc.), and fills it with information
@@ -534,7 +534,7 @@ are printed on the top line of the buffer. You can use this feature to
display messages---for example, to remind yourself of the conditions
under which @code{debug} is called.
@end table
-@end defun
+@end deffn
@node Internals of Debugger
@subsection Internals of the Debugger
diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi
index cafa8ddd18..229dcaedef 100644
--- a/doc/lispref/display.texi
+++ b/doc/lispref/display.texi
@@ -413,7 +413,7 @@ This function calls @code{progress-reporter-update}, so the first
message is printed immediately.
@end defun
-@defun progress-reporter-update reporter value
+@defun progress-reporter-update reporter &optional value
This function does the main work of reporting progress of your
operation. It displays the message of @var{reporter}, followed by
progress percentage determined by @var{value}. If percentage is zero,
@@ -434,7 +434,7 @@ try to reduce the number of calls to it: resulting overhead will most
likely negate your effort.
@end defun
-@defun progress-reporter-force-update reporter value &optional new-message
+@defun progress-reporter-force-update reporter &optional value new-message
This function is similar to @code{progress-reporter-update} except
that it prints a message in the echo area unconditionally.
@@ -2662,11 +2662,13 @@ makes @code{modeline} an alias for the @code{mode-line} face.
(put 'modeline 'face-alias 'mode-line)
@end example
-@defun define-obsolete-face-alias obsolete-face current-face &optional when
-This function defines a face alias and marks it as obsolete, indicating
-that it may be removed in future. The optional string @var{when}
-indicates when the face was made obsolete (for example, a release number).
-@end defun
+@defmac define-obsolete-face-alias obsolete-face current-face when
+This macro defines @code{obsolete-face} as an alias for
+@var{current-face}, and also marks it as obsolete, indicating that it
+may be removed in future. @var{when} should be a string indicating
+when @code{obsolete-face} was made obsolete (usually a version number
+string).
+@end defmac
@node Auto Faces
@subsection Automatic Face Assignment
@@ -4904,7 +4906,7 @@ create animation. Currently, Emacs only supports animated GIF files.
The following functions related to animated images are available.
@defun image-animated-p image
-This function returns non-nil if @var{image} can be animated.
+This function returns non-@code{nil} if @var{image} can be animated.
The actual return value is a cons @code{(@var{nimages} . @var{delay})},
where @var{nimages} is the number of frames and @var{delay} is the
delay in seconds between them.
diff --git a/doc/lispref/files.texi b/doc/lispref/files.texi
index 2ee80504b6..7bb2bad0f7 100644
--- a/doc/lispref/files.texi
+++ b/doc/lispref/files.texi
@@ -3133,10 +3133,10 @@ in the order of appearance in the list.
This command writes the current buffer contents into the file @var{file}
in a format based on @var{format}, which is a list of format names. It
constructs the actual format starting from @var{format}, then appending
-any elements from the value of @code{buffer-file-format} with a non-nil
-@var{preserve} flag (see above), if they are not already present in
-@var{format}. It then updates @code{buffer-file-format} with this
-format, making it the default for future saves. Except for the
+any elements from the value of @code{buffer-file-format} with a
+non-@code{nil} @var{preserve} flag (see above), if they are not already
+present in @var{format}. It then updates @code{buffer-file-format} with
+this format, making it the default for future saves. Except for the
@var{format} argument, this command is similar to @code{write-file}. In
particular, @var{confirm} has the same meaning and interactive treatment
as the corresponding argument to @code{write-file}. @xref{Definition of
diff --git a/doc/lispref/frames.texi b/doc/lispref/frames.texi
index 2ff4df5566..330fb654b8 100644
--- a/doc/lispref/frames.texi
+++ b/doc/lispref/frames.texi
@@ -108,7 +108,7 @@ for @code{framep} above.
To create a new frame, call the function @code{make-frame}.
-@defun make-frame &optional alist
+@deffn Command make-frame &optional alist
This function creates and returns a new frame, displaying the current
buffer.
@@ -134,7 +134,7 @@ This function itself does not make the new frame the selected frame.
@xref{Input Focus}. The previously selected frame remains selected.
On graphical terminals, however, the windowing system may select the
new frame for its own reasons.
-@end defun
+@end deffn
@defvar before-make-frame-hook
A normal hook run by @code{make-frame} before it creates the frame.
@@ -1395,7 +1395,7 @@ same meaning as for @code{select-frame} (see below). The return value
of this function is not significant.
@end defun
-@defun select-frame frame &optional norecord
+@deffn Command select-frame frame &optional norecord
This function selects frame @var{frame}, temporarily disregarding the
focus of the X server if any. The selection of @var{frame} lasts until
the next time the user does something to select a different frame, or
@@ -1418,7 +1418,7 @@ been deleted.
In general, you should never use @code{select-frame} in a way that
could switch to a different terminal without switching back when
you're done.
-@end defun
+@end deffn
Emacs cooperates with the window system by arranging to select frames as
the server and window manager request. It does so by generating a
diff --git a/doc/lispref/functions.texi b/doc/lispref/functions.texi
index 5e393a399d..5dce59cc2d 100644
--- a/doc/lispref/functions.texi
+++ b/doc/lispref/functions.texi
@@ -1178,12 +1178,14 @@ equivalent to the following:
In addition, you can mark a certain a particular calling convention
for a function as obsolete:
-@defun set-advertised-calling-convention function signature
+@defun set-advertised-calling-convention function signature when
This function specifies the argument list @var{signature} as the
correct way to call @var{function}. This causes the Emacs byte
compiler to issue a warning whenever it comes across an Emacs Lisp
program that calls @var{function} any other way (however, it will
-still allow the code to be byte compiled).
+still allow the code to be byte compiled). @var{when} should be a
+string indicating when the variable was first made obsolete (usually a
+version number string).
For instance, in old versions of Emacs the @code{sit-for} function
accepted three arguments, like this
@@ -1198,7 +1200,7 @@ this:
@example
(set-advertised-calling-convention
- 'sit-for '(seconds &optional nodisp))
+ 'sit-for '(seconds &optional nodisp) "22.1")
@end example
@end defun
diff --git a/doc/lispref/help.texi b/doc/lispref/help.texi
index 762b42113f..d6d69fcc48 100644
--- a/doc/lispref/help.texi
+++ b/doc/lispref/help.texi
@@ -511,7 +511,7 @@ for Meta.
@end smallexample
@end defun
-@defun read-kbd-macro string &optional need-vector
+@deffn Command read-kbd-macro string &optional need-vector
This function is used mainly for operating on keyboard macros, but it
can also be used as a rough inverse for @code{key-description}. You
call it with a string containing key descriptions, separated by spaces;
@@ -519,7 +519,7 @@ it returns a string or vector containing the corresponding events.
(This may or may not be a single valid key sequence, depending on what
events you use; @pxref{Key Sequences}.) If @var{need-vector} is
non-@code{nil}, the return value is always a vector.
-@end defun
+@end deffn
@node Help Functions
@section Help Functions
@@ -626,12 +626,12 @@ character, and the help character has no binding after that prefix. The
variable's default value is @code{describe-prefix-bindings}.
@end defvar
-@defun describe-prefix-bindings
+@deffn Command describe-prefix-bindings
This function calls @code{describe-bindings} to display a list of all
the subcommands of the prefix key of the most recent key sequence. The
prefix described consists of all but the last event of that key
sequence. (The last event is, presumably, the help character.)
-@end defun
+@end deffn
The following two functions are meant for modes that want to provide
help without relinquishing control, such as the ``electric'' modes.
diff --git a/doc/lispref/markers.texi b/doc/lispref/markers.texi
index ba9d429314..a1fef662a2 100644
--- a/doc/lispref/markers.texi
+++ b/doc/lispref/markers.texi
@@ -205,7 +205,7 @@ chapter.
@end example
@end defun
-@defun copy-marker marker-or-integer &optional insertion-type
+@defun copy-marker &optional marker-or-integer insertion-type
If passed a marker as its argument, @code{copy-marker} returns a
new marker that points to the same place and the same buffer as does
@var{marker-or-integer}. If passed an integer as its argument,
diff --git a/doc/lispref/minibuf.texi b/doc/lispref/minibuf.texi
index 99118af19c..6e66b6541a 100644
--- a/doc/lispref/minibuf.texi
+++ b/doc/lispref/minibuf.texi
@@ -1404,7 +1404,7 @@ returns the pre-inserted contents of the minibuffer.
If the user types @key{RET} in an empty minibuffer, this function
returns an empty string, regardless of the value of
@var{require-match}. This is, for instance, how the user can make the
-current buffer visit no file using @code{M-x set-visited-file-name}.
+current buffer visit no file using @kbd{M-x set-visited-file-name}.
If @var{predicate} is non-@code{nil}, it specifies a function of one
argument that decides which file names are acceptable completion
diff --git a/doc/lispref/modes.texi b/doc/lispref/modes.texi
index 00cd43d7b7..81e860ed5a 100644
--- a/doc/lispref/modes.texi
+++ b/doc/lispref/modes.texi
@@ -734,13 +734,15 @@ modes. It is normally bound to @kbd{C-h m}. It uses the value of the
variable @code{major-mode} (@pxref{Major Modes}), which is why every
major mode command needs to set that variable.
-@deffn Command describe-mode
-This function displays the documentation of the current major mode.
-
-The @code{describe-mode} function calls the @code{documentation}
-function using the value of @code{major-mode} as an argument. Thus, it
-displays the documentation string of the major mode command.
-(@xref{Accessing Documentation}.)
+@deffn Command describe-mode &optional buffer
+This command displays the documentation of the current buffer's major
+mode and minor modes. It uses the @code{documentation} function to
+retrieve the documentation strings of the major and minor mode
+commands (@pxref{Accessing Documentation}).
+
+If called from Lisp with a non-nil @var{buffer} argument, this
+function displays the documentation for that buffer's major and minor
+modes, rather than those of the current buffer.
@end deffn
@node Derived Modes
@@ -1990,14 +1992,14 @@ default value also displays the recursive editing level, information
on the process status, and whether narrowing is in effect.
@end defopt
-@defopt mode-line-remote
+@defvar mode-line-remote
This variable is used to show whether @code{default-directory} for the
current buffer is remote.
-@end defopt
+@end defvar
-@defopt mode-line-client
+@defvar mode-line-client
This variable is used to identify @code{emacsclient} frames.
-@end defopt
+@end defvar
The following three variables are used in @code{mode-line-modes}:
@@ -2315,10 +2317,10 @@ definitions, or other named portions of the buffer; then the user can
choose one of them and move point to it. Major modes can add a menu
bar item to use Imenu using @code{imenu-add-to-menubar}.
-@defun imenu-add-to-menubar name
+@deffn Command imenu-add-to-menubar name
This function defines a local menu bar item named @var{name}
to run Imenu.
-@end defun
+@end deffn
The user-level commands for using Imenu are described in the Emacs
Manual (@pxref{Imenu,, Imenu, emacs, the Emacs Manual}). This section
@@ -3860,9 +3862,9 @@ Return non-@code{nil} if the current token's parent is among @var{parents}.
@end defun
@defun smie-rule-sibling-p
-Return non-nil if the current token's parent is actually a sibling.
-This is the case for example when the parent of a @code{","} is just the
-previous @code{","}.
+Return non-@code{nil} if the current token's parent is actually a
+sibling. This is the case for example when the parent of a @code{","}
+is just the previous @code{","}.
@end defun
@defun smie-rule-parent &optional offset
diff --git a/doc/lispref/os.texi b/doc/lispref/os.texi
index ac6711f482..dd2fb17ab1 100644
--- a/doc/lispref/os.texi
+++ b/doc/lispref/os.texi
@@ -2108,10 +2108,10 @@ calls the functions in the list @code{play-sound-functions}.
Each function is called with one argument, @var{sound}.
@end defun
-@defun play-sound-file file &optional volume device
+@deffn Command play-sound-file file &optional volume device
This function is an alternative interface to playing a sound @var{file}
specifying an optional @var{volume} and @var{device}.
-@end defun
+@end deffn
@defvar play-sound-functions
A list of functions to be called before playing a sound. Each function
diff --git a/doc/lispref/package.texi b/doc/lispref/package.texi
index 7c6d41b8e2..ad2b8fd621 100644
--- a/doc/lispref/package.texi
+++ b/doc/lispref/package.texi
@@ -294,8 +294,8 @@ How to accomplish this is beyond the scope of this manual.
A convenient way to set up and update a package archive is via the
@code{package-x} library. This is included with Emacs, but not loaded
-by default; type @kbd{M-x load-library @kbd{RET} package-x @kbd{RET}}
-to load it, or add @code{(require 'package-x)} to your init file.
+by default; type @kbd{M-x load-library @key{RET} package-x @key{RET}} to
+load it, or add @code{(require 'package-x)} to your init file.
@xref{Lisp Libraries,, Lisp Libraries, emacs, The GNU Emacs Manual}.
Once loaded, you can make use of the following:
diff --git a/doc/lispref/processes.texi b/doc/lispref/processes.texi
index ea68cf9ce9..dbb939583a 100644
--- a/doc/lispref/processes.texi
+++ b/doc/lispref/processes.texi
@@ -1073,7 +1073,7 @@ job-control shells won't work when a pipe is used. See
@defun interrupt-process &optional process current-group
This function interrupts the process @var{process} by sending the
signal @code{SIGINT}. Outside of Emacs, typing the ``interrupt
-character'' (normally @kbd{C-c} on some systems, and @code{DEL} on
+character'' (normally @kbd{C-c} on some systems, and @key{DEL} on
others) sends this signal. When the argument @var{current-group} is
non-@code{nil}, you can think of this function as ``typing @kbd{C-c}''
on the terminal by which Emacs talks to the subprocess.
@@ -1112,7 +1112,7 @@ it the signal @code{SIGCONT}. This presumes that @var{process} was
stopped previously.
@end defun
-@defun signal-process process signal
+@deffn Command signal-process process signal
This function sends a signal to process @var{process}. The argument
@var{signal} specifies which signal to send; it should be an integer,
or a symbol whose name is a signal.
@@ -1120,7 +1120,7 @@ or a symbol whose name is a signal.
The @var{process} argument can be a system process @acronym{ID} (an
integer); that allows you to send signals to processes that are not
children of Emacs. @xref{System Processes}.
-@end defun
+@end deffn
@node Output from Processes
@section Receiving Output from Processes
diff --git a/doc/lispref/text.texi b/doc/lispref/text.texi
index 09ea37a96b..8a656dc3ef 100644
--- a/doc/lispref/text.texi
+++ b/doc/lispref/text.texi
@@ -3530,7 +3530,7 @@ properties. For simplicity, we will refer to the clickable text as a
@dfn{link}.
Implementing a link involves three separate steps: (1) indicating
-clickability when the mouse moves over the link; (2) making @kbd{RET}
+clickability when the mouse moves over the link; (2) making @key{RET}
or @kbd{Mouse-2} on that link do something; and (3) setting up a
@code{follow-link} condition so that the link obeys
@code{mouse-1-click-follows-link}.
@@ -4068,7 +4068,7 @@ text, to avoid overlong lines. However, if the optional argument
the output is just one long line.
@end deffn
-@deffn Command base64-encode-string string &optional no-line-break
+@defun base64-encode-string string &optional no-line-break
This function converts the string @var{string} into base 64 code. It
returns a string containing the encoded text. As for
@code{base64-encode-region}, an error is signaled if a character in the
@@ -4078,15 +4078,15 @@ Normally, this function inserts newline characters into the encoded
text, to avoid overlong lines. However, if the optional argument
@var{no-line-break} is non-@code{nil}, these newlines are not added, so
the result string is just one long line.
-@end deffn
+@end defun
-@defun base64-decode-region beg end
+@deffn Command base64-decode-region beg end
This function converts the region from @var{beg} to @var{end} from base
64 code into the corresponding decoded text. It returns the length of
the decoded text.
The decoding functions ignore newline characters in the encoded text.
-@end defun
+@end deffn
@defun base64-decode-string string
This function converts the string @var{string} from base 64 code into
diff --git a/doc/lispref/variables.texi b/doc/lispref/variables.texi
index 4e62223164..0be496a3c4 100644
--- a/doc/lispref/variables.texi
+++ b/doc/lispref/variables.texi
@@ -1852,16 +1852,19 @@ variable with a new name. @code{make-obsolete-variable} declares that
the old name is obsolete and therefore that it may be removed at some
stage in the future.
-@defun make-obsolete-variable obsolete-name current-name &optional when
+@defun make-obsolete-variable obsolete-name current-name when &optional access-type
This function makes the byte compiler warn that the variable
-@var{obsolete-name} is obsolete. If @var{current-name} is a symbol, it is
-the variable's new name; then the warning message says to use
-@var{current-name} instead of @var{obsolete-name}. If @var{current-name}
-is a string, this is the message and there is no replacement variable.
-
-If provided, @var{when} should be a string indicating when the
-variable was first made obsolete---for example, a date or a release
-number.
+@var{obsolete-name} is obsolete. If @var{current-name} is a symbol,
+it is the variable's new name; then the warning message says to use
+@var{current-name} instead of @var{obsolete-name}. If
+@var{current-name} is a string, this is the message and there is no
+replacement variable. @var{when} should be a string indicating when
+the variable was first made obsolete (usually a version number
+string).
+
+The optional argument @var{access-type}, if non-@code{nil}, should
+should specify the kind of access that will trigger obsolescence
+warnings; it can be either @code{get} or @code{set}.
@end defun
You can make two variables synonyms and declare one obsolete at the
diff --git a/doc/lispref/windows.texi b/doc/lispref/windows.texi
index 094729033b..b4aeaf26ee 100644
--- a/doc/lispref/windows.texi
+++ b/doc/lispref/windows.texi
@@ -1558,7 +1558,7 @@ displaying the buffer. Hence, all the variables affecting
@code{display-buffer} will affect it as well. @xref{Choosing Window},
for the documentation of @code{display-buffer}.
-@defun pop-to-buffer buffer-or-name &optional action norecord
+@deffn Command pop-to-buffer buffer-or-name &optional action norecord
This function makes @var{buffer-or-name} the current buffer and
displays it in some window, preferably not the window previously
selected. It then selects the displaying window. If that window is
@@ -1581,7 +1581,7 @@ displayed in the selected window.
Like @code{switch-to-buffer}, this function updates the buffer list
unless @var{norecord} is non-@code{nil}.
-@end defun
+@end deffn
@node Choosing Window
@section Choosing a Window for Display
diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog
index a10f65b085..82e6a2f70a 100644
--- a/doc/misc/ChangeLog
+++ b/doc/misc/ChangeLog
@@ -1,7 +1,10 @@
+2012-05-27 Bastien Guerry <[email protected]>
+
+ * org.texi (Durations and time values): Fix typo.
+
2012-05-19 Jay Belanger <[email protected]>
- * doc/misc/calc.texi
- (Basic Operations on Units, Customizing Calc):
+ * doc/misc/calc.texi (Basic Operations on Units, Customizing Calc):
Mention `calc-ensure-consistent-units'.
2012-05-14 Andreas Schwab <[email protected]>
diff --git a/doc/misc/org.texi b/doc/misc/org.texi
index 775ff638ee..575b9cbebe 100644
--- a/doc/misc/org.texi
+++ b/doc/misc/org.texi
@@ -4,8 +4,8 @@
@setfilename ../../info/org
@settitle The Org Manual
-@set VERSION 7.8.09
-@set DATE April 2012
+@set VERSION 7.8.11
+@set DATE May 2012
@c Use proper quote and backtick for code sections in PDF output
@c Cf. Texinfo manual 14.2
@@ -2625,7 +2625,7 @@ formulas or Elisp formulas:
Input duration values must be of the form @code{[HH:MM[:SS]}, where seconds
are optional. With the @code{T} flag, computed durations will be displayed
-as @code{[HH:MM:SS} (see the first formula above). With the @code{t} flag,
+as @code{HH:MM:SS} (see the first formula above). With the @code{t} flag,
computed durations will be displayed according to the value of the variable
@code{org-table-duration-custom-format}, which defaults to @code{'hours} and
will display the result as a fraction of hours (see the second formula in the
@@ -7900,9 +7900,9 @@ Interactively select another agenda view and append it to the current view.
Delete other windows.
@c
@orgcmdkskc{v d,d,org-agenda-day-view}
-@xorgcmdkskc{v w,w,org-agenda-day-view}
+@xorgcmdkskc{v w,w,org-agenda-week-view}
@xorgcmd{v m,org-agenda-month-view}
-@xorgcmd{v y,org-agenda-month-year}
+@xorgcmd{v y,org-agenda-year-view}
@xorgcmd{v SPC,org-agenda-reset-view}
@vindex org-agenda-span
Switch to day/week/month/year view. When switching to day or week view, this
diff --git a/etc/refcards/orgcard.pdf b/etc/refcards/orgcard.pdf
index 3bedb6f2cf..2b474bf4e9 100644
--- a/etc/refcards/orgcard.pdf
+++ b/etc/refcards/orgcard.pdf
Binary files differ
diff --git a/etc/refcards/orgcard.tex b/etc/refcards/orgcard.tex
index d06afca808..3c0584d6db 100644
--- a/etc/refcards/orgcard.tex
+++ b/etc/refcards/orgcard.tex
@@ -1,5 +1,5 @@
% Reference Card for Org Mode
-\def\orgversionnumber{7.8.09}
+\def\orgversionnumber{7.8.11}
\def\versionyear{2012} % latest update
\def\year{2012} % latest copyright year
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index d3ba1caf60..3a71d8edfa 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,18 @@
+2012-05-27 Eli Zaretskii <[email protected]>
+
+ * mail/sendmail.el (mail-yank-region): Recognize
+ rmail-yank-current-message in addition to insert-buffer. Fixes
+ mail-mode's "C-c C-r" that otherwise does nothing when invoked in
+ a *mail* buffer created through rmail-start-mail with sendmail as
+ mail-user-agent.
+
+2012-05-27 Chong Yidong <[email protected]>
+
+ * net/gnutls.el (gnutls-min-prime-bits): Improve docstring.
+ Default to 256 (Bug#11267).
+
+ * help.el (describe-mode): Doc fix.
+
2012-05-26 Glenn Morris <[email protected]>
* w32-fns.el (w32-init-info): Remove.
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index 50ce9075dc..3060c08ec5 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,3 +1,8 @@
+2012-05-27 Katsumi Yamaoka <[email protected]>
+
+ * gnus-msg.el (gnus-msg-mail): Ensure that gnus-newsgroup-name is
+ a string so that Gcc works (bug#11514).
+
2012-05-26 Stefan Monnier <[email protected]>
* legacy-gnus-agent.el (gnus-agent-unhook-expire-days):
diff --git a/lisp/gnus/gnus-msg.el b/lisp/gnus/gnus-msg.el
index 815bd9e44a..c6d0c3213a 100644
--- a/lisp/gnus/gnus-msg.el
+++ b/lisp/gnus/gnus-msg.el
@@ -490,6 +490,7 @@ instead."
(message-mail to subject other-headers continue
nil yank-action send-actions return-action)
(let ((buf (current-buffer))
+ (gnus-newsgroup-name (or gnus-newsgroup-name ""))
mail-buf)
(gnus-setup-message 'message
(message-mail to subject other-headers continue
diff --git a/lisp/help.el b/lisp/help.el
index 1a6aa9d13d..317d5cf8f4 100644
--- a/lisp/help.el
+++ b/lisp/help.el
@@ -783,7 +783,10 @@ descriptions of the minor modes, each on a separate page.
For this to work correctly for a minor mode, the mode's indicator
variable \(listed in `minor-mode-alist') must also be a function
-whose documentation describes the minor mode."
+whose documentation describes the minor mode.
+
+If called from Lisp with a non-nil BUFFER argument, display
+documentation for the major and minor modes of that buffer."
(interactive "@")
(unless buffer (setq buffer (current-buffer)))
(help-setup-xref (list #'describe-mode buffer)
diff --git a/lisp/mail/sendmail.el b/lisp/mail/sendmail.el
index cd3862985b..3b262e3fb5 100644
--- a/lisp/mail/sendmail.el
+++ b/lisp/mail/sendmail.el
@@ -1678,7 +1678,8 @@ Just \\[universal-argument] as argument means don't indent, insert no prefix,
and don't delete any header fields."
(interactive "P")
(and (consp mail-reply-action)
- (eq (car mail-reply-action) 'insert-buffer)
+ (memq (car mail-reply-action)
+ '(rmail-yank-current-message insert-buffer))
(with-current-buffer (nth 1 mail-reply-action)
(or (mark t)
(error "No mark set: %S" (current-buffer))))
diff --git a/lisp/net/gnutls.el b/lisp/net/gnutls.el
index 1bc319c796..a306384c77 100644
--- a/lisp/net/gnutls.el
+++ b/lisp/net/gnutls.el
@@ -66,14 +66,16 @@ The files may not exist, in which case they will be ignored."
(repeat (file :tag "Bundle filename"))))
;;;###autoload
-(defcustom gnutls-min-prime-bits nil
- "The minimum number of bits to be used in Diffie-Hellman key exchange.
-
-This sets the minimum accepted size of the key to be used in a
-client-server handshake. If the server sends a prime with fewer than
-the specified number of bits the handshake will fail.
-
-A value of nil says to use the default gnutls value."
+(defcustom gnutls-min-prime-bits 256
+ ;; Several mail servers send fewer bits than the GnuTLS default.
+ ;; Currently, 256 appears to be a reasonable choice (Bug#11267).
+ "Minimum number of prime bits accepted by GnuTLS for key exchange.
+During a Diffie-Hellman handshake, if the server sends a prime
+number with fewer than this number of bits, the handshake is
+rejected. \(The smaller the prime number, the less secure the
+key exchange is against man-in-the-middle attacks.)
+
+A value of nil says to use the default GnuTLS value."
:type '(choice (const :tag "Use default value" nil)
(integer :tag "Number of bits" 512))
:group 'gnutls)
diff --git a/lisp/org/ChangeLog b/lisp/org/ChangeLog
index 8cdc90109b..2d2bf69974 100644
--- a/lisp/org/ChangeLog
+++ b/lisp/org/ChangeLog
@@ -1,3 +1,106 @@
+2012-05-27 Mark Shoulson <[email protected]> (tiny change)
+
+ * org.el (org-fontify-entities): Fix bug: The entities \sup[123] and
+ \there4 were not "prettified" when org-pretty-entities was enabled.
+
+2012-05-27 Nicolas Goaziou <[email protected]>
+
+ * org.el (org-font-lock-add-priority-faces):
+ Restrict priorities fontification to headlines and inlinetasks.
+
+2012-05-27 Jambunathan K <[email protected]>
+
+ * org-odt.el (org-odt-init-outfile)
+ (org-odt-write-manifest-file):
+ Disable `nxml-auto-insert-xml-declaration-flag'.
+
+ * org-lparse.el (org-do-lparse): Don't trigger auto-mode processing.
+
+2012-05-27 Bastien Guerry <[email protected]>
+
+ * org.el (org-scan-tags): Fix bug when building the scanner regexp.
+
+2012-05-27 Eric Schulte <[email protected]>
+
+ * ob.el (org-babel-capitalize-examplize-region-markers):
+ Controls the capitalization of begin and end example blocks.
+ (org-babel-examplize-region):
+ Optionally capitalize example block delimiters.
+
+ * ob-plantuml.el (org-babel-execute:plantuml):
+ Add a :java header argument to plantuml.
+
+ * org-exp-blocks.el (org-export-blocks-preprocess):
+ Even when the body of a block is not indented the boundary markers
+ should be indented to their original positions so things like list
+ indentation still work.
+
+ * ob.el (org-babel-parse-src-block-match):
+ Save match data during indentation check.
+
+2012-05-27 Bastien Guerry <[email protected]>
+
+ * org.el (org-scan-tags): Correctly match TODO keywords.
+
+2012-05-27 Nicolas Goaziou <[email protected]>
+
+ * org-list.el (org-list-struct): Fix white spaces.
+ (org-list-swap-items, org-list-send-item): Fix visibility preservation.
+
+ * org-list.el (org-list-swap-items, org-list-send-item):
+ Preserve visibility when moving items.
+
+2012-05-27 Mark E. Shoulson <[email protected]> (tiny change)
+
+ * org.el (org-fontify-entities): Hide {} when prettifying entities.
+
+2012-05-27 Bastien Guerry <[email protected]>
+
+ * org.el (org-cycle-internal-global): Prevent the display of
+ messages when cycling from with a Gnus article buffer.
+
+ * org-table.el (org-table-time-seconds-to-string):
+ Fix bug about handling a negative duration value.
+
+2012-05-27 Nicolas Goaziou <[email protected]>
+
+ * org.el (org-link-expand-abbrev): Fix docstring.
+
+ * org.el (org-translate-link): Fix bug.
+
+2012-05-27 Bastien Guerry <[email protected]>
+
+ * org-agenda.el (org-agenda-bulk-mark-regexp):
+ Fix bug when setting the number of marked entries.
+
+ * org-table.el (org-tbl-calc-modes): Rename from `org-table-modes'.
+ (org-set-calc-mode, org-table-eval-formula): Use it.
+
+2012-05-27 Eric Schulte <[email protected]>
+
+ * ob.el (org-babel-find-named-result):
+ Fix bug finding empty named results.
+
+2012-05-27 Nicolas Goaziou <[email protected]>
+
+ * org.el (org-set-regexps-and-options):
+ Fix `org-planning-or-clock-line-re' regexp. Indeed "\\>" will never
+ match since time keywords must end with colons, which are not word
+ constituents.
+
+2012-05-27 Bastien Guerry <[email protected]>
+
+ * org-ctags.el (org-ctags-new-topic-template):
+ Fix the option default value back again.
+
+2012-05-27 Eric Schulte <[email protected]>
+
+ * org-bibtex.el (org-bibtex-export-to-kill-ring):
+ Don't rely on kill-new to return a string.
+
+ * org-bibtex.el (org-bibtex-headline):
+ Remove call to bibtex-reformat which often hangs.
+
2012-04-27 Glenn Morris <[email protected]>
* org-ctags.el (org-ctags-new-topic-template):
diff --git a/lisp/org/ob-plantuml.el b/lisp/org/ob-plantuml.el
index 55729eb417..7da689393a 100644
--- a/lisp/org/ob-plantuml.el
+++ b/lisp/org/ob-plantuml.el
@@ -55,9 +55,10 @@ This function is called by `org-babel-execute-src-block'."
(error "plantuml requires a \":file\" header argument")))
(cmdline (cdr (assoc :cmdline params)))
(in-file (org-babel-temp-file "plantuml-"))
+ (java (or (cdr (assoc :java params)) ""))
(cmd (if (not org-plantuml-jar-path)
(error "`org-plantuml-jar-path' is not set")
- (concat "java -jar "
+ (concat "java " java " -jar "
(shell-quote-argument
(expand-file-name org-plantuml-jar-path))
(if (string= (file-name-extension out-file) "svg")
diff --git a/lisp/org/ob.el b/lisp/org/ob.el
index ac6de9f1bb..0512248758 100644
--- a/lisp/org/ob.el
+++ b/lisp/org/ob.el
@@ -1159,7 +1159,8 @@ may be specified in the properties of the current outline entry."
(substring body 0 sub-length)
(or body "")))))
(preserve-indentation (or org-src-preserve-indentation
- (string-match "-i\\>" switches))))
+ (save-match-data
+ (string-match "-i\\>" switches)))))
(list lang
;; get block body less properties, protective commas, and indentation
(with-temp-buffer
@@ -1498,7 +1499,7 @@ buffer or nil if no such result exists."
(catch 'is-a-code-block
(when (re-search-forward
(concat org-babel-result-regexp
- "[ \t]" (regexp-quote name) "[ \t\n\f\v\r]+") nil t)
+ "[ \t]" (regexp-quote name) "[ \t]*[\n\f\v\r]") nil t)
(when (and (string= "name" (downcase (match-string 1)))
(or (beginning-of-line 1)
(looking-at org-babel-src-block-regexp)
@@ -1957,11 +1958,16 @@ file's directory then expand relative links."
(stringp (car result)) (stringp (cadr result)))
(format "[[file:%s][%s]]" (car result) (cadr result))))))
+(defvar org-babel-capitalize-examplize-region-markers nil
+ "Make true to capitalize begin/end example markers inserted by code blocks.")
+
(defun org-babel-examplize-region (beg end &optional results-switches)
"Comment out region using the inline '==' or ': ' org example quote."
(interactive "*r")
(flet ((chars-between (b e)
- (not (string-match "^[\\s]*$" (buffer-substring b e)))))
+ (not (string-match "^[\\s]*$" (buffer-substring b e))))
+ (maybe-cap (str) (if org-babel-capitalize-examplize-region-markers
+ (upcase str) str)))
(if (or (chars-between (save-excursion (goto-char beg) (point-at-bol)) beg)
(chars-between end (save-excursion (goto-char end) (point-at-eol))))
(save-excursion
@@ -1978,10 +1984,12 @@ file's directory then expand relative links."
(t
(goto-char beg)
(insert (if results-switches
- (format "#+begin_example%s\n" results-switches)
- "#+begin_example\n"))
+ (format "%s%s\n"
+ (maybe-cap "#+begin_example")
+ results-switches)
+ (maybe-cap "#+begin_example\n")))
(if (markerp end) (goto-char end) (forward-char (- end beg)))
- (insert "#+end_example\n"))))))))
+ (insert (maybe-cap "#+end_example\n")))))))))
(defun org-babel-update-block-body (new-body)
"Update the body of the current code block to NEW-BODY."
diff --git a/lisp/org/org-agenda.el b/lisp/org/org-agenda.el
index ddb56ca4ba..367d8e8447 100644
--- a/lisp/org/org-agenda.el
+++ b/lisp/org/org-agenda.el
@@ -8315,13 +8315,13 @@ This is a command that has to be installed in `calendar-mode-map'."
(defun org-agenda-bulk-mark-regexp (regexp)
"Mark entries match REGEXP."
(interactive "sMark entries matching regexp: ")
- (let (entries-marked)
+ (let ((entries-marked 0))
(save-excursion
(goto-char (point-min))
(goto-char (next-single-property-change (point) 'txt))
(while (re-search-forward regexp nil t)
(when (string-match regexp (get-text-property (point) 'txt))
- (setq entries-marked (+ entries-marked 1))
+ (setq entries-marked (1+ entries-marked))
(call-interactively 'org-agenda-bulk-mark))))
(if (not entries-marked)
(message "No entry matching this regexp."))))
diff --git a/lisp/org/org-bibtex.el b/lisp/org/org-bibtex.el
index 21e36a7c18..4c852fcb87 100644
--- a/lisp/org/org-bibtex.el
+++ b/lisp/org/org-bibtex.el
@@ -369,7 +369,7 @@ This variable is relevant only if `org-bibtex-export-tags-as-keywords` is t."
(progn (goto-char (match-end 1)) (insert ", "))
(bibtex-make-field "keywords" t t))
(insert (mapconcat #'identity tags ", ")))
- (bibtex-reformat) (buffer-string)))))))
+ (buffer-string)))))))
(defun org-bibtex-ask (field)
(unless (assoc field org-bibtex-fields)
@@ -661,7 +661,8 @@ This uses `bibtex-parse-entry'."
(defun org-bibtex-export-to-kill-ring ()
"Export current headline to kill ring as bibtex entry."
(interactive)
- (kill-new (org-bibtex-headline)))
+ (let ((result (org-bibtex-headline)))
+ (kill-new result) result))
(defun org-bibtex-search (string)
"Search for bibliographical entries in agenda files.
diff --git a/lisp/org/org-exp-blocks.el b/lisp/org/org-exp-blocks.el
index 7d466cec65..fbac659209 100644
--- a/lisp/org/org-exp-blocks.el
+++ b/lisp/org/org-exp-blocks.el
@@ -211,7 +211,13 @@ which defaults to the value of `org-export-blocks-witheld'."
(when replacement
(delete-region match-start match-end)
(goto-char match-start) (insert replacement)
- (unless preserve-indent
+ (if preserve-indent
+ ;; indent only the code block markers
+ (save-excursion
+ (indent-line-to indentation) ; indent end_block
+ (goto-char match-start)
+ (indent-line-to indentation)) ; indent begin_block
+ ;; indent everything
(indent-code-rigidly match-start (point) indentation)))))
;; cleanup markers
(set-marker match-start nil)
diff --git a/lisp/org/org-list.el b/lisp/org/org-list.el
index 4498280ac7..8d3948698f 100644
--- a/lisp/org/org-list.el
+++ b/lisp/org/org-list.el
@@ -714,15 +714,15 @@ Assume point is at an item."
;; equally indented than BEG-CELL's cdr. Also, store ending
;; position of items in END-LST-2.
(catch 'exit
- (while t
- (let ((ind (+ (or (get-text-property (point) 'original-indentation) 0)
+ (while t
+ (let ((ind (+ (or (get-text-property (point) 'original-indentation) 0)
(org-get-indentation))))
- (cond
- ((>= (point) lim-down)
+ (cond
+ ((>= (point) lim-down)
;; At downward limit: this is de facto the end of the
;; list. Save point as an ending position, and jump to
;; part 3.
- (throw 'exit
+ (throw 'exit
(push (cons 0 (funcall end-before-blank)) end-lst-2)))
;; At a verbatim block, move to its end. Point is at bol
;; and 'org-example property is set by whole lines:
@@ -1071,8 +1071,10 @@ It determines the number of whitespaces to append by looking at
(defun org-list-swap-items (beg-A beg-B struct)
"Swap item starting at BEG-A with item starting at BEG-B in STRUCT.
-Blank lines at the end of items are left in place. Return the
-new structure after the changes.
+
+Blank lines at the end of items are left in place. Item
+visibility is preserved. Return the new structure after the
+changes.
Assume BEG-A is lesser than BEG-B and that BEG-A and BEG-B belong
to the same sub-list.
@@ -1089,7 +1091,17 @@ This function modifies STRUCT."
(body-B (buffer-substring beg-B end-B-no-blank))
(between-A-no-blank-and-B (buffer-substring end-A-no-blank beg-B))
(sub-A (cons beg-A (org-list-get-subtree beg-A struct)))
- (sub-B (cons beg-B (org-list-get-subtree beg-B struct))))
+ (sub-B (cons beg-B (org-list-get-subtree beg-B struct)))
+ ;; Store overlays responsible for visibility status. We
+ ;; also need to store their boundaries as they will be
+ ;; removed from buffer.
+ (overlays (cons
+ (mapcar (lambda (ov)
+ (list ov (overlay-start ov) (overlay-end ov)))
+ (overlays-in beg-A end-A))
+ (mapcar (lambda (ov)
+ (list ov (overlay-start ov) (overlay-end ov)))
+ (overlays-in beg-B end-B)))))
;; 1. Move effectively items in buffer.
(goto-char beg-A)
(delete-region beg-A end-B-no-blank)
@@ -1122,7 +1134,22 @@ This function modifies STRUCT."
(setcar e (+ pos (- size-B size-A)))
(setcar (nthcdr 6 e) (+ end-e (- size-B size-A))))))))
struct)
- (sort struct (lambda (e1 e2) (< (car e1) (car e2)))))))
+ (setq struct (sort struct (lambda (e1 e2) (< (car e1) (car e2)))))
+ ;; Restore visibility status, by moving overlays to their new
+ ;; position.
+ (mapc (lambda (ov)
+ (move-overlay
+ (car ov)
+ (+ (nth 1 ov) (- (+ beg-B (- size-B size-A)) beg-A))
+ (+ (nth 2 ov) (- (+ beg-B (- size-B size-A)) beg-A))))
+ (car overlays))
+ (mapc (lambda (ov)
+ (move-overlay (car ov)
+ (+ (nth 1 ov) (- beg-A beg-B))
+ (+ (nth 2 ov) (- beg-A beg-B))))
+ (cdr overlays))
+ ;; Return structure.
+ struct)))
(defun org-list-separating-blank-lines-number (pos struct prevs)
"Return number of blank lines that should separate items in list.
@@ -1340,8 +1367,8 @@ If DEST is a buffer position, the function will assume it points
to another item in the same list as ITEM, and will move the
latter just before the former.
-If DEST is `begin' \(respectively `end'\), ITEM will be moved at
-the beginning \(respectively end\) of the list it belongs to.
+If DEST is `begin' (respectively `end'), ITEM will be moved at
+the beginning (respectively end) of the list it belongs to.
If DEST is a string like \"N\", where N is an integer, ITEM will
be moved at the Nth position in the list.
@@ -1351,6 +1378,8 @@ added to the kill-ring.
If DEST is `delete', ITEM will be deleted.
+Visibility of item is preserved.
+
This function returns, destructively, the new list structure."
(let* ((prevs (org-list-prevs-alist struct))
(item-end (org-list-get-item-end item struct))
@@ -1393,7 +1422,9 @@ This function returns, destructively, the new list structure."
(org-list-get-last-item item struct prevs))
(point-at-eol)))))
(t dest)))
- (org-M-RET-may-split-line nil))
+ (org-M-RET-may-split-line nil)
+ ;; Store visibility.
+ (visibility (overlays-in item item-end)))
(cond
((eq dest 'delete) (org-list-delete-item item struct))
((eq dest 'kill)
@@ -1429,9 +1460,14 @@ This function returns, destructively, the new list structure."
(+ end shift)))))))
moved-items))
(lambda (e1 e2) (< (car e1) (car e2))))))
- ;; 2. Eventually delete extra copy of the item and clean marker.
- (prog1
- (org-list-delete-item (marker-position item) struct)
+ ;; 2. Restore visibility.
+ (mapc (lambda (ov)
+ (move-overlay ov
+ (+ (overlay-start ov) (- (point) item))
+ (+ (overlay-end ov) (- (point) item))))
+ visibility)
+ ;; 3. Eventually delete extra copy of the item and clean marker.
+ (prog1 (org-list-delete-item (marker-position item) struct)
(move-marker item nil)))
(t struct))))
diff --git a/lisp/org/org-lparse.el b/lisp/org/org-lparse.el
index c9669dd8ab..9c3cd5b481 100644
--- a/lisp/org/org-lparse.el
+++ b/lisp/org/org-lparse.el
@@ -1111,9 +1111,6 @@ version."
(unless body-only
(org-lparse-end 'DOCUMENT-CONTENT))
- (unless (plist-get opt-plist :buffer-will-be-killed)
- (set-auto-mode t))
-
(org-lparse-end 'EXPORT)
;; kill collection buffer
diff --git a/lisp/org/org-odt.el b/lisp/org/org-odt.el
index 2e984a575b..ca43d05bdb 100644
--- a/lisp/org/org-odt.el
+++ b/lisp/org/org-odt.el
@@ -2211,7 +2211,9 @@ captions on export.")
(content-file (expand-file-name "content.xml" outdir)))
;; init conten.xml
- (with-current-buffer (find-file-noselect content-file t))
+ (require 'nxml-mode)
+ (let ((nxml-auto-insert-xml-declaration-flag nil))
+ (find-file-noselect content-file t))
;; reset variables
(setq org-odt-manifest-file-entries nil
@@ -2320,7 +2322,8 @@ visually."
(make-directory "META-INF")
(let ((manifest-file (expand-file-name "META-INF/manifest.xml")))
(with-current-buffer
- (find-file-noselect manifest-file t)
+ (let ((nxml-auto-insert-xml-declaration-flag nil))
+ (find-file-noselect manifest-file t))
(insert
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>
<manifest:manifest xmlns:manifest=\"urn:oasis:names:tc:opendocument:xmlns:manifest:1.0\" manifest:version=\"1.2\">\n")
diff --git a/lisp/org/org-protocol.el b/lisp/org/org-protocol.el
index 419a1ffcaa..74fc35f2db 100644
--- a/lisp/org/org-protocol.el
+++ b/lisp/org/org-protocol.el
@@ -225,7 +225,7 @@ Consider using the interactive functions `org-protocol-create' and
:type 'alist)
(defcustom org-protocol-protocol-alist nil
- " Register custom handlers for org-protocol.
+ "Register custom handlers for org-protocol.
Each element of this list must be of the form:
diff --git a/lisp/org/org-table.el b/lisp/org/org-table.el
index 37e5c4f91a..e02062a2b9 100644
--- a/lisp/org/org-table.el
+++ b/lisp/org/org-table.el
@@ -2368,7 +2368,7 @@ of the new mark."
(looking-at org-table-auto-recalculate-regexp))
(org-table-recalculate) t))
-(defvar org-table-modes)
+(defvar org-tbl-calc-modes) ;; Dynamically bound in `org-table-eval-formula'
(defsubst org-set-calc-mode (var &optional value)
(if (stringp var)
(setq var (assoc var '(("D" calc-angle-mode deg)
@@ -2376,10 +2376,10 @@ of the new mark."
("F" calc-prefer-frac t)
("S" calc-symbolic-mode t)))
value (nth 2 var) var (nth 1 var)))
- (if (memq var org-table-modes)
- (setcar (cdr (memq var org-table-modes)) value)
- (cons var (cons value org-table-modes)))
- org-table-modes)
+ (if (memq var org-tbl-calc-modes)
+ (setcar (cdr (memq var org-tbl-calc-modes)) value)
+ (cons var (cons value org-tbl-calc-modes)))
+ org-tbl-calc-modes)
(defun org-table-eval-formula (&optional arg equation
suppress-align suppress-const
@@ -2437,7 +2437,7 @@ not overwrite the stored one."
equation
(org-table-get-formula equation (equal arg '(4)))))
(n0 (org-table-current-column))
- (modes (copy-sequence org-calc-default-modes))
+ (org-tbl-calc-modes (copy-sequence org-calc-default-modes))
(numbers nil) ; was a variable, now fixed default
(keep-empty nil)
n form form0 formrpl formrg bw fmt x ev orig c lispp literal
@@ -2453,12 +2453,13 @@ not overwrite the stored one."
(setq c (string-to-char (match-string 1 fmt))
n (string-to-number (match-string 2 fmt)))
(if (= c ?p)
- (setq modes (org-set-calc-mode 'calc-internal-prec n))
- (setq modes (org-set-calc-mode
- 'calc-float-format
- (list (cdr (assoc c '((?n . float) (?f . fix)
- (?s . sci) (?e . eng))))
- n))))
+ (setq org-tbl-calc-modes (org-set-calc-mode 'calc-internal-prec n))
+ (setq org-tbl-calc-modes
+ (org-set-calc-mode
+ 'calc-float-format
+ (list (cdr (assoc c '((?n . float) (?f . fix)
+ (?s . sci) (?e . eng))))
+ n))))
(setq fmt (replace-match "" t t fmt)))
(if (string-match "T" fmt)
(setq duration t numbers t
@@ -2479,7 +2480,7 @@ not overwrite the stored one."
(setq keep-empty t
fmt (replace-match "" t t fmt)))
(while (string-match "[DRFS]" fmt)
- (setq modes (org-set-calc-mode (match-string 0 fmt)))
+ (setq org-tbl-calc-modes (org-set-calc-mode (match-string 0 fmt)))
(setq fmt (replace-match "" t t fmt)))
(unless (string-match "\\S-" fmt)
(setq fmt nil))))
@@ -2588,7 +2589,7 @@ not overwrite the stored one."
duration-output-format) ev))
(or (fboundp 'calc-eval)
(error "Calc does not seem to be installed, and is needed to evaluate the formula"))
- (setq ev (calc-eval (cons form modes) (if numbers 'num))
+ (setq ev (calc-eval (cons form org-tbl-calc-modes) (if numbers 'num))
ev (if duration (org-table-time-seconds-to-string
(string-to-number ev)
duration-output-format) ev)))
@@ -3309,15 +3310,18 @@ If S is a string representing a number, keep this number."
"Convert a number of seconds to a time string.
If OUTPUT-FORMAT is non-nil, return a number of days, hours,
minutes or seconds."
- (cond ((eq output-format 'days)
- (format "%.3f" (/ (float secs) 86400)))
- ((eq output-format 'hours)
- (format "%.2f" (/ (float secs) 3600)))
- ((eq output-format 'minutes)
- (format "%.1f" (/ (float secs) 60)))
- ((eq output-format 'seconds)
- (format "%d" secs))
- (t (org-format-seconds "%.2h:%.2m:%.2s" secs))))
+ (let* ((secs0 (abs secs))
+ (res
+ (cond ((eq output-format 'days)
+ (format "%.3f" (/ (float secs0) 86400)))
+ ((eq output-format 'hours)
+ (format "%.2f" (/ (float secs0) 3600)))
+ ((eq output-format 'minutes)
+ (format "%.1f" (/ (float secs0) 60)))
+ ((eq output-format 'seconds)
+ (format "%d" secs0))
+ (t (org-format-seconds "%.2h:%.2m:%.2s" secs0)))))
+ (if (< secs 0) (concat "-" res) res)))
(defun org-table-fedit-convert-buffer (function)
"Convert all references in this buffer, using FUNCTION."
diff --git a/lisp/org/org.el b/lisp/org/org.el
index 838a9a18ad..972f7801af 100644
--- a/lisp/org/org.el
+++ b/lisp/org/org.el
@@ -6,7 +6,7 @@
;; Maintainer: Bastien Guerry <bzg at gnu dot org>
;; Keywords: outlines, hypermedia, calendar, wp
;; Homepage: http://orgmode.org
-;; Version: 7.8.09
+;; Version: 7.8.11
;;
;; This file is part of GNU Emacs.
;;
@@ -206,7 +206,7 @@ identifier."
;;; Version
-(defconst org-version "7.8.09"
+(defconst org-version "7.8.11"
"The version number of the file org.el.")
;;;###autoload
@@ -4789,10 +4789,11 @@ but the stars and the body are.")
"\\|" org-clock-string "\\)\\)?"
" *\\([[<][0-9]\\{4\\}-[0-9]\\{2\\}-[0-9]\\{2\\} ?[^]\r\n>]*?[]>]\\|<%%([^\r\n>]*>\\)")
org-planning-or-clock-line-re
- (concat "\\(?:^[ \t]*\\(" org-scheduled-string
- "\\|" org-deadline-string
- "\\|" org-closed-string "\\|" org-clock-string
- "\\)\\>\\)")
+ (concat "^[ \t]*\\("
+ org-scheduled-string "\\|"
+ org-deadline-string "\\|"
+ org-closed-string "\\|"
+ org-clock-string "\\)")
org-all-time-keywords
(mapcar (lambda (w) (substring w 0 -1))
(list org-scheduled-string org-deadline-string
@@ -5916,16 +5917,19 @@ needs to be inserted at a specific position in the font-lock sequence.")
(when org-pretty-entities
(catch 'match
(while (re-search-forward
- "\\\\\\(frac[13][24]\\|[a-zA-Z]+\\)\\($\\|[^[:alpha:]\n]\\)"
+ "\\\\\\(there4\\|sup[123]\\|frac[13][24]\\|[a-zA-Z]+\\)\\($\\|{}\\|[^[:alpha:]\n]\\)"
limit t)
(if (and (not (org-in-indented-comment-line))
(setq ee (org-entity-get (match-string 1)))
(= (length (nth 6 ee)) 1))
- (progn
+ (let*
+ ((end (if (equal (match-string 2) "{}")
+ (match-end 2)
+ (match-end 1))))
(add-text-properties
- (match-beginning 0) (match-end 1)
+ (match-beginning 0) end
(list 'font-lock-fontified t))
- (compose-region (match-beginning 0) (match-end 1)
+ (compose-region (match-beginning 0) end
(nth 6 ee) nil)
(backward-char 1)
(throw 'match t))))
@@ -5986,14 +5990,15 @@ When FACE-OR-COLOR is not a string, just return it."
(defun org-font-lock-add-priority-faces (limit)
"Add the special priority faces."
(while (re-search-forward "\\[#\\([A-Z0-9]\\)\\]" limit t)
- (add-text-properties
- (match-beginning 0) (match-end 0)
- (list 'face (or (org-face-from-face-or-color
- 'priority 'org-special-keyword
- (cdr (assoc (char-after (match-beginning 1))
- org-priority-faces)))
- 'org-special-keyword)
- 'font-lock-fontified t))))
+ (when (save-match-data (org-at-heading-p))
+ (add-text-properties
+ (match-beginning 0) (match-end 0)
+ (list 'face (or (org-face-from-face-or-color
+ 'priority 'org-special-keyword
+ (cdr (assoc (char-after (match-beginning 1))
+ org-priority-faces)))
+ 'org-special-keyword)
+ 'font-lock-fontified t)))))
(defun org-get-tag-face (kwd)
"Get the right face for a TODO keyword KWD.
@@ -6255,34 +6260,36 @@ in special contexts.
(defun org-cycle-internal-global ()
"Do the global cycling action."
- (cond
- ((and (eq last-command this-command)
- (eq org-cycle-global-status 'overview))
- ;; We just created the overview - now do table of contents
- ;; This can be slow in very large buffers, so indicate action
- (run-hook-with-args 'org-pre-cycle-hook 'contents)
- (message "CONTENTS...")
- (org-content)
- (message "CONTENTS...done")
- (setq org-cycle-global-status 'contents)
- (run-hook-with-args 'org-cycle-hook 'contents))
-
- ((and (eq last-command this-command)
- (eq org-cycle-global-status 'contents))
- ;; We just showed the table of contents - now show everything
- (run-hook-with-args 'org-pre-cycle-hook 'all)
- (show-all)
- (message "SHOW ALL")
- (setq org-cycle-global-status 'all)
- (run-hook-with-args 'org-cycle-hook 'all))
+ ;; Hack to avoid display of messages for .org attachments in Gnus
+ (let ((ga (string-match "\\*fontification" (buffer-name))))
+ (cond
+ ((and (eq last-command this-command)
+ (eq org-cycle-global-status 'overview))
+ ;; We just created the overview - now do table of contents
+ ;; This can be slow in very large buffers, so indicate action
+ (run-hook-with-args 'org-pre-cycle-hook 'contents)
+ (unless ga (message "CONTENTS..."))
+ (org-content)
+ (unless ga (message "CONTENTS...done"))
+ (setq org-cycle-global-status 'contents)
+ (run-hook-with-args 'org-cycle-hook 'contents))
+
+ ((and (eq last-command this-command)
+ (eq org-cycle-global-status 'contents))
+ ;; We just showed the table of contents - now show everything
+ (run-hook-with-args 'org-pre-cycle-hook 'all)
+ (show-all)
+ (unless ga (message "SHOW ALL"))
+ (setq org-cycle-global-status 'all)
+ (run-hook-with-args 'org-cycle-hook 'all))
- (t
- ;; Default action: go to overview
- (run-hook-with-args 'org-pre-cycle-hook 'overview)
- (org-overview)
- (message "OVERVIEW")
- (setq org-cycle-global-status 'overview)
- (run-hook-with-args 'org-cycle-hook 'overview))))
+ (t
+ ;; Default action: go to overview
+ (run-hook-with-args 'org-pre-cycle-hook 'overview)
+ (org-overview)
+ (unless ga (message "OVERVIEW"))
+ (setq org-cycle-global-status 'overview)
+ (run-hook-with-args 'org-cycle-hook 'overview)))))
(defun org-cycle-internal-local ()
"Do the local cycling action."
@@ -8574,7 +8581,7 @@ call CMD."
;;; Link abbreviations
(defun org-link-expand-abbrev (link)
- "Apply replacements as defined in `org-link-abbrev-alist."
+ "Apply replacements as defined in `org-link-abbrev-alist'."
(if (string-match "^\\([^:]*\\)\\(::?\\(.*\\)\\)?$" link)
(let* ((key (match-string 1 link))
(as (or (assoc key org-link-abbrev-alist-local)
@@ -9432,7 +9439,7 @@ If the link is in hidden text, expose it."
(string-match "\\([a-zA-Z0-9]+\\):\\(.*\\)" s))
(progn
(setq s (funcall org-link-translation-function
- (match-string 1) (match-string 2)))
+ (match-string 1 s) (match-string 2 s)))
(concat (car s) ":" (cdr s)))
s))
@@ -12822,8 +12829,7 @@ headlines matching this string."
org-outline-regexp)
" *\\(\\<\\("
(mapconcat 'regexp-quote org-todo-keywords-1 "\\|")
- (org-re
- "\\>\\)\\)? *\\(.*?\\)\\(:[[:alnum:]_@#%:]+:\\)?[ \t]*$")))
+ (org-re "\\)\\>\\)? *\\(.*?\\)\\(:[[:alnum:]_@#%:]+:\\)?[ \t]*$")))
(props (list 'face 'default
'done-face 'org-agenda-done
'undone-face 'default
diff --git a/nt/ChangeLog b/nt/ChangeLog
index 198729776b..7a825ecb29 100644
--- a/nt/ChangeLog
+++ b/nt/ChangeLog
@@ -1,3 +1,9 @@
+2012-05-27 Eli Zaretskii <[email protected]>
+
+ * configure.bat: Ensure a space between %var% expansion and
+ redirection symbol '>', which breaks when %var% ends in a digit,
+ such as 1.
+
2012-05-22 Paul Eggert <[email protected]>
Remove src/m/*.
diff --git a/nt/configure.bat b/nt/configure.bat
index db587b0299..a60df56fc9 100755
--- a/nt/configure.bat
+++ b/nt/configure.bat
@@ -757,25 +757,25 @@ rem NB. Be very careful to not have a space before redirection symbols
rem except when there is a preceding digit, when a space is required.
rem
echo # Start of settings from configure.bat >config.settings
-echo COMPILER=%COMPILER%>>config.settings
-if not "(%mf%)" == "()" echo MCPU_FLAG=%mf%>>config.settings
-if not "(%dbginfo%)" == "()" echo DEBUG_INFO=%dbginfo%>>config.settings
+echo COMPILER=%COMPILER% >>config.settings
+if not "(%mf%)" == "()" echo MCPU_FLAG=%mf% >>config.settings
+if not "(%dbginfo%)" == "()" echo DEBUG_INFO=%dbginfo% >>config.settings
if (%nodebug%) == (Y) echo NODEBUG=1 >>config.settings
if (%noopt%) == (Y) echo NOOPT=1 >>config.settings
if (%enablechecking%) == (Y) echo ENABLECHECKS=1 >>config.settings
if (%profile%) == (Y) echo PROFILE=1 >>config.settings
if (%nocygwin%) == (Y) echo NOCYGWIN=1 >>config.settings
-if not "(%prefix%)" == "()" echo INSTALL_DIR=%prefix%>>config.settings
-if not "(%distfiles%)" == "()" echo DIST_FILES=%distfiles%>>config.settings
+if not "(%prefix%)" == "()" echo INSTALL_DIR=%prefix% >>config.settings
+if not "(%distfiles%)" == "()" echo DIST_FILES=%distfiles% >>config.settings
rem We go thru docflags because usercflags could be "-DFOO=bar" -something
rem and the if command cannot cope with this
for %%v in (%usercflags%) do if not (%%v)==() set docflags=Y
-if (%docflags%)==(Y) echo USER_CFLAGS=%usercflags%>>config.settings
-if (%docflags%)==(Y) echo ESC_USER_CFLAGS=%escusercflags%>>config.settings
+if (%docflags%)==(Y) echo USER_CFLAGS=%usercflags% >>config.settings
+if (%docflags%)==(Y) echo ESC_USER_CFLAGS=%escusercflags% >>config.settings
for %%v in (%userldflags%) do if not (%%v)==() set doldflags=Y
-if (%doldflags%)==(Y) echo USER_LDFLAGS=%userldflags%>>config.settings
+if (%doldflags%)==(Y) echo USER_LDFLAGS=%userldflags% >>config.settings
for %%v in (%extrauserlibs%) do if not (%%v)==() set doextralibs=Y
-if (%doextralibs%)==(Y) echo USER_LIBS=%extrauserlibs%>>config.settings
+if (%doextralibs%)==(Y) echo USER_LIBS=%extrauserlibs% >>config.settings
echo # End of settings from configure.bat>>config.settings
echo. >>config.settings
@@ -784,8 +784,8 @@ echo. >>config.tmp
echo /* Start of settings from configure.bat. */ >>config.tmp
rem We write USER_CFLAGS and USER_LDFLAGS starting with a space to simplify
rem processing of compiler options in w32.c:get_emacs_configuration_options
-if (%docflags%) == (Y) echo #define USER_CFLAGS " %escusercflags%">>config.tmp
-if (%doldflags%) == (Y) echo #define USER_LDFLAGS " %escuserldflags%">>config.tmp
+if (%docflags%) == (Y) echo #define USER_CFLAGS " %escusercflags%" >>config.tmp
+if (%doldflags%) == (Y) echo #define USER_LDFLAGS " %escuserldflags%" >>config.tmp
if (%profile%) == (Y) echo #define PROFILING 1 >>config.tmp
if not "(%HAVE_PNG%)" == "()" echo #define HAVE_PNG 1 >>config.tmp
if not "(%HAVE_GNUTLS%)" == "()" echo #define HAVE_GNUTLS 1 >>config.tmp
diff --git a/src/ChangeLog b/src/ChangeLog
index 1ade469118..a9dae7f68a 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,34 @@
+2012-05-27 Ken Brown <[email protected]>
+
+ * callproc.c (Fcall_process): Restore a line that was accidentally
+ commented out in the 2011-02-13 change (bug#11547).
+
+2012-05-27 Eli Zaretskii <[email protected]>
+
+ * lisp.h [REL_ALLOC]: Add prototypes for external functions
+ defined on ralloc.c.
+
+ * buffer.c [REL_ALLOC]: Remove prototypes of
+ r_alloc_reset_variable, r_alloc, r_re_alloc, and r_alloc_free,
+ they are now on lisp.h.
+
+ * ralloc.c (r_alloc_inhibit_buffer_relocation): New function.
+
+ * search.c (search_buffer): Use it to inhibit relocation of buffer
+ text while re_search_2 is doing its job, because re_search_2 is
+ passed C pointers to buffer text. (Bug#11519)
+
+ * msdos.c (internal_terminal_init) <Vwindow_system_version>:
+ Update value to 24.
+
+ * xdisp.c (move_it_to): Under MOVE_TO_Y, when restoring iterator
+ state after an additional call to move_it_in_display_line_to, keep
+ the values of it->max_ascent and it->max_descent found for the
+ entire line.
+ (pos_visible_p): Revert the comparison against bottom_y to what it
+ was in revid [email protected].
+ (Bug#11464)
+
2012-05-26 Paul Eggert <[email protected]>
Fix coding-related core dumps with gcc -ftrapv.
diff --git a/src/callproc.c b/src/callproc.c
index 1dd56749e1..f7c9971907 100644
--- a/src/callproc.c
+++ b/src/callproc.c
@@ -652,7 +652,7 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */)
/* GConf causes us to ignore SIGPIPE, make sure it is restored
in the child. */
- //signal (SIGPIPE, SIG_DFL);
+ signal (SIGPIPE, SIG_DFL);
#ifdef HAVE_WORKING_VFORK
pthread_sigmask (SIG_SETMASK, &procmask, 0);
#endif
diff --git a/src/lisp.h b/src/lisp.h
index 551c15473a..522f7cec63 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -3633,6 +3633,15 @@ void syms_of_dbusbind (void);
/* Defined in msdos.c, w32.c */
extern char *emacs_root_dir (void);
#endif /* DOS_NT */
+
+#ifdef REL_ALLOC
+/* Defined in ralloc.c */
+extern void r_alloc_reset_variable (POINTER_TYPE **, POINTER_TYPE **);
+extern POINTER_TYPE *r_alloc (POINTER_TYPE **, size_t);
+extern POINTER_TYPE *r_re_alloc (POINTER_TYPE **, size_t);
+extern void r_alloc_free (POINTER_TYPE **ptr);
+extern void r_alloc_inhibit_buffer_relocation (int);
+#endif /* REL_ALLOC */
/* Nonzero means Emacs has already been initialized.
Used during startup to detect startup of dumped Emacs. */
diff --git a/src/msdos.c b/src/msdos.c
index 5f46829aef..c6213b566b 100644
--- a/src/msdos.c
+++ b/src/msdos.c
@@ -1813,7 +1813,7 @@ internal_terminal_init (void)
}
Vinitial_window_system = Qpc;
- Vwindow_system_version = make_number (23); /* RE Emacs version */
+ Vwindow_system_version = make_number (24); /* RE Emacs version */
tty->terminal->type = output_msdos_raw;
/* If Emacs was dumped on DOS/V machine, forget the stale VRAM
diff --git a/src/ralloc.c b/src/ralloc.c
index d736e27952..7fdef69842 100644
--- a/src/ralloc.c
+++ b/src/ralloc.c
@@ -1139,6 +1139,12 @@ r_alloc_reset_variable (POINTER *old, POINTER *new)
bloc->variable = new;
}
+void
+r_alloc_inhibit_buffer_relocation (int inhibit)
+{
+ use_relocatable_buffers = !inhibit;
+}
+
/***********************************************************************
Initialization
diff --git a/src/search.c b/src/search.c
index a9542a2ed9..5608e344e7 100644
--- a/src/search.c
+++ b/src/search.c
@@ -1159,12 +1159,25 @@ search_buffer (Lisp_Object string, ptrdiff_t pos, ptrdiff_t pos_byte,
while (n < 0)
{
ptrdiff_t val;
+
+#ifdef REL_ALLOC
+ /* re_search_2 below is passed C pointers to buffer text.
+ If some code called by it causes memory (re)allocation,
+ buffer text could be relocated on platforms that use
+ REL_ALLOC, which invalidates those C pointers. So we
+ inhibit relocation of buffer text for as long as
+ re_search_2 runs. */
+ r_alloc_inhibit_buffer_relocation (1);
+#endif
val = re_search_2 (bufp, (char *) p1, s1, (char *) p2, s2,
pos_byte - BEGV_BYTE, lim_byte - pos_byte,
(NILP (Vinhibit_changing_match_data)
? &search_regs : &search_regs_1),
/* Don't allow match past current point */
pos_byte - BEGV_BYTE);
+#ifdef REL_ALLOC
+ r_alloc_inhibit_buffer_relocation (0);
+#endif
if (val == -2)
{
matcher_overflow ();
@@ -1203,11 +1216,20 @@ search_buffer (Lisp_Object string, ptrdiff_t pos, ptrdiff_t pos_byte,
while (n > 0)
{
ptrdiff_t val;
+
+#ifdef REL_ALLOC
+ /* See commentary above for the reasons for inhibiting
+ buffer text relocation here. */
+ r_alloc_inhibit_buffer_relocation (1);
+#endif
val = re_search_2 (bufp, (char *) p1, s1, (char *) p2, s2,
pos_byte - BEGV_BYTE, lim_byte - pos_byte,
(NILP (Vinhibit_changing_match_data)
? &search_regs : &search_regs_1),
lim_byte - BEGV_BYTE);
+#ifdef REL_ALLOC
+ r_alloc_inhibit_buffer_relocation (0);
+#endif
if (val == -2)
{
matcher_overflow ();
diff --git a/src/xdisp.c b/src/xdisp.c
index 794355af15..25aae04f04 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -8705,8 +8705,18 @@ move_it_to (struct it *it, ptrdiff_t to_charpos, int to_x, int to_y, int to_vpos
{
/* If TO_Y is in this line and TO_X was reached
above, we scanned too far. We have to restore
- IT's settings to the ones before skipping. */
+ IT's settings to the ones before skipping. But
+ keep the more accurate values of max_ascent and
+ max_descent we've found while skipping the rest
+ of the line, for the sake of callers, such as
+ pos_visible_p, that need to know the line
+ height. */
+ int max_ascent = it->max_ascent;
+ int max_descent = it->max_descent;
+
RESTORE_IT (it, &it_backup, backup_data);
+ it->max_ascent = max_ascent;
+ it->max_descent = max_descent;
reached = 6;
}
else