merge trunk

This commit is contained in:
Kenichi Handa 2012-03-19 13:17:50 +09:00
commit 4ebb358f29
58 changed files with 1245 additions and 643 deletions

View file

@ -203,8 +203,7 @@ hash.texi cyd
help.texi cyd
hooks.texi rgm
index.texi
internals.texi rgm (I don't know much about this, so it would be
good if someone else could at least look at the FIXME? comments.)
internals.texi rgm cyd
intro.texi cyd
keymaps.texi cyd
lists.texi cyd
@ -217,7 +216,7 @@ modes.texi cyd
nonascii.texi cyd
numbers.texi cyd
objects.texi cyd
os.texi
os.texi cyd
package.texi rgm
positions.texi cyd
processes.texi

View file

@ -1,3 +1,18 @@
2012-03-17 Chong Yidong <cyd@gnu.org>
* package.texi (Package Installation): Document use of
package-initialize in init file.
2012-03-16 Glenn Morris <rgm@gnu.org>
* help.texi (Language Help):
* mule.texi (International Chars):
etc/HELLO is for character demonstration.
2012-03-15 Dani Moncayo <dmoncayo@gmail.com> (tiny change)
* dired.texi (Shell Commands in Dired): Fix typo.
2012-03-04 Chong Yidong <cyd@gnu.org>
* killing.texi (Clipboard): Document clipboard manager.

View file

@ -823,9 +823,9 @@ replaces each occurrence.
@item
If the command string contains neither @samp{*} nor @samp{?}, Emacs
runs the shell command once for each file, adding the file name is
added at the end. For example, @kbd{! uudecode @key{RET}} runs
@code{uudecode} on each file.
runs the shell command once for each file, adding the file name at the
end. For example, @kbd{! uudecode @key{RET}} runs @code{uudecode} on
each file.
@end itemize
To iterate over the file names in a more complicated fashion, use an

View file

@ -464,7 +464,8 @@ listing the associated character sets, coding systems, and input
methods, as well as some sample text for that language environment.
The command @kbd{C-h h} (@code{view-hello-file}) displays the file
@file{etc/HELLO}, which shows how to say ``hello'' in many languages.
@file{etc/HELLO}, which demonstrates various character sets by showing
how to say ``hello'' in many languages.
The command @kbd{C-h I} (@code{describe-input-method}) describes an
input method---either a specified input method, or by default the

View file

@ -1,5 +1,5 @@
@c This is part of the Emacs manual.
@c Copyright (C) 1997, 1999-2012 Free Software Foundation, Inc.
@c Copyright (C) 1997, 1999-2012 Free Software Foundation, Inc.
@c See file emacs.texi for copying conditions.
@node International, Modes, Frames, Top
@chapter International Character Set Support
@ -137,8 +137,8 @@ writing files, and when exchanging data with subprocesses.
@cindex undisplayable characters
@cindex @samp{?} in display
The command @kbd{C-h h} (@code{view-hello-file}) displays the file
@file{etc/HELLO}, which shows how to say ``hello'' in many languages.
This illustrates various scripts. If some characters can't be
@file{etc/HELLO}, which illustrates various scripts by showing
how to say ``hello'' in many languages. If some characters can't be
displayed on your terminal, they appear as @samp{?} or as hollow boxes
(@pxref{Undisplayable Characters}).

View file

@ -157,25 +157,38 @@ directory name of the package archive. You can alter this list if you
wish to use third party package archives---but do so at your own risk,
and use only third parties that you think you can trust!
Once a package is downloaded and installed, it takes effect in the
current Emacs session. What ``taking effect'' means depends on the
package; most packages just make some new commands available, while
others have more wide-ranging effects on the Emacs session. For such
information, consult the package's help buffer.
Once a package is downloaded and installed, it is @dfn{loaded} into
the current Emacs session. Loading a package is not quite the same as
loading a Lisp library (@pxref{Lisp Libraries}); its effect varies
from package to package. Most packages just make some new commands
available, while others have more wide-ranging effects on the Emacs
session. For such information, consult the package's help buffer.
By default, Emacs also automatically loads all installed packages
(causing them to ``take effect'') in subsequent Emacs sessions. This
happens at startup, after processing the init file (@pxref{Init
File}). As an exception, Emacs does not load packages at startup if
invoked with the @samp{-q} or @samp{--no-init-file} options
(@pxref{Initial Options}).
By default, Emacs also automatically loads all installed packages in
subsequent Emacs sessions. This happens at startup, after processing
the init file (@pxref{Init File}). As an exception, Emacs does not
load packages at startup if invoked with the @samp{-q} or
@samp{--no-init-file} options (@pxref{Initial Options}).
@vindex package-enable-at-startup
@findex package-initialize
To disable automatic package loading, change the variable
@code{package-enable-at-startup} to @code{nil}. If you do this, you
can use the command @kbd{M-x package-initialize} to load your
packages.
@code{package-enable-at-startup} to @code{nil}.
@findex package-initialize
The reason automatic package loading occurs after loading the init
file is that user options only receive their customized values after
loading the init file, including user options which affect the
packaging system. In some circumstances, you may want to load
packages explicitly in your init file (usually because some other code
in your init file depends on a package). In that case, your init file
should call the function @code{package-initialize}. It is up to you
to ensure that relevant user options, such as @code{package-load-list}
(see below), are set up prior to the @code{package-initialize} call.
You should also set @code{package-enable-at-startup} to @code{nil}, to
avoid loading the packages again after processing the init file.
Alternatively, you may choose to completely inhibit package loading at
startup, and invoke the command @kbd{M-x package-initialize} to load
your packages manually.
@vindex package-load-list
For finer control over package loading, you can use the variable

View file

@ -1,3 +1,41 @@
2012-03-18 Chong Yidong <cyd@gnu.org>
* internals.texi (Building Emacs, Garbage Collection): Copyedits.
(Writing Emacs Primitives): Re-organize discussion of functions
with variable Lisp arguments are handled. Delete an obsolete
remark, previously tagged as FIXME.
* os.texi (Idle Timers): Minor clarification.
(Idle Timers): Link to Time of Day for description of time list.
2012-03-18 Glenn Morris <rgm@gnu.org>
* os.texi (System Interface): Flow control was removed.
(Startup Summary): General update.
(Init File): Don't mention compiling it.
2012-03-17 Chong Yidong <cyd@gnu.org>
* os.texi (Startup Summary): Mention package loading.
(Init File): Don't refer to .emacs in section title. Copyedits.
(Terminal-Specific): Give a realistic example.
(Command-Line Arguments): Reference Entering Emacs instead of
repeating the spiel about not restarting Emacs.
(Time of Day): Discuss time representation at beginning of node.
(Sound Output): Copyedits.
* package.texi (Packaging Basics): Document package-initialize.
2012-03-17 Eli Zaretskii <eliz@gnu.org>
* frames.texi (Initial Parameters): Add an index entry for
minibuffer-only frame.
2012-03-16 Glenn Morris <rgm@gnu.org>
* modes.texi (Major Mode Conventions): Mention the strange
relationship between View mode and special modes. (Bug#10650)
2012-03-11 Chong Yidong <cyd@gnu.org>
* windows.texi (Window Configurations): save-window-excursion is

View file

@ -420,10 +420,11 @@ the initial frame, specify the same parameters in
@code{initial-frame-alist} with values that match the X resources.
@end defopt
If these parameters specify a separate minibuffer-only frame with
If these parameters specify a separate @dfn{minibuffer-only frame} with
@code{(minibuffer . nil)}, and you have not created one, Emacs creates
one for you.
@cindex minibuffer-only frame
@defopt minibuffer-frame-alist
This variable's value is an alist of parameter values used when
creating an initial minibuffer-only frame. This is the

View file

@ -28,42 +28,39 @@ internal aspects of GNU Emacs that may be of interest to C programmers.
This section explains the steps involved in building the Emacs
executable. You don't have to know this material to build and install
Emacs, since the makefiles do all these things automatically. This
information is pertinent to Emacs maintenance.
information is pertinent to Emacs developers.
Compilation of the C source files in the @file{src} directory
produces an executable file called @file{temacs}, also called a
@dfn{bare impure Emacs}. It contains the Emacs Lisp interpreter and I/O
routines, but not the editing commands.
@dfn{bare impure Emacs}. It contains the Emacs Lisp interpreter and
I/O routines, but not the editing commands.
@cindex @file{loadup.el}
The command @w{@samp{temacs -l loadup}} uses @file{temacs} to create
the real runnable Emacs executable. These arguments direct
@file{temacs} to evaluate the Lisp files specified in the file
@file{loadup.el}. These files set up the normal Emacs editing
environment, resulting in an Emacs that is still impure but no longer
bare.
The command @w{@command{temacs -l loadup}} would run @file{temacs}
and direct it to load @file{loadup.el}. The @code{loadup} library
loads additional Lisp libraries, which set up the normal Emacs editing
environment. After this step, the Emacs executable is no longer
@dfn{bare}.
@cindex dumping Emacs
It takes some time to load the standard Lisp files. Luckily,
you don't have to do this each time you run Emacs; @file{temacs} can
dump out an executable program called @file{emacs} that has these files
preloaded. @file{emacs} starts more quickly because it does not need to
load the files. This is the Emacs executable that is normally
installed.
Because it takes some time to load the standard Lisp files, the
@file{temacs} executable usually isn't run directly by users.
Instead, as one of the last steps of building Emacs, the command
@samp{temacs -batch -l loadup dump} is run. The special @samp{dump}
argument causes @command{temacs} to dump out an executable program,
called @file{emacs}, which has all the standard Lisp files preloaded.
(The @samp{-batch} argument prevents @file{temacs} from trying to
initialize any of its data on the terminal, so that the tables of
terminal information are empty in the dumped Emacs.)
@cindex preloaded Lisp files
@vindex preloaded-file-list
@cindex dumped Lisp files
To create @file{emacs}, use the command @samp{temacs -batch -l loadup
dump}. The purpose of @samp{-batch} here is to prevent @file{temacs}
from trying to initialize any of its data on the terminal; this ensures
that the tables of terminal information are empty in the dumped Emacs.
The argument @samp{dump} tells @file{loadup.el} to dump a new executable
named @file{emacs}. The variable @code{preloaded-file-list} stores a
list of the Lisp files that were dumped with the @file{emacs} executable.
If you port Emacs to a new operating system, and are not able to
implement dumping, then Emacs must load @file{loadup.el} each time it
starts.
The dumped @file{emacs} executable (also called a @dfn{pure} Emacs)
is the one which is installed. The variable
@code{preloaded-file-list} stores a list of the Lisp files preloaded
into the dumped Emacs. If you port Emacs to a new operating system,
and are not able to implement dumping, then Emacs must load
@file{loadup.el} each time it starts.
@cindex @file{site-load.el}
You can specify additional files to preload by writing a library named
@ -134,7 +131,7 @@ in a different location since it was dumped.
This function delays the initialization of @var{symbol} to the next
Emacs start. You normally use this function by specifying it as the
@code{:initialize} property of a customizable variable. (The argument
@var{value} is unused, and is provided only for compatiblity with the
@var{value} is unused, and is provided only for compatibility with the
form Custom expects.)
@end defun
@ -163,7 +160,7 @@ all the new data created during an Emacs session are kept
in the preloaded standard Lisp files---data that should never change
during actual use of Emacs.
Pure storage is allocated only while @file{temacs} is loading the
Pure storage is allocated only while @command{temacs} is loading the
standard preloaded Lisp libraries. In the file @file{emacs}, it is
marked as read-only (on operating systems that permit this), so that
the memory space can be shared by all the Emacs jobs running on the
@ -214,31 +211,27 @@ You should not change this flag in a running Emacs.
@node Garbage Collection
@section Garbage Collection
@cindex garbage collection
@cindex memory allocation
When a program creates a list or the user defines a new function (such
as by loading a library), that data is placed in normal storage. If
normal storage runs low, then Emacs asks the operating system to
allocate more memory in blocks of 1k bytes. Each block is used for one
type of Lisp object, so symbols, cons cells, markers, etc., are
segregated in distinct blocks in memory. (Vectors, long strings,
buffers and certain other editing types, which are fairly large, are
allocated in individual blocks, one per object, while small strings are
packed into blocks of 8k bytes.)
When a program creates a list or the user defines a new function
(such as by loading a library), that data is placed in normal storage.
If normal storage runs low, then Emacs asks the operating system to
allocate more memory. Different types of Lisp objects, such as
symbols, cons cells, markers, etc., are segregated in distinct blocks
in memory. (Vectors, long strings, buffers and certain other editing
types, which are fairly large, are allocated in individual blocks, one
per object, while small strings are packed into blocks of 8k bytes.)
It is quite common to use some storage for a while, then release it by
(for example) killing a buffer or deleting the last pointer to an
@cindex garbage collection
It is quite common to use some storage for a while, then release it
by (for example) killing a buffer or deleting the last pointer to an
object. Emacs provides a @dfn{garbage collector} to reclaim this
abandoned storage. (This name is traditional, but ``garbage recycler''
might be a more intuitive metaphor for this facility.)
The garbage collector operates by finding and marking all Lisp objects
that are still accessible to Lisp programs. To begin with, it assumes
all the symbols, their values and associated function definitions, and
any data presently on the stack, are accessible. Any objects that can
be reached indirectly through other accessible objects are also
accessible.
abandoned storage. The garbage collector operates by finding and
marking all Lisp objects that are still accessible to Lisp programs.
To begin with, it assumes all the symbols, their values and associated
function definitions, and any data presently on the stack, are
accessible. Any objects that can be reached indirectly through other
accessible objects are also accessible.
When marking is finished, all objects still unmarked are garbage. No
matter what the Lisp program or the user does, it is impossible to refer
@ -336,11 +329,9 @@ The total size of all strings, in characters.
The total number of elements of existing vectors.
@item used-floats
@c Emacs 19 feature
The number of floats in use.
@item free-floats
@c Emacs 19 feature
The number of floats for which space has been obtained from the
operating system, but that are not currently being used.
@ -417,7 +408,6 @@ memory used by Lisp data, broken down by data type. By contrast, the
function @code{memory-limit} provides information on the total amount of
memory Emacs is currently using.
@c Emacs 19 feature
@defun memory-limit
This function returns the address of the last byte Emacs has allocated,
divided by 1024. We divide the value by 1024 to make sure it fits in a
@ -428,7 +418,7 @@ memory usage.
@end defun
@defvar memory-full
This variable is @code{t} if Emacs is close to out of memory for Lisp
This variable is @code{t} if Emacs is nearly out of memory for Lisp
objects, and @code{nil} otherwise.
@end defvar
@ -519,8 +509,9 @@ appearance.)
@smallexample
@group
DEFUN ("or", For, Sor, 0, UNEVALLED, 0,
doc: /* Eval args until one of them yields non-nil, then return that
value. The remaining args are not evalled at all.
doc: /* Eval args until one of them yields non-nil, then return
that value.
The remaining args are not evalled at all.
If all args return nil, return nil.
@end group
@group
@ -566,14 +557,11 @@ This is the name of the Lisp symbol to define as the function name; in
the example above, it is @code{or}.
@item fname
This is the C function name for this function. This is
the name that is used in C code for calling the function. The name is,
by convention, @samp{F} prepended to the Lisp name, with all dashes
(@samp{-}) in the Lisp name changed to underscores. Thus, to call this
function from C code, call @code{For}. Remember that the arguments must
be of type @code{Lisp_Object}; various macros and functions for creating
values of type @code{Lisp_Object} are declared in the file
@file{lisp.h}.
This is the C function name for this function. This is the name that
is used in C code for calling the function. The name is, by
convention, @samp{F} prepended to the Lisp name, with all dashes
(@samp{-}) in the Lisp name changed to underscores. Thus, to call
this function from C code, call @code{For}.
@item sname
This is a C variable name to use for a structure that holds the data for
@ -627,38 +615,35 @@ too.
@end table
After the call to the @code{DEFUN} macro, you must write the
argument list that every C function must have, including the types for
the arguments. For a function with a fixed maximum number of
arguments, declare a C argument for each Lisp argument, and give them
all type @code{Lisp_Object}. When a Lisp function has no upper limit
on the number of arguments, its implementation in C actually receives
exactly two arguments: the first is the number of Lisp arguments, and
the second is the address of a block containing their values. They
have types @code{int} and @w{@code{Lisp_Object *}}.
argument list for the C function, including the types for the
arguments. If the primitive accepts a fixed maximum number of Lisp
arguments, there must be one C argument for each Lisp argument, and
each argument must be of type @code{Lisp_Object}. (Various macros and
functions for creating values of type @code{Lisp_Object} are declared
in the file @file{lisp.h}.) If the primitive has no upper limit on
the number of Lisp arguments, it must have exactly two C arguments:
the first is the number of Lisp arguments, and the second is the
address of a block containing their values. These have types
@code{int} and @w{@code{Lisp_Object *}} respectively.
@cindex @code{GCPRO} and @code{UNGCPRO}
@cindex protect C variables from garbage collection
Within the function @code{For} itself, note the use of the macros
@code{GCPRO1} and @code{UNGCPRO}. @code{GCPRO1} is used to
``protect'' a variable from garbage collection---to inform the garbage
collector that it must look in that variable and regard its contents
as an accessible object. GC protection is necessary whenever you call
@code{eval_sub} (or @code{Feval}) either directly or indirectly.
At such a time, any Lisp object that this function may refer to again
must be protected somehow.
@code{GCPRO1} and @code{UNGCPRO}. These macros are defined for the
sake of the few platforms which do not use Emacs' default
stack-marking garbage collector. The @code{GCPRO1} macro ``protects''
a variable from garbage collection, explicitly informing the garbage
collector that that variable and all its contents must be as
accessible. GC protection is necessary in any function which can
perform Lisp evaluation by calling @code{eval_sub} or @code{Feval} as
a subroutine, either directly or indirectly.
It suffices to ensure that at least one pointer to each object is
GC-protected; that way, the object cannot be recycled, so all pointers
to it remain valid. Thus, a particular local variable can do without
GC-protected. Thus, a particular local variable can do without
protection if it is certain that the object it points to will be
preserved by some other pointer (such as another local variable that
has a @code{GCPRO}).
@ignore
@footnote{Formerly, strings were a special exception; in older Emacs
versions, every local variable that might point to a string needed a
@code{GCPRO}.}.
@end ignore
Otherwise, the local variable needs a @code{GCPRO}.
has a @code{GCPRO}). Otherwise, the local variable needs a
@code{GCPRO}.
The macro @code{GCPRO1} protects just one local variable. If you
want to protect two variables, use @code{GCPRO2} instead; repeating
@ -667,34 +652,17 @@ want to protect two variables, use @code{GCPRO2} instead; repeating
implicitly use local variables such as @code{gcpro1}; you must declare
these explicitly, with type @code{struct gcpro}. Thus, if you use
@code{GCPRO2}, you must declare @code{gcpro1} and @code{gcpro2}.
Alas, we can't explain all the tricky details here.
@code{UNGCPRO} cancels the protection of the variables that are
protected in the current function. It is necessary to do this
explicitly.
Built-in functions that take a variable number of arguments actually
accept two arguments at the C level: the number of Lisp arguments, and
a @code{Lisp_Object *} pointer to a C vector containing those Lisp
arguments. This C vector may be part of a Lisp vector, but it need
not be. The responsibility for using @code{GCPRO} to protect the Lisp
arguments from GC if necessary rests with the caller in this case,
since the caller allocated or found the storage for them.
You must not use C initializers for static or global variables unless
the variables are never written once Emacs is dumped. These variables
with initializers are allocated in an area of memory that becomes
read-only (on certain operating systems) as a result of dumping Emacs.
@xref{Pure Storage}.
@c FIXME is this still true? I don't think so...
Do not use static variables within functions---place all static
variables at top level in the file. This is necessary because Emacs on
some operating systems defines the keyword @code{static} as a null
macro. (This definition is used because those systems put all variables
declared static in a place that becomes read-only after dumping, whether
they have initializers or not.)
@cindex @code{defsubr}, Lisp symbol for a primitive
Defining the C function is not enough to make a Lisp primitive
available; you must also create the Lisp symbol for the primitive and

View file

@ -525,6 +525,10 @@ mode when creating new buffers (@pxref{Auto Major Mode}), but with such
@code{special} modes, Fundamental mode is used instead. Modes such as
Dired, Rmail, and Buffer List use this feature.
The function @code{view-buffer} does not enable View mode in buffers
whose mode-class is special, because such modes usually provide their
own View-like bindings.
The @code{define-derived-mode} macro automatically marks the derived
mode as special if the parent mode is special. Special mode is a
convenient parent for such modes to inherit from; @xref{Basic Major

View file

@ -8,8 +8,7 @@
@chapter Operating System Interface
This chapter is about starting and getting out of Emacs, access to
values in the operating system environment, and terminal input, output,
and flow control.
values in the operating system environment, and terminal input, output.
@xref{Building Emacs}, for related information. @xref{Display}, for
additional operating system status information pertaining to the
@ -60,7 +59,7 @@ can customize these actions.
@cindex @file{startup.el}
When Emacs is started up, it performs the following operations
(which are defined in @file{startup.el}):
(see @code{normal-top-level} in @file{startup.el}):
@enumerate
@item
@ -70,6 +69,15 @@ adds the directory's subdirectories to the list, and those are scanned
in their turn. The files @file{subdirs.el} are normally generated
automatically when Emacs is installed.
@item
It registers input methods by loading any @file{leim-list.el} file
found in the @code{load-path}.
@c It removes PWD from the environment if it is not accurate.
@c It abbreviates default-directory.
@c Now normal-top-level calls command-line.
@vindex before-init-time
@item
It sets the variable @code{before-init-time} to the value of
@ -77,32 +85,49 @@ It sets the variable @code{before-init-time} to the value of
@code{after-init-time} to @code{nil}, which signals to Lisp programs
that Emacs is being initialized.
@vindex initial-window-system@r{, and startup}
@vindex window-system-initialization-alist
@item
It loads the initialization library for the window system specified by
the variable @code{initial-window-system} (@pxref{Window Systems,
initial-window-system}). This library's name is
@file{term/@var{windowsystem}-win.el}, where @var{windowsystem} is the
value of @code{initial-window-system}. From that library, it calls
the appropriate initialization function. The initialization function
for each supported window system is specified by
@code{window-system-initialization-alist}.
@c set-locale-environment
@item
It sets the language environment and the terminal coding system,
if requested by environment variables such as @code{LANG}.
@item
It processes the initial options. (Some of them are handled
even earlier than this.)
It does some basic parsing of the command-line arguments.
@vindex initial-window-system@r{, and startup}
@vindex window-system-initialization-alist
@item
If not running in batch mode, it initializes the window system that
the variable @code{initial-window-system} specifies (@pxref{Window
Systems, initial-window-system}). The initialization function for
each supported window system is specified by
@code{window-system-initialization-alist}. If the value
of @code{initial-window-system} is @var{windowsystem}, then the
appropriate initialization function is defined in the file
@file{term/@var{windowsystem}-win.el}. This file should have been
compiled into the Emacs executable when it was built.
@item
It runs the normal hook @code{before-init-hook}.
@item
It initializes the initial frame's faces, and turns on the menu bar
and tool bar if needed.
If appropriate (e.g., not in batch mode or started as a daemon), it
creates a graphical frame.
@item
It initializes the initial frame's faces, and sets up the menu bar
and tool bar if needed. If graphical frames are supported, it sets up
the tool bar even if the current frame is not a graphical one, since a
graphical frame may be created later on.
@item
It use @code{custom-reevaluate-setting} to re-initialize the members
of the list @code{custom-delayed-init-variables}. These are any
pre-loaded user options whose default value depends on the run-time,
rather than build-time, context.
@xref{Building Emacs, custom-initialize-delay}.
@c @item
@c It registers the colors available for tty frames.
@item
It loads the library @file{site-start}, if it exists. This is not
@ -127,6 +152,11 @@ It loads your abbrevs from the file specified by
(@pxref{Abbrev Files, abbrev-file-name}). This is not done if the
option @samp{--batch} was specified.
@item
If @code{package-enable-at-startup} is non-@code{nil}, it calls the
function @code{package-initialize} to activate any optional Emacs Lisp
package that has been installed. @xref{Packaging Basics}.
@vindex after-init-time
@item
It sets the variable @code{after-init-time} to the value of
@ -149,13 +179,17 @@ Lisp library, which is specified by the variable
@code{term-file-prefix} (@pxref{Terminal-Specific}). This is not done
in @code{--batch} mode, nor if @code{term-file-prefix} is @code{nil}.
@c Now command-line calls command-line-1.
@item
It displays the initial echo area message, unless you have suppressed
that with @code{inhibit-startup-echo-area-message}.
@item
It processes the action arguments from the command line.
It processes any command-line options that were not handled earlier.
@c This next one is back in command-line, but the remaining bits of
@c command-line-1 are not done if noninteractive.
@item
It now exits if the option @code{--batch} was specified.
@ -164,6 +198,15 @@ If @code{initial-buffer-choice} is a string, it visits the file with
that name. Furthermore, if the @samp{*scratch*} buffer exists and is
empty, it inserts @code{initial-scratch-message} into that buffer.
@c To make things nice and confusing, the next three items can be
@c called from two places. If displaying a startup screen, they are
@c called in command-line-1 before the startup screen is shown.
@c inhibit-startup-hooks is then set and window-setup-hook set to nil.
@c If not displaying a startup screen, they are are called in
@c normal-top-level.
@c FIXME? So it seems they can be called before or after the
@c daemon/session restore step?
@item
It runs @code{emacs-startup-hook} and then @code{term-setup-hook}.
@ -175,11 +218,6 @@ specify.
@item
It runs @code{window-setup-hook}. @xref{Window Systems}.
@item
If the option @code{--daemon} was specified, it calls
@code{server-start} and detaches from the controlling terminal.
@xref{Emacs Server,,, emacs, The GNU Emacs Manual}.
@item
It displays the @dfn{startup screen}, which is a special buffer that
contains information about copyleft and basic Emacs usage. This is
@ -187,10 +225,27 @@ not done if @code{initial-buffer-choice} or
@code{inhibit-startup-screen} are @code{nil}, nor if the
@samp{--no-splash} or @samp{-Q} command-line options were specified.
@c End of command-line-1.
@c Back to command-line from command-line-1.
@c This is the point at which we actually exit in batch mode, but the
@c last few bits of command-line-1 are not done in batch mode.
@item
If the option @code{--daemon} was specified, it calls
@code{server-start} and detaches from the controlling terminal.
@xref{Emacs Server,,, emacs, The GNU Emacs Manual}.
@item
If started by the X session manager, it calls
@code{emacs-session-restore} passing it as argument the ID of the
previous session. @xref{Session Management}.
@c End of command-line.
@c Back to normal-top-level from command-line.
@end enumerate
@defopt inhibit-startup-screen
@ -242,17 +297,20 @@ is @code{nil}, the @samp{*scratch*} buffer is empty.
@end defopt
@node Init File
@subsection The Init File, @file{.emacs}
@subsection The Init File
@cindex init file
@cindex @file{.emacs}
@cindex @file{init.el}
When you start Emacs, it normally attempts to load your @dfn{init
file}. This is either a file named @file{.emacs} or @file{.emacs.el}
in your home directory, or a file named @file{init.el} in a
subdirectory named @file{.emacs.d} in your home directory. Whichever
place you use, you can also compile the file (@pxref{Byte
subdirectory named @file{.emacs.d} in your home directory.
@ignore
Whichever place you use, you can also compile the file (@pxref{Byte
Compilation}); then the actual file loaded will be @file{.emacs.elc}
or @file{init.elc}.
@end ignore
The command-line switches @samp{-q}, @samp{-Q}, and @samp{-u}
control whether and where to find the init file; @samp{-q} (and the
@ -267,13 +325,13 @@ file. If those environment variables are absent, though, Emacs uses
your user-id to find your home directory.
@cindex default init file
A site may have a @dfn{default init file}, which is the library
named @file{default.el}. Emacs finds the @file{default.el} file
through the standard search path for libraries (@pxref{How Programs Do
Loading}). The Emacs distribution does not come with this file; sites
may provide one for local customizations. If the default init file
exists, it is loaded whenever you start Emacs, except in batch mode or
if @samp{-q} (or @samp{-Q}) is specified. But your own personal init
An Emacs installation may have a @dfn{default init file}, which is a
Lisp library named @file{default.el}. Emacs finds this file through
the standard search path for libraries (@pxref{How Programs Do
Loading}). The Emacs distribution does not come with this file; it is
intended for local customizations. If the default init file exists,
it is loaded whenever you start Emacs, except in batch mode or if
@samp{-q} (or @samp{-Q}) is specified. But your own personal init
file, if any, is loaded first; if it sets @code{inhibit-default-init}
to a non-@code{nil} value, then Emacs does not subsequently load the
@file{default.el} file.
@ -343,23 +401,22 @@ in the normal manner, by searching the @code{load-path} directories, and
trying the @samp{.elc} and @samp{.el} suffixes.
@cindex Termcap
The usual function of a terminal-specific library is to enable
special keys to send sequences that Emacs can recognize. It may also
need to set or add to @code{input-decode-map} if the Termcap or
Terminfo entry does not specify all the terminal's function keys.
@xref{Terminal Input}.
The usual role of a terminal-specific library is to enable special
keys to send sequences that Emacs can recognize. It may also need to
set or add to @code{input-decode-map} if the Termcap or Terminfo entry
does not specify all the terminal's function keys. @xref{Terminal
Input}.
When the name of the terminal type contains a hyphen, and no library
is found whose name is identical to the terminal's name, Emacs strips
from the terminal's name the last hyphen and everything that follows
it, and tries again. This process is repeated until Emacs finds a
matching library or until there are no more hyphens in the name (the
latter means the terminal doesn't have any library specific to it).
Thus, for example, if there are no @samp{aaa-48} and @samp{aaa-30}
libraries, Emacs will try the same library @file{term/aaa.el} for
terminal types @samp{aaa-48} and @samp{aaa-30-rv}. If necessary, the
library can evaluate @code{(getenv "TERM")} to find the full name of
the terminal type.@refill
matching library, or until there are no more hyphens in the name
(i.g.@: there is no terminal-specific library). For example, if the
terminal name is @samp{xterm-256color} and there is no
@file{term/xterm-256color.el} library, Emacs tries to load
@file{term/xterm.el}. If necessary, the terminal library can evaluate
@code{(getenv "TERM")} to find the full name of the terminal type.
Your init file can prevent the loading of the
terminal-specific library by setting the variable
@ -376,8 +433,8 @@ have their own libraries. @xref{Hooks}.
@defvar term-file-prefix
@cindex @code{TERM} environment variable
If the @code{term-file-prefix} variable is non-@code{nil}, Emacs loads
a terminal-specific initialization file as follows:
If the value of this variable is non-@code{nil}, Emacs loads a
terminal-specific initialization file as follows:
@example
(load (concat term-file-prefix (getenv "TERM")))
@ -409,29 +466,14 @@ feature.
@subsection Command-Line Arguments
@cindex command-line arguments
You can use command-line arguments to request various actions when you
start Emacs. Since you do not need to start Emacs more than once per
day, and will often leave your Emacs session running longer than that,
command-line arguments are hardly ever used. As a practical matter, it
is best to avoid making the habit of using them, since this habit would
encourage you to kill and restart Emacs unnecessarily often. These
options exist for two reasons: to be compatible with other editors (for
invocation by other programs) and to enable shell scripts to run
specific Lisp programs.
This section describes how Emacs processes command-line arguments,
and how you can customize them.
@ignore
(Note that some other editors require you to start afresh each time
you want to edit a file. With this kind of editor, you will probably
specify the file as a command-line argument. The recommended way to
use GNU Emacs is to start it only once, just after you log in, and do
all your editing in the same Emacs process. Each time you want to edit
a different file, you visit it with the existing Emacs, which eventually
comes to have many files in it ready for editing. Usually you do not
kill the Emacs until you are about to log out.)
@end ignore
You can use command-line arguments to request various actions when
you start Emacs. Command-line arguments should not be commonly used,
since the recommended way of using Emacs is to start it just once,
after logging in, and do all editing in the same Emacs session
(@pxref{Entering Emacs,,, emacs, The GNU Emacs Manual}); nonetheless,
they can be useful when invoking Emacs from session scripts or
debugging Emacs itself. This section describes how Emacs processes
command-line arguments.
@defun command-line
This function parses the command line that Emacs was called with,
@ -525,9 +567,7 @@ as a file name to visit.
There are two ways to get out of Emacs: you can kill the Emacs job,
which exits permanently, or you can suspend it, which permits you to
reenter the Emacs process later. As a practical matter, you seldom kill
Emacs---only when you are about to log out. Suspending is much more
common.
reenter the Emacs process later.
@menu
* Killing Emacs:: Exiting Emacs irreversibly.
@ -1105,24 +1145,47 @@ The value may be a floating point number.
@node Time of Day
@section Time of Day
This section explains how to determine the current time and the time
This section explains how to determine the current time and time
zone.
@cindex epoch
Most of these functions represent time as a list of either three
integers, @code{(@var{sec-high} @var{sec-low} @var{microsec})}, or of
two integers, @code{(@var{sec-high} @var{sec-low})}. The integers
@var{sec-high} and @var{sec-low} give the high and low bits of an
integer number of seconds. This integer number,
@ifnottex
@var{high} * 2**16 + @var{low},
@end ifnottex
@tex
$high*2^{16}+low$,
@end tex
is the number of seconds from the @dfn{epoch} (0:00 January 1, 1970
UTC) to the specified time. The third list element @var{microsec}, if
present, gives the number of microseconds from the start of that
second to the specified time.
The return value of @code{current-time} represents time using three
integers, while the timestamps in the return value of
@code{file-attributes} use two integers (@pxref{Definition of
file-attributes}). In function arguments, e.g.@: the @var{time-value}
argument to @code{current-time-string}, both two- and three-integer
lists are accepted. You can convert times from the list
representation into standard human-readable strings using
@code{current-time}, or to other forms using the @code{decode-time}
and @code{format-time-string} functions documented in the following
sections.
@defun current-time-string &optional time-value
This function returns the current time and date as a human-readable
string. The format of the string is unvarying; the number of characters
used for each part is always the same, so you can reliably use
@code{substring} to extract pieces of it. It is wise to count the
characters from the beginning of the string rather than from the end, as
additional information may some day be added at the end.
string. The format of the string is unvarying; the number of
characters used for each part is always the same, so you can reliably
use @code{substring} to extract pieces of it. You should count
characters from the beginning of the string rather than from the end,
as additional information may some day be added at the end.
The argument @var{time-value}, if given, specifies a time to format
instead of the current time. This argument should have the same form
as the times obtained from @code{current-time} (see below) and from
@code{file-attributes} (@pxref{Definition of file-attributes}). It
should be a list whose first two elements are integers; a third
(microsecond) element, if present, is ignored. @var{time-value} can
also be a cons of two integers, but this usage is obsolete.
(represented as a list of integers), instead of the current time.
@example
@group
@ -1133,33 +1196,16 @@ also be a cons of two integers, but this usage is obsolete.
@end defun
@defun current-time
This function returns the system's time value as a list of three
integers: @code{(@var{high} @var{low} @var{microsec})}. The integers
@var{high} and @var{low} combine to give the number of seconds since
0:00 January 1, 1970 UTC (Coordinated Universal Time), which is
@ifnottex
@var{high} * 2**16 + @var{low}.
@end ifnottex
@tex
$high*2^{16}+low$.
@end tex
The third element, @var{microsec}, gives the microseconds since the
start of the current second (or 0 for systems that return time with
the resolution of only one second).
The first two elements can be compared with file time values such as you
get with the function @code{file-attributes}.
@xref{Definition of file-attributes}.
This function returns the current time, represented as a list of three
integers @code{(@var{sec-high} @var{sec-low} @var{microsec})}. On
systems with only one-second time resolutions, @var{microsec} is 0.
@end defun
@defun float-time &optional time-value
This function returns the current time as a floating-point number of
seconds since the epoch. The argument @var{time-value}, if given,
specifies a time to convert instead of the current time. The argument
should have the same form as for @code{current-time-string} (see
above). Thus, it accepts the output of @code{current-time} and
@code{file-attributes} (@pxref{Definition of file-attributes}).
seconds since the epoch. The optional argument @var{time-value}, if
given, specifies a time (represented as a list of integers) to convert
instead of the current time.
@emph{Warning}: Since the result is floating point, it may not be
exact. Do not use this function if precise time stamps are required.
@ -1180,11 +1226,8 @@ adjustment, then the value is constant through time.
If the operating system doesn't supply all the information necessary to
compute the value, the unknown elements of the list are @code{nil}.
The argument @var{time-value}, if given, specifies a time to analyze
instead of the current time. The argument should have the same form
as for @code{current-time-string} (see above). Thus, you can use
times obtained from @code{current-time} (see above) and from
@code{file-attributes}. @xref{Definition of file-attributes}.
The argument @var{time-value}, if given, specifies a time (represented
as a list of integers) to analyze instead of the current time.
@end defun
The current time zone is determined by the @samp{TZ} environment
@ -1196,16 +1239,15 @@ time zone.
@node Time Conversion
@section Time Conversion
These functions convert time values (lists of two or three integers)
to calendrical information and vice versa. You can get time values
from the functions @code{current-time} (@pxref{Time of Day}) and
@code{file-attributes} (@pxref{Definition of file-attributes}).
These functions convert time values (lists of two or three integers,
as explained in the previous section) into calendrical information and
vice versa.
Many 32-bit operating systems are limited to time values that contain 32 bits
of information; these systems typically handle only the times from
1901-12-13 20:45:52 UTC through 2038-01-19 03:14:07 UTC. However, 64-bit
and some 32-bit operating systems have larger time values, and can
represent times far in the past or future.
Many 32-bit operating systems are limited to time values containing
32 bits of information; these systems typically handle only the times
from 1901-12-13 20:45:52 UTC through 2038-01-19 03:14:07 UTC.
However, 64-bit and some 32-bit operating systems have larger time
values, and can represent times far in the past or future.
Time conversion functions always use the Gregorian calendar, even
for dates before the Gregorian calendar was introduced. Year numbers
@ -1718,9 +1760,9 @@ certain length of time. Aside from how to set them up, idle timers
work just like ordinary timers.
@deffn Command run-with-idle-timer secs repeat function &rest args
Set up a timer which runs when Emacs has been idle for @var{secs}
seconds. The value of @var{secs} may be an integer or a floating point
number; a value of the type returned by @code{current-idle-time}
Set up a timer which runs the next time Emacs is idle for @var{secs}
seconds. The value of @var{secs} may be an integer or a floating
point number; a value of the type returned by @code{current-idle-time}
is also allowed.
If @var{repeat} is @code{nil}, the timer runs just once, the first time
@ -1733,13 +1775,13 @@ can use in calling @code{cancel-timer} (@pxref{Timers}).
@end deffn
@cindex idleness
Emacs becomes ``idle'' when it starts waiting for user input, and it
remains idle until the user provides some input. If a timer is set for
five seconds of idleness, it runs approximately five seconds after Emacs
first becomes idle. Even if @var{repeat} is non-@code{nil}, this timer
will not run again as long as Emacs remains idle, because the duration
of idleness will continue to increase and will not go down to five
seconds again.
Emacs becomes @dfn{idle} when it starts waiting for user input, and
it remains idle until the user provides some input. If a timer is set
for five seconds of idleness, it runs approximately five seconds after
Emacs first becomes idle. Even if @var{repeat} is non-@code{nil},
this timer will not run again as long as Emacs remains idle, because
the duration of idleness will continue to increase and will not go
down to five seconds again.
Emacs can do various things while idle: garbage collect, autosave or
handle data from a subprocess. But these interludes during idleness do
@ -1753,22 +1795,12 @@ minutes, and even if there have been garbage collections and autosaves.
input. Then it becomes idle again, and all the idle timers that are
set up to repeat will subsequently run another time, one by one.
@c Emacs 19 feature
@defun current-idle-time
If Emacs is idle, this function returns the length of time Emacs has
been idle, as a list of three integers: @code{(@var{high} @var{low}
@var{microsec})}. The integers @var{high} and @var{low} combine to
give the number of seconds of idleness, which is
@ifnottex
@var{high} * 2**16 + @var{low}.
@end ifnottex
@tex
$high*2^{16}+low$.
@end tex
The third element, @var{microsec}, gives the microseconds since the
start of the current second (or 0 for systems that return time with
the resolution of only one second).
been idle, as a list of three integers: @code{(@var{sec-high}
@var{sec-low} @var{microsec})}, where @var{high} and @var{low} are the
high and low bits for the number of seconds and @var{microsec} is the
additional number of microseconds (@pxref{Time of Day}).
When Emacs is not idle, @code{current-idle-time} returns @code{nil}.
This is a convenient way to test whether Emacs is idle.
@ -1801,9 +1833,9 @@ Here's an example:
@end smallexample
@end defun
Some idle timer functions in user Lisp packages have a loop that
does a certain amount of processing each time around, and exits when
@code{(input-pending-p)} is non-@code{nil}. That approach seems very
Do not write an idle timer function containing a loop which does a
certain amount of processing each time around, and exits when
@code{(input-pending-p)} is non-@code{nil}. This approach seems very
natural but has two problems:
@itemize
@ -1816,9 +1848,9 @@ It blocks out any idle timers that ought to run during that time.
@end itemize
@noindent
To avoid these problems, don't use that technique. Instead, write
such idle timers to reschedule themselves after a brief pause, using
the method in the @code{timer-function} example above.
The correct approach is for the idle timer to reschedule itself after
a brief pause, using the method in the @code{timer-function} example
above.
@node Terminal Input
@section Terminal Input
@ -2014,9 +2046,8 @@ See also @code{open-dribble-file} in @ref{Recording Input}.
@cindex sound
To play sound using Emacs, use the function @code{play-sound}. Only
certain systems are supported; if you call @code{play-sound} on a system
which cannot really do the job, it gives an error. Emacs version 20 and
earlier did not support sound at all.
certain systems are supported; if you call @code{play-sound} on a
system which cannot really do the job, it gives an error.
The sound must be stored as a file in RIFF-WAVE format (@samp{.wav})
or Sun Audio format (@samp{.au}).

View file

@ -15,6 +15,8 @@ install, uninstall, and upgrade it.
The following sections describe how to create a package, and how to
put it in a @dfn{package archive} for others to download.
@xref{Packages,,, emacs, The GNU Emacs Manual}, for a description of
user-level features of the packaging system.
@menu
* Packaging Basics:: The basic concepts of Emacs Lisp packages.
@ -91,17 +93,34 @@ definitions are saved to a file named @file{@var{name}-autoloads.el}
in the content directory. They are typically used to autoload the
principal user commands defined in the package, but they can also
perform other tasks, such as adding an element to
@code{auto-mode-alist} (@pxref{Auto Major Mode}). During this time,
Emacs will also byte-compile the Lisp files.
@code{auto-mode-alist} (@pxref{Auto Major Mode}). Note that a package
typically does @emph{not} autoload every function and variable defined
within it---only the handful of commands typically called to begin
using the package. Emacs then byte-compiles every Lisp file in the
package.
After installation, and (by default) each time Emacs is started, the
installed package is @dfn{activated}. During activation, Emacs adds
the package's content directory to @code{load-path}, and evaluates the
autoload definitions in @file{@var{name}-autoloads.el}.
After installation, the installed package is @dfn{loaded}: Emacs
adds the package's content directory to @code{load-path}, and
evaluates the autoload definitions in @file{@var{name}-autoloads.el}.
Note that a package typically does @emph{not} autoload every
function and variable defined within it---only the handful of commands
typically called to begin using the package.
Whenever Emacs starts up, it automatically calls the function
@code{package-initialize} to load installed packages. This is done
after loading the init file and abbrev file (if any) and before
running @code{after-init-hook} (@pxref{Startup Summary}). Automatic
package loading is disabled if the user option
@code{package-enable-at-startup} is @code{nil}.
@deffn Command package-initialize &optional no-activate
This function initializes Emacs' internal record of which packages are
installed, and loads them. The user option @code{package-load-list}
specifies which packages to load; by default, all installed packages
are loaded. @xref{Package Installation,,, emacs, The GNU Emacs
Manual}.
The optional argument @var{no-activate}, if non-@code{nil}, causes
Emacs to update its record of installed packages without actually
loading them; it is for internal use only.
@end deffn
@node Simple Packages
@section Simple Packages

View file

@ -1,3 +1,8 @@
2012-03-16 Glenn Morris <rgm@gnu.org>
* HELLO: Say that this is not a comprehensive list.
Remove "duplicate" entry. (Bug#11024)
2012-02-20 Paul Eggert <eggert@cs.ucla.edu>
* emacs-buffer.gdb ($valmask): Don't assume EMACS_INT fits in 'long'.

View file

@ -1,4 +1,6 @@
This is a list of ways to say hello in various languages.
It is not intended to be comprehensive, but to demonstrate
some of the character sets that Emacs supports.
Non-ASCII examples:
Europe: ,A!(BHola!, Gr,A|_(B Gott, Hyv,Add(B p,Ad(Biv,Add(B, Tere ,Au(Bhtust, Bon,Cu(Bu
@ -46,7 +48,6 @@ Lao ((1>RJRERG(B) (1JP:R-4U(B / (1"mcKib*!4U(B
Malayalam ($,1@N@R@O@^@S@"(B) $,1@H@N@X@m@5@^@P@"(B
Maltese (il-Malti) Bon,Cu(Bu / Sa,C11(Ba
Mathematics $,1x (B p $,1x((B world $,1s"(B hello p $,2!a(B
Nederlands, Vlaams Hallo / Dag
Norwegian (norsk) Hei / God dag
Oriya ($,1:s;\;?:f(B) $,1;6;A;#;?;,;G(B
Polish (j,Bj(Bzyk polski) Dzie,Bq(B dobry! / Cze,B6f(B!
@ -55,7 +56,7 @@ Sinhala ($,1B#B2ABB$A}(B) $,1AFAzB4AvB=B AqB*(B
Slovak (sloven,Bh(Bina) Dobr,A}(B de,Br(B
Slovenian (sloven,B9h(Bina) Pozdravljeni!
Spanish (espa,Aq(Bol) ,A!(BHola!
Swedish (p,Ae(B svenska) Hej / Goddag / Hall,Ae(B
Swedish (svenska) Hej / Goddag / Hall,Ae(B
Tamil ($,1<D<N<_<T<m(B) $,1<U<C<5<m<5<N<m(B
Telugu ($,1=d>&=r>!=W>!(B) $,1=h=n=x>-=U=~=p=B(B
Thai (,T@RIRd7B(B) ,TJGQJ4U$CQ:(B / ,TJGQJ4U$hP(B

View file

@ -251,7 +251,8 @@ On character terminals, these methods are used for characters that
cannot be encoded by the `terminal-coding-system'.
---
*** New input methods for Farsi: farsi and farsi-translit.
*** New input methods for Farsi: farsi and farsi-translit;
and for Bulgarian: bulgarian-alt-phonetic.
+++
*** `nobreak-char-display' now also highlights Unicode hyphen chars
@ -468,6 +469,11 @@ been shown in a specific window.
This is handy for minibuffer-only frames, and is also used for the feature
where mouse-1 pops up *Messages*"', which can now easily be changed.
---
** Minibuffers set `truncate-lines' to nil.
If you want to change the value to something else, you could use
for example minibuffer-setup-hook.
* Editing Changes in Emacs 24.1
@ -1030,7 +1036,7 @@ for buffers with dead inferior processes has been generalized.
** The return value of `backup-buffer' has changed.
It is now a list of three elements, where the second element is a list
describing the original file's SELinux context. If Emacs or the
system lacks SELinux cupport, the context list is (nil nil nil nil).
system lacks SELinux support, the context list is (nil nil nil nil).
See the "Basic SELinux support" entry under "Changes in Emacs 24.1",
above.
@ -1370,7 +1376,7 @@ This can be useful when `inhibit-quit' is set.
+++
** The new function `server-eval-at' allows evaluation of Lisp forms on
named Emacs server instances, using TCP sockets.
named Emacs server instances.
+++
** `call-process' and `call-process-region' allow a `(:file "file")' spec

View file

@ -302,6 +302,12 @@ Help mode due to setting `temp-buffer-show-hook' rather than using
** Keyboard problems
*** Unable to enter the M-| key on some German keyboards.
Some users have reported that M-| suffers from "keyboard ghosting".
This can't be fixed by Emacs, as the keypress never gets passed to it
at all (as can be verified using "xev"). You can work around this by
typing `ESC |' instead.
*** "Compose Character" key does strange things when used as a Meta key.
If you define one key to serve as both Meta and Compose Character, you

View file

@ -1,7 +1,16 @@
2012-03-16 Kenichi Handa <handa@m17n.org>
* quail/indian.el (telugu-inscript): Fix typo. (Bug#10936)
2012-03-13 Йордан Миладинов <jordanmiladinov@gmail.com> (tiny change)
* quail/cyrillic.el (bulgarian-alt-phonetic):
New input method. (Bug#10893)
2012-03-09 Mohsen BANAN <libre@mohsen.1.banan.byname.net>
* quail/persian.el: Update which includes: (1) full compliance to
ISIRI-6219, forbiden characters were eliminated and missing
ISIRI-6219, forbidden characters were eliminated and missing
characters were added; (2) layer 3 of ISIRI-9147 is now
implemented with a '\' prefix; (3) double entry of characters
which were postfixed with 'h' is now supported; (4) lots of

View file

@ -1236,6 +1236,79 @@ Unicode based."
("." ?$,1(n(B)
("/" ?.))
(quail-define-package
"bulgarian-alt-phonetic" "Bulgarian" "$,1(1(=(D(B"
nil
"Bulgarian alternative Phonetic keyboard layout, producing Unicode.
This phonetic layout replaces all the Latin letters with Bulgarian
\(Cyrillic\) letters based on similarities in their pronunciation or look.
Note that, since the letters ',Li(B', ',Ll(B', ',Ln(B' and ',Lo(B' are attached to the
']', '\', '`' and '[' keys respectively, Caps Lock does not affect them."
nil t t t t nil nil nil nil nil t)
;; $,1(N(B 1! 2@ 3$,1uV(B 4$ 5% 6$,1tL(B 7,A'(B 8* 9( 0) -$,1rs(B =+ $,1(l(}(B
;; $,1(G(B $,1(H(B $,1(5(B $,1(@(B $,1(B(B $,1(J(B $,1(C(B $,1(8(B $,1(>(B $,1(?(B $,1(O(B $,1(I(B
;; ,L0(B $,1(A(B $,1(4(B $,1(D(B $,1(3(B $,1(E(B $,1(9(B $,1(:(B $,1(;(B :; '"
;; $,1(7(B $,1(6(B $,1(F(B $,1(2(B $,1(1(B $,1(=(B $,1(<(B ,$,1r~(B .$,1r|(B /?
(quail-define-rules
("#" ?,Lp(B)
("&" ?,A'(B)
("/#" ?#)
("/&" ?&)
("/<" ?<)
("/>" ?>)
("/[" ?\[)
("/\\" ?\\)
("/]" ?\])
("/^" ?^)
("/_" ?_)
("/`" ?`)
("/{" ?{)
("/|" ?|)
("/}" ?})
("/~" ?~)
("<" ?$,1r~(B)
(">" ?$,1r|(B)
("A" ?$,1(0(B) ("a" ?$,1(P(B)
("B" ?$,1(1(B) ("b" ?$,1(Q(B)
("C" ?$,1(F(B) ("c" ?$,1(f(B)
("D" ?$,1(4(B) ("d" ?$,1(T(B)
("E" ?$,1(5(B) ("e" ?$,1(U(B)
("F" ?$,1(D(B) ("f" ?$,1(d(B)
("G" ?$,1(3(B) ("g" ?$,1(S(B)
("H" ?$,1(E(B) ("h" ?$,1(e(B)
("I" ?$,1(8(B) ("i" ?$,1(X(B)
("J" ?$,1(9(B) ("j" ?$,1(Y(B)
("K" ?$,1(:(B) ("k" ?$,1(Z(B)
("L" ?$,1(;(B) ("l" ?$,1([(B)
("M" ?$,1(<(B) ("m" ?$,1(\(B)
("N" ?$,1(=(B) ("n" ?$,1(](B)
("O" ?$,1(>(B) ("o" ?$,1(^(B)
("P" ?$,1(?(B) ("p" ?$,1(_(B)
("Q" ?$,1(G(B) ("q" ?$,1(g(B)
("R" ?$,1(@(B) ("r" ?$,1(`(B)
("S" ?$,1(A(B) ("s" ?$,1(a(B)
("T" ?$,1(B(B) ("t" ?$,1(b(B)
("U" ?$,1(C(B) ("u" ?$,1(c(B)
("V" ?$,1(2(B) ("v" ?$,1(R(B)
("W" ?$,1(H(B) ("w" ?$,1(h(B)
("X" ?$,1(6(B) ("x" ?$,1(V(B)
("Y" ?$,1(J(B) ("y" ?$,1(j(B)
("Z" ?$,1(7(B) ("z" ?$,1(W(B)
("[" ?$,1(o(B)
("\\" ?$,1(l(B)
("]" ?$,1(i(B)
("^" ?$,1tL(B)
("_" ?$,1rs(B)
("`" ?$,1(n(B)
("{" ?$,1(O(B)
("|" ?$,1(}(B)
("}" ?$,1(I(B)
("~" ?$,1(N(B))
;; From `Bulgarian-PHO.kmap for Yudit', Alexander Shopov
;; <al_shopov@web.bg>.

View file

@ -440,7 +440,7 @@ Full key sequences are listed below:")
(if nil
(quail-define-package "telugu-inscript" "Telugu" "TlgIS" t "Telugu keyboard Inscript"))
(quail-define-inscript-package
indian-dev-base-table inscript-dev-keytable
indian-tlg-base-table inscript-dev-keytable
"telugu-inscript" "Telugu" "TlgIS"
"Telugu keyboard Inscript.")

View file

@ -34,7 +34,7 @@
;; - (farsi-isiri-9149) Persian Keyboard based on Islamic Republic of Iran's ISIR-9147
;; - (farsi-transliterate-banan) An intuitive transliteration keyboard for Farsi
;;
;; Additional documentaion for these inpput methods can be found at:
;; Additional documentation for these input methods can be found at:
;; http://www.persoarabic.org/PLPC/120036
;;
@ -279,7 +279,7 @@ Based on ISIRI-9147 Layout of Persian Letters and Symbols on Computer Keyboards.
;; ISIRI-9147 Persian keyboard is generally not well suited for Iranian-Expatriates
;; working/living in the West.
;;
;; The qwetry keyboard is usually second nature to Persian speaking expatriates and they
;; The qwerty keyboard is usually second nature to Persian speaking expatriates and they
;; don't want to learn/adapt to ISIRI-9147. They expect software to adapt to them.
;;
;; That is what the ``Banan Multi-Character (Reverse) Transliteration Persian Input Method'' does.
@ -289,21 +289,21 @@ Based on ISIRI-9147 Layout of Persian Letters and Symbols on Computer Keyboards.
;; - can write in farsi (not just speak it).
;; - is fully comfortable with a qwerty latin keyboard.
;; - is not familiar with isir-9147 and does not wish to be trained.
;; - communicatates and writes in a mixed globish/persian -- not pure persian.
;; - communicates and writes in a mixed globish/persian -- not pure persian.
;; - is intuitively familiar with transliteration of farsi/persian into latin based on two letter
;; phonetic mapping to persian characters (e.g., gh ق -- kh خ -- sh ش -- ch چ -- zh ژ.
;;
;; This transliteration keyboard is designed to be intuitive such that
;; mapping are easy and natural to remember for a persian writer.
;; It is designed to be equivalent in capability to farsi-isiri-9147
;; and provide for inputing all characters enumerated in ISIRI-6219.
;; and provide for inputting all characters enumerated in ISIRI-6219.
;;
;; farsi-transliterate-banan is of course phonetic oriented. But it is very different from
;; pinglish. Pinglish is word oriented where you sound out the word with latin letters --
;; incuding the vowels. farsi-transliterate-banan is letter oriented where you enter the
;; including the vowels. farsi-transliterate-banan is letter oriented where you enter the
;; latin letter/letters closest to the persian letter. And usually omit vowels.
;;
;; For some persian characters there are multiple ways of inputing
;; For some persian characters there are multiple ways of inputting
;; the same character. For example both ``i'' and ``y'' produce ی.
;; For یک ``yk'', ``y'' is more natural and for این ``ain'', ``i'' is more natural.
;;
@ -317,7 +317,7 @@ Based on ISIRI-9147 Layout of Persian Letters and Symbols on Computer Keyboards.
;;
;;
;; Prefix letter \ is used for two character inputs when an alternate form of a letter
;; is desired for exampe \% is: ‌÷ when % is: ٪.
;; is desired for example \% is: ‌÷ when % is: ٪.
;;
;; Prefix letter & is used for multi-character inputs when special characters are
;; desired based on their abbreviate name. For example you can enter &lrm; to enter the
@ -485,7 +485,7 @@ Based on ISIRI-9147 Layout of Persian Letters and Symbols on Computer Keyboards.
("$" ?\u0670) ;; (ucs-insert #x0670)ٰ named: الفِ مقصوره‌ی فارسی
;;;;;;;;;;; isiri-6219 Table 8 - Forbiden Characters -- جدول ۸ - نویسه‌هایِ ممنوع
;;;;;;;;;;; isiri-6219 Table 8 - Forbidden Characters -- جدول ۸ - نویسه‌هایِ ممنوع
;; ;; he ye (ucs-insert 1728) kills emacs-24.0.90
;; arabic digits 0-9

View file

@ -1,3 +1,159 @@
2012-03-18 Chong Yidong <cyd@gnu.org>
* faces.el (face-spec-reset-face): Don't call display-graphic-p if
it is not yet defined (for temacs).
2012-03-18 Leo Liu <sdl.web@gmail.com>
* net/rcirc.el (rcirc-cmd-quit): Allow quiting all servers with
prefix.
2012-03-17 Eli Zaretskii <eliz@gnu.org>
* textmodes/ispell.el (ispell-skip-tib, ispell-keep-choices-win)
(ispell-choices-win-default-height, ispell-silently-savep)
(ispell-dictionary-alist, ispell-encoding8-command)
(ispell-check-version, ispell-aspell-find-dictionary)
(ispell-valid-dictionary-list, ispell-words-keyword)
(ispell-get-word, ispell-internal-change-dictionary)
(ispell-region, ispell-skip-region-list)
(ispell-begin-skip-region-regexp, ispell-ignore-fcc)
(ispell-process-line, ispell-minor-mode, ispell-minor-check)
(ispell-message-text-end, ispell-message)
(ispell-buffer-local-parsing): Doc fix.
2012-03-13 Jambunathan K <kjambunathan@gmail.com>
* htmlfontify.el: Add support for code block fontification for ODT
export (Bug #9914).
(hfy-optimisations): Define new option
`body-text-only'
(hfy-fontify-buffer): Honor above setting.
(hfy-begin-span, hfy-end-span): New routines factored out form
`hfy-fontify-buffer'.
(hfy-begin-span-handler, hfy-end-span-handler): New variables
that permit insertion of custom tags.
(hfy-fontify-buffer): Use above handlers.
(hfy-face-to-css-default): Same as the earlier `hfy-face-to-css'.
(hfy-face-to-css): Re-defined to be a variable.
(hfy-compile-stylesheet): Modified. Allow stylesheet to be built
over multiple runs. This is made possible by having the caller let
bind a special variable `hfy-user-sheet-assoc'.
(htmlfontify-string): New defun.
(hfy-compile-face-map): Make sure that the last char in the
buffer is correctly fontified.
(hfy-face-resolve-face): Whitespace only change.
2012-03-17 Eli Zaretskii <eliz@gnu.org>
* textmodes/ispell.el (ispell-get-decoded-string): Make the error
message more clear.
2012-03-16 Leo Liu <sdl.web@gmail.com>
* emacs-lisp/copyright.el (copyright-year-ranges): Fix typo.
2012-03-16 Alan Mackenzie <acm@muc.de>
Further optimise the handling of large macros.
* progmodes/cc-engine.el (c-crosses-statement-barrier-p): Use a
limit to a call of `c-literal-limits'.
(c-determine-+ve-limit): New function.
(c-at-macro-vsemi-p): Move `c-in-literal' to the bottom of an
`and'.
(c-guess-basic-syntax): In macros, restrict a search limit to
2000.
In CASE 5B, restrict a search limit to 500.
(c-just-after-func-arglist-p): Obviouly wrong `or' -> `and'.
* progmodes/cc-mode.el (c-neutralize-syntax-in-and-mark-CPP):
Restrict macro bounds to +-500 from after-change's BEG END.
2012-03-16 Leo Liu <sdl.web@gmail.com>
* font-lock.el (lisp-font-lock-keywords-2): Add letrec.
2012-03-16 Aaron S. Hawley <Aaron.S.Hawley@gmail.com>
* tar-mode.el (tar-mode): Fix saving by conditionally undoing
`special-mode' setting of `buffer-read-only'. (Bug#11010)
2012-03-16 Glenn Morris <rgm@gnu.org>
* view.el (view-buffer, view-buffer-other-window)
(view-buffer-other-frame): Doc fixes re special mode-class.
* subr.el (eval-after-load): If named feature is provided not from
a file, run after-load forms. (Bug#10946)
* calendar/calendar.el (calendar-insert-at-column):
Handle non-unit-width characters a bit better. (Bug#10978)
2012-03-15 Chong Yidong <cyd@gnu.org>
* emacs-lisp/ring.el (ring-extend): New function.
(ring-insert+extend): Extend the ring correctly (Bug#11019).
* comint.el (comint-read-input-ring)
(comint-add-to-input-history): Grow comint-input-ring lazily.
2012-03-15 Stefan Monnier <monnier@iro.umontreal.ca>
* progmodes/perl-mode.el (perl-syntax-propertize-special-constructs):
Fix up parsing of multiline twoarg non-paired elements (bug#11014).
* imenu.el: Fix multiple inheritance breakage (bug#9199).
(imenu-add-to-menubar): Don't add a redundant index.
(imenu-update-menubar): Handle a dynamically composed keymap.
2012-03-13 Katsumi Yamaoka <yamaoka@jpl.org>
* mail/sendmail.el (mail-encode-header):
Bind rfc2047-encode-encoded-words to nil.
2012-03-13 Glenn Morris <rgm@gnu.org>
* calendar/calendar.el (calendar-string-spread):
Handle non-unit-width characters a bit better. (Bug#10978)
2012-03-13 Leo Liu <sdl.web@gmail.com>
* vc/vc-hg.el (vc-hg-working-revision): Rework to work with both
directory and file as argument (Bug#10822).
2012-03-13 Kaushik Srenevasan <ksrenevasan@gmail.com> (tiny change)
* progmodes/gdb-mi.el (gdb-invalidate-disassembly):
For dynamically generated code, follow $PC.
(gdb-disassembly-handler-custom): Handle no function name case.
2012-03-13 Tim Landscheidt <tim@tim-landscheidt.de> (tiny change)
* calendar/icalendar.el (icalendar-export-file, icalendar-import-file):
* emulation/ws-mode.el (ws-query-replace):
* sort.el (sort-regexp-fields):
Fix missing trailing whitespace in interactive prompts. (Bug#11002)
2012-03-12 Stefan Monnier <monnier@iro.umontreal.ca>
* dabbrev.el: Fix cycle completion order (bug#10963).
(dabbrev--last-obarray, dabbrev--last-completion-buffer): Remove.
(dabbrev-completion): Don't use an obarray; provide
a cycle-sort-function.
2012-03-12 Leo Liu <sdl.web@gmail.com>
* simple.el (kill-new): Use equal-including-properties for
comparison.
(kill-do-not-save-duplicates): Doc fix.
2012-03-12 Stefan Monnier <monnier@iro.umontreal.ca>
* dabbrev.el: Fix cycle completion (bug#10963).
Use lexical binding and wrap to 80 columns.
(dabbrev-completion): Delay computing the list of completions.
2012-03-12 Kenichi Handa <handa@m17n.org>
* international/quail.el (quail-insert-kbd-layout): Surround each

View file

@ -1424,16 +1424,24 @@ Optional integers MON and YR are used instead of today's date."
"Move to column INDENT, adding spaces as needed.
Inserts STRING so that it ends at INDENT. STRING is either a
literal string, or a sexp to evaluate to return such. Truncates
STRING to length TRUNCATE, ensure a trailing space."
STRING to length TRUNCATE, and ensures a trailing space."
(if (not (ignore-errors (stringp (setq string (eval string)))))
(calendar-move-to-column indent)
(if (> (length string) truncate)
(setq string (substring string 0 truncate)))
(if (> (string-width string) truncate)
(setq string (truncate-string-to-width string truncate)))
(or (string-match " $" string)
(if (= (length string) truncate)
(aset string (1- truncate) ?\s)
(setq string (concat string " "))))
(calendar-move-to-column (- indent (length string)))
(setq string (concat (if (= (string-width string) truncate)
(substring string 0 -1)
string)
;; Avoid inserting text properties unless
;; we have to (ie, non-unit-width chars).
;; This is by no means essential.
(if (= (string-width string) (length string))
" "
;; Cribbed from buff-menu.el.
(propertize
" " 'display `(space :align-to ,indent))))))
(calendar-move-to-column (- indent (string-width string)))
(insert string)))
(defun calendar-generate-month (month year indent)
@ -1756,8 +1764,8 @@ the STRINGS are just concatenated and the result truncated."
(if (< (length strings) 2)
(append (list "") strings (list ""))
strings)))
(n (- length (length (apply 'concat strings))))
(m (1- (length strings)))
(n (- length (string-width (apply 'concat strings))))
(m (* (1- (length strings)) (char-width char)))
(s (car strings))
(strings (cdr strings))
(i 0))
@ -1766,7 +1774,7 @@ the STRINGS are just concatenated and the result truncated."
(make-string (max 0 (/ (+ n i) m)) char)
string)
i (1+ i)))
(substring s 0 length)))
(truncate-string-to-width s length)))
(defun calendar-update-mode-line ()
"Update the calendar mode line with the current date and date style."

View file

@ -915,7 +915,7 @@ would be \"pm\"."
"Export diary file to iCalendar format.
All diary entries in the file DIARY-FILENAME are converted to iCalendar
format. The result is appended to the file ICAL-FILENAME."
(interactive "FExport diary data from file:
(interactive "FExport diary data from file: \n\
Finto iCalendar file: ")
(save-current-buffer
(set-buffer (find-file diary-filename))
@ -1794,7 +1794,7 @@ Argument ICAL-FILENAME output iCalendar file.
Argument DIARY-FILENAME input `diary-file'.
Optional argument NON-MARKING determines whether events are created as
non-marking or not."
(interactive "fImport iCalendar data from file:
(interactive "fImport iCalendar data from file: \n\
Finto diary file:
p")
;; clean up the diary file

View file

@ -1,3 +1,10 @@
2012-03-12 David Engster <deng@randomsample.de>
* semantic/db-find.el
(semanticdb-find-translate-path-brutish-default): If we don't yet
have a proper table for PATH, use `semanticdb-current-database'
instead (bug #10343).
2012-03-11 David Engster <deng@randomsample.de>
* semantic/wisent/javascript.el (js-mode): Define `js-mode' as

View file

@ -325,8 +325,10 @@ Default action as described in `semanticdb-find-translate-path'."
(cond ((null path) semanticdb-current-database)
((semanticdb-table-p path) (oref path parent-db))
(t (let ((tt (semantic-something-to-tag-table path)))
;; @todo - What does this DO ??!?!
(with-current-buffer (semantic-tag-buffer (car tt))
(if tt
;; @todo - What does this DO ??!?!
(with-current-buffer (semantic-tag-buffer (car tt))
semanticdb-current-database)
semanticdb-current-database))))))
(apply
#'nconc

View file

@ -922,15 +922,18 @@ See also `comint-input-ignoredups' and `comint-write-input-ring'."
(t
(let* ((file comint-input-ring-file-name)
(count 0)
(size comint-input-ring-size)
(ring (make-ring size)))
;; Some users set HISTSIZE or `comint-input-ring-size'
;; to huge numbers. Don't allocate a huge ring right
;; away; there might not be that much history.
(ring-size (min 1500 comint-input-ring-size))
(ring (make-ring ring-size)))
(with-temp-buffer
(insert-file-contents file)
;; Save restriction in case file is already visited...
;; Watch for those date stamps in history files!
(goto-char (point-max))
(let (start end history)
(while (and (< count size)
(while (and (< count comint-input-ring-size)
(re-search-backward comint-input-ring-separator
nil t)
(setq end (match-beginning 0)))
@ -941,15 +944,18 @@ See also `comint-input-ignoredups' and `comint-write-input-ring'."
(point-min)))
(setq history (buffer-substring start end))
(goto-char start)
(if (and (not (string-match comint-input-history-ignore
history))
(or (null comint-input-ignoredups)
(ring-empty-p ring)
(not (string-equal (ring-ref ring 0)
history))))
(progn
(ring-insert-at-beginning ring history)
(setq count (1+ count)))))))
(when (and (not (string-match comint-input-history-ignore
history))
(or (null comint-input-ignoredups)
(ring-empty-p ring)
(not (string-equal (ring-ref ring 0)
history))))
(when (= count ring-size)
(ring-extend ring (min (- comint-input-ring-size ring-size)
ring-size))
(setq ring-size (ring-size ring)))
(ring-insert-at-beginning ring history)
(setq count (1+ count))))))
(setq comint-input-ring ring
comint-input-ring-index nil)))))
@ -1691,13 +1697,18 @@ Argument 0 is the command name."
(defun comint-add-to-input-history (cmd)
"Add CMD to the input history.
Ignore duplicates if `comint-input-ignoredups' is non-nil."
(if (and (funcall comint-input-filter cmd)
(or (null comint-input-ignoredups)
(not (ring-p comint-input-ring))
(ring-empty-p comint-input-ring)
(not (string-equal (ring-ref comint-input-ring 0)
cmd))))
(ring-insert comint-input-ring cmd)))
(when (and (funcall comint-input-filter cmd)
(or (null comint-input-ignoredups)
(not (ring-p comint-input-ring))
(ring-empty-p comint-input-ring)
(not (string-equal (ring-ref comint-input-ring 0) cmd))))
;; If `comint-input-ring' is full, maybe grow it.
(let ((size (ring-size comint-input-ring)))
(and (= size (ring-length comint-input-ring))
(< size comint-input-ring-size)
(ring-extend comint-input-ring
(min size (- comint-input-ring-size size)))))
(ring-insert comint-input-ring cmd)))
(defun comint-send-input (&optional no-newline artificial)
"Send input to process.

View file

@ -1,4 +1,4 @@
;;; dabbrev.el --- dynamic abbreviation package
;;; dabbrev.el --- dynamic abbreviation package -*- lexical-binding: t -*-
;; Copyright (C) 1985-1986, 1992, 1994, 1996-1997, 2000-2012
;; Free Software Foundation, Inc.
@ -291,9 +291,6 @@ this list."
;; Internal variables
;;----------------------------------------------------------------
;; Last obarray of completions in `dabbrev-completion'
(defvar dabbrev--last-obarray nil)
;; Table of expansions seen so far
(defvar dabbrev--last-table nil)
@ -321,9 +318,6 @@ this list."
;; The buffer we found the expansion last time.
(defvar dabbrev--last-buffer-found nil)
;; The buffer we last did a completion in.
(defvar dabbrev--last-completion-buffer nil)
;; If non-nil, a function to use when copying successive words.
;; It should be `upcase' or `downcase'.
(defvar dabbrev--last-case-pattern nil)
@ -387,49 +381,46 @@ then it searches *all* buffers."
(abbrev (dabbrev--abbrev-at-point))
(beg (progn (search-backward abbrev) (point)))
(end (progn (search-forward abbrev) (point)))
(ignore-case-p (and (if (eq dabbrev-case-fold-search 'case-fold-search)
case-fold-search
dabbrev-case-fold-search)
(or (not dabbrev-upcase-means-case-search)
(string= abbrev (downcase abbrev)))))
(my-obarray dabbrev--last-obarray))
(save-excursion
;;--------------------------------
;; New abbreviation to expand.
;;--------------------------------
(setq dabbrev--last-abbreviation abbrev)
;; Find all expansion
(let ((completion-list
(dabbrev--find-all-expansions abbrev ignore-case-p))
(completion-ignore-case ignore-case-p))
;; Make an obarray with all expansions
(setq my-obarray (make-vector (length completion-list) 0))
(or (> (length my-obarray) 0)
(error "No dynamic expansion for \"%s\" found%s"
abbrev
(if dabbrev--check-other-buffers "" " in this-buffer")))
(cond
((or (not ignore-case-p)
(not dabbrev-case-replace))
(mapc (function (lambda (string)
(intern string my-obarray)))
completion-list))
((string= abbrev (upcase abbrev))
(mapc (function (lambda (string)
(intern (upcase string) my-obarray)))
completion-list))
((string= (substring abbrev 0 1)
(upcase (substring abbrev 0 1)))
(mapc (function (lambda (string)
(intern (capitalize string) my-obarray)))
completion-list))
(t
(mapc (function (lambda (string)
(intern (downcase string) my-obarray)))
completion-list)))
(setq dabbrev--last-obarray my-obarray)
(setq dabbrev--last-completion-buffer (current-buffer))))
(completion-in-region beg end my-obarray)))
(ignore-case-p
(and (if (eq dabbrev-case-fold-search 'case-fold-search)
case-fold-search
dabbrev-case-fold-search)
(or (not dabbrev-upcase-means-case-search)
(string= abbrev (downcase abbrev)))))
(list 'uninitialized)
(table
(lambda (s p a)
(if (eq a 'metadata)
`(metadata (cycle-sort-function . ,#'identity)
(category . dabbrev))
(when (eq list 'uninitialized)
(save-excursion
;;--------------------------------
;; New abbreviation to expand.
;;--------------------------------
(setq dabbrev--last-abbreviation abbrev)
;; Find all expansion
(let ((completion-list
(dabbrev--find-all-expansions abbrev ignore-case-p))
(completion-ignore-case ignore-case-p))
(or (consp completion-list)
(error "No dynamic expansion for \"%s\" found%s"
abbrev
(if dabbrev--check-other-buffers
"" " in this-buffer")))
(setq list
(cond
((not (and ignore-case-p dabbrev-case-replace))
completion-list)
((string= abbrev (upcase abbrev))
(mapcar #'upcase completion-list))
((string= (substring abbrev 0 1)
(upcase (substring abbrev 0 1)))
(mapcar #'capitalize completion-list))
(t
(mapcar #'downcase completion-list)))))))
(complete-with-action a list s p)))))
(completion-in-region beg end table)))
;;;###autoload
(defun dabbrev-expand (arg)
@ -521,12 +512,13 @@ See also `dabbrev-abbrev-char-regexp' and \\[dabbrev-completion]."
;;--------------------------------
(or expansion
(setq expansion
(dabbrev--find-expansion abbrev direction
(and (if (eq dabbrev-case-fold-search 'case-fold-search)
case-fold-search
dabbrev-case-fold-search)
(or (not dabbrev-upcase-means-case-search)
(string= abbrev (downcase abbrev))))))))
(dabbrev--find-expansion
abbrev direction
(and (if (eq dabbrev-case-fold-search 'case-fold-search)
case-fold-search
dabbrev-case-fold-search)
(or (not dabbrev-upcase-means-case-search)
(string= abbrev (downcase abbrev))))))))
(cond
((not expansion)
(dabbrev--reset-global-variables)
@ -621,8 +613,6 @@ all skip characters."
(defun dabbrev--reset-global-variables ()
"Initialize all global variables."
;; dabbrev--last-obarray and dabbrev--last-completion-buffer
;; must not be reset here.
(setq dabbrev--last-table nil
dabbrev--last-abbreviation nil
dabbrev--last-abbrev-location nil
@ -667,13 +657,13 @@ of the expansion in `dabbrev--last-expansion-location'."
(let ((case-fold-search ignore-case)
(count n))
(while (and (> count 0)
(setq expansion (dabbrev--search abbrev
reverse
(and ignore-case
(if (eq dabbrev-case-distinction 'case-replace)
case-replace
dabbrev-case-distinction))
)))
(setq expansion (dabbrev--search
abbrev reverse
(and ignore-case
(if (eq dabbrev-case-distinction
'case-replace)
case-replace
dabbrev-case-distinction)))))
(setq count (1- count))))
(and expansion
(setq dabbrev--last-expansion-location (point)))
@ -829,14 +819,15 @@ EXPANSION is the expansion substring to be used this time.
RECORD-CASE-PATTERN, if non-nil, means set `dabbrev--last-case-pattern'
to record whether we upcased the expansion, downcased it, or did neither."
;;(undo-boundary)
(let ((use-case-replace (and (if (eq dabbrev-case-fold-search 'case-fold-search)
case-fold-search
dabbrev-case-fold-search)
(or (not dabbrev-upcase-means-case-search)
(string= abbrev (downcase abbrev)))
(if (eq dabbrev-case-replace 'case-replace)
case-replace
dabbrev-case-replace))))
(let ((use-case-replace
(and (if (eq dabbrev-case-fold-search 'case-fold-search)
case-fold-search
dabbrev-case-fold-search)
(or (not dabbrev-upcase-means-case-search)
(string= abbrev (downcase abbrev)))
(if (eq dabbrev-case-replace 'case-replace)
case-replace
dabbrev-case-replace))))
;; If we upcased or downcased the original expansion,
;; do likewise for the subsequent words when we copy them.
@ -862,12 +853,13 @@ to record whether we upcased the expansion, downcased it, or did neither."
(let ((expansion-rest (substring expansion 1))
(first-letter-position (string-match "[[:alpha:]]" abbrev)))
(if (or (null first-letter-position)
(and (not (and (or (string= expansion-rest (downcase expansion-rest))
(string= expansion-rest (upcase expansion-rest)))
(or (string= abbrev (downcase abbrev))
(and (string= abbrev (upcase abbrev))
(> (- (length abbrev) first-letter-position)
1)))))
(and (not
(and (or (string= expansion-rest (downcase expansion-rest))
(string= expansion-rest (upcase expansion-rest)))
(or (string= abbrev (downcase abbrev))
(and (string= abbrev (upcase abbrev))
(> (- (length abbrev) first-letter-position)
1)))))
(string= abbrev
(substring expansion 0 (length abbrev)))))
(setq use-case-replace nil)))
@ -951,9 +943,9 @@ Leaves point at the location of the start of the expansion."
;; Limited search.
(save-restriction
(and dabbrev-limit
(narrow-to-region dabbrev--last-expansion-location
(+ (point)
(if reverse (- dabbrev-limit) dabbrev-limit))))
(narrow-to-region
dabbrev--last-expansion-location
(+ (point) (if reverse (- dabbrev-limit) dabbrev-limit))))
;;--------------------------------
;; Look for a distinct expansion, using dabbrev--last-table.
;;--------------------------------

View file

@ -85,7 +85,7 @@ The second \\( \\) construct must match the years."
"Non-nil if individual consecutive years should be replaced with a range.
For example: 2005, 2006, 2007, 2008 might be replaced with 2005-2008.
If you use ranges, you should add an explanatory note in a README file.
The function `copyright-fix-year' respects this variable."
The function `copyright-fix-years' respects this variable."
:group 'copyright
:type 'boolean
:version "24.1")

View file

@ -185,26 +185,31 @@ Raise error if ITEM is not in the RING."
(unless curr-index (error "Item is not in the ring: `%s'" item))
(ring-ref ring (ring-minus1 curr-index (ring-length ring)))))
(defun ring-extend (ring x)
"Increase the size of RING by X."
(when (and (integerp x) (> x 0))
(let* ((hd (car ring))
(length (ring-length ring))
(size (ring-size ring))
(old-vec (cddr ring))
(new-vec (make-vector (+ size x) nil)))
(setcdr ring (cons length new-vec))
;; If the ring is wrapped, the existing elements must be written
;; out in the right order.
(dotimes (j length)
(aset new-vec j (aref old-vec (mod (+ hd j) size))))
(setcar ring 0))))
(defun ring-insert+extend (ring item &optional grow-p)
"Like `ring-insert', but if GROW-P is non-nil, then enlarge ring.
Insert onto ring RING the item ITEM, as the newest (last) item.
If the ring is full, behavior depends on GROW-P:
If GROW-P is non-nil, enlarge the ring to accommodate the new item.
If GROW-P is nil, dump the oldest item to make room for the new."
(let* ((vec (cddr ring))
(veclen (length vec))
(hd (car ring))
(ringlen (ring-length ring)))
(prog1
(cond ((and grow-p (= ringlen veclen)) ; Full ring. Enlarge it.
(setq veclen (1+ veclen))
(setcdr ring (cons (setq ringlen (1+ ringlen))
(setq vec (vconcat vec (vector item)))))
(setcar ring hd))
(t (aset vec (mod (+ hd ringlen) veclen) item)))
(if (= ringlen veclen)
(setcar ring (ring-plus1 hd veclen))
(setcar (cdr ring) (1+ ringlen))))))
(and grow-p
(= (ring-length ring) (ring-size ring))
(ring-extend ring 1))
(ring-insert ring item))
(defun ring-remove+insert+extend (ring item &optional grow-p)
"`ring-remove' ITEM from RING, then `ring-insert+extend' it.

View file

@ -716,7 +716,7 @@ This will only work for errors raised by WordStar mode functions."
(defun ws-query-replace (from to)
"In WordStar mode: Search string, remember string for repetition."
(interactive "sReplace:
(interactive "sReplace: \n\
sWith: " )
(setq ws-search-string from)
(setq ws-search-direction t)

View file

@ -1516,12 +1516,15 @@ If SPEC is nil, return nil."
(apply 'set-face-attribute face frame
(if (eq face 'default)
;; For the default face, avoid making any attribute
;; unspecifed. Instead, set attributes to default values
;; unspecified. Instead, set attributes to default values
;; (see also realize_default_face in xfaces.c).
(append
'(:underline nil :overline nil :strike-through nil
:box nil :inverse-video nil :stipple nil :inherit nil)
(unless (display-graphic-p frame)
;; `display-graphic-p' is unavailable when running
;; temacs, prior to loading frame.el.
(unless (and (fboundp 'display-graphic-p)
(display-graphic-p frame))
'(:family "default" :foundry "default" :width normal
:height 1 :weight normal :slant normal
:foreground "unspecified-fg"

View file

@ -2284,7 +2284,7 @@ in which C preprocessor directives are used. e.g. `asm-mode' and
`(;; Control structures. Emacs Lisp forms.
(,(concat
"(" (regexp-opt
'("cond" "if" "while" "while-no-input" "let" "let*"
'("cond" "if" "while" "while-no-input" "let" "let*" "letrec"
"prog" "progn" "progv" "prog1" "prog2" "prog*"
"inline" "lambda" "save-restriction" "save-excursion"
"save-selected-window" "save-window-excursion"

View file

@ -1,3 +1,27 @@
2012-03-14 Lars Magne Ingebrigtsen <larsi@gnus.org>
* gnus-sum.el (gnus-update-marks): Don't propagate marks unless
requested (bug#10961).
* shr.el (shr-table-widths): Divide the extra width more fairly over
the TDs (bug#10973).
(shr-render-td): Don't delete too much padding.
(shr-natural-width): Compute the natural width more correctly.
(shr-insert): Allow the natural width to be computed for tables again.
(shr-tag-table-1): Rework how the natural widths are computed by
rendering the table a third time.
(shr-natural-width): Removed.
(shr-buffer-width): New function.
(shr-expand-newlines): Use it.
* gnus-msg.el (gnus-bug): Don't delete the other windows. We may be
using a `gnus-use-full-window' setup (bug#11013).
2012-03-12 Lars Magne Ingebrigtsen <larsi@gnus.org>
* gnus-int.el (gnus-backend-trace): Flip default to nil before Emacs
24.1 release.
2012-03-10 David Edmondson <dme@dme.org>
* mm-uu.el (mm-uu-forward-extract): Allow for blank lines between the

View file

@ -247,7 +247,7 @@ If it is down, start it up (again)."
(eq (nth 1 (assoc method gnus-opened-servers))
'denied))
(defvar gnus-backend-trace t)
(defvar gnus-backend-trace nil)
(defun gnus-open-server (gnus-command-method)
"Open a connection to GNUS-COMMAND-METHOD."

View file

@ -1453,7 +1453,6 @@ If YANK is non-nil, include the original article."
(error "Gnus has been shut down"))
(gnus-setup-message (if (message-mail-user-agent) 'message 'bug)
(unless (message-mail-user-agent)
(delete-other-windows)
(when gnus-bug-create-help-buffer
(switch-to-buffer "*Gnus Help Bug*")
(erase-buffer)

View file

@ -6074,6 +6074,10 @@ If SELECT-ARTICLES, only select those articles from GROUP."
(when (and (gnus-check-backend-function
'request-set-mark gnus-newsgroup-name)
(or gnus-propagate-marks
(gnus-method-option-p
(gnus-find-method-for-group gnus-newsgroup-name)
'server-marks))
(not (gnus-article-unpropagatable-p (cdr type))))
(let* ((old (cdr (assq (cdr type) (gnus-info-marks info))))
;; Don't do anything about marks for articles we

View file

@ -341,7 +341,6 @@ the URL of the image to the kill buffer instead."
(delete-char -1))
(insert "\n")
(unless found
(put-text-property (1- (point)) (point) 'shr-break t)
;; No space is needed at the beginning of a line.
(when (eq (following-char) ? )
(delete-char 1)))
@ -711,7 +710,7 @@ ones, in case fg and bg are nil."
(forward-line 1)
(setq end (point))
(narrow-to-region start end)
(let ((width (shr-natural-width))
(let ((width (shr-buffer-width))
column)
(goto-char (point-min))
(while (not (eobp))
@ -1048,7 +1047,10 @@ ones, in case fg and bg are nil."
;; be smaller (if there's little text) or bigger (if there's
;; unbreakable text).
(sketch (shr-make-table cont suggested-widths))
(sketch-widths (shr-table-widths sketch suggested-widths)))
;; Compute the "natural" width by setting each column to 500
;; characters and see how wide they really render.
(natural (shr-make-table cont (make-vector (length columns) 500)))
(sketch-widths (shr-table-widths sketch natural suggested-widths)))
;; This probably won't work very well.
(when (> (+ (loop for width across sketch-widths
summing (1+ width))
@ -1186,31 +1188,35 @@ ones, in case fg and bg are nil."
shr-table-corner))
(insert "\n"))
(defun shr-table-widths (table suggested-widths)
(defun shr-table-widths (table natural-table suggested-widths)
(let* ((length (length suggested-widths))
(widths (make-vector length 0))
(natural-widths (make-vector length 0)))
(dolist (row table)
(let ((i 0))
(dolist (column row)
(aset widths i (max (aref widths i)
(car column)))
(aset natural-widths i (max (aref natural-widths i)
(cadr column)))
(aset widths i (max (aref widths i) column))
(setq i (1+ i)))))
(dolist (row natural-table)
(let ((i 0))
(dolist (column row)
(aset natural-widths i (max (aref natural-widths i) column))
(setq i (1+ i)))))
(let ((extra (- (apply '+ (append suggested-widths nil))
(apply '+ (append widths nil))))
(expanded-columns 0))
;; We have extra, unused space, so divide this space amongst the
;; columns.
(when (> extra 0)
;; If the natural width is wider than the rendered width, we
;; want to allow the column to expand.
(dotimes (i length)
;; If the natural width is wider than the rendered width, we
;; want to allow the column to expand.
(when (> (aref natural-widths i) (aref widths i))
(setq expanded-columns (1+ expanded-columns))))
(dotimes (i length)
(when (> (aref natural-widths i) (aref widths i))
(aset widths i (min
(1+ (aref natural-widths i))
(aref natural-widths i)
(+ (/ extra expanded-columns)
(aref widths i))))))))
widths))
@ -1265,10 +1271,13 @@ ones, in case fg and bg are nil."
(let ((shr-width width)
(shr-indentation 0))
(shr-descend (cons 'td cont)))
;; Delete padding at the bottom of the TDs.
(delete-region
(point)
(+ (point)
(skip-chars-backward " \t\n")))
(progn
(skip-chars-backward " \t\n")
(end-of-line)
(point)))
(push (list (cons width cont) (buffer-string)
(shr-overlays-in-region (point-min) (point-max)))
shr-content-cache)))
@ -1302,19 +1311,14 @@ ones, in case fg and bg are nil."
(split-string (buffer-string) "\n")
(shr-collect-overlays)
(car actual-colors))
(list max
(shr-natural-width)))))))
max)))))
(defun shr-natural-width ()
(defun shr-buffer-width ()
(goto-char (point-min))
(let ((current 0)
(max 0))
(let ((max 0))
(while (not (eobp))
(end-of-line)
(setq current (+ current (current-column)))
(unless (get-text-property (point) 'shr-break)
(setq max (max max current)
current 0))
(setq max (max max (current-column)))
(forward-line 1))
max))

View file

@ -450,6 +450,12 @@ and so on."
keep-overlays : More of a bell (or possibly whistle) than an
optimization - If on, preserve overlay highlighting
(cf ediff or goo-font-lock) as well as basic faces.\n
body-text-only : Emit only body-text. In concrete terms,
1. Suppress calls to `hfy-page-header'and
`hfy-page-footer'
2. Pretend that `div-wrapper' option above is
turned off
3. Don't enclose output in <pre> </pre> tags
And the following are planned but not yet available:\n
kill-context-leak : Suppress hyperlinking between files highlighted by
different modes.\n
@ -463,7 +469,8 @@ which can never slow you down, but may result in incomplete fontification."
(const :tag "skip-refontification" skip-refontification)
(const :tag "kill-context-leak" kill-context-leak )
(const :tag "div-wrapper" div-wrapper )
(const :tag "keep-overlays" keep-overlays ))
(const :tag "keep-overlays" keep-overlays )
(const :tag "body-text-only" body-text-only ))
:group 'htmlfontify
:tag "optimizations")
@ -1044,7 +1051,7 @@ haven't encountered them yet. Returns a `hfy-style-assoc'."
((facep fn)
(hfy-face-attr-for-class fn hfy-display-class))
((and (symbolp fn)
(facep (symbol-value fn)))
(facep (symbol-value fn)))
;; Obsolete faces like `font-lock-reference-face' are defined as
;; aliases for another face.
(hfy-face-attr-for-class (symbol-value fn) hfy-display-class))
@ -1108,10 +1115,9 @@ See also `hfy-face-to-style-i', `hfy-flatten-style'."
;; construct an assoc of (stripped-name . "{ css-stuff-here }") pairs
;; from a face:
(defun hfy-face-to-css (fn)
"Take FN, a font or `defface' specification (cf `face-attr-construct')
and return a CSS style specification.\n
See also `hfy-face-to-style'."
(defun hfy-face-to-css-default (fn)
"Default handler for mapping faces to styles.
See also `hfy-face-to-css'."
;;(message "hfy-face-to-css");;DBUG
(let* ((css-list (hfy-face-to-style fn))
(seen nil)
@ -1125,6 +1131,17 @@ See also `hfy-face-to-style'."
css-list)))
(cons (hfy-css-name fn) (format "{%s}" (apply 'concat css-text)))) )
(defvar hfy-face-to-css 'hfy-face-to-css-default
"Handler for mapping faces to styles.
The signature of the handler is of the form \(lambda (FN) ...\).
FN is a font or `defface' specification (cf
`face-attr-construct'). The handler should return a cons cell of
the form (STYLE-NAME . STYLE-SPEC).
The default handler is `hfy-face-to-css-default'.
See also `hfy-face-to-style'.")
(defalias 'hfy-prop-invisible-p
(if (fboundp 'invisible-p) #'invisible-p
(lambda (prop)
@ -1311,20 +1328,27 @@ The plists are returned in descending priority order."
;; construct an assoc of (face-name . (css-name . "{ css-style }")) elements:
(defun hfy-compile-stylesheet ()
"Trawl the current buffer, construct and return a `hfy-sheet-assoc'."
"Trawl the current buffer, construct and return a `hfy-sheet-assoc'.
If `hfy-user-sheet-assoc' is currently bound then use it to
collect new styles discovered during this run. Otherwise create
a new assoc."
;;(message "hfy-compile-stylesheet");;DBUG
(let ((pt (point-min))
;; Make the font stack stay:
;;(hfy-tmpfont-stack nil)
(fn nil)
(style nil))
(style (and (boundp 'hfy-user-sheet-assoc) hfy-user-sheet-assoc)))
(save-excursion
(goto-char pt)
(while (< pt (point-max))
(if (and (setq fn (hfy-face-at pt)) (not (assoc fn style)))
(push (cons fn (hfy-face-to-css fn)) style))
(setq pt (next-char-property-change pt))) )
(push (cons 'default (hfy-face-to-css 'default)) style)))
(push (cons fn (funcall hfy-face-to-css fn)) style))
(setq pt (next-char-property-change pt))))
(unless (assoc 'default style)
(push (cons 'default (funcall hfy-face-to-css 'default)) style))
(when (boundp 'hfy-user-sheet-assoc)
(setq hfy-user-sheet-assoc style))
style))
(defun hfy-fontified-p ()
"`font-lock' doesn't like to say it's been fontified when in batch
@ -1425,7 +1449,7 @@ Returns a modified copy of FACE-MAP."
(setq pt (next-char-property-change pt))
(setq pt-narrow (+ offset pt)))
(if (and map (not (eq 'end (cdar map))))
(push (cons (- (point-max) (point-min)) 'end) map)))
(push (cons (1+ (- (point-max) (point-min))) 'end) map)))
(if (hfy-opt 'merge-adjacent-tags) (hfy-merge-adjacent-spans map) map)))
(defun hfy-buffer ()
@ -1547,6 +1571,61 @@ Do not record undo information during evaluation of BODY."
(remove-text-properties (point-min) (point-max)
'(hfy-show-trailing-whitespace)))))
(defun hfy-begin-span (style text-block text-id text-begins-block-p)
"Default handler to begin a span of text.
Insert \"<span class=\"STYLE\" ...>\". See
`hfy-begin-span-handler' for more information."
(when text-begins-block-p
(insert
(format "<span onclick=\"toggle_invis('%s');\">…</span>" text-block)))
(insert
(if text-block
(format "<span class=\"%s\" id=\"%s-%d\">" style text-block text-id)
(format "<span class=\"%s\">" style))))
(defun hfy-end-span ()
"Default handler to end a span of text.
Insert \"</span>\". See `hfy-end-span-handler' for more
information."
(insert "</span>"))
(defvar hfy-begin-span-handler 'hfy-begin-span
"Handler to begin a span of text.
The signature of the handler is \(lambda (STYLE TEXT-BLOCK
TEXT-ID TEXT-BEGINS-BLOCK-P) ...\). The handler must insert
appropriate tags to begin a span of text.
STYLE is the name of the style that begins at point. It is
derived from the face attributes as part of `hfy-face-to-css'
callback. The other arguments TEXT-BLOCK, TEXT-ID,
TEXT-BEGINS-BLOCK-P are non-nil only if the buffer contains
invisible text.
TEXT-BLOCK is a string that identifies a single chunk of visible
or invisible text of which the current position is a part. For
visible portions, it's value is \"nil\". For invisible portions,
it's value is computed as part of `hfy-invisible-name'.
TEXT-ID marks a unique position within a block. It is set to
value of `point' at the current buffer position.
TEXT-BEGINS-BLOCK-P is a boolean and is non-nil if the current
span also begins a invisible portion of text.
An implementation can use TEXT-BLOCK, TEXT-ID,
TEXT-BEGINS-BLOCK-P to implement fold/unfold-on-mouse-click like
behaviour.
The default handler is `hfy-begin-span'.")
(defvar hfy-end-span-handler 'hfy-end-span
"Handler to end a span of text.
The signature of the handler is \(lambda () ...\). The handler
must insert appropriate tags to end a span of text.
The default handler is `hfy-end-span'.")
(defun hfy-fontify-buffer (&optional srcdir file)
"Implement the guts of `htmlfontify-buffer'.
SRCDIR, if set, is the directory being htmlfontified.
@ -1634,23 +1713,19 @@ FILE, if set, is the file name."
(or (get-text-property pt 'hfy-linkp)
(get-text-property pt 'hfy-endl )))
(if (eq 'end fn)
(insert "</span>")
(funcall hfy-end-span-handler)
(if (not (and srcdir file))
nil
(when move-link
(remove-text-properties (point) (1+ (point)) '(hfy-endl nil))
(put-text-property pt (1+ pt) 'hfy-endl t) ))
;; if we have invisible blocks, we need to do some extra magic:
(if invis-ranges
(let ((iname (hfy-invisible-name pt invis-ranges))
(fname (hfy-lookup fn css-sheet )))
(when (assq pt invis-ranges)
(insert
(format "<span onclick=\"toggle_invis('%s');\">" iname))
(insert "…</span>"))
(insert
(format "<span class=\"%s\" id=\"%s-%d\">" fname iname pt)))
(insert (format "<span class=\"%s\">" (hfy-lookup fn css-sheet))))
(funcall hfy-begin-span-handler
(hfy-lookup fn css-sheet)
(and invis-ranges
(format "%s" (hfy-invisible-name pt invis-ranges)))
(and invis-ranges pt)
(and invis-ranges (assq pt invis-ranges)))
(if (not move-link) nil
;;(message "removing prop2 @ %d" (point))
(if (remove-text-properties (point) (1+ (point)) '(hfy-endl nil))
@ -1698,23 +1773,39 @@ FILE, if set, is the file name."
;; so we have to do this after we use said properties:
;; (message "munging dangerous characters")
(hfy-html-dekludge-buffer)
;; insert the stylesheet at the top:
(goto-char (point-min))
;;(message "inserting stylesheet")
(insert (hfy-sprintf-stylesheet css-sheet file))
(if (hfy-opt 'div-wrapper) (insert "<div class=\"default\">"))
(insert "\n<pre>")
(goto-char (point-max))
(insert "</pre>\n")
(if (hfy-opt 'div-wrapper) (insert "</div>"))
;;(message "inserting footer")
(insert (funcall hfy-page-footer file))
(unless (hfy-opt 'body-text-only)
;; insert the stylesheet at the top:
(goto-char (point-min))
;;(message "inserting stylesheet")
(insert (hfy-sprintf-stylesheet css-sheet file))
(if (hfy-opt 'div-wrapper) (insert "<div class=\"default\">"))
(insert "\n<pre>")
(goto-char (point-max))
(insert "</pre>\n")
(if (hfy-opt 'div-wrapper) (insert "</div>"))
;;(message "inserting footer")
(insert (funcall hfy-page-footer file)))
;; call any post html-generation hooks:
(run-hooks 'hfy-post-html-hooks)
;; return the html buffer
(set-buffer-modified-p nil)
html-buffer))
(defun htmlfontify-string (string)
"Take a STRING and return a fontified version of it.
It is assumed that STRING has text properties that allow it to be
fontified. This is a simple convenience wrapper around
`htmlfontify-buffer'."
(let* ((hfy-optimisations-1 (copy-sequence hfy-optimisations))
(hfy-optimisations (add-to-list 'hfy-optimisations-1
'skip-refontification)))
(with-temp-buffer
(insert string)
(htmlfontify-buffer)
(buffer-string))))
(defun hfy-force-fontification ()
"Try to force font-locking even when it is optimized away."
(run-hooks 'hfy-init-kludge-hook)

View file

@ -963,13 +963,14 @@ See the command `imenu' for more information."
imenu-generic-expression
(not (eq imenu-create-index-function
'imenu-default-create-index-function)))
(let ((newmap (make-sparse-keymap)))
(set-keymap-parent newmap (current-local-map))
(setq imenu--last-menubar-index-alist nil)
(define-key newmap [menu-bar index]
`(menu-item ,name ,(make-sparse-keymap "Imenu")))
(use-local-map newmap)
(add-hook 'menu-bar-update-hook 'imenu-update-menubar))
(unless (keymapp (lookup-key (current-local-map) [menu-bar index]))
(let ((newmap (make-sparse-keymap)))
(set-keymap-parent newmap (current-local-map))
(setq imenu--last-menubar-index-alist nil)
(define-key newmap [menu-bar index]
`(menu-item ,name ,(make-sparse-keymap "Imenu")))
(use-local-map newmap)
(add-hook 'menu-bar-update-hook 'imenu-update-menubar)))
(error "The mode `%s' does not support Imenu"
(format-mode-line mode-name))))
@ -1008,6 +1009,9 @@ to `imenu-update-menubar'.")
(car (cdr menu))))
'imenu--menubar-select))
(setq old (lookup-key (current-local-map) [menu-bar index]))
;; This should never happen, but in some odd cases, potentially,
;; lookup-key may return a dynamically composed keymap.
(if (keymapp (cadr old)) (setq old (cadr old)))
(setcdr old (cdr menu1)))))))
(defun imenu--menubar-select (item)

View file

@ -1085,9 +1085,10 @@ Return non-nil if and only if some part of the header is encoded."
(cons selected mm-coding-system-priorities)
mm-coding-system-priorities))
(tick (buffer-chars-modified-tick))
;; rms: this proved necessary, but I don't recall why.
;; Can anyone determine why, and state it here?
(rfc2047-encode-encoded-words t))
;; Many mailers, including Gnus, passes a message of which
;; the header is already encoded, so this is necessary to
;; prevent it from being encoded again.
(rfc2047-encode-encoded-words nil))
(rfc2047-encode-message-header)
(= tick (buffer-chars-modified-tick)))))

View file

@ -659,7 +659,7 @@ Fill in VALUES if based on an article."
" containing the word)\n"
" substring= to match words containing the substring\n"
" substring=N to match words containing the substring, allowing\n"
" up to N errors(mising/extra/different letters)\n"
" up to N errors(missing/extra/different letters)\n"
" ^substring= to match the substring at the beginning of a word.\n"))
(widget-insert
"Whitespace will be converted to ',' (i.e. AND). Use '/' for OR.\n\n")

View file

@ -2165,13 +2165,17 @@ CHANNELS is a comma- or space-separated string of channel names."
(let ((channel (if (> (length channel) 0) channel target)))
(rcirc-send-string process (concat "PART " channel " :" rcirc-id-string))))
(defun-rcirc-command quit (reason)
"Send a quit message to server with REASON."
(interactive "sQuit reason: ")
(rcirc-send-string process (concat "QUIT :"
(if (not (zerop (length reason)))
reason
rcirc-id-string))))
(defun-rcirc-command quit (reason all)
"Send a quit message to server with REASON.
When called with prefix, quit all servers."
(interactive "sQuit reason: \nP")
(dolist (p (if all
(rcirc-process-list)
(list process)))
(rcirc-send-string p (concat "QUIT :"
(if (not (zerop (length reason)))
reason
rcirc-id-string)))))
(defun-rcirc-command nick (nick)
"Change nick to NICK."

View file

@ -236,7 +236,7 @@
(defun c-invalidate-macro-cache (beg end)
;; Called from a before-change function. If the change region is before or
;; in the macro characterised by `c-macro-cache' etc., nullify it
;; in the macro characterized by `c-macro-cache' etc., nullify it
;; appropriately. BEG and END are the standard before-change-functions
;; parameters. END isn't used.
(cond
@ -1246,7 +1246,7 @@ comment at the start of cc-engine.el for more info."
(c-at-vsemi-p))))
(throw 'done vsemi-pos))
;; In a string/comment?
((setq lit-range (c-literal-limits))
((setq lit-range (c-literal-limits from))
(goto-char (cdr lit-range)))
((eq (char-after) ?:)
(forward-char)
@ -2163,7 +2163,7 @@ comment at the start of cc-engine.el for more info."
(make-variable-buffer-local 'c-state-semi-nonlit-pos-cache-limit)
;; An upper limit on valid entries in `c-state-semi-nonlit-pos-cache'. This is
;; reduced by buffer changes, and increased by invocations of
;; `c-state-literal-at'. FIMXE!!!
;; `c-state-literal-at'. FIXME!!!
(defsubst c-state-pp-to-literal (from to)
;; Do a parse-partial-sexp from FROM to TO, returning either
@ -3250,8 +3250,7 @@ comment at the start of cc-engine.el for more info."
(if scan-forward-p
(progn (narrow-to-region (point-min) here)
(c-append-to-state-cache good-pos))
(c-get-cache-scan-pos good-pos))))
good-pos)))
(t ; (eq strategy 'IN-LIT)
(setq c-state-cache nil
@ -4563,6 +4562,38 @@ comment at the start of cc-engine.el for more info."
(point-min))
(t
(c-determine-limit (- how-far-back count) base try-size))))))
(defun c-determine-+ve-limit (how-far &optional start-pos)
;; Return a buffer position about HOW-FAR non-literal characters forward
;; from START-POS (default point), which must not be inside a literal.
(save-excursion
(let ((pos (or start-pos (point)))
(count how-far)
(s (parse-partial-sexp (point) (point)))) ; null state
(while (and (not (eobp))
(> count 0))
;; Scan over counted characters.
(setq s (parse-partial-sexp
pos
(min (+ pos count) (point-max))
nil ; target-depth
nil ; stop-before
s ; state
'syntax-table)) ; stop-comment
(setq count (- count (- (point) pos) 1)
pos (point))
;; Scan over literal characters.
(if (nth 8 s)
(setq s (parse-partial-sexp
pos
(point-max)
nil ; target-depth
nil ; stop-before
s ; state
'syntax-table) ; stop-comment
pos (point))))
(point))))
;; `c-find-decl-spots' and accompanying stuff.
@ -7670,8 +7701,8 @@ comment at the start of cc-engine.el for more info."
(and
(eq (c-beginning-of-statement-1 lim) 'same)
(not (or (c-major-mode-is 'objc-mode)
(c-forward-objc-directive)))
(not (and (c-major-mode-is 'objc-mode)
(c-forward-objc-directive)))
(setq id-start
(car-safe (c-forward-decl-or-cast-1 (c-point 'bosws) nil nil)))
@ -8635,7 +8666,6 @@ comment at the start of cc-engine.el for more info."
(setq pos (point)))
(and
c-macro-with-semi-re
(not (c-in-literal))
(eq (skip-chars-backward " \t") 0)
;; Check we've got nothing after this except comments and empty lines
@ -8666,7 +8696,9 @@ comment at the start of cc-engine.el for more info."
(c-backward-syntactic-ws)
t))
(c-simple-skip-symbol-backward)
(looking-at c-macro-with-semi-re)))))
(looking-at c-macro-with-semi-re)
(goto-char pos)
(not (c-in-literal)))))) ; The most expensive check last.
(defun c-macro-vsemi-status-unknown-p () t) ; See cc-defs.el.
@ -9207,6 +9239,10 @@ comment at the start of cc-engine.el for more info."
containing-sexp nil)))
(setq lim (1+ containing-sexp))))
(setq lim (point-min)))
(when (c-beginning-of-macro)
(goto-char indent-point)
(let ((lim1 (c-determine-limit 2000)))
(setq lim (max lim lim1))))
;; If we're in a parenthesis list then ',' delimits the
;; "statements" rather than being an operator (with the
@ -9571,7 +9607,8 @@ comment at the start of cc-engine.el for more info."
;; CASE 5B: After a function header but before the body (or
;; the ending semicolon if there's no body).
((save-excursion
(when (setq placeholder (c-just-after-func-arglist-p lim))
(when (setq placeholder (c-just-after-func-arglist-p
(max lim (c-determine-limit 500))))
(setq tmp-pos (point))))
(cond
@ -9779,7 +9816,7 @@ comment at the start of cc-engine.el for more info."
;; top level construct. Or, perhaps, an unrecognized construct.
(t
(while (and (setq placeholder (point))
(eq (car (c-beginning-of-decl-1 containing-sexp))
(eq (car (c-beginning-of-decl-1 containing-sexp)) ; Can't use `lim' here.
'same)
(save-excursion
(c-backward-syntactic-ws)
@ -9882,7 +9919,7 @@ comment at the start of cc-engine.el for more info."
(eq (cdar c-state-cache) (point)))
;; Speed up the backward search a bit.
(goto-char (caar c-state-cache)))
(c-beginning-of-decl-1 containing-sexp)
(c-beginning-of-decl-1 containing-sexp) ; Can't use `lim' here.
(setq placeholder (point))
(if (= start (point))
;; The '}' is unbalanced.

View file

@ -925,8 +925,8 @@ Note that the style variables are always made local to the buffer."
;; inside a string, comment, or macro.
(setq new-bounds (c-extend-font-lock-region-for-macros
c-new-BEG c-new-END old-len))
(setq c-new-BEG (car new-bounds)
c-new-END (cdr new-bounds))
(setq c-new-BEG (max (car new-bounds) (c-determine-limit 500 begg))
c-new-END (min (cdr new-bounds) (c-determine-+ve-limit 500 endd)))
;; Clear all old relevant properties.
(c-clear-char-property-with-value c-new-BEG c-new-END 'syntax-table '(1))
(c-clear-char-property-with-value c-new-BEG c-new-END 'category 'c-cpp-delimiter)

View file

@ -3269,8 +3269,12 @@ DOC is an optional documentation string."
(let* ((frame (gdb-current-buffer-frame))
(file (bindat-get-field frame 'fullname))
(line (bindat-get-field frame 'line)))
(when file
(format "-data-disassemble -f %s -l %s -n -1 -- 0" file line)))
(if file
(format "-data-disassemble -f %s -l %s -n -1 -- 0" file line)
;; If we're unable to get a file name / line for $PC, simply
;; follow $PC, disassembling the next 10 (x ~15 (on IA) ==
;; 150 bytes) instructions.
"-data-disassemble -s $pc -e \"$pc + 150\" -- 0"))
gdb-disassembly-handler
;; We update disassembly only after we have actual frame information
;; about all threads, so no there's `update' signal in this list
@ -3329,8 +3333,12 @@ DOC is an optional documentation string."
(gdb-table-add-row table
(list
(bindat-get-field instr 'address)
(apply #'format "<%s+%s>:"
(gdb-get-many-fields instr 'func-name 'offset))
(let
((func-name (bindat-get-field instr 'func-name))
(offset (bindat-get-field instr 'offset)))
(if func-name
(format "<%s+%s>:" func-name offset)
""))
(bindat-get-field instr 'inst)))
(when (string-equal (bindat-get-field instr 'address)
address)

View file

@ -388,7 +388,11 @@ The expansion is entirely correct because it uses the C preprocessor."
;; In case of error, make sure we don't move backward.
(scan-error (goto-char startpos) nil))
(not (or (nth 8 (parse-partial-sexp
(point) limit nil nil state 'syntax-table))
;; Since we don't know if point is within
;; the first or the scond arg, we have to
;; start from the beginning.
(if twoargs (1+ (nth 8 state)) (point))
limit nil nil state 'syntax-table))
;; If we have a self-paired opener and a twoargs
;; command, the form is s/../../ so we have to skip
;; a second time.

View file

@ -3069,7 +3069,8 @@ before the Emacs kill and one can still paste it using \\[yank] \\[yank-pop]."
:version "23.2")
(defcustom kill-do-not-save-duplicates nil
"Do not add a new string to `kill-ring' when it is the same as the last one."
"Do not add a new string to `kill-ring' if it duplicates the last one.
The comparison is done using `equal-including-properties'."
:type 'boolean
:group 'killing
:version "23.2")
@ -3097,7 +3098,10 @@ argument should still be a \"useful\" string for such uses."
(signal 'args-out-of-range
(list string "yank-handler specified for empty string"))))
(unless (and kill-do-not-save-duplicates
(equal string (car kill-ring)))
;; Due to text properties such as 'yank-handler that
;; can alter the contents to yank, comparison using
;; `equal' is unsafe.
(equal-including-properties string (car kill-ring)))
(if (fboundp 'menu-bar-update-yank-menu)
(menu-bar-update-yank-menu string (and replace (car kill-ring)))))
(when save-interprogram-paste-before-kill
@ -3108,10 +3112,10 @@ argument should still be a \"useful\" string for such uses."
(nreverse interprogram-paste)
(list interprogram-paste)))
(unless (and kill-do-not-save-duplicates
(equal s (car kill-ring)))
(equal-including-properties s (car kill-ring)))
(push s kill-ring))))))
(unless (and kill-do-not-save-duplicates
(equal string (car kill-ring)))
(equal-including-properties string (car kill-ring)))
(if (and replace kill-ring)
(setcar kill-ring string)
(push string kill-ring)

View file

@ -423,7 +423,7 @@ For example: to sort lines in the region by the first word on each line
;; using negative prefix arg to mean "reverse" is now inconsistent with
;; other sort-.*fields functions but then again this was before, since it
;; didn't use the magnitude of the arg to specify anything.
(interactive "P\nsRegexp specifying records to sort:
(interactive "P\nsRegexp specifying records to sort: \n\
sRegexp specifying key within record: \nr")
(cond ((or (equal key-regexp "") (equal key-regexp "\\&"))
(setq key-regexp 0))

View file

@ -1785,6 +1785,8 @@ this name matching.
Alternatively, FILE can be a feature (i.e. a symbol), in which case FORM
is evaluated at the end of any file that `provide's this feature.
If the feature is provided when evaluating code not associated with a
file, FORM is evaluated immediately after the provide statement.
Usually FILE is just a library name like \"font-lock\" or a feature name
like 'font-lock.
@ -1814,14 +1816,16 @@ This function makes or adds to an entry on `after-load-alist'."
;; make sure that `form' is really run "after-load" in case the provide
;; call happens early.
(setq form
`(when load-file-name
(let ((fun (make-symbol "eval-after-load-helper")))
(fset fun `(lambda (file)
(if (not (equal file ',load-file-name))
nil
(remove-hook 'after-load-functions ',fun)
,',form)))
(add-hook 'after-load-functions fun)))))
`(if load-file-name
(let ((fun (make-symbol "eval-after-load-helper")))
(fset fun `(lambda (file)
(if (not (equal file ',load-file-name))
nil
(remove-hook 'after-load-functions ',fun)
,',form)))
(add-hook 'after-load-functions fun))
;; Not being provided from a file, run form right now.
,form)))
;; Add FORM to the element unless it's already there.
(unless (member form (cdr elt))
(nconc elt (purecopy (list form)))))))

View file

@ -634,6 +634,9 @@ inside of a tar archive without extracting it and re-archiving it.
See also: variables `tar-update-datestamp' and `tar-anal-blocksize'.
\\{tar-mode-map}"
(and buffer-file-name
(file-writable-p buffer-file-name)
(setq buffer-read-only nil)) ; undo what `special-mode' did
(make-local-variable 'tar-parse-info)
(set (make-local-variable 'require-final-newline) nil) ; binary data, dude...
(set (make-local-variable 'local-enable-local-variables) nil)

View file

@ -324,9 +324,9 @@ Uses `query-replace' (\\[query-replace]) for corrections."
Skips any text between strings matching regular expressions
`ispell-tib-ref-beginning' and `ispell-tib-ref-end'.
TeX users beware: Any field starting with [. will skip until a .] -- even
your whole buffer -- unless you set `ispell-skip-tib' to nil. That includes
a [.5mm] type of number...."
TeX users beware: Any text between [. and .] will be skipped -- even if
that's your whole buffer -- unless you set `ispell-skip-tib' to nil.
That includes the [.5mm] type of number..."
:type 'boolean
:group 'ispell)
@ -337,13 +337,13 @@ a [.5mm] type of number...."
"Regexp matching the end of a Tib reference.")
(defcustom ispell-keep-choices-win t
"*When non-nil, the `*Choices*' window remains for spelling session.
"*If non-nil, keep the `*Choices*' window for the entire spelling session.
This minimizes redisplay thrashing."
:type 'boolean
:group 'ispell)
(defcustom ispell-choices-win-default-height 2
"*The default size of the `*Choices*' window, including mode line.
"*The default size of the `*Choices*' window, including the mode line.
Must be greater than 1."
:type 'integer
:group 'ispell)
@ -493,7 +493,7 @@ default dictionary and LANG the two letter language code."
:group 'ispell)
(defcustom ispell-silently-savep nil
"*When non-nil, save the personal dictionary without confirmation."
"*When non-nil, save personal dictionary without asking for confirmation."
:type 'boolean
:group 'ispell)
@ -714,7 +714,7 @@ Hint: regexp syntax requires the hyphen to be declared first here.
CASECHARS, NOT-CASECHARS, and OTHERCHARS must be unibyte strings
containing bytes of CHARACTER-SET. In addition, if they contain
a non-ASCII byte, the regular expression must be a single
non-ASCII bytes, the regular expression must be a single
`character set' construct that doesn't specify a character range
for non-ASCII bytes.
@ -734,27 +734,31 @@ but the dictionary can control the extended character mode.
Both defaults can be overruled in a buffer-local fashion. See
`ispell-parsing-keyword' for details on this.
CHARACTER-SET used for languages with multibyte characters.
CHARACTER-SET used to encode text sent to the ispell subprocess
when the language uses non-ASCII characters.
Note that the CASECHARS and OTHERCHARS slots of the alist should
contain the same character set as casechars and otherchars in the
LANGUAGE.aff file \(e.g., english.aff\).")
Note that with \"ispell\" as the speller, the CASECHARS and
OTHERCHARS slots of the alist should contain the same character
set as casechars and otherchars in the LANGUAGE.aff file \(e.g.,
english.aff\). apsell and hunspell don't have this limitation.")
(defvar ispell-really-aspell nil) ; Non-nil if we can use aspell extensions.
(defvar ispell-really-hunspell nil) ; Non-nil if we can use hunspell extensions.
(defvar ispell-encoding8-command nil
"Command line option prefix to select UTF-8 if supported, nil otherwise.
If UTF-8 if supported by spellchecker and is selectable from the command line
this variable will contain \"--encoding=\" for aspell and \"-i \" for hunspell,
so UTF-8 or other mime charsets can be selected. That will be set for hunspell
>=1.1.6 or aspell >= 0.60 in `ispell-check-version'.
"Command line option prefix to select encoding if supported, nil otherwise.
If setting the encoding is supported by spellchecker and is selectable from
the command line, this variable will contain \"--encoding=\" for aspell
and \"-i \" for hunspell, so the appropriate mime charset can be selected.
That will be set in `ispell-check-version' for hunspell >= 1.1.6 and
aspell >= 0.60.
For aspell non-nil means to try to automatically find aspell dictionaries.
Earlier aspell versions do not consistently support UTF-8. Handling
For aspell, non-nil also means to try to automatically find its dictionaries.
Earlier aspell versions do not consistently support charset encoding. Handling
this would require some extra guessing in `ispell-aspell-find-dictionary'.")
(defvar ispell-aspell-supports-utf8 nil
"Non nil if aspell has consistent command line UTF-8 support. Obsolete.
"Non-nil if aspell has consistent command line UTF-8 support. Obsolete.
ispell.el and flyspell.el will use for this purpose the more generic
variable `ispell-encoding8-command' for both aspell and hunspell. Is left
here just for backwards compatibility.")
@ -780,7 +784,7 @@ here just for backwards compatibility.")
(defun ispell-check-version (&optional interactivep)
"Ensure that `ispell-program-name' is valid and the correct version.
"Ensure that `ispell-program-name' is valid and has the correct version.
Returns version number if called interactively.
Otherwise returns the library directory name, if that is defined."
;; This is a little wasteful as we actually launch ispell twice: once
@ -983,8 +987,8 @@ Assumes that value contains no whitespace."
(defun ispell-aspell-find-dictionary (dict-name)
"For aspell dictionary DICT-NAME, return a list of parameters if an
associated data file is found or nil otherwise. List format is
that of `ispell-dictionary-base-alist' elements."
associated data file is found or nil otherwise. List format is that
of `ispell-dictionary-base-alist' elements."
;; Make sure `ispell-aspell-data-dir' is defined
(or ispell-aspell-data-dir
(setq ispell-aspell-data-dir
@ -1117,7 +1121,7 @@ aspell is used along with Emacs).")
(defun ispell-valid-dictionary-list ()
"Return a list of valid dictionaries.
The variable `ispell-library-directory' defines the library location."
The variable `ispell-library-directory' defines their location."
;; Initialize variables and dictionaries alists for desired spellchecker.
;; Make sure ispell.el is loaded to avoid some autoload loops in XEmacs
;; (and may be others)
@ -1307,7 +1311,8 @@ Protects against bogus binding of `enable-multibyte-characters' in XEmacs."
(let* ((slot (or
(assoc ispell-current-dictionary ispell-local-dictionary-alist)
(assoc ispell-current-dictionary ispell-dictionary-alist)
(error "No match for the current dictionary")))
(error "No data for dictionary \"%s\", neither in `ispell-local-dictionary-alist' nor in `ispell-dictionary-alist'"
ispell-current-dictionary)))
(str (nth n slot)))
(when (and (> (length str) 0)
(not (multibyte-string-p str)))
@ -1381,7 +1386,7 @@ Set to the MIME boundary locations when checking messages.")
(defconst ispell-words-keyword "LocalWords: "
"The keyword for local oddly-spelled words to accept.
The keyword will be followed by any number of local word spellings.
There can be multiple of these keywords in the file.")
There can be multiple instances of this keyword in the file.")
(defconst ispell-dictionary-keyword "Local IspellDict: "
"The keyword for a local dictionary to use.
@ -1786,7 +1791,8 @@ If optional argument FOLLOWING is non-nil or if `ispell-following-word'
is non-nil when called interactively, then the following word
\(rather than preceding\) is checked when the cursor is not over a word.
Optional second argument contains otherchars that can be included in word
many times.
many times (see the doc string of `ispell-dictionary-alist' for details
about otherchars).
Word syntax is controlled by the definition of the chosen dictionary,
which is in `ispell-local-dictionary-alist' or `ispell-dictionary-alist'."
@ -2817,8 +2823,8 @@ By just answering RET you can find out what the current dictionary is."
(defun ispell-internal-change-dictionary ()
"Update the dictionary and the personal dictionary used by Ispell.
This may kill the Ispell process; if so,
a new one will be started when needed."
This may kill the Ispell process; if so, a new one will be started
when needed."
(let ((dict (or ispell-local-dictionary ispell-dictionary))
(pdict (or ispell-local-pdict ispell-personal-dictionary)))
(unless (and (equal ispell-current-dictionary dict)
@ -2836,8 +2842,8 @@ a new one will be started when needed."
;;;###autoload
(defun ispell-region (reg-start reg-end &optional recheckp shift)
"Interactively check a region for spelling errors.
Return nil if spell session is quit,
otherwise returns shift offset amount for last line processed."
Return nil if spell session was terminated, otherwise returns shift offset
amount for last line processed."
(interactive "r") ; Don't flag errors on read-only bufs.
(ispell-set-spellchecker-params) ; Initialize variables and dicts alists
(if (not recheckp)
@ -2956,7 +2962,7 @@ Return nil if spell session is quit,
(defun ispell-begin-skip-region-regexp ()
"Return a regexp of the search keys for region skipping.
Includes `ispell-skip-region-alist' plus tex, tib, html, and comment keys.
Must call after `ispell-buffer-local-parsing' due to dependence on mode."
Must be called after `ispell-buffer-local-parsing' due to dependence on mode."
(mapconcat
'identity
(delq nil
@ -3016,7 +3022,7 @@ Includes regions defined by `ispell-skip-region-alist', tex mode,
`ispell-html-skip-alists', and `ispell-checking-message'.
Manual checking must include comments and tib references.
The list is of the form described by variable `ispell-skip-region-alist'.
Must call after `ispell-buffer-local-parsing' due to dependence on mode."
Must be called after `ispell-buffer-local-parsing' due to dependence on mode."
(let ((skip-alist ispell-skip-region-alist))
;; only additional explicit region definition is tex.
(if (eq ispell-parser 'tex)
@ -3046,7 +3052,7 @@ Must call after `ispell-buffer-local-parsing' due to dependence on mode."
(defun ispell-ignore-fcc (start end)
"Delete the Fcc: message header when large attachments are included.
Return value `nil' if file with large attachments are saved.
Return value `nil' if file with large attachments is saved.
This can be used to avoid multiple questions for multiple large attachments.
Returns point to starting location afterwards."
(let ((result t))
@ -3153,7 +3159,7 @@ Returns a string with the line data."
coding)))))
(defun ispell-process-line (string shift)
"Send STRING, a line of text, to ispell and processes the result.
"Send STRING, a line of text, to ispell and process the result.
This will modify the buffer for spelling errors.
Requires variables ISPELL-START and ISPELL-END to be defined in its
dynamic scope.
@ -3468,7 +3474,7 @@ With a prefix argument ARG, enable Ispell minor mode if ARG is
positive, and disable it otherwise. If called from Lisp, enable
the mode if ARG is omitted or nil.
Ispell minor mode is a buffer-local mior mode. When enabled,
Ispell minor mode is a buffer-local minor mode. When enabled,
typing SPC or RET warns you if the previous word is incorrectly
spelled.
@ -3481,7 +3487,7 @@ RET, use `flyspell-mode'."
nil " Spell" ispell-minor-keymap)
(defun ispell-minor-check ()
"Check previous word then continue with the normal binding of this key.
"Check previous word, then continue with the normal binding of this key.
Don't check previous word when character before point is a space or newline.
Don't read buffer-local settings or word lists."
(interactive "*")
@ -3519,8 +3525,8 @@ Don't read buffer-local settings or word lists."
;; Matches commonly used "cut" boundaries
"^\\(- \\)?[-=_]+\\s ?\\(cut here\\|Environment Follows\\)")
"\\|")
"*End of text which will be checked in `ispell-message'.
If it is a string, limit at first occurrence of that regular expression.
"*Text beyond which `ispell-message' will not spell-check.
If it is a string, limit is the first occurrence of that regular expression.
Otherwise, it must be a function which is called to get the limit.")
(put 'ispell-message-text-end 'risky-local-variable t)
@ -3625,7 +3631,7 @@ Don't check included messages.
To abort spell checking of a message region and send the message anyway,
use the `x' command. (Any subsequent regions will be checked.)
The `X' command aborts the message send so that you can edit the buffer.
The `X' command aborts sending the message so that you can edit the buffer.
To spell-check whenever a message is sent, include the appropriate lines
in your .emacs file:
@ -3788,7 +3794,7 @@ You can bind this to the key C-c i in GNUS or mail by adding to
(defun ispell-buffer-local-parsing ()
"Place Ispell into parsing mode for this buffer.
Overrides the default parsing mode.
Includes Latex/Nroff modes and extended character mode."
Includes LaTeX/Nroff modes and extended character mode."
;; (ispell-init-process) must already be called.
(ispell-send-string "!\n") ; Put process in terse mode.
;; We assume all major modes with "tex-mode" in them should use latex parsing
@ -3838,7 +3844,7 @@ Includes Latex/Nroff modes and extended character mode."
(defun ispell-buffer-local-dict (&optional no-reload)
"Initializes local dictionary and local personal dictionary.
If optional NO-RELOAD is non-nil, do not make any dictionary reloading.
If optional NO-RELOAD is non-nil, do not reload any dictionary.
When a dictionary is defined in the buffer (see variable
`ispell-dictionary-keyword'), it will override the local setting
from \\[ispell-change-dictionary].

View file

@ -1,3 +1,8 @@
2012-03-14 Lars Magne Ingebrigtsen <larsi@gnus.org>
* url-queue.el (url-queue-kill-job): Make sure that the callback
is always called, even if we have a timeout.
2012-03-11 Chong Yidong <cyd@gnu.org>
* url-http.el (url-http-end-of-document-sentinel): Handle

View file

@ -156,9 +156,20 @@ The variable `url-queue-timeout' sets a timeout."
(while (setq process (get-buffer-process (url-queue-buffer job)))
(set-process-sentinel process 'ignore)
(ignore-errors
(delete-process process))))
(ignore-errors
(kill-buffer (url-queue-buffer job)))))
(delete-process process)))))
;; Call the callback with an error message to ensure that the caller
;; is notified that the job has failed.
(with-current-buffer
(if (bufferp (url-queue-buffer job))
;; Use the (partially filled) process buffer it it exists.
(url-queue-buffer job)
;; If not, just create a new buffer, which will probably be
;; killed again by the caller.
(generate-new-buffer " *temp*"))
(apply (url-queue-callback job)
(cons (list :error (list 'error 'url-queue-timeout
"Queue timeout exceeded"))
(url-queue-cbargs job)))))
(provide 'url-queue)

View file

@ -226,45 +226,14 @@ highlighting the Log View buffer."
(defun vc-hg-working-revision (file)
"Hg-specific version of `vc-working-revision'."
(let*
((status nil)
(default-directory (file-name-directory file))
;; Avoid localization of messages so we can parse the output.
(avoid-local-env (append (list "TERM=dumb" "LANGUAGE=C")
process-environment))
(out
(with-output-to-string
(with-current-buffer
standard-output
(setq status
(condition-case nil
(let ((process-environment avoid-local-env))
;; Ignore all errors.
(process-file
vc-hg-program nil t nil
"--config" "alias.parents=parents"
"--config" "defaults.parents="
"parents" "--template" "{rev}" (file-relative-name file)))
;; Some problem happened. E.g. We can't find an `hg'
;; executable.
(error nil)))))))
(if (eq 0 status)
out
;; Check if the file is in the 'added state, the above hg
;; command does not distinguish between 'added and 'unregistered.
(setq status
(condition-case nil
(let ((process-environment avoid-local-env))
(process-file
vc-hg-program nil nil nil
;; We use "log" here, if there's a faster command
;; that returns true for an 'added file and false
;; for an 'unregistered one, we could use that.
"log" "-l1" (file-relative-name file)))
;; Some problem happened. E.g. We can't find an `hg'
;; executable.
(error nil)))
(when (eq 0 status) "0"))))
(let ((default-directory (if (file-directory-p file)
(file-name-as-directory file)
(file-name-directory file))))
(ignore-errors
(with-output-to-string
(process-file vc-hg-program nil standard-output nil
"log" "-l" "1" "--template" "{rev}"
(file-relative-name file))))))
;;; History functions

View file

@ -309,7 +309,11 @@ this argument instead of explicitly setting `view-exit-action'.
Do not set EXIT-ACTION to `kill-buffer' when BUFFER visits a
file: Users may suspend viewing in order to modify the buffer.
Exiting View mode will then discard the user's edits. Setting
EXIT-ACTION to `kill-buffer-if-not-modified' avoids this."
EXIT-ACTION to `kill-buffer-if-not-modified' avoids this.
This function does not enable View mode if the buffer's major-mode
has a `special' mode-class, because such modes usually have their
own View-like bindings."
(interactive "bView buffer: ")
(switch-to-buffer buffer)
(if (eq (get major-mode 'mode-class) 'special)
@ -331,7 +335,11 @@ Optional argument NOT-RETURN is ignored.
Optional argument EXIT-ACTION is either nil or a function with buffer as
argument. This function is called when finished viewing buffer. Use
this argument instead of explicitly setting `view-exit-action'."
this argument instead of explicitly setting `view-exit-action'.
This function does not enable View mode if the buffer's major-mode
has a `special' mode-class, because such modes usually have their
own View-like bindings."
(interactive "bIn other window view buffer:\nP")
(let ((pop-up-windows t))
(pop-to-buffer buffer t))
@ -354,7 +362,11 @@ Optional argument NOT-RETURN is ignored.
Optional argument EXIT-ACTION is either nil or a function with buffer as
argument. This function is called when finished viewing buffer. Use
this argument instead of explicitly setting `view-exit-action'."
this argument instead of explicitly setting `view-exit-action'.
This function does not enable View mode if the buffer's major-mode
has a `special' mode-class, because such modes usually have their
own View-like bindings."
(interactive "bView buffer in other frame: \nP")
(let ((pop-up-frames t))
(pop-to-buffer buffer t))

View file

@ -3,6 +3,18 @@
* ftfont.c (ftfont_drive_otf): Mask bits of character code to make
it fit in a valid range (Bug#11003).
2012-03-18 Eli Zaretskii <eliz@gnu.org>
* xdisp.c (cursor_row_p): Even if the glyph row ends in a string
that is not from display property, accept the row as a "cursor
row" if one of the string's character has a non-nil `cursor'
property. Fixes cursor positioning when there are newlines in
overlay strings, e.g. in icomplete.el. (Bug#11035)
2012-03-12 Paul Eggert <eggert@cs.ucla.edu>
* buffer.c (compare_overlays): Don't assume args differ (Bug#6830).
2012-03-12 Chong Yidong <cyd@gnu.org>
* eval.c (inhibit_lisp_code): Rename from

View file

@ -2868,7 +2868,9 @@ compare_overlays (const void *v1, const void *v2)
between "equal" overlays. The result can still change between
invocations of Emacs, but it won't change in the middle of
`find_field' (bug#6830). */
return XHASH (s1->overlay) < XHASH (s2->overlay) ? -1 : 1;
if (XHASH (s1->overlay) != XHASH (s2->overlay))
return XHASH (s1->overlay) < XHASH (s2->overlay) ? -1 : 1;
return 0;
}
/* Sort an array of overlays by priority. The array is modified in place.

View file

@ -18456,9 +18456,11 @@ cursor_row_p (struct glyph_row *row)
/* Suppose the row ends on a string.
Unless the row is continued, that means it ends on a newline
in the string. If it's anything other than a display string
(e.g. a before-string from an overlay), we don't want the
(e.g., a before-string from an overlay), we don't want the
cursor there. (This heuristic seems to give the optimal
behavior for the various types of multi-line strings.) */
behavior for the various types of multi-line strings.)
One exception: if the string has `cursor' property on one of
its characters, we _do_ want the cursor there. */
if (CHARPOS (row->end.string_pos) >= 0)
{
if (row->continued_p)
@ -18480,6 +18482,25 @@ cursor_row_p (struct glyph_row *row)
result =
(!NILP (prop)
&& display_prop_string_p (prop, glyph->object));
/* If there's a `cursor' property on one of the
string's characters, this row is a cursor row,
even though this is not a display string. */
if (!result)
{
Lisp_Object s = glyph->object;
for ( ; glyph >= beg && EQ (glyph->object, s); --glyph)
{
EMACS_INT gpos = glyph->charpos;
if (!NILP (Fget_char_property (make_number (gpos),
Qcursor, s)))
{
result = 1;
break;
}
}
}
break;
}
}