Commit ba1d2c3e authored by Kenichi Handa's avatar Kenichi Handa
Browse files

merge trunk

parents c5d3843c 953cebf5
2012-02-02 Glenn Morris <rgm@gnu.org>
* configure.in [HAVE_NS]:
Error if use --without-toolkit-scroll-bars. (Bug#10673)
2012-02-01 Paul Eggert <eggert@cs.ucla.edu>
Port to older Solaris 10 versions (Bug#10677).
......
......@@ -1568,6 +1568,10 @@ ns_frag=/dev/null
NS_OBJ=
NS_OBJC_OBJ=
if test "${HAVE_NS}" = yes; then
if test "$with_toolkit_scroll_bars" = "no"; then
AC_MSG_ERROR([Native scroll bars are not implemented for Nextstep.])
fi
window_system=nextstep
with_xft=no
# set up packaging dirs
......
2012-02-02 Glenn Morris <rgm@gnu.org>
* processes.texi (Synchronous Processes):
Mention call-process's :file gets overwritten.
* commands.texi (Reading One Event):
* help.texi (Help Functions): Document read-char-choice.
* hooks.texi (Standard Hooks):
* modes.texi (Keymaps and Minor Modes):
* text.texi (Commands for Insertion): Document post-self-insert-hook.
* hooks.texi (Standard Hooks): Add prog-mode-hook.
* hooks.texi (Standard Hooks):
* modes.texi (Major Mode Conventions, Mode Hooks):
Document change-major-mode-after-body-hook.
2012-02-01 Glenn Morris <rgm@gnu.org>
* modes.texi (Defining Minor Modes):
......
......@@ -2472,6 +2472,17 @@ The argument @var{prompt} is either a string to be displayed in the
echo area as a prompt, or @code{nil}, meaning not to display a prompt.
@end defun
@defun read-char-choice prompt chars &optional inhibit-quit
This function uses @code{read-key} to read and return a single
character. It ignores any input that is not a member of @var{chars},
a list of accepted characters. Optionally, it will also ignore
keyboard-quit events while it is waiting for valid input. If you bind
@code{help-form} (@pxref{Help Functions}) to a non-@code{nil} value
while calling @code{read-char-choice}, then pressing @code{help-char}
causes it to evaluate @code{help-form} and display the result. It
then continues to wait for a valid input character, or keyboard-quit.
@end defun
@node Event Mod
@subsection Modifying and Translating Input Events
......
......@@ -582,11 +582,12 @@ If this variable is non-@code{nil}, its value is a form to evaluate
whenever the character @code{help-char} is read. If evaluating the form
produces a string, that string is displayed.
A command that calls @code{read-event} or @code{read-char} probably
should bind @code{help-form} to a non-@code{nil} expression while it
does input. (The time when you should not do this is when @kbd{C-h} has
some other meaning.) Evaluating this expression should result in a
string that explains what the input is for and how to enter it properly.
A command that calls @code{read-event}, @code{read-char-choice}, or
@code{read-char} probably should bind @code{help-form} to a
non-@code{nil} expression while it does input. (The time when you
should not do this is when @kbd{C-h} has some other meaning.)
Evaluating this expression should result in a string that explains
what the input is for and how to enter it properly.
Entry to the minibuffer binds this variable to the value of
@code{minibuffer-help-form} (@pxref{Definition of minibuffer-help-form}).
......
......@@ -127,6 +127,9 @@ not exactly a hook, but does a similar job.
@xref{Calendar Customizing,,, emacs}.
@end ifnottex
@item change-major-mode-after-body-hook
@xref{Mode Hooks}.
@item change-major-mode-hook
@xref{Creating Buffer-Local}.
......@@ -292,9 +295,15 @@ Manual}.
@item post-command-hook
@xref{Command Overview}.
@item post-self-insert-hook
@xref{Keymaps and Minor Modes}.
@item pre-command-hook
@xref{Command Overview}.
@item prog-mode-hook
@xref{Basic Major Modes}.
@item resume-tty-functions
@xref{Suspending Emacs}.
......
......@@ -468,8 +468,9 @@ other packages would interfere with them.
@cindex major mode hook
Each major mode should have a normal @dfn{mode hook} named
@code{@var{modename}-mode-hook}. The very last thing the major mode command
should do is to call @code{run-mode-hooks}. This runs the mode hook,
and then runs the normal hook @code{after-change-major-mode-hook}.
should do is to call @code{run-mode-hooks}. This runs the normal
hook @code{change-major-mode-after-body-hook}, the mode hook,
and then the normal hook @code{after-change-major-mode-hook}.
@xref{Mode Hooks}.
@item
......@@ -939,8 +940,9 @@ before it runs the mode hook variable @code{@var{mode}-hook}.
@node Mode Hooks
@subsection Mode Hooks
Every major mode command should finish by running its mode hook and
the mode-independent normal hook @code{after-change-major-mode-hook}.
Every major mode command should finish by running the mode-independent
normal hook @code{change-major-mode-after-body-hook}, its mode hook,
and the normal hook @code{after-change-major-mode-hook}.
It does this by calling @code{run-mode-hooks}. If the major mode is a
derived mode, that is if it calls another major mode (the parent mode)
in its body, it should do this inside @code{delay-mode-hooks} so that
......@@ -949,11 +951,12 @@ call to @code{run-mode-hooks} runs the parent's mode hook too.
@xref{Major Mode Conventions}.
Emacs versions before Emacs 22 did not have @code{delay-mode-hooks}.
When user-implemented major modes have not been updated to use it,
they won't entirely follow these conventions: they may run the
parent's mode hook too early, or fail to run
@code{after-change-major-mode-hook}. If you encounter such a major
mode, please correct it to follow these conventions.
Versions before 24 did not have @code{change-major-mode-after-body-hook}.
When user-implemented major modes do not use @code{run-mode-hooks} and
have not been updated to use these newer features, they won't entirely
follow these conventions: they may run the parent's mode hook too early,
or fail to run @code{after-change-major-mode-hook}. If you encounter
such a major mode, please correct it to follow these conventions.
When you defined a major mode using @code{define-derived-mode}, it
automatically makes sure these conventions are followed. If you
......@@ -963,6 +966,7 @@ use the following functions to handle these conventions automatically.
@defun run-mode-hooks &rest hookvars
Major modes should run their mode hook using this function. It is
similar to @code{run-hooks} (@pxref{Hooks}), but it also runs
@code{change-major-mode-after-body-hook} and
@code{after-change-major-mode-hook}.
When this function is called during the execution of a
......@@ -982,6 +986,11 @@ The hooks will actually run during the next call to
construct.
@end defmac
@defvar change-major-mode-after-body-hook
This is a normal hook run by @code{run-mode-hooks}. It is run before
the mode hooks.
@end defvar
@defvar after-change-major-mode-hook
This is a normal hook run by @code{run-mode-hooks}. It is run at the
very end of every properly-written major mode command.
......@@ -1332,11 +1341,12 @@ alist @code{minor-mode-map-alist}. @xref{Definition of minor-mode-map-alist}.
@cindex @code{self-insert-command}, minor modes
One use of minor mode keymaps is to modify the behavior of certain
self-inserting characters so that they do something else as well as
self-insert. In general, this is the only way to do that, since the
facilities for customizing @code{self-insert-command} are limited to
special cases (designed for abbrevs and Auto Fill mode). (Do not try
substituting your own definition of @code{self-insert-command} for the
standard one. The editor command loop handles this function specially.)
self-insert. (Another way to customize @code{self-insert-command} is
through @code{post-self-insert-hook}. Apart from this, the facilities
for customizing @code{self-insert-command} are limited to special cases,
designed for abbrevs and Auto Fill mode. Do not try substituting your
own definition of @code{self-insert-command} for the standard one. The
editor command loop handles this function specially.)
The key sequences bound in a minor mode should consist of @kbd{C-c}
followed by one of @kbd{.,/?`'"[]\|~!#$%^&*()-_+=}. (The other
......
......@@ -300,7 +300,8 @@ MS-DOS doesn't support asynchronous subprocesses, so this option doesn't
work there.
@item @code{(:file @var{file-name})}
Send the output to the file name specified.
Send the output to the file name specified, overwriting it if it
already exists.
@item @code{(@var{real-destination} @var{error-destination})}
Keep the standard output stream separate from the standard error stream;
......
......@@ -500,6 +500,11 @@ syntax. (@xref{Abbrevs}, and @ref{Syntax Class Table}.) It is also
responsible for calling @code{blink-paren-function} when the inserted
character has close parenthesis syntax (@pxref{Blinking}).
@vindex post-self-insert-hook
The final thing this command does is to run the hook
@code{post-self-insert-hook}. You could use this to automatically
reindent text as it is typed, for example.
Do not try substituting your own definition of
@code{self-insert-command} for the standard one. The editor command
loop handles this function specially.
......
......@@ -1237,11 +1237,13 @@ passing the hook functions as arguments to a "wrapping" function.
*** New macro `with-wrapper-hook' for running an abnormal hook as a
set of "wrapping" filters, similar to around advice.
** `server-eval-at' is provided to allow evaluating forms on different
Emacs server instances.
+++
** The new function `server-eval-at' allows evaluation of Lisp forms on
named Emacs server instances, using TCP sockets.
** `call-process' allows a `(:file "file")' spec to redirect STDOUT to
a file.
+++
** `call-process' and `call-process-region' allow a `(:file "file")' spec
to redirect STDOUT to a file.
---
** Variable `stack-trace-on-error' removed.
......@@ -1253,6 +1255,7 @@ jumping all the way to the top-level.
** The function format-time-string now supports the %N directive, for
higher-resolution time stamps.
+++
** New function `read-char-choice' reads a restricted set of characters,
discarding any inputs not inside the set.
......@@ -1271,6 +1274,7 @@ syntax-propertize-via-font-lock to reuse old font-lock-syntactic-keywords
as-is; and syntax-propertize-rules which provides a new way to specify
syntactic rules.
+++
** New hook post-self-insert-hook run at the end of self-insert-command.
+++
......@@ -1283,10 +1287,12 @@ syntactic rules.
*** `prog-mode' is a new major mode from which programming modes
should be derived.
+++
**** `prog-mode-hook' can be used to enable features for programming
modes, e.g. (add-hook 'prog-mode-hook 'flyspell-prog-mode) to enable
on-the-fly spell checking for comments and strings.
+++
*** New hook `change-major-mode-after-body-hook', run by
`run-mode-hooks' just before any other mode hooks.
......
2012-02-02 Glenn Morris <rgm@gnu.org>
* server.el (server-auth-dir): Doc fix.
(server-eval-at): Doc fix. Give an explicit error if !server-use-tcp.
* subr.el (run-mode-hooks): Doc fix.
2012-02-02 Juri Linkov <juri@jurta.org>
* image-mode.el (image-toggle-display-image): Remove tautological
`major-mode' from the `derived-mode-p' test.
2012-02-02 Kenichi Handa <handa@m17n.org>
* (compose-region): Cancel previous change.
......
......@@ -482,7 +482,7 @@ Remove text properties that display the image."
"Show the image of the image file.
Turn the image data into a real image, but only if the whole file
was inserted."
(unless (derived-mode-p 'image-mode major-mode)
(unless (derived-mode-p 'image-mode)
(error "The buffer is not in Image mode"))
(let* ((filename (buffer-file-name))
(data-p (not (and filename
......
......@@ -126,6 +126,8 @@ port number."
(defcustom server-auth-dir (locate-user-emacs-file "server/")
"Directory for server authentication files.
We only use this if `server-use-tcp' is non-nil.
Otherwise we use `server-socket-dir'.
NOTE: On FAT32 filesystems, directories are not secure;
files can be read and modified by any user or process.
......@@ -1525,7 +1527,14 @@ only these files will be asked to be saved."
nil)
(defun server-eval-at (server form)
"Eval FORM on Emacs Server SERVER."
"Contact the Emacs server named SERVER and evaluate FORM there.
Returns the result of the evaluation, or signals an error if it
cannot contact the specified server. For example:
\(server-eval-at \"server\" '(emacs-pid))
returns the process ID of the Emacs instance running \"server\".
This function requires the use of TCP sockets. "
(or server-use-tcp
(error "This function requires TCP sockets"))
(let ((auth-file (expand-file-name server server-auth-dir))
(coding-system-for-read 'binary)
(coding-system-for-write 'binary)
......
......@@ -1539,10 +1539,12 @@ if it is empty or a duplicate."
(defun run-mode-hooks (&rest hooks)
"Run mode hooks `delayed-mode-hooks' and HOOKS, or delay HOOKS.
Execution is delayed if the variable `delay-mode-hooks' is non-nil.
Otherwise, runs the mode hooks and then `after-change-major-mode-hook'.
Major mode functions should use this instead of `run-hooks' when running their
FOO-mode-hook."
If the variable `delay-mode-hooks' is non-nil, does not run any hooks,
just adds the HOOKS to the list `delayed-mode-hooks'.
Otherwise, runs hooks in the sequence: `change-major-mode-after-body-hook',
`delayed-mode-hooks' (in reverse order), HOOKS, and finally
`after-change-major-mode-hook'. Major mode functions should use
this instead of `run-hooks' when running their FOO-mode-hook."
(if delay-mode-hooks
;; Delaying case.
(dolist (hook hooks)
......
2012-02-02 Glenn Morris <rgm@gnu.org>
* callproc.c (Fcall_process, Fcall_process_region): Doc fix.
* nsterm.m (syms_of_nsterm) <x-toolkit-scroll-bars>:
Unconditionally set to t. (Bug#10673)
* nsterm.m (syms_of_nsterm) <x-toolkit-scroll-bars>:
* w32term.c (syms_of_w32term) <x-toolkit-scroll-bars>:
* xterm.c (syms_of_xterm) <x-toolkit-scroll-bars>: Doc fix.
2012-02-02 Kenichi Handa <handa@m17n.org>
(x_produce_glyphs): Cancel previous change. If cmp->glyph_len is
......
......@@ -164,7 +164,8 @@ The remaining arguments are optional.
The program's input comes from file INFILE (nil means `/dev/null').
Insert output in BUFFER before point; t means current buffer; nil for BUFFER
means discard it; 0 means discard and don't wait; and `(:file FILE)', where
FILE is a file name string, means that it should be written to that file.
FILE is a file name string, means that it should be written to that file
\(if the file already exists it is overwritten).
BUFFER can also have the form (REAL-BUFFER STDERR-FILE); in that case,
REAL-BUFFER says what to do with standard output, as above,
while STDERR-FILE says what to do with standard error in the child.
......@@ -940,7 +941,7 @@ Delete the text if fourth arg DELETE is non-nil.
Insert output in BUFFER before point; t means current buffer; nil for
BUFFER means discard it; 0 means discard and don't wait; and `(:file
FILE)', where FILE is a file name string, means that it should be
written to that file.
written to that file (if the file already exists it is overwritten).
BUFFER can also have the form (REAL-BUFFER STDERR-FILE); in that case,
REAL-BUFFER says what to do with standard output, as above,
while STDERR-FILE says what to do with standard error in the child.
......
/* NeXT/Open/GNUstep / MacOSX communication module.
Copyright (C) 1989, 1993-1994, 2005-2006, 2008-2012
Free Software Foundation, Inc.
Copyright (C) 1989, 1993-1994, 2005-2006, 2008-2012
Free Software Foundation, Inc.
This file is part of GNU Emacs.
......@@ -6739,13 +6740,8 @@ Convert an X font name (XLFD) to an NS font name.
A value of nil means Emacs doesn't use toolkit scroll bars.
With the X Window system, the value is a symbol describing the
X toolkit. Possible values are: gtk, motif, xaw, or xaw3d.
With MS Windows, the value is t. With Nextstep, the value is
t or nil. */);
#ifdef USE_TOOLKIT_SCROLL_BARS
With MS Windows or Nextstep, the value is t. */);
Vx_toolkit_scroll_bars = Qt;
#else
Vx_toolkit_scroll_bars = Qnil;
#endif
DEFVAR_BOOL ("x-use-underline-position-properties",
x_use_underline_position_properties,
......
/* Implementation of GUI terminal on the Microsoft W32 API.
Copyright (C) 1989, 1993-2012 Free Software Foundation, Inc.
Copyright (C) 1989, 1993-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
......@@ -6432,8 +6432,7 @@ baseline level. The default value is nil. */);
A value of nil means Emacs doesn't use toolkit scroll bars.
With the X Window system, the value is a symbol describing the
X toolkit. Possible values are: gtk, motif, xaw, or xaw3d.
With MS Windows, the value is t. With Nextstep, the value is
t or nil. */);
With MS Windows or Nextstep, the value is t. */);
Vx_toolkit_scroll_bars = Qt;
staticpro (&last_mouse_motion_frame);
......
/* X Communication module for terminals which understand the X protocol.
Copyright (C) 1989, 1993-2012 Free Software Foundation, Inc.
Copyright (C) 1989, 1993-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
......@@ -10844,8 +10844,7 @@ selected window or cursor position is preserved. */);
A value of nil means Emacs doesn't use toolkit scroll bars.
With the X Window system, the value is a symbol describing the
X toolkit. Possible values are: gtk, motif, xaw, or xaw3d.
With MS Windows, the value is t. With Nextstep, the value is
t or nil. */);
With MS Windows or Nextstep, the value is t. */);
#ifdef USE_TOOLKIT_SCROLL_BARS
#ifdef USE_MOTIF
Vx_toolkit_scroll_bars = intern_c_string ("motif");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment