This commit is contained in:
Joakim Verona 2012-10-24 13:07:12 +02:00
commit fd0ea43455
99 changed files with 1955 additions and 1397 deletions

View file

@ -1,3 +1,21 @@
2012-10-23 Paul Eggert <eggert@cs.ucla.edu>
* configure.ac (_FORTIFY_SOURCE): Do not multiply define (Bug#12714).
This ports to Gentoo. Problem originally reported against coreutils,
but Emacs has it too.
2012-10-23 Glenn Morris <rgm@gnu.org>
* Makefile.in (emacs_transform): Remove.
(install-man): Revert 2012-10-21 change. (Bug#12713)
2012-10-21 Glenn Morris <rgm@gnu.org>
* Makefile.in (install-etc): Don't install emacs22 icons.
* Makefile.in (emacs_transform): New variable.
(install-etc): Prefer a make variable to a shell variable.
2012-10-18 Stefan Monnier <monnier@iro.umontreal.ca>
* Makefile.in ($(MAKEFILE_NAME)): Depend on src/lisp.mk as well.

View file

@ -645,7 +645,7 @@ install-etc:
for dir in */*/apps */*/mimetypes; do \
[ -d $${dir} ] || continue ; \
( cd $${thisdir}; ${MKDIR_P} $(DESTDIR)${icondir}/$${dir} ) ; \
for icon in $${dir}/*.*; do \
for icon in $${dir}/emacs[.-]*; do \
[ -r $${icon} ] || continue ; \
dest=`echo "$${icon}" | sed -e 's|.*/||' -e '$(TRANSFORM)'` ; \
( cd $${thisdir}; \

View file

@ -144,7 +144,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
/* Enable compile-time and run-time bounds-checking, and some warnings,
without upsetting glibc 2.15+. */
#if defined __OPTIMIZE__ && __OPTIMIZE__
#if !defined _FORTIFY_SOURCE && defined __OPTIMIZE__ && __OPTIMIZE__
# define _FORTIFY_SOURCE 2
#endif

View file

@ -745,7 +745,7 @@ else
AH_VERBATIM([FORTIFY_SOURCE],
[/* Enable compile-time and run-time bounds-checking, and some warnings,
without upsetting glibc 2.15+. */
#if defined __OPTIMIZE__ && __OPTIMIZE__
#if !defined _FORTIFY_SOURCE && defined __OPTIMIZE__ && __OPTIMIZE__
# define _FORTIFY_SOURCE 2
#endif
])
@ -2599,7 +2599,7 @@ no_return_alloc_pixels
fi
if test "${HAVE_XPM}" = "yes"; then
AC_DEFINE(HAVE_XPM, 1, [Define to 1 if you have the Xpm libary (-lXpm).])
AC_DEFINE(HAVE_XPM, 1, [Define to 1 if you have the Xpm library (-lXpm).])
LIBXPM=-lXpm
fi
fi

View file

@ -1,3 +1,16 @@
2012-10-23 Bastien Guerry <bzg@gnu.org>
* text.texi (Org Authoring): Use a comma after @ref to avoid the
insertion of a period in the Info output.
2012-10-23 Stefan Monnier <monnier@iro.umontreal.ca>
* custom.texi (Hooks): Clarify that -hooks is deprecated.
2012-10-23 Chong Yidong <cyd@gnu.org>
* kmacro.texi (Edit Keyboard Macro): Fix typo.
2012-10-18 Dani Moncayo <dmoncayo@gmail.com>
* mini.texi (Completion Options): Fix off-by-one error. (Bug#12644)

View file

@ -838,7 +838,8 @@ is a normal hook.
@cindex abnormal hook
A few hooks are @dfn{abnormal hooks}. Their names end in
@samp{-hooks} or @samp{-functions}, instead of @samp{-hook}. What
@samp{-functions}, instead of @samp{-hook} (some old code may also use
the deprecated suffix @samp{-hooks}). What
makes these hooks abnormal is the way its functions are
called---perhaps they are given arguments, or perhaps the values they
return are used in some way. For example,
@ -1735,11 +1736,11 @@ and @kbd{C-c p} in Texinfo mode:
@example
(add-hook 'texinfo-mode-hook
'(lambda ()
(define-key texinfo-mode-map "\C-cp"
'backward-paragraph)
(define-key texinfo-mode-map "\C-cn"
'forward-paragraph)))
(lambda ()
(define-key texinfo-mode-map "\C-cp"
'backward-paragraph)
(define-key texinfo-mode-map "\C-cn"
'forward-paragraph)))
@end example
@node Modifier Keys

View file

@ -482,10 +482,11 @@ Edit the last 300 keystrokes as a keyboard macro
@kindex C-x C-k C-e
@kindex C-x C-k RET
You can edit the last keyboard macro by typing @kbd{C-x C-k C-e} or
@kbd{C-x C-k RET} (@code{kmacro-edit-macro}). This formats the macro
definition in a buffer and enters a specialized major mode for editing
it. Type @kbd{C-h m} once in that buffer to display details of how to
edit the macro. When you are finished editing, type @kbd{C-c C-c}.
@kbd{C-x C-k @key{RET}} (@code{kmacro-edit-macro}). This formats the
macro definition in a buffer and enters a specialized major mode for
editing it. Type @kbd{C-h m} once in that buffer to display details
of how to edit the macro. When you are finished editing, type
@kbd{C-c C-c}.
@findex edit-kbd-macro
@kindex C-x C-k e

View file

@ -1399,7 +1399,7 @@ This is an example.
#+end_example
@end example
For further details, see @ref{Exporting,,,org, The Org Manual} and
For further details, @ref{Exporting,,,org, The Org Manual}, and
@ref{Publishing,,,org, The Org Manual}.
@node TeX Mode

View file

@ -1,3 +1,8 @@
2012-10-24 Paul Eggert <eggert@penguin.cs.ucla.edu>
* emacs-lisp-intro.texi (Files List):
Update manual for new time stamp format (Bug#12706).
2012-10-17 Gregor Zattler <grfz@gmx.de> (tiny change)
* emacs-lisp-intro.texi (Narrowing advantages):

View file

@ -238,7 +238,7 @@ GNU Press, @hfill @uref{http://www.fsf.org/campaigns/gnu-press/}@*
a division of the @hfill email: @email{sales@@fsf.org}@*
Free Software Foundation, Inc. @hfill Tel: +1 (617) 542-5942@*
51 Franklin Street, Fifth Floor @hfill Fax: +1 (617) 542-2652@*
Boston, MA 02110-1301 USA
Boston, MA 02110-1301 USA
@end iftex
@ifnottex
@ -249,7 +249,7 @@ GNU Press, http://www.fsf.org/campaigns/gnu-press/
a division of the email: sales@@fsf.org
Free Software Foundation, Inc. Tel: +1 (617) 542-5942
51 Franklin Street, Fifth Floor Fax: +1 (617) 542-2652
Boston, MA 02110-1301 USA
Boston, MA 02110-1301 USA
@end example
@end ifnottex
@ -15680,11 +15680,11 @@ nil
100
@end group
@group
(17733 259)
(17491 28834)
(17596 62124)
13157
"-rw-rw-r--"
(20615 27034 579989 697000)
(17905 55681 0 0)
(20615 26327 734791 805000)
13188
"-rw-r--r--"
@end group
@group
nil
@ -17909,10 +17909,10 @@ file that set values:
@group
;; Set calendar highlighting colors
(setq calendar-load-hook
'(lambda ()
(set-face-foreground 'diary-face "skyblue")
(set-face-background 'holiday-face "slate blue")
(set-face-foreground 'holiday-face "white")))
(lambda ()
(set-face-foreground 'diary-face "skyblue")
(set-face-background 'holiday-face "slate blue")
(set-face-foreground 'holiday-face "white")))
@end group
@end smallexample
@ -20947,7 +20947,7 @@ not yet seen, @code{mapcar} and @code{lambda}.
@group
(defun one-fiftieth (full-range)
"Return list, each number one-fiftieth of previous."
(mapcar '(lambda (arg) (/ arg 50)) full-range))
(mapcar (lambda (arg) (/ arg 50)) full-range))
@end group
@end smallexample
@ -21168,7 +21168,7 @@ and the second argument is @code{full-range}, which will be bound to
The whole expression looks like this:
@smallexample
(mapcar '(lambda (arg) (/ arg 50)) full-range))
(mapcar (lambda (arg) (/ arg 50)) full-range))
@end smallexample
@xref{Mapping Functions, , Mapping Functions, elisp, The GNU Emacs
@ -21840,7 +21840,7 @@ each column."
@group
(defun one-fiftieth (full-range)
"Return list, each number of which is 1/50th previous."
(mapcar '(lambda (arg) (/ arg 50)) full-range))
(mapcar (lambda (arg) (/ arg 50)) full-range))
@end group
@end smallexample

View file

@ -1,3 +1,45 @@
2012-10-24 Paul Eggert <eggert@penguin.cs.ucla.edu>
Update manual for new time stamp format (Bug#12706).
* buffers.texi (Modification Time):
* files.texi (Testing Accessibility, File Attributes):
* intro.texi (Version Info):
* os.texi (Time of Day):
Update for new time stamp format (HIGH LOW MICROSEC PICOSEC).
These instances were missed the first time around.
Problem reported by Glenn Morris in <http://bugs.gnu.org/12706#25>.
2012-10-24 Chong Yidong <cyd@gnu.org>
* keymaps.texi (Toolkit Differences): Node deleted.
(Easy Menu): New node.
2012-10-23 Stefan Monnier <monnier@iro.umontreal.ca>
* hooks.texi (Standard Hooks): Clarify that -hooks is deprecated.
2012-10-23 Paul Eggert <eggert@cs.ucla.edu>
Fix outdated timestamp documentation in Elisp manual (bug#12706).
* files.texi (File Attributes):
* text.texi (Undo):
Time stamp resolution is now 1 picosecond, not 1 second.
2012-10-23 Chong Yidong <cyd@gnu.org>
* display.texi (Font Lookup): Remove font-list-limit.
* keymaps.texi (Key Sequences): Avoid referring to Edit Macro mode
(Bug#12529).
2012-10-22 Glenn Morris <rgm@gnu.org>
* os.texi (Recording Input): Tiny fix.
* intro.texi (Lisp History):
* lists.texi (Sets And Lists): Refer to cl-lib rather than cl.
* tips.texi (Coding Conventions): Recommend cl-lib over cl.
2012-10-15 Chong Yidong <cyd@gnu.org>
* macros.texi (Defining Macros): defmacro is now a macro.

View file

@ -634,7 +634,8 @@ file should not be done.
@c Emacs 19 feature
@defun visited-file-modtime
This function returns the current buffer's recorded last file
modification time, as a list of the form @code{(@var{high} @var{low})}.
modification time, as a list of the form @code{(@var{high} @var{low}
@var{microsec} @var{picosec})}.
(This is the same format that @code{file-attributes} uses to return
time values; see @ref{File Attributes}.)
@ -664,9 +665,8 @@ is not @code{nil}, and otherwise to the last modification time of the
visited file.
If @var{time} is neither @code{nil} nor zero, it should have the form
@code{(@var{high} . @var{low})} or @code{(@var{high} @var{low})}, in
either case containing two integers, each of which holds 16 bits of the
time.
@code{(@var{high} @var{low} @var{microsec} @var{picosec})},
the format used by @code{current-time} (@pxref{Time of Day}).
This function is useful if the buffer was not read from the file
normally, or if the file itself has been changed for some known benign
@ -1237,4 +1237,3 @@ This function returns the current gap position in the current buffer.
@defun gap-size
This function returns the current gap size of the current buffer.
@end defun

View file

@ -2944,14 +2944,6 @@ The last three elements give additional information about the font.
encoding of the font.
@end defun
@defopt font-list-limit
This variable specifies maximum number of fonts to consider in font
matching. The function @code{x-family-fonts} will not return more
than that many fonts, and font selection will consider only that many
fonts when searching a matching font for face attributes. The default
is 100.
@end defopt
@node Fontsets
@subsection Fontsets

View file

@ -800,17 +800,14 @@ Menu Keymaps
* Menu Bar:: How to customize the menu bar.
* Tool Bar:: A tool bar is a row of images.
* Modifying Menus:: How to add new items to a menu.
* Easy Menu:: A convenience macro for defining menus.
Defining Menus
* Simple Menu Items:: A simple kind of menu key binding,
limited in capabilities.
* Extended Menu Items:: More powerful menu item definitions
let you specify keywords to enable
various features.
* Simple Menu Items:: A simple kind of menu key binding.
* Extended Menu Items:: More complex menu item definitions.
* Menu Separators:: Drawing a horizontal line through a menu.
* Alias Menu Items:: Using command aliases in menu items.
* Toolkit Differences:: Not all toolkits provide the same features.
Major and Minor Modes

View file

@ -938,7 +938,7 @@ on the 19th, @file{aug-20} was written on the 20th, and the file
@end example
You can use @code{file-attributes} to get a file's last modification
time as a list of two numbers. @xref{File Attributes}.
time as a list of four integers. @xref{File Attributes}.
@end defun
@node Kinds of Files
@ -1220,20 +1220,19 @@ point number.
The file's @acronym{GID}, likewise.
@item
The time of last access, as a list of two integers.
The first integer has the high-order 16 bits of time,
the second has the low 16 bits. (This is similar to the
The time of last access, as a list of four integers @code{(@var{sec-high}
@var{sec-low} @var{microsec} @var{picosec})}. (This is similar to the
value of @code{current-time}; see @ref{Time of Day}.) Note that on
some FAT-based filesystems, only the date of last access is recorded,
so this time will always hold the midnight of the day of last access.
@cindex modification time of file
@item
The time of last modification as a list of two integers (as above).
The time of last modification as a list of four integers (as above).
This is the last time when the file's contents were modified.
@item
The time of last status change as a list of two integers (as above).
The time of last status change as a list of four integers (as above).
This is the time of the last change to the file's access mode bits,
its owner and group, and other information recorded in the filesystem
for the file, beyond the file's contents.
@ -1276,9 +1275,9 @@ For example, here are the file attributes for @file{files.texi}:
@group
(file-attributes "files.texi" 'string)
@result{} (nil 1 "lh" "users"
(19145 42977)
(19141 59576)
(18340 17300)
(20614 64019 50040 152000)
(20000 23 0 0)
(20614 64555 902289 872000)
122295 "-rw-rw-rw-"
nil (5888 2 . 43978)
(15479 . 46724))
@ -1302,14 +1301,14 @@ is owned by the user with name "lh".
@item "users"
is in the group with name "users".
@item (19145 42977)
was last accessed on Oct 5 2009, at 10:01:37.
@item (20614 64019 50040 152000)
was last accessed on October 23, 2012, at 20:12:03.050040152 UTC.
@item (19141 59576)
last had its contents modified on Oct 2 2009, at 13:49:12.
@item (20000 23 0 0)
was last modified on July 15, 2001, at 08:53:43 UTC.
@item (18340 17300)
last had its status changed on Feb 2 2008, at 12:19:00.
@item (20614 64555 902289 872000)
last had its status changed on October 23, 2012, at 20:20:59.902289872 UTC.
@item 122295
is 122295 bytes long. (It may not contain 122295 characters, though,

View file

@ -978,7 +978,7 @@ anonymous function by quoting it as a list:
@example
@group
(defun double-property (symbol prop)
(change-property symbol prop '(lambda (x) (* 2 x))))
(change-property symbol prop (lambda (x) (* 2 x))))
@end group
@end example

View file

@ -17,11 +17,11 @@ arguments and their values are completely ignored. The recommended way
to put a new function on such a hook is to call @code{add-hook}.
@xref{Hooks}, for more information about using hooks.
The variables whose names end in @samp{-hooks} or @samp{-functions} are
usually @dfn{abnormal hooks}; their values are lists of functions, but
these functions are called in a special way (they are passed arguments,
or their values are used). The variables whose names end in
@samp{-function} have single functions as their values.
The variables whose names end in @samp{-functions} are usually @dfn{abnormal
hooks} (some old code may also use the deprecated @samp{-hooks} suffix); their
values are lists of functions, but these functions are called in a special way
(they are passed arguments, or their return values are used). The variables
whose names end in @samp{-function} have single functions as their values.
This is not an exhaustive list, it only covers the more general hooks.
For example, every major mode defines a hook named

View file

@ -119,7 +119,7 @@ worry about it; this manual is self-contained.
@pindex cl
A certain amount of Common Lisp emulation is available via the
@file{cl} library. @xref{Top,, Overview, cl, Common Lisp Extensions}.
@file{cl-lib} library. @xref{Top,, Overview, cl, Common Lisp Extensions}.
Emacs Lisp is not at all influenced by Scheme; but the GNU project has
an implementation of Scheme, called Guile. We use it in all new GNU
@ -493,13 +493,13 @@ giving a prefix argument makes @var{here} non-@code{nil}.
@defvar emacs-build-time
The value of this variable indicates the time at which Emacs was
built. It is a list of three integers, like the value of
built. It is a list of four integers, like the value of
@code{current-time} (@pxref{Time of Day}).
@example
@group
emacs-build-time
@result{} (18846 52016 156039)
@result{} (20614 63694 515336 438000)
@end group
@end example
@end defvar

View file

@ -78,11 +78,11 @@ representations, @ref{Init Rebinding,,, emacs, The GNU Emacs Manual}.
@defmac kbd keyseq-text
This macro converts the text @var{keyseq-text} (a string constant)
into a key sequence (a string or vector constant). The contents of
@var{keyseq-text} should describe the key sequence using almost the same
syntax used in this manual. More precisely, it uses the same syntax
that Edit Macro mode uses for editing keyboard macros (@pxref{Edit
Keyboard Macro,,, emacs, The GNU Emacs Manual}); you must surround
function key names with @samp{<@dots{}>}.
@var{keyseq-text} should use the same syntax as in the buffer invoked
by the @kbd{C-x C-k @key{RET}} (@code{kmacro-edit-macro}) command; in
particular, you must surround function key names with
@samp{<@dots{}>}. @xref{Edit Keyboard Macro,,, emacs, The GNU Emacs
Manual}.
@example
(kbd "C-x") @result{} "\C-x"
@ -1963,13 +1963,14 @@ is active for the next input event, that activates the keyboard menu
feature.
@menu
* Defining Menus:: How to make a keymap that defines a menu.
* Mouse Menus:: How users actuate the menu with the mouse.
* Keyboard Menus:: How users actuate the menu with the keyboard.
* Menu Example:: Making a simple menu.
* Menu Bar:: How to customize the menu bar.
* Tool Bar:: A tool bar is a row of images.
* Modifying Menus:: How to add new items to a menu.
* Defining Menus:: How to make a keymap that defines a menu.
* Mouse Menus:: How users actuate the menu with the mouse.
* Keyboard Menus:: How users actuate the menu with the keyboard.
* Menu Example:: Making a simple menu.
* Menu Bar:: How to customize the menu bar.
* Tool Bar:: A tool bar is a row of images.
* Modifying Menus:: How to add new items to a menu.
* Easy Menu:: A convenience macro for making menus.
@end menu
@node Defining Menus
@ -2015,17 +2016,12 @@ an existing menu, you can specify its position in the menu using
@code{define-key-after} (@pxref{Modifying Menus}).
@menu
* Simple Menu Items:: A simple kind of menu key binding,
limited in capabilities.
* Extended Menu Items:: More powerful menu item definitions
let you specify keywords to enable
various features.
* Simple Menu Items:: A simple kind of menu key binding.
* Extended Menu Items:: More complex menu item definitions.
* Menu Separators:: Drawing a horizontal line through a menu.
* Alias Menu Items:: Using command aliases in menu items.
* Toolkit Differences:: Not all toolkits provide the same features.
@end menu
@node Simple Menu Items
@subsubsection Simple Menu Items
@ -2312,28 +2308,6 @@ itself). To request this, give the alias symbol a non-@code{nil}
causes menu items for @code{make-read-only} and @code{make-writable} to
show the keyboard bindings for @code{read-only-mode}.
@node Toolkit Differences
@subsubsection Toolkit Differences
The various toolkits with which you can build Emacs do not all support
the same set of features for menus. Some code works as expected with
one toolkit, but not under another.
One example is menu actions or buttons in a top-level menu bar. The
following works with the Lucid toolkit or on MS Windows, but not with
GTK or Nextstep, where clicking on the item has no effect.
@example
(defun menu-action-greet ()
(interactive)
(message "Hello Emacs User!"))
(defun top-level-menu ()
(interactive)
(define-key lisp-interaction-mode-map [menu-bar m]
'(menu-item "Action Button" menu-action-greet)))
@end example
@node Mouse Menus
@subsection Menus and the Mouse
@ -2813,3 +2787,125 @@ menu of Shell mode, after the item @code{break}:
[work] '("Work" . work-command) 'break)
@end example
@end defun
@node Easy Menu
@subsection Easy Menu
The following macro provides a convenient way to define pop-up menus
and/or menu bar menus.
@defmac easy-menu-define symbol maps doc menu
This macro defines a pop-up menu and/or menu bar submenu, whose
contents are given by @var{menu}.
If @var{symbol} is non-@code{nil}, it should be a symbol; then this
macro defines @var{symbol} as a function for popping up the menu
(@pxref{Pop-Up Menus}), with @var{doc} as its documentation string.
@var{symbol} should not be quoted.
Regardless of the value of @var{symbol}, if @var{maps} is a keymap,
the menu is added to that keymap, as a top-level menu for the menu bar
(@pxref{Menu Bar}). It can also be a list of keymaps, in which case
the menu is added separately to each of those keymaps.
The first element of @var{menu} must be a string, which serves as the
menu label. It may be followed by any number of the following
keyword-argument pairs:
@table @code
@item :filter @var{function}
@var{function} must be a function which, if called with one
argument---the list of the other menu items---returns the actual items
to be displayed in the menu.
@item :visible @var{include}
@var{include} is an expression; if it evaluates to @code{nil}, the
menu is made invisible. @code{:included} is an alias for
@code{:visible}.
@item :active @var{enable}
@var{enable} is an expression; if it evaluates to @code{nil}, the menu
is not selectable. @code{:enable} is an alias for @code{:active}.
@end table
The remaining elements in @var{menu} are menu items.
A menu item can be a vector of three elements, @code{[@var{name}
@var{callback} @var{enable}]}. @var{name} is the menu item name (a
string). @var{callback} is a command to run, or an expression to
evaluate, when the item is chosen. @var{enable} is an expression; if
it evaluates to @code{nil}, the item is disabled for selection.
Alternatively, a menu item may have the form:
@smallexample
[ @var{name} @var{callback} [ @var{keyword} @var{arg} ]... ]
@end smallexample
@noindent
where @var{name} and @var{callback} have the same meanings as above,
and each optional @var{keyword} and @var{arg} pair should be one of
the following:
@table @code
@item :keys @var{keys}
@var{keys} is a keyboard equivalent to the menu item (a string). This
is normally not needed, as keyboard equivalents are computed
automatically. @var{keys} is expanded with
@code{substitute-command-keys} before it is displayed (@pxref{Keys in
Documentation}).
@item :key-sequence @var{keys}
@var{keys} is a hint for speeding up Emacs's first display of the
menu. It should be nil if you know that the menu item has no keyboard
equivalent; otherwise it should be a string or vector specifying a
keyboard equivalent for the menu item.
@item :active @var{enable}
@var{enable} is an expression; if it evaluates to @code{nil}, the item
is make unselectable.. @code{:enable} is an alias for @code{:active}.
@item :visible @var{include}
@var{include} is an expression; if it evaluates to @code{nil}, the
item is made invisible. @code{:included} is an alias for
@code{:visible}.
@item :label @var{form}
@var{form} is an expression that is evaluated to obtain a value which
serves as the menu item's label (the default is @var{name}).
@item :suffix @var{form}
@var{form} is an expression that is dynamically evaluated and whose
value is concatenated with the menu entry's label.
@item :style @var{style}
@var{style} is a symbol describing the type of menu item; it should be
@code{toggle} (a checkbox), or @code{radio} (a radio button), or
anything else (meaning an ordinary menu item).
@item :selected @var{selected}
@var{selected} is an expression; the checkbox or radio button is
selected whenever the expression's value is non-nil.
@item :help @var{help}
@var{help} is a string describing the menu item.
@end table
Alternatively, a menu item can be a string. Then that string appears
in the menu as unselectable text. A string consisting of dashes is
displayed as a separator (@pxref{Menu Separators}).
Alternatively, a menu item can be a list with the same format as
@var{menu}. This is a submenu.
@end defmac
Here is an example of using @code{easy-menu-define} to define a menu
similar to the one defined in the example in @ref{Menu Bar}:
@example
(easy-menu-define words-menu global-map
"Menu for word navigation commands."
'("Words"
["Forward word" forward-word]
["Backward word" backward-word]))
@end example

View file

@ -1266,7 +1266,7 @@ functions for sets include @code{memq} and @code{delq}, and their
@quotation
@b{Common Lisp note:} Common Lisp has functions @code{union} (which
avoids duplicate elements) and @code{intersection} for set operations.
Although standard GNU Emacs Lisp does not have them, the @file{cl}
Although standard GNU Emacs Lisp does not have them, the @file{cl-lib}
library provides versions. @xref{Top,, Overview, cl, Common Lisp Extensions}.
@end quotation

View file

@ -897,8 +897,8 @@ It then restores any autoloads formerly associated with those symbols.
Before restoring the previous definitions, @code{unload-feature} runs
@code{remove-hook} to remove functions in the library from certain
hooks. These hooks include variables whose names end in @samp{hook}
or @samp{-hooks}, plus those listed in
hooks. These hooks include variables whose names end in @samp{-hook}
(or the deprecated suffix @samp{-hooks}), plus those listed in
@code{unload-feature-special-hooks}, as well as
@code{auto-mode-alist}. This is to prevent Emacs from ceasing to
function because important hooks refer to functions that are no longer

View file

@ -70,9 +70,9 @@ called. You can use @code{add-hook} to add a function to an abnormal
hook, but you must write the function to follow the hook's calling
convention.
By convention, abnormal hook names end in @samp{-functions} or
@samp{-hooks}. If the variable's name ends in @samp{-function}, then
its value is just a single function, not a list of functions.
By convention, abnormal hook names end in @samp{-functions}. If the
variable's name ends in @samp{-function}, then its value is just a single
function, not a list of functions.
@menu
* Running Hooks:: How to run a hook.

View file

@ -1199,7 +1199,7 @@ Similarly, the fourth list element @var{picosec}, if present, gives
the number of picoseconds from the start of that microsecond to the
specified time.
The return value of @code{current-time} represents time using three
The return value of @code{current-time} represents time using four
integers, as do the timestamps in the return value of
@code{file-attributes} (@pxref{Definition of
file-attributes}). In function arguments, e.g.@: the @var{time-value}
@ -1963,7 +1963,7 @@ is the character Emacs currently uses for quitting, usually @kbd{C-g}.
This function returns a vector containing the last 300 input events from
the keyboard or mouse. All input events are included, whether or not
they were used as parts of key sequences. Thus, you always get the last
100 input events, not counting events generated by keyboard macros.
300 input events, not counting events generated by keyboard macros.
(These are excluded because they are less interesting for debugging; it
should be enough to see the events that invoked the macros.)

View file

@ -1233,11 +1233,12 @@ reinsert it is @code{(abs @var{position})}. If @var{position} is
positive, point was at the beginning of the deleted text, otherwise it
was at the end.
@item (t @var{high} . @var{low})
@item (t @var{sec-high} @var{sec-low} @var{microsec} @var{picosec})
This kind of element indicates that an unmodified buffer became
modified. The elements @var{high} and @var{low} are two integers, each
recording 16 bits of the visited file's modification time as of when it
was previously visited or saved. @code{primitive-undo} uses those
modified. The list @code{(@var{sec-high} @var{sec-low} @var{microsec}
@var{picosec})} represents the visited file's modification time as of
when it was previously visited or saved, using the same format as
@code{current-time}; see @ref{Time of Day}. @code{primitive-undo} uses those
values to determine whether to mark the buffer as unmodified once again;
it does so only if the file's modification time matches those numbers.

View file

@ -120,15 +120,18 @@ library when needed. This way people who don't use those aspects of
your file do not need to load the extra library.
@item
Please don't require the @code{cl} package of Common Lisp extensions at
run time. Use of this package is optional, and it is not part of the
standard Emacs namespace. If your package loads @code{cl} at run time,
that could cause name clashes for users who don't use that package.
If you need Common Lisp extensions, use the @code{cl-lib} library
rather than the old @code{cl} library. The latter does not
use a clean namespace (i.e., its definitions do not
start with a @samp{cl-} prefix). If your package loads @code{cl} at
run time, that could cause name clashes for users who don't use that
package.
However, there is no problem with using the @code{cl} package at
compile time, with @code{(eval-when-compile (require 'cl))}. That's
There is no problem with using the @code{cl} package at @emph{compile}
time, with @code{(eval-when-compile (require 'cl))}. That's
sufficient for using the macros in the @code{cl} package, because the
compiler expands them before generating the byte-code.
compiler expands them before generating the byte-code. It is still
better to use the more modern @code{cl-lib} in this case, though.
@item
When defining a major mode, please follow the major mode

View file

@ -1,3 +1,32 @@
2012-10-24 Glenn Morris <rgm@gnu.org>
* cl.texi (Basic Setf, Macros, Declarations, Symbols, Numbers)
(Sequences, Lists, Structures, Assertions, Efficiency Concerns)
(Efficiency Concerns, Efficiency Concerns)
(Common Lisp Compatibility, Old CL Compatibility):
Further updates for cl-lib namespace.
2012-10-24 Paul Eggert <eggert@penguin.cs.ucla.edu>
Update manual for new time stamp format (Bug#12706).
* emacs-mime.texi (time-date): Update for new format.
Also, fix bogus time stamp and modernize a bit.
2012-10-23 Glenn Morris <rgm@gnu.org>
* cl.texi: Include emacsver.texi. Use Emacs version number rather
than unchanging cl.el version number.
End all menu descriptions with a period.
Do not use @dfn{CL} for every instance of "CL".
(Overview): Remove no-runtime caveat, and note about foo* names.
(Usage): Use cl-lib rather than cl.
(Organization, Naming Conventions): Update for cl-lib.el.
(Installation): Remove long-irrelevant node.
(Program Structure, Predicates, Control Structure):
Start updating for cl-lib namespace.
* Makefile.in ($(buildinfodir)/cl$(INFO_EXT), cl.dvi, cl.pdf):
Depend on emacsver.texi.
2012-10-09 Michael Albinus <michael.albinus@gmx.de>
* trampver.texi: Update release number.

View file

@ -237,12 +237,12 @@ cc-mode.pdf: ${srcdir}/cc-mode.texi
$(ENVADD) $(TEXI2PDF) ${srcdir}/cc-mode.texi
cl : $(buildinfodir)/cl$(INFO_EXT)
$(buildinfodir)/cl$(INFO_EXT): ${srcdir}/cl.texi
$(buildinfodir)/cl$(INFO_EXT): ${srcdir}/cl.texi $(emacsdir)/emacsver.texi
$(mkinfodir)
$(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ ${srcdir}/cl.texi
cl.dvi: ${srcdir}/cl.texi
cl.dvi: ${srcdir}/cl.texi $(emacsdir)/emacsver.texi
$(ENVADD) $(TEXI2DVI) ${srcdir}/cl.texi
cl.pdf: ${srcdir}/cl.texi
cl.pdf: ${srcdir}/cl.texi $(emacsdir)/emacsver.texi
$(ENVADD) $(TEXI2PDF) ${srcdir}/cl.texi
dbus : $(buildinfodir)/dbus$(INFO_EXT)

File diff suppressed because it is too large Load diff

View file

@ -1981,7 +1981,7 @@ usually not desired. D-Bus errors in events can be made visible by
setting the variable @code{dbus-debug} to @code{t}. They can also be
handled by a hook function.
@defvar dbus-event-error-hooks
@defvar dbus-event-error-functions
This hook variable keeps a list of functions, which are called when a
D-Bus error happens in the event handler. Every function must accept
two arguments, the event and the error variable caught in
@ -1997,7 +1997,7 @@ Example:
(message "my-dbus-event-error-handler: %S %S" event error)
(signal 'file-error (cdr error))))
(add-hook 'dbus-event-error-hooks 'my-dbus-event-error-handler)
(add-hook 'dbus-event-error-functions 'my-dbus-event-error-handler)
@end lisp
@end defvar

View file

@ -1248,7 +1248,7 @@ detection scheme works like this:
@table @asis
@item Step 1:
@code{find-file-hooks} calls @code{ede-turn-on-hook} on BUFFER.
@code{find-file-hook} calls @code{ede-turn-on-hook} on BUFFER.
@item Step 2:
@code{ede-turn-on-hook} turns on @code{ede-minor-mode}
@item Step 3:

View file

@ -1248,7 +1248,7 @@ This hook is run just before @code{ediff-quit-hook}. This is a good
place to do various cleanups, such as deleting the variant buffers.
Ediff provides a function, @code{ediff-janitor}, as one such possible
hook, which you can add to @code{ediff-cleanup-hook} with
@code{add-hooks}.
@code{add-hook}.
@findex ediff-janitor
This function kills buffers A, B, and, possibly, C, if these buffers aren't

View file

@ -1516,16 +1516,16 @@ Here's a bunch of time/date/second/day examples:
@result{} 905595714.0
(seconds-to-time 905595714.0)
@result{} (13818 19266 0)
@result{} (13818 19266 0 0)
(time-to-days '(13818 19266))
@result{} 729644
(days-to-time 729644)
@result{} (961933 65536)
@result{} (961933 512)
(time-since '(13818 19266))
@result{} (0 430)
@result{} (6797 9607 984839 247000)
(time-less-p '(13818 19266) '(13818 19145))
@result{} nil
@ -1546,7 +1546,7 @@ Here's a bunch of time/date/second/day examples:
(time-to-number-of-days
(time-since
(date-to-time "Mon, 01 Jan 2001 02:22:26 GMT")))
@result{} 4.146122685185185
@result{} 4314.095589286675
@end example
And finally, we have @code{safe-date-to-time}, which does the same as
@ -1561,7 +1561,7 @@ An RFC822 (or similar) date string. For instance: @code{"Sat Sep 12
12:21:54 1998 +0200"}.
@item time
An internal Emacs time. For instance: @code{(13818 26466)}.
An internal Emacs time. For instance: @code{(13818 26466 0 0)}.
@item seconds
A floating point representation of the internal Emacs time. For

View file

@ -170,8 +170,8 @@ of the buffer are parsed using the specifications in
@code{forms-format-list}, and the data file is updated. If the record
has fields that aren't included in the display, they are not changed.
@vindex forms-mode-hooks
Entering Forms mode runs the normal hook @code{forms-mode-hooks} to
@vindex forms-mode-hook
Entering Forms mode runs the normal hook @code{forms-mode-hook} to
perform user-defined customization.
To save any modified data, you can use @kbd{C-x C-s}

View file

@ -3148,7 +3148,7 @@ following is added to a group parameter
@lisp
(gnus-summary-prepared-hook
'(lambda nil (local-set-key "d" (local-key-binding "n"))))
(lambda nil (local-set-key "d" (local-key-binding "n"))))
@end lisp
when the group is entered, the 'd' key will not mark the article as

View file

@ -429,7 +429,7 @@ for a description about @dfn{normal hooks} and @dfn{abnormal hooks}.
MH-E uses normal hooks in nearly all cases, so you can assume that we
are talking about normal hooks unless we explicitly mention that a
hook is abnormal. We also follow the conventions described in that
section: the name of the abnormal hooks end in @code{-hooks} and all
section: the name of the abnormal hooks end in @code{-functions} and all
the rest of the MH-E hooks end in @code{-hook}. You can add hooks with
either @code{customize-option} or @code{add-hook}.
@ -3749,9 +3749,9 @@ when you press @key{TAB} when prompted for a folder name.
@findex mh-search-p
@kindex k
@vindex mh-kill-folder-suppress-prompt-hooks
@vindex mh-kill-folder-suppress-prompt-functions
The hook @code{mh-kill-folder-suppress-prompt-hooks} is an abnormal
The hook @code{mh-kill-folder-suppress-prompt-functions} is an abnormal
hook run at the beginning of the command @kbd{k}. The hook functions
are called with no arguments and should return a non-nil value to
suppress the normal prompt when you remove a folder. This is useful

View file

@ -277,7 +277,7 @@ variable. This allows SemanticDB to save tag caches in directories
controlled by them.
@end defvar
@deffn Option semanticdb-save-database-hooks
@deffn Option semanticdb-save-database-functions
Abnormal hook run after a database is saved. Each function is called
with one argument, the object representing the database recently
written.

View file

@ -3007,10 +3007,10 @@ checksum.
@lisp
(add-hook
'find-file-hooks
'(lambda ()
(when (file-remote-p default-directory)
(set (make-local-variable 'file-precious-flag) t))))
'find-file-hook
(lambda ()
(when (file-remote-p default-directory)
(set (make-local-variable 'file-precious-flag) t))))
@end lisp
@end itemize
@ -3126,7 +3126,7 @@ into your @file{~/.emacs}:
(setq mode-line-format
(format-mode-line mode-line-format 'font-lock-warning-face))))
(add-hook 'find-file-hooks 'my-mode-line-function)
(add-hook 'find-file-hook 'my-mode-line-function)
(add-hook 'dired-mode-hook 'my-mode-line-function)
@end lisp
@end ifset
@ -3159,10 +3159,10 @@ should put it into your @file{~/.emacs}:
(add-hook
'dired-mode-hook
'(lambda ()
(setq
mode-line-buffer-identification
my-mode-line-buffer-identification)))
(lambda ()
(setq
mode-line-buffer-identification
my-mode-line-buffer-identification)))
@end lisp
Since @value{emacsname} 23.1, the mode line contains an indication if
@ -3195,9 +3195,9 @@ like this:
@lisp
(add-hook
'dired-before-readin-hook
'(lambda ()
(when (file-remote-p default-directory)
(setq dired-actual-switches "-al"))))
(lambda ()
(when (file-remote-p default-directory)
(setq dired-actual-switches "-al"))))
@end lisp
@end ifset
@ -3329,9 +3329,9 @@ minibuffer:
(add-hook
'minibuffer-setup-hook
'(lambda ()
(abbrev-mode 1)
(setq local-abbrev-table my-tramp-abbrev-table)))
(lambda ()
(abbrev-mode 1)
(setq local-abbrev-table my-tramp-abbrev-table)))
(defadvice minibuffer-complete
(before my-minibuffer-complete activate)
@ -3398,7 +3398,7 @@ their readability through a remote access:
@ifset xemacs
(recent-files-initialize)
(add-hook
'find-file-hooks
'find-file-hook
(lambda ()
(when (file-remote-p (buffer-file-name))
(recent-files-make-permanent)))

View file

@ -1,3 +1,15 @@
2012-10-23 Paul Eggert <eggert@cs.ucla.edu>
Fix outdated timestamp documentation in Elisp manual (bug#12706).
* NEWS: Document increased precision in undo list.
2012-10-21 Glenn Morris <rgm@gnu.org>
* images/icons/hicolor/32x32/apps/emacs22.png:
* images/icons/hicolor/16x16/apps/emacs22.png:
* images/icons/hicolor/48x48/apps/emacs22.png:
* images/icons/hicolor/24x24/apps/emacs22.png: Restore old icons.
2012-10-14 Kenichi Handa <handa@gnu.org>
* charsets/JISC6226.map: Re-generated.
@ -9,12 +21,12 @@
2012-10-11 Kenichi Handa <handa@gnu.org>
* charsets/CNS-2.map, charsets/CNS-3.map, charsets/CNS-4.map,
charsets/CNS-5.map, charsets/CNS-6.map, charsets/CNS-7.map,
charsets/CP932-2BYTE.map, charsets/GB180302.map,
charsets/GB180304.map, charsets/JISC6226.map,
charsets/JISX2131.map, charsets/MIK.map, charsets/PTCP154.map,
charsets/stdenc.map, charsets/symbol.map: Re-generated.
* charsets/CNS-2.map, charsets/CNS-3.map, charsets/CNS-4.map:
* charsets/CNS-5.map, charsets/CNS-6.map, charsets/CNS-7.map:
* charsets/CP932-2BYTE.map, charsets/GB180302.map:
* charsets/GB180304.map, charsets/JISC6226.map:
* charsets/JISX2131.map, charsets/MIK.map, charsets/PTCP154.map:
* charsets/stdenc.map, charsets/symbol.map: Re-generate.
2012-10-07 Jan Djärv <jan.h.d@swipnet.se>

View file

@ -621,6 +621,29 @@ enabled.
** FIXME something happened to ses.el, 2012-04-17.
** Hooks renamed to avoid obsolete "-hooks" suffix:
*** semantic-lex-reset-hooks -> semantic-lex-reset-functions
*** semantic-change-hooks -> semantic-change-functions
*** semantic-edits-new-change-hooks -> semantic-edits-new-change-functions
*** semantic-edits-delete-change-hooks -> semantic-edits-delete-change-functions
*** semantic-edits-reparse-change-hooks -> semantic-edits-reparse-change-functions
*** semanticdb-save-database-hooks -> semanticdb-save-database-functions
*** c-prepare-bug-report-hooks -> c-prepare-bug-report-hook
*** rcirc-sentinel-hooks -> rcirc-sentinel-functions
*** rcirc-receive-message-hooks -> rcirc-receive-message-functions
*** rcirc-activity-hooks -> rcirc-activity-functions
*** rcirc-print-hooks -> rcirc-print-functions
*** dbus-event-error-hooks -> dbus-event-error-functions
*** eieio-pre-method-execution-hooks -> eieio-pre-method-execution-functions
*** checkdoc-style-hooks -> checkdoc-style-functions
*** checkdoc-comment-style-hooks -> checkdoc-comment-style-functions
*** archive-extract-hooks -> archive-extract-hook
*** filesets-cache-fill-content-hooks -> filesets-cache-fill-content-hook
*** hfy-post-html-hooks -> hfy-post-html-hook
*** nndiary-request-create-group-hooks -> nndiary-request-create-group-functions
*** nndiary-request-update-info-hooks -> nndiary-request-update-info-functions
*** nndiary-request-accept-article-hooks -> nndiary-request-accept-article-functions
*** gnus-subscribe-newsgroup-hooks -> gnus-subscribe-newsgroup-functions
** Obsolete packages:
+++
@ -830,7 +853,7 @@ in Emacs 24.1:
*** `current-time-string' no longer requires that its argument's year
must be in the range 1000..9999. It now works with any year supported
by the underlying C implementation.
---
*** `current-time' now returns extended-format time stamps
(HIGH LOW USEC PSEC), where the new PSEC slot specifies picoseconds.
PSEC is typically a multiple of 1000 on current machines. Other
@ -843,6 +866,9 @@ stamps are still accepted.
The PSECS slot is new, and uses picosecond resolution. It can be
accessed via the new timer--psecs accessor.
*** Last-modified time stamps in undo lists now are of the form
(t HI-SECS LO-SECS USECS PSECS) instead of (t HI-SECS . LO-SECS).
+++
** Floating point functions now always return special values like NaN,
instead of signaling errors, if given invalid args, e.g. (log -1.0).
@ -890,6 +916,7 @@ See the "Face Attributes" section of the Elisp manual.
*** `window-system-version'
*** `dired-pop-to-buffer' (use `dired-mark-pop-up')
*** `query-replace-interactive'
*** `font-list-limit' (has had no effect since Emacs < 23)
* Changes in Emacs 24.3 on non-free operating systems

View file

@ -9,6 +9,13 @@ Copyright (C) 2007-2012 Free Software Foundation, Inc.
License: GNU General Public License version 3 or later (see COPYING)
Files: hicolor/16x16/apps/emacs22.png hicolor/24x24/apps/emacs22.png
hicolor/32x32/apps/emacs22.png hicolor/48x48/apps/emacs22.png
Author: Andrew Zhilin <andrew_zhilin@yahoo.com>
Copyright (C) 2005-2012 Free Software Foundation, Inc.
License: GNU General Public License version 3 or later (see COPYING)
Files: allout-widgets-dark-bg/closed.png
allout-widgets-dark-bg/closed.xpm
allout-widgets-dark-bg/empty.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 705 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 988 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

View file

@ -1,3 +1,12 @@
2012-10-23 Eli Zaretskii <eliz@gnu.org>
* makefile.w32-in (lisp2): Add cp51932.el and eucjp-ms.el, to
follow src/lisp.mk.
2012-10-21 Glenn Morris <rgm@gnu.org>
* make-docfile.c (scan_lisp_file): Add cp51932.el and eucjp-ms.el.
2012-10-20 Eli Zaretskii <eliz@gnu.org>
* make-docfile.c (IS_SLASH, DEF_ELISP_FILE): New macros.

View file

@ -1118,7 +1118,9 @@ scan_lisp_file (const char *filename, const char *mode)
} const uncompiled[] = {
DEF_ELISP_FILE (loaddefs.el),
DEF_ELISP_FILE (loadup.el),
DEF_ELISP_FILE (charprop.el)
DEF_ELISP_FILE (charprop.el),
DEF_ELISP_FILE (cp51932.el),
DEF_ELISP_FILE (eucjp-ms.el)
};
int i, match;
size_t flen = strlen (filename);

View file

@ -229,6 +229,8 @@ lisp2 = \
$(lispsource)language/greek.elc \
$(lispsource)language/hebrew.elc \
$(lispsource)language/japanese.elc \
$(lispsource)international/cp51932.el \
$(lispsource)international/eucjp-ms.el \
$(lispsource)language/korean.elc \
$(lispsource)language/lao.elc \
$(lispsource)language/cham.elc \

View file

@ -1,3 +1,111 @@
2012-10-24 Chong Yidong <cyd@gnu.org>
* emacs-lisp/easymenu.el (easy-menu-define): Doc fix (Bug#12628).
2012-10-24 Stefan Monnier <monnier@iro.umontreal.ca>
* minibuffer.el (completion--all-sorted-completions-location): New var.
(completion--cache-all-sorted-completions)
(completion--flush-all-sorted-completions): Use it.
(completion-in-region, completion-in-region--postch)
(completion-at-point, completion-help-at-point): Use markers in
completion-in-region--data (bug#12619).
2012-10-23 Stefan Monnier <monnier@iro.umontreal.ca>
* progmodes/compile.el (compilation-start): Try to handle common
quoting of `cd' argument (bug#12640).
* vc/diff-mode.el (diff-hunk): `save-excursion' while refining
(bug#12671).
2012-10-23 Glenn Morris <rgm@gnu.org>
* progmodes/gud.el (gud-menu-map):
Check gdb-active-process is bound. (Bug#12358)
2012-10-23 Stefan Monnier <monnier@iro.umontreal.ca>
* repeat.el (repeat): Set real-this-command (bug#12232).
* htmlfontify.el (hfy-post-html-hook):
* filesets.el (filesets-cache-fill-content-hook):
* arc-mode.el (archive-extract-hook):
* progmodes/cc-mode.el (c-prepare-bug-report-hook):
* net/rcirc.el (rcirc-sentinel-functions)
(rcirc-receive-message-functions, rcirc-activity-functions)
(rcirc-print-functions):
* net/dbus.el (dbus-event-error-functions):
* emacs-lisp/eieio.el (eieio-pre-method-execution-functions):
* emacs-lisp/checkdoc.el (checkdoc-style-functions)
(checkdoc-comment-style-functions): Don't use "-hooks" suffix.
* term/sun.el (sun-raw-prefix-hooks):
* mail/sendmail.el (mail-yank-hooks): Use make-obsolete-variable.
2012-10-23 Michael Albinus <michael.albinus@gmx.de>
* net/tramp-smb.el (tramp-smb-maybe-open-connection):
Set `tramp-chunksize' to 1. This improves the performance.
(tramp-smb-wait-for-output): Add timeout to
`tramp-accept-process-output' calls.
2012-10-23 Chong Yidong <cyd@gnu.org>
* faces.el (font-list-limit): Define as an obsolete variable.
* startup.el (command-line):
* cus-start.el: Don't refer to font-list-limit.
* newcomment.el (comment-normalize-vars): Doc fix (Bug#12583).
2012-10-23 Stefan Monnier <monnier@iro.umontreal.ca>
* subr.el (internal-temp-output-buffer-show): Rename from
temp-output-buffer-show, since previously compiled files expect this name.
2012-10-23 Glenn Morris <rgm@gnu.org>
* image.el (image-type-from-file-name): If multiple types match,
return the first one that is supported. (Bug#9045)
2012-10-22 Glenn Morris <rgm@gnu.org>
* image.el (imagemagick-enabled-types): Doc fix.
2012-10-22 Takafumi Arakaki <aka.tkf@gmail.com> (tiny change)
* progmodes/which-func.el (which-func-current): The hash-table may have
an explicit nil (bug#12338).
2012-10-22 Stefan Monnier <monnier@iro.umontreal.ca>
* electric.el (electric-pair-delete-selection-self-insert-function):
Rename to electric-pair-will-use-region, return a boolean.
(electric-pair-mode): Adjust accordingly. Don't require delsel.
* delsel.el (delete-selection-helper): Use a function instead of a hook.
(delete-selection-pre-hook): Use use-region-p.
(delete-selection-self-insert-function): Remove.
(self-insert-command): Obey self-insert-uses-region-functions.
(self-insert-iso): Revert to previous setting, since we don't actually
know what that command does.
(delete-selection-self-insert-hooks): Remove.
2012-10-22 Simon Law <sfllaw@sfllaw.ca> (tiny change)
* delsel.el (delete-selection-helper): New function, extracted from
delete-selection-pre-hook.
(delete-selection-pre-hook): Use it.
(delete-selection-self-insert-function): New function.
(delete-selection-self-insert-hooks): New hook.
(self-insert-command, self-insert-iso): Use it.
* electric.el (electric-pair-syntax): New function, extracted from
electric-pair-post-self-insert-function.
(electric-pair-post-self-insert-function): Use it.
(electric-pair-delete-selection-self-insert-function): New function.
(electric-pair-mode): Require delsel and setup
delete-selection-self-insert-hooks (bug#11520).
2012-10-20 Chong Yidong <cyd@gnu.org>
* vc/vc.el (vc-diff-internal): Set up Diff mode even if there are
@ -8,8 +116,8 @@
2012-10-20 Arne Jørgensen <arne@arnested.dk>
* progmodes/flymake.el (flymake-create-temp-inplace): Use
file-truename.
* progmodes/flymake.el (flymake-create-temp-inplace):
Use file-truename.
2012-10-20 Eli Zaretskii <eliz@gnu.org>

View file

@ -140,8 +140,10 @@ A local copy of the archive will be used when updating."
:type 'regexp
:group 'archive)
(defcustom archive-extract-hooks nil
"Hooks to run when an archive member has been extracted."
(define-obsolete-variable-alias 'archive-extract-hooks
'archive-extract-hook "24.3")
(defcustom archive-extract-hook nil
"Hook run when an archive member has been extracted."
:type 'hook
:group 'archive)
;; ------------------------------
@ -1078,7 +1080,7 @@ using `make-temp-file', and the generated name is returned."
;; We will write out the archive ourselves if it is
;; part of another archive.
(remove-hook 'write-contents-functions 'archive-write-file t))
(run-hooks 'archive-extract-hooks)
(run-hooks 'archive-extract-hook)
(if archive-read-only
(message "Note: altering this archive is not implemented."))))
(archive-maybe-update t))

View file

@ -1,14 +1,23 @@
2012-10-23 Stefan Monnier <monnier@iro.umontreal.ca>
* semantic/db-file.el (semanticdb-save-database-functions):
* semantic/lex.el (semantic-lex-reset-functions):
* semantic/edit.el (semantic-change-functions)
(semantic-edits-new-change-functions)
(semantic-edits-delete-change-functions)
(semantic-edits-reparse-change-functions): Don't use "-hooks" suffix.
2012-10-14 David Engster <deng@randomsample.de>
* semantic.el (semantic-error-if-unparsed): New function. Raise
error if buffer was not parsed by Semantic (bug #12045).
* semantic.el (semantic-error-if-unparsed): New function.
Raise error if buffer was not parsed by Semantic (bug #12045).
(navigate-menu, edit-menu, cedet-menu-map): Enable Semantic items
only if buffer was parsed. Also, replace ':active' with ':enable'
where necessary.
* semantic/wisent/python.el
(semantic-python-get-system-include-path): Use
`python-shell-internal-send-string' if available to query Python
(semantic-python-get-system-include-path):
Use `python-shell-internal-send-string' if available to query Python
for system paths.
* semantic/senator.el (senator-next-tag, senator-previous-tag)
@ -57,8 +66,8 @@
2012-10-06 Chong Yidong <cyd@gnu.org>
* semantic/bovine/grammar.el:
* semantic/wisent/grammar.el: Move from admin/grammars. Add
autoloads for bovine-grammar-mode and wisent-grammar-mode.
* semantic/wisent/grammar.el: Move from admin/grammars.
Add autoloads for bovine-grammar-mode and wisent-grammar-mode.
2012-10-02 Chong Yidong <cyd@gnu.org>
@ -163,8 +172,8 @@
(-scheme, -makefile-misc, ede-proj-target-makefile-program)
(-makefile-archive, -makefile-shared-object)
(ede-proj-target-makefile-info, -grammar): New autoloads.
(ede-proj-project): Inherit from eieio-persistent-read. Specify
extension and header line.
(ede-proj-project): Inherit from eieio-persistent-read.
Specify extension and header line.
(ede-proj-load, ede-proj-save): Replace with impl using
eieio-persistent-read.
@ -176,27 +185,27 @@
(navigate-menu): Add menu item for Stickyfunc mode.
* semantic/analyze/debug.el
(semantic-analyzer-debug-insert-include-summary): Before
dereferencing tableinner, make sure it has a value.
(semantic-analyzer-debug-insert-include-summary):
Before dereferencing tableinner, make sure it has a value.
* semantic/analyze/refs.el
(semantic-analyze-tag-references-default): When doing a lookup,
specify noerror.
(semantic--analyze-refs-full-lookup): Add optional noerror input
argument. Pass to to full-lookup-simple.
(semantic-analyze-refs-impl, semantic-analyze-refs-proto): Ignore
:typemodifiers during compare.
(semantic-analyze-refs-impl, semantic-analyze-refs-proto):
Ignore :typemodifiers during compare.
* semantic/bovine/c.el (semantic-lex-cpp-define): Specify limits
to looking back for comment chars.
(semantic--tag-similar-names-p, semantic--tag-similar-names-p-default)
(semantic--tag-attribute-similar-p): New.
(semantic-c-describe-environment): Handle list value of ede-object.
(semantic-lex-c-preprocessor-symbol-map-builtin): Add
__attribute_pure__.
(semantic-lex-c-preprocessor-symbol-map-builtin):
Add __attribute_pure__.
* semantic/bovine/scm.el (semantic-format-tag-prototype): Add
parent and color argument. Pass them through.
* semantic/bovine/scm.el (semantic-format-tag-prototype):
Add parent and color argument. Pass them through.
* semantic/complete.el (semantic-collector-calculate-completions):
Search for more matches if new prefix is a substring of old one.
@ -217,15 +226,15 @@
the (%d tags) extra string.
(semanticdb-project-database): Specify :type for table.
(semanticdb-create-table-for-file): Specify file-truename.
(semanticdb-synchronize, semanticdb-partial-synchronize): Restore
code that refreshes references to include files.
(semanticdb-synchronize, semanticdb-partial-synchronize):
Restore code that refreshes references to include files.
* semantic/decorate/include.el
(semantic-decoration-on-fileless-includes): New face.
(semantic-decoration-on-fileless-include-map)
(semantic-decoration-on-fileless-include-menu): New variables.
(semantic-decoration-on-includes-highlight-default): Support
includes that have a table, but are not associated with a file.
(semantic-decoration-on-includes-highlight-default):
Support includes that have a table, but are not associated with a file.
(semantic-decoration-fileless-include-describe)
(semantic-decoration-fileless-include-menu): New functions.
(semantic-decoration-all-include-summary): Add arrows to indicate
@ -262,15 +271,15 @@
* semantic/tag.el (semantic-create-tag-proxy)
(semantic-tag-set-proxy, semantic-tag-resolve-proxy): New.
* semantic/util.el (semantic-describe-buffer): Add
semantic-new-buffer-fcn-was-run.
* semantic/util.el (semantic-describe-buffer):
Add semantic-new-buffer-fcn-was-run.
* semantic/wisent/java-tags.el (semantic-get-local-variables): Add
`this' to the local variable context.
* semantic/wisent/java-tags.el (semantic-get-local-variables):
Add `this' to the local variable context.
(semantic-analyze-split-name, semantic-analyze-unsplit-name): New.
* semantic/wisent/python.el (semantic-python-expand-tag): New
function.
* semantic/wisent/python.el (semantic-python-expand-tag):
New function.
* srecode/compile.el (srecode-compile-templates): Add "framework"
special variable support.
@ -280,7 +289,7 @@
(srecode-semantic-handle-:cpp): New functions.
(srecode-semantic-apply-tag-to-dict): Move from cpp-mode function
to c-mode function.
(srecode-c-apply-templates): Renamed from srecode-cpp-apply-templates.
(srecode-c-apply-templates): Rename from srecode-cpp-apply-templates.
* srecode/dictionary.el (initialize-instance): Remove bogus error
condition.
@ -293,8 +302,8 @@
* srecode/mode.el (srecode-minor-mode): Support the m3 menu.
* srecode/semantic.el (srecode-semantic-insert-tag): Support
system includes.
* srecode/semantic.el (srecode-semantic-insert-tag):
Support system includes.
* srecode/srt-mode.el (srecode-font-lock-keywords): Update.
@ -325,8 +334,8 @@
* ede/proj-comp.el (ede-proj-makefile-insert-rules): Fix insertion
of phony rule.
* ede/proj-elisp.el (ede-proj-target-elisp): Remove
ede-emacs-preload-compiler.
* ede/proj-elisp.el (ede-proj-target-elisp):
Remove ede-emacs-preload-compiler.
(ede-proj-makefile-insert-rules, ede-proj-makefile-dependencies):
New methods.
(ede-emacs-compiler): Add 'require' macro to variables and pattern
@ -362,8 +371,8 @@
(semantic-cpp-lexer): Add semantic-lex-c-ifdef.
(semantic-expand-c-tag): Check if tag is non-nil before adding it
to return list
(semantic-expand-c-extern-C, semantic-expand-c-complex-type): New
functions, copied from semantic-expand-c-tag.
(semantic-expand-c-extern-C, semantic-expand-c-complex-type):
New functions, copied from semantic-expand-c-tag.
(semantic-find-tags-included): New override which also searches
for include tags inside of namespaces.
(semantic-c-dereference-typedef): Use semantic-tag-prototype-p.
@ -371,16 +380,16 @@
* semantic/bovine/el.el: Remove emacs-lisp-mode-hook.
* semantic/complete.el (semantic-complete-post-command-hook): Exit
completion when user has deleted all characters from the prefix.
* semantic/complete.el (semantic-complete-post-command-hook):
Exit completion when user has deleted all characters from the prefix.
(semantic-displayor-focus-request): Return to previous window when
focussing tags.
* semantic/db-el.el (semanticdb-normalize-one-tag): Make obsolete.
(semanticdb-elisp-sym->tag): Use help-function-arglist instead.
* semantic/db-file.el (semanticdb-create-database): Use
semantic-tag-version instead of just semantic-version as the
* semantic/db-file.el (semanticdb-create-database):
Use semantic-tag-version instead of just semantic-version as the
initializer for the :semantic-tag-version slot.
* semantic/db-find.el (semanticdb-find-tags-by-class-method):
@ -394,11 +403,11 @@
(semanticdb-save-current-db, semanticdb-save-all-db): Only emit
message when running interactively.
* semantic/decorate/mode.el (semantic-decoration-mode): Activate
decoration of includes by default.
* semantic/decorate/mode.el (semantic-decoration-mode):
Activate decoration of includes by default.
* semantic/doc.el (semantic-doc-snarf-comment-for-tag): Remove
comment delimiter at the end of the text.
* semantic/doc.el (semantic-doc-snarf-comment-for-tag):
Remove comment delimiter at the end of the text.
* semantic/ede-grammar.el (semantic-ede-proj-target-grammar):
Change aux- and pre-load-packages.
@ -412,16 +421,16 @@
(ede-proj-makefile-insert-rules): Add target specific EMACSFLAGS
to raise max-specpdl-size and max-lisp-eval-depth.
* semantic/find.el (semantic-find-tags-included): Make
overridable.
* semantic/find.el (semantic-find-tags-included):
Make overridable.
* semantic/fw.el (semantic-alias-obsolete)
(semantic-varalias-obsolete): Use byte-compile-warn.
(semantic-find-file-noselect): Disable font lock by calling
global-font-lock-mode.
* semantic/grammar.el (semantic-grammar-create-package): Fix
message.
* semantic/grammar.el (semantic-grammar-create-package):
Fix message.
(semantic-grammar-batch-build-one-package): When generating
parsers in batch-mode, ignore version control and make sure we do
not use cached versions.
@ -433,16 +442,16 @@
(semantic-lex-spp-lex-text-string): Instead of only setting the
lexer, call the major mode's setup function.
* semantic/scope.el (semantic-analyze-scoped-types-default): Use
semantic-tag-prototype-p.
* semantic/scope.el (semantic-analyze-scoped-types-default):
Use semantic-tag-prototype-p.
(semantic-analyze-scope-nested-tags-default): Make sure we don't
return tags we already have in scopetypes.
* semantic/symref/filter.el
(semantic-symref-test-count-hits-in-tag): Restore.
* semantic/wisent/comp.el (wisent-BITS-PER-WORD): Use
most-positive-fixnum if available.
* semantic/wisent/comp.el (wisent-BITS-PER-WORD):
Use most-positive-fixnum if available.
* semantic/wisent/javascript.el (semantic-tag-protection)
(semantic-analyze-scope-calculate-access)
@ -477,8 +486,8 @@
2012-10-01 Jan Moringen <jan.moringen@uni-bielefeld.de>
* semantic/idle.el
(semantic-idle-breadcrumbs--display-in-header-line): Escape
%-characters to avoid erroneous expansion in header line.
(semantic-idle-breadcrumbs--display-in-header-line):
Escape %-characters to avoid erroneous expansion in header line.
(semantic-idle-breadcrumbs--display-in-mode-line): Likewise.
* semantic/wisent/python.el (wisent-python-reconstitute-function-tag)
@ -514,8 +523,8 @@
* semantic/wisent/python.el (wisent-python-string-start-re)
(wisent-python-string-re, wisent-python-forward-string)
(wisent-python-forward-line,wisent-python-lex-string): New
variables.
(wisent-python-forward-line,wisent-python-lex-string):
New variables.
(wisent-python-forward-balanced-expression): New function.
2012-10-01 Pete Beardmore <elbeardmorez@msn.com>
@ -528,16 +537,16 @@
(semantic-displayor-tooltip-mode)
(semantic-displayor-tooltip-initial-max-tags)
(semantic-displayor-tooltip-max-tags): New defcustoms.
(semantic-displayor-tooltip): Use new variables as initforms. Use
new slot `mode' instead of `force-show'. Rename `max-tags' to
(semantic-displayor-tooltip): Use new variables as initforms.
Use new slot `mode' instead of `force-show'. Rename `max-tags' to
`max-tags-initial'.
(semantic-displayor-show-request): Display completions according
to new modes, and make variable names clearer.
(semantic-displayor-tooltip::semantic-displayor-scroll-request):
Use new max-tags-initial slot.
* semantic/idle.el (semantic-idle-local-symbol-highlight): Make
sure there actually is a tag at point.
* semantic/idle.el (semantic-idle-local-symbol-highlight):
Make sure there actually is a tag at point.
(semantic-idle-completion-list-default): Report errors as messages
if semantic-idle-scheduler-verbose-flag is non-nil.
@ -548,13 +557,13 @@
2012-10-01 Alex Ott <alexott@gmail.com>
* semantic/idle.el (semantic-idle-scheduler-enabled-p): Fix
file-checking.
* semantic/idle.el (semantic-idle-scheduler-enabled-p):
Fix file-checking.
2012-10-01 Darren Hoo <darren.hoo@gmail.com> (tiny change)
* semantic/db-find.el (semanticdb-find-default-throttle): Make
buffer-local.
* semantic/db-find.el (semanticdb-find-default-throttle):
Make buffer-local.
(semanticdb-strip-find-results): Check for existing :filename
attribute, so that file information from GNU Global is not lost.
@ -1001,7 +1010,7 @@
(ede-customize-forms-menu): Prevent error if there is no project.
(ede-load-project-file): Set ede-constructing to the thing being
constructed, instead of t.
(ede-project-force-load): Deleted.
(ede-project-force-load): Delete.
* ede/base.el:
* ede/auto.el:
@ -1011,7 +1020,7 @@
(autoconf-parameters-for-macro): Parse multiline parameters of
macros. Optionally ignore case and at bol for macro.
(autoconf-parameter-strip): Use greedy match for newlines.
(autoconf-new-automake-string): Deleted.
(autoconf-new-automake-string): Delete.
(autoconf-new-program): Use SRecode to fill an empty file.
* ede/cpp-root.el (ede-create-lots-of-projects-under-dir):
@ -1046,7 +1055,7 @@
(project-am-scan-for-targets): Scan also over
project-am-meta-type-alist.
(ede-system-include-path): Simple implementation.
(ede-find-target): Deleted. EDE core takes care of this.
(ede-find-target): Delete. EDE core takes care of this.
(ede-buffer-mine): Create the searched filename as relative.
(project-am-load): Simplify, using autoconf-edit.
(project-am-extract-package-info): Fix separators.
@ -1063,7 +1072,7 @@
(ede-proj-target-makefile-objectcode): Quote initforms.
Support lex and yacc.
* ede/proj-prog.el (ede-proj-makefile-insert-rules): Removed.
* ede/proj-prog.el (ede-proj-makefile-insert-rules): Remove.
(ede-proj-makefile-insert-variables): New, add LDDEPS.
(ede-proj-makefile-insert-automake-post-variables): Add LDADD
variable. Use ldlibs-local slot. Add a -l to ldlibs strings.
@ -1158,7 +1167,7 @@
* semantic/util.el (semantic-hack-search)
(semantic-recursive-find-nonterminal-by-name)
(semantic-current-tag-interactive): Deleted.
(semantic-current-tag-interactive): Delete.
(semantic-describe-buffer): Fix expand-nonterminal.
Add lex-syntax-mods, type relation separator char, and command
separation char.
@ -1191,7 +1200,7 @@
(semantic-idle-truncate-long-summaries): New option.
* semantic/ia.el (semantic-ia-cache)
(semantic-ia-get-completions): Deleted. Callers changed.
(semantic-ia-get-completions): Delete. Callers changed.
(semantic-ia-show-variants): New command.
(semantic-ia-show-doc): If doc is empty, don't make a temp buffer.
(semantic-ia-show-summary): If there isn't anything to show, say so.

View file

@ -70,7 +70,9 @@ passes a list of predicates in `semanticdb-project-predicate-functions'."
:group 'semanticdb
:type nil)
(defcustom semanticdb-save-database-hooks nil
(define-obsolete-variable-alias 'semanticdb-save-database-hooks
'semanticdb-save-database-functions "24.3")
(defcustom semanticdb-save-database-functions nil
"Abnormal hook run after a database is saved.
Each function is called with one argument, the object representing
the database recently written."
@ -251,7 +253,7 @@ If DB is not specified, then use the current database."
(message "Save Error: %S: %s" (car (cdr foo))
objname)
(error "%S" (car (cdr foo))))))))
(run-hook-with-args 'semanticdb-save-database-hooks
(run-hook-with-args 'semanticdb-save-database-functions
(or DB semanticdb-current-database))
;;(message "Saving tag summary for %s...done" objname)
)

View file

@ -72,7 +72,9 @@ updated in the current buffer.
For language specific hooks, make sure you define this as a local hook.")
(defvar semantic-change-hooks
(define-obsolete-variable-alias 'semantic-change-hooks
'semantic-change-functions "24.3")
(defvar semantic-change-functions
'(semantic-edits-change-function-handle-changes)
"Abnormal hook run when semantic detects a change in a buffer.
Each hook function must take three arguments, identical to the
@ -89,11 +91,15 @@ If the hook returns non-nil, then declare that a reparse is needed.
For language specific hooks, make sure you define this as a local hook.
Not used yet; part of the next generation reparse mechanism.")
(defvar semantic-edits-new-change-hooks nil
(define-obsolete-variable-alias 'semantic-edits-new-change-hooks
'semantic-edits-new-change-functions "24.3")
(defvar semantic-edits-new-change-functions nil
"Abnormal hook run when a new change is found.
Functions must take one argument representing an overlay on that change.")
(defvar semantic-edits-delete-change-hooks nil
(define-obsolete-variable-alias 'semantic-edits-delete-change-hooks
'semantic-edits-delete-change-functions "24.3")
(defvar semantic-edits-delete-change-functions nil
"Abnormal hook run before a change overlay is deleted.
Deleted changes occur when multiple changes are merged.
Functions must take one argument representing an overlay being deleted.")
@ -104,7 +110,9 @@ Changes move when a new change overlaps an old change. The old change
will be moved.
Functions must take one argument representing an overlay being moved.")
(defvar semantic-edits-reparse-change-hooks nil
(define-obsolete-variable-alias 'semantic-edits-reparse-change-hooks
'semantic-edits-reparse-change-functions "24.3")
(defvar semantic-edits-reparse-change-functions nil
"Abnormal hook run after a change results in a reparse.
Functions are called before the overlay is deleted, and after the
incremental reparse.")
@ -133,7 +141,7 @@ Argument START, END, and LENGTH specify the bounds of the change."
(setq semantic-unmatched-syntax-cache-check t)
(let ((inhibit-point-motion-hooks t)
)
(run-hook-with-args 'semantic-change-hooks start end length)
(run-hook-with-args 'semantic-change-functions start end length)
))
(defun semantic-changes-in-region (start end &optional buffer)
@ -168,7 +176,7 @@ Argument START, END, and LENGTH specify the bounds of the change."
;; function will be removed from the list of active change
;; functions.
(condition-case nil
(run-hook-with-args 'semantic-edits-new-change-hooks o)
(run-hook-with-args 'semantic-edits-new-change-functions o)
(error nil)))
(let ((tmp changes-in-change))
;; Find greatest bounds of all changes
@ -188,7 +196,7 @@ Argument START, END, and LENGTH specify the bounds of the change."
;; Delete other changes. They are now all bound here.
(while changes-in-change
(condition-case nil
(run-hook-with-args 'semantic-edits-delete-change-hooks
(run-hook-with-args 'semantic-edits-delete-change-functions
(car changes-in-change))
(error nil))
(semantic-overlay-delete (car changes-in-change))
@ -198,7 +206,7 @@ Argument START, END, and LENGTH specify the bounds of the change."
(defsubst semantic-edits-flush-change (change)
"Flush the CHANGE overlay."
(condition-case nil
(run-hook-with-args 'semantic-edits-delete-change-hooks
(run-hook-with-args 'semantic-edits-delete-change-functions
change)
(error nil))
(semantic-overlay-delete change))

View file

@ -729,7 +729,9 @@ This is an alist of (ANCHOR . STREAM) elements where ANCHOR is the
start position of the block, and STREAM is the list of tokens in that
block.")
(defvar semantic-lex-reset-hooks nil
(define-obsolete-variable-alias 'semantic-lex-reset-hooks
'semantic-lex-reset-functions "24.3")
(defvar semantic-lex-reset-functions nil
"Abnormal hook used by major-modes to reset lexical analyzers.
Hook functions are called with START and END values for the
current lexical pass. Should be set with `add-hook', specifying
@ -771,7 +773,7 @@ analyzer which might mistake a number for as a symbol."
;; Make sure the state of block parsing starts over.
(setq semantic-lex-block-streams nil)
;; Allow specialty reset items.
(run-hook-with-args 'semantic-lex-reset-hooks start end)
(run-hook-with-args 'semantic-lex-reset-functions start end)
;; Lexing state.
(let* (;(starttime (current-time))
(starting-position (point))

View file

@ -487,7 +487,6 @@ since it could result in memory overflow and make Emacs crash."
(hourglass-delay cursor number)
;; xfaces.c
(font-list-limit display integer)
(scalable-fonts-allowed display boolean "22.1")
;; xfns.c
(x-bitmap-file-path installation

View file

@ -44,9 +44,12 @@
;; `kill-region' is used on the selection, rather than
;; `delete-region'. (Text selected with the mouse will typically
;; be yankable anyhow.)
;; non-nil
;; t
;; The normal case: delete the active region prior to executing
;; the command which will insert replacement text.
;; <function>
;; For commands which need to dynamically determine this behaviour.
;; The function should return one of the above values or nil.
;;; Code:
@ -71,65 +74,96 @@ any selection."
(transient-mark-mode t)))
(defun delete-active-region (&optional killp)
"Delete the active region.
If KILLP in not-nil, the active region is killed instead of deleted."
(if killp
(kill-region (point) (mark))
(delete-region (point) (mark)))
t)
(defun delete-selection-pre-hook ()
(when (and delete-selection-mode transient-mark-mode mark-active
(not buffer-read-only))
(let ((type (and (symbolp this-command)
(get this-command 'delete-selection))))
(condition-case data
(cond ((eq type 'kill)
(delete-active-region t))
((eq type 'yank)
;; Before a yank command, make sure we don't yank the
;; head of the kill-ring that really comes from the
;; currently active region we are going to delete.
;; That would make yank a no-op.
(when (and (string= (buffer-substring-no-properties
(point) (mark))
(car kill-ring))
(fboundp 'mouse-region-match)
(mouse-region-match))
(current-kill 1))
(delete-active-region))
((eq type 'supersede)
(let ((empty-region (= (point) (mark))))
(delete-active-region)
(unless empty-region
(setq this-command 'ignore))))
(type
(delete-active-region)
(if (and overwrite-mode
(eq this-command 'self-insert-command))
(let ((overwrite-mode nil))
(self-insert-command
(prefix-numeric-value current-prefix-arg))
(setq this-command 'ignore)))))
;; If ask-user-about-supersession-threat signals an error,
;; stop safe_run_hooks from clearing out pre-command-hook.
(file-supersession (message "%s" (cadr data)) (ding))
(text-read-only
;; This signal may come either from `delete-active-region' or
;; `self-insert-command' (when `overwrite-mode' is non-nil).
;; To avoid clearing out `pre-command-hook' we handle this case
;; by issuing a simple message. Note, however, that we do not
;; handle all related problems: When read-only text ends before
;; the end of the region, the latter is not deleted but any
;; subsequent insertion will succeed. We could avoid this case
;; by doing a (setq this-command 'ignore) here. This would,
;; however, still not handle the case where read-only text ends
;; precisely where the region starts: In that case the deletion
;; would succeed but the subsequent insertion would fail with a
;; text-read-only error. To handle that case we would have to
;; investigate text properties at both ends of the region and
;; skip the deletion when inserting text is forbidden there.
(message "Text is read-only") (ding))))))
(defun delete-selection-helper (type)
"Delete selection according to TYPE:
`yank'
For commands which do a yank; ensures the region about to be
deleted isn't yanked.
`supersede'
Delete the active region and ignore the current command,
i.e. the command will just delete the region.
`kill'
`kill-region' is used on the selection, rather than
`delete-region'. (Text selected with the mouse will typically
be yankable anyhow.)
t
The normal case: delete the active region prior to executing
the command which will insert replacement text.
FUNCTION
For commands which need to dynamically determine this behaviour.
FUNCTION should take no argument and return one of the above values or nil."
(condition-case data
(cond ((eq type 'kill)
(delete-active-region t))
((eq type 'yank)
;; Before a yank command, make sure we don't yank the
;; head of the kill-ring that really comes from the
;; currently active region we are going to delete.
;; That would make yank a no-op.
(when (and (string= (buffer-substring-no-properties
(point) (mark))
(car kill-ring))
(fboundp 'mouse-region-match)
(mouse-region-match))
(current-kill 1))
(delete-active-region))
((eq type 'supersede)
(let ((empty-region (= (point) (mark))))
(delete-active-region)
(unless empty-region
(setq this-command 'ignore))))
((functionp type) (delete-selection-helper (funcall type)))
(type
(delete-active-region)
(if (and overwrite-mode
(eq this-command 'self-insert-command))
(let ((overwrite-mode nil))
(self-insert-command
(prefix-numeric-value current-prefix-arg))
(setq this-command 'ignore)))))
;; If ask-user-about-supersession-threat signals an error,
;; stop safe_run_hooks from clearing out pre-command-hook.
(file-supersession (message "%s" (cadr data)) (ding))
(text-read-only
;; This signal may come either from `delete-active-region' or
;; `self-insert-command' (when `overwrite-mode' is non-nil).
;; To avoid clearing out `pre-command-hook' we handle this case
;; by issuing a simple message. Note, however, that we do not
;; handle all related problems: When read-only text ends before
;; the end of the region, the latter is not deleted but any
;; subsequent insertion will succeed. We could avoid this case
;; by doing a (setq this-command 'ignore) here. This would,
;; however, still not handle the case where read-only text ends
;; precisely where the region starts: In that case the deletion
;; would succeed but the subsequent insertion would fail with a
;; text-read-only error. To handle that case we would have to
;; investigate text properties at both ends of the region and
;; skip the deletion when inserting text is forbidden there.
(message "Text is read-only") (ding))))
(defun delete-selection-pre-hook ()
"Function run before commands that delete selections are executed.
Commands which will delete the selection need a `delete-selection'
property on their symbol; commands which insert text but don't
have this property won't delete the selection.
See `delete-selection-helper'."
(when (and delete-selection-mode (use-region-p)
(not buffer-read-only))
(delete-selection-helper (and (symbolp this-command)
(get this-command 'delete-selection)))))
(put 'self-insert-command 'delete-selection
(lambda ()
(not (run-hook-with-args-until-success
'self-insert-uses-region-functions))))
(put 'self-insert-command 'delete-selection t)
(put 'self-insert-iso 'delete-selection t)
(put 'yank 'delete-selection 'yank)

View file

@ -301,14 +301,17 @@ This can be convenient for people who find it easier to hit ) than C-f."
:version "24.1"
:type 'boolean)
(defun electric-pair-syntax (command-event)
(and electric-pair-mode
(let ((x (assq command-event electric-pair-pairs)))
(cond
(x (if (eq (car x) (cdr x)) ?\" ?\())
((rassq command-event electric-pair-pairs) ?\))
(t (char-syntax command-event))))))
(defun electric-pair-post-self-insert-function ()
(let* ((syntax (and (eq (char-before) last-command-event) ; Sanity check.
electric-pair-mode
(let ((x (assq last-command-event electric-pair-pairs)))
(cond
(x (if (eq (car x) (cdr x)) ?\" ?\())
((rassq last-command-event electric-pair-pairs) ?\))
(t (char-syntax last-command-event))))))
(electric-pair-syntax last-command-event)))
;; FIXME: when inserting the closer, we should maybe use
;; self-insert-command, although it may prove tricky running
;; post-self-insert-hook recursively, and we wouldn't want to trigger
@ -355,6 +358,10 @@ This can be convenient for people who find it easier to hit ) than C-f."
(eq (char-syntax (following-char)) ?w)))
(save-excursion (insert closer))))))
(defun electric-pair-will-use-region ()
(and (use-region-p)
(memq (electric-pair-syntax last-command-event) '(?\( ?\" ?\$))))
;;;###autoload
(define-minor-mode electric-pair-mode
"Toggle automatic parens pairing (Electric Pair mode).
@ -370,10 +377,15 @@ See options `electric-pair-pairs' and `electric-pair-skip-self'."
:global t
:group 'electricity
(if electric-pair-mode
(add-hook 'post-self-insert-hook
#'electric-pair-post-self-insert-function)
(progn
(add-hook 'post-self-insert-hook
#'electric-pair-post-self-insert-function)
(add-hook 'self-insert-uses-region-functions
#'electric-pair-will-use-region))
(remove-hook 'post-self-insert-hook
#'electric-pair-post-self-insert-function)))
#'electric-pair-post-self-insert-function)
(remove-hook 'self-insert-uses-region-functions
#'electric-pair-will-use-region)))
;; Automatically add newlines after/before/around some chars.

View file

@ -124,7 +124,7 @@
;; Adding your own checks:
;;
;; You can experiment with adding your own checks by setting the
;; hooks `checkdoc-style-hooks' and `checkdoc-comment-style-hooks'.
;; hooks `checkdoc-style-functions' and `checkdoc-comment-style-hooks'.
;; Return a string which is the error you wish to report. The cursor
;; position should be preserved.
;;
@ -274,17 +274,21 @@ made in the style guide relating to order."
:type 'boolean)
;;;###autoload(put 'checkdoc-arguments-in-order-flag 'safe-local-variable 'booleanp)
(defvar checkdoc-style-hooks nil
"Hooks called after the standard style check is completed.
All hooks must return nil or a string representing the error found.
(define-obsolete-variable-alias 'checkdoc-style-hooks
'checkdoc-style-functions "24.3")
(defvar checkdoc-style-functions nil
"Hook run after the standard style check is completed.
All functions must return nil or a string representing the error found.
Useful for adding new user implemented commands.
Each hook is called with two parameters, (DEFUNINFO ENDPOINT).
DEFUNINFO is the return value of `checkdoc-defun-info'. ENDPOINT is the
location of end of the documentation string.")
(defvar checkdoc-comment-style-hooks nil
"Hooks called after the standard comment style check is completed.
(define-obsolete-variable-alias 'checkdoc-comment-style-hooks
'checkdoc-comment-style-functions "24.3")
(defvar checkdoc-comment-style-functions nil
"Hook run after the standard comment style check is completed.
Must return nil if no errors are found, or a string describing the
problem discovered. This is useful for adding additional checks.")
@ -1843,7 +1847,7 @@ Replace with \"%s\"? " original replace)
;; and reliance on the Ispell program.
(checkdoc-ispell-docstring-engine e)
;; User supplied checks
(save-excursion (checkdoc-run-hooks 'checkdoc-style-hooks fp e))
(save-excursion (checkdoc-run-hooks 'checkdoc-style-functions fp e))
;; Done!
)))
@ -2353,7 +2357,7 @@ Code:, and others referenced in the style guide."
err
(or
;; Generic Full-file checks (should be comment related)
(checkdoc-run-hooks 'checkdoc-comment-style-hooks)
(checkdoc-run-hooks 'checkdoc-comment-style-functions)
err))
;; Done with full file comment checks
err)))

View file

@ -44,110 +44,101 @@ menus, turn this variable off, otherwise it is probably better to keep it on.")
;;;###autoload
(defmacro easy-menu-define (symbol maps doc menu)
"Define a menu bar submenu in maps MAPS, according to MENU.
"Define a pop-up menu and/or menu bar menu specified by MENU.
If SYMBOL is non-nil, define SYMBOL as a function to pop up the
submenu defined by MENU, with DOC as its doc string.
If SYMBOL is non-nil, store the menu keymap in the value of SYMBOL,
and define SYMBOL as a function to pop up the menu, with DOC as its doc string.
If SYMBOL is nil, just store the menu keymap into MAPS.
MAPS, if non-nil, should be a keymap or a list of keymaps; add
the submenu defined by MENU to the keymap or each of the keymaps,
as a top-level menu bar item.
The first element of MENU must be a string. It is the menu bar item name.
It may be followed by the following keyword argument pairs
The first element of MENU must be a string. It is the menu bar
item name. It may be followed by the following keyword argument
pairs:
:filter FUNCTION
:filter FUNCTION
FUNCTION must be a function which, if called with one
argument---the list of the other menu items---returns the
items to actually display.
FUNCTION is a function with one argument, the rest of menu items.
It returns the remaining items of the displayed menu.
:visible INCLUDE
INCLUDE is an expression. The menu is visible if the
expression evaluates to a non-nil value. `:included' is an
alias for `:visible'.
:visible INCLUDE
:active ENABLE
ENABLE is an expression. The menu is enabled for selection
if the expression evaluates to a non-nil value. `:enable' is
an alias for `:active'.
INCLUDE is an expression; this menu is only visible if this
expression has a non-nil value. `:included' is an alias for `:visible'.
The rest of the elements in MENU are menu items.
A menu item can be a vector of three elements:
:active ENABLE
ENABLE is an expression; the menu is enabled for selection whenever
this expression's value is non-nil. `:enable' is an alias for `:active'.
The rest of the elements in MENU, are menu items.
A menu item is usually a vector of three elements: [NAME CALLBACK ENABLE]
[NAME CALLBACK ENABLE]
NAME is a string--the menu item name.
CALLBACK is a command to run when the item is chosen,
or a list to evaluate when the item is chosen.
CALLBACK is a command to run when the item is chosen, or an
expression to evaluate when the item is chosen.
ENABLE is an expression; the item is enabled for selection
whenever this expression's value is non-nil.
ENABLE is an expression; the item is enabled for selection if the
expression evaluates to a non-nil value.
Alternatively, a menu item may have the form:
[ NAME CALLBACK [ KEYWORD ARG ] ... ]
[ NAME CALLBACK [ KEYWORD ARG ]... ]
Where KEYWORD is one of the symbols defined below.
where NAME and CALLBACK have the same meanings as above, and each
optional KEYWORD and ARG pair should be one of the following:
:keys KEYS
:keys KEYS
KEYS is a string; a keyboard equivalent to the menu item.
This is normally not needed because keyboard equivalents are
usually computed automatically. KEYS is expanded with
`substitute-command-keys' before it is used.
KEYS is a string; a complex keyboard equivalent to this menu item.
This is normally not needed because keyboard equivalents are usually
computed automatically.
KEYS is expanded with `substitute-command-keys' before it is used.
:key-sequence KEYS
KEYS is a hint for speeding up Emacs's first display of the
menu. It should be nil if you know that the menu item has no
keyboard equivalent; otherwise it should be a string or
vector specifying a keyboard equivalent for the menu item.
:key-sequence KEYS
:active ENABLE
ENABLE is an expression; the item is enabled for selection
whenever this expression's value is non-nil. `:enable' is an
alias for `:active'.
KEYS is nil, a string or a vector; nil or a keyboard equivalent to this
menu item.
This is a hint that will considerably speed up Emacs's first display of
a menu. Use `:key-sequence nil' when you know that this menu item has no
keyboard equivalent.
:visible INCLUDE
INCLUDE is an expression; this item is only visible if this
expression has a non-nil value. `:included' is an alias for
`:visible'.
:active ENABLE
:label FORM
FORM is an expression that is dynamically evaluated and whose
value serves as the menu item's label (the default is NAME).
ENABLE is an expression; the item is enabled for selection whenever
this expression's value is non-nil. `:enable' is an alias for `:active'.
:suffix FORM
FORM is an expression that is dynamically evaluated and whose
value is concatenated with the menu entry's label.
:visible INCLUDE
:style STYLE
STYLE is a symbol describing the type of menu item; it should
be `toggle' (a checkbox), or `radio' (a radio button), or any
other value (meaning an ordinary menu item).
INCLUDE is an expression; this item is only visible if this
expression has a non-nil value. `:included' is an alias for `:visible'.
:selected SELECTED
SELECTED is an expression; the checkbox or radio button is
selected whenever the expression's value is non-nil.
:label FORM
:help HELP
HELP is a string, the help to display for the menu item.
FORM is an expression that will be dynamically evaluated and whose
value will be used for the menu entry's text label (the default is NAME).
Alternatively, a menu item can be a string. Then that string
appears in the menu as unselectable text. A string consisting
solely of dashes is displayed as a menu separator.
:suffix FORM
FORM is an expression that will be dynamically evaluated and whose
value will be concatenated to the menu entry's label.
:style STYLE
STYLE is a symbol describing the type of menu item. The following are
defined:
toggle: A checkbox.
Prepend the name with `(*) ' or `( ) ' depending on if selected or not.
radio: A radio button.
Prepend the name with `[X] ' or `[ ] ' depending on if selected or not.
button: Surround the name with `[' and `]'. Use this for an item in the
menu bar itself.
anything else means an ordinary menu item.
:selected SELECTED
SELECTED is an expression; the checkbox or radio button is selected
whenever this expression's value is non-nil.
:help HELP
HELP is a string, the help to display for the menu item.
A menu item can be a string. Then that string appears in the menu as
unselectable text. A string consisting solely of hyphens is displayed
as a solid horizontal line.
A menu item can be a list with the same format as MENU. This is a submenu."
Alternatively, a menu item can be a list with the same format as
MENU. This is a submenu."
(declare (indent defun) (debug (symbolp body)))
`(progn
,(if symbol `(defvar ,symbol nil ,doc))

View file

@ -2066,7 +2066,9 @@ Keys are a number representing :before, :primary, and :after methods.")
During executions, the list is first generated, then as each next method
is called, the next method is popped off the stack.")
(defvar eieio-pre-method-execution-hooks nil
(define-obsolete-variable-alias 'eieio-pre-method-execution-hooks
'eieio-pre-method-execution-functions "24.3")
(defvar eieio-pre-method-execution-functions nil
"Abnormal hook run just before an EIEIO method is executed.
The hook function must accept one argument, the list of forms
about to be executed.")
@ -2172,7 +2174,7 @@ This should only be called from a generic function."
(eieiomt-method-list method method-primary nil)))
)
(run-hook-with-args 'eieio-pre-method-execution-hooks
(run-hook-with-args 'eieio-pre-method-execution-functions
primarymethodlist)
;; Now loop through all occurrences forms which we must execute
@ -2277,7 +2279,7 @@ for this common case to improve performance."
;; Do the regular implementation here.
(run-hook-with-args 'eieio-pre-method-execution-hooks
(run-hook-with-args 'eieio-pre-method-execution-functions
lambdas)
(setq lastval (apply (car lambdas) newargs))

View file

@ -2572,6 +2572,12 @@ also the same size as FACE on FRAME, or fail."
(car fonts))
(cdr (assq 'font (frame-parameters (selected-frame))))))
(defcustom font-list-limit 100
"This variable is obsolete and has no effect."
:type 'integer
:group 'display)
(make-obsolete-variable 'font-list-limit nil "24.3")
(provide 'faces)
;;; faces.el ends here

View file

@ -403,8 +403,10 @@ Don't forget to check out `filesets-menu-ensure-use-cached'."
(sexp :tag "Other" :value nil)))
:group 'filesets)
(defcustom filesets-cache-fill-content-hooks nil
"Hooks to run when writing the contents of filesets' cache file.
(define-obsolete-variable-alias 'filesets-cache-fill-content-hooks
'filesets-cache-fill-content-hook "24.3")
(defcustom filesets-cache-fill-content-hook nil
"Hook run when writing the contents of filesets' cache file.
The hook is called with the cache file as current buffer and the cursor
at the last position. I.e. each hook has to make sure that the cursor is
@ -2414,7 +2416,7 @@ fileset thinks this is necessary or not."
(when filesets-cache-hostname-flag
(insert (format "(setq filesets-cache-hostname %S)" (system-name)))
(newline 2))
(run-hooks 'filesets-cache-fill-content-hooks)
(run-hooks 'filesets-cache-fill-content-hook)
(write-file filesets-menu-cache-file))
(setq filesets-has-changed-flag nil)
(setq filesets-update-cache-file-flag nil)))

View file

@ -1,3 +1,11 @@
2012-10-23 Stefan Monnier <monnier@iro.umontreal.ca>
* nndiary.el (nndiary-request-create-group-functions)
(nndiary-request-update-info-functions)
(nndiary-request-accept-article-functions):
* gnus-start.el (gnus-subscribe-newsgroup-functions): Don't use
"-hooks" suffix.
2012-10-17 Kazuhiro Ito <kzhr@d1.dion.ne.jp> (tiny change)
* starttls.el (starttls-extra-arguments): Doc fix.
@ -110,7 +118,7 @@
2012-09-05 Martin Stjernholm <mast@lysator.liu.se>
* gnus-demon.el (gnus-demon-init): Fixed regression when IDLE is t and
* gnus-demon.el (gnus-demon-init): Fix regression when IDLE is t and
TIME is set.
2012-09-05 Juri Linkov <juri@jurta.org>
@ -571,7 +579,7 @@
* gnus.el: Register gnus-registry functions.
* gnus-registry.el (gnus-try-warping-via-registry):
Moved here and indent.
Move here and indent.
* gnus-int.el (gnus-warp-to-article):
Check whether the registry is enabled before warping.
@ -703,7 +711,7 @@
(message-multi-smtp-send-mail): Respect the X-Message-SMTP-Method
header to implement multi-SMTP functionality.
* gnus-agent.el (gnus-agent-send-mail-function): Removed.
* gnus-agent.el (gnus-agent-send-mail-function): Remove.
(gnus-agentize): Don't set it.
(gnus-agent-send-mail): Don't use it.
@ -844,8 +852,8 @@
2012-06-10 Lars Magne Ingebrigtsen <larsi@gnus.org>
* gnus-group.el (gnus-group-get-new-news): Respect
`gnus-group-use-permanent-levels', as documented (bug#11638).
* gnus-group.el (gnus-group-get-new-news):
Respect `gnus-group-use-permanent-levels', as documented (bug#11638).
2012-06-10 Dave Abrahams <dave@boostpro.com>
@ -985,7 +993,7 @@
(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-natural-width): Remove.
(shr-buffer-width): New function.
(shr-expand-newlines): Use it.
@ -1396,8 +1404,8 @@
2012-01-04 Wolfgang Jenkner <wjenkner@inode.at> (tiny change)
* gnus-agent.el (gnus-agent-load-local): Recompute
gnus-agent-article-local on changing method.
* gnus-agent.el (gnus-agent-load-local):
Recompute gnus-agent-article-local on changing method.
2012-01-04 Lars Magne Ingebrigtsen <larsi@gnus.org>
@ -1689,8 +1697,8 @@
2011-09-27 Daiki Ueno <ueno@unixuser.org>
* plstore.el (plstore-select-keys, plstore-encrypt-to): Clarify
documentation.
* plstore.el (plstore-select-keys, plstore-encrypt-to):
Clarify documentation.
2011-09-27 Lars Magne Ingebrigtsen <larsi@gnus.org>

View file

@ -291,7 +291,9 @@ claim them."
function
(repeat function)))
(defcustom gnus-subscribe-newsgroup-hooks nil
(define-obsolete-variable-alias 'gnus-subscribe-newsgroup-hooks
'gnus-subscribe-newsgroup-functions "24.3")
(defcustom gnus-subscribe-newsgroup-functions nil
"*Hooks run after you subscribe to a new group.
The hooks will be called with new group's name as argument."
:version "22.1"
@ -639,7 +641,7 @@ the first newsgroup."
gnus-level-killed (gnus-group-entry (or next "dummy.group")))
(gnus-request-update-group-status newsgroup 'subscribe)
(gnus-message 5 "Subscribe newsgroup: %s" newsgroup)
(run-hook-with-args 'gnus-subscribe-newsgroup-hooks newsgroup)
(run-hook-with-args 'gnus-subscribe-newsgroup-functions newsgroup)
t))
(defun gnus-read-active-file-p ()

View file

@ -179,22 +179,28 @@ In order to make this clear, here are some examples:
:group 'nndiary)
(defcustom nndiary-request-create-group-hooks nil
"*Hooks to run after `nndiary-request-create-group' is executed.
The hooks will be called with the full group name as argument."
(define-obsolete-variable-alias 'nndiary-request-create-group-hooks
'nndiary-request-create-group-functions "24.3")
(defcustom nndiary-request-create-group-functions nil
"*Hook run after `nndiary-request-create-group' is executed.
The hook functions will be called with the full group name as argument."
:group 'nndiary
:type 'hook)
(defcustom nndiary-request-update-info-hooks nil
"*Hooks to run after `nndiary-request-update-info-group' is executed.
The hooks will be called with the full group name as argument."
(define-obsolete-variable-alias 'nndiary-request-update-info-hooks
'nndiary-request-update-info-functions "24.3")
(defcustom nndiary-request-update-info-functions nil
"*Hook run after `nndiary-request-update-info-group' is executed.
The hook functions will be called with the full group name as argument."
:group 'nndiary
:type 'hook)
(defcustom nndiary-request-accept-article-hooks nil
"*Hooks to run before accepting an article.
(define-obsolete-variable-alias 'nndiary-request-accept-article-hooks
'nndiary-request-accept-article-functions "24.3")
(defcustom nndiary-request-accept-article-functions nil
"*Hook run before accepting an article.
Executed near the beginning of `nndiary-request-accept-article'.
The hooks will be called with the article in the current buffer."
The hook functions will be called with the article in the current buffer."
:group 'nndiary
:type 'hook)
@ -541,7 +547,7 @@ all. This may very well take some time.")
(setcar active (apply 'min articles))
(setcdr active (apply 'max articles))))
(nnmail-save-active nndiary-group-alist nndiary-active-file)
(run-hook-with-args 'nndiary-request-create-group-hooks
(run-hook-with-args 'nndiary-request-create-group-functions
(gnus-group-prefixed-name group
(list "nndiary" server)))
t))
@ -633,7 +639,7 @@ all. This may very well take some time.")
(deffoo nndiary-request-accept-article (group &optional server last)
(nndiary-possibly-change-directory group server)
(nnmail-check-syntax)
(run-hooks 'nndiary-request-accept-article-hooks)
(run-hooks 'nndiary-request-accept-article-functions)
(when (nndiary-schedule)
(let (result)
(when nnmail-cache-accepted-message-ids
@ -804,7 +810,7 @@ all. This may very well take some time.")
(gnus-info-set-read info (gnus-update-read-articles
(gnus-info-group info) unread t)))
))
(run-hook-with-args 'nndiary-request-update-info-hooks
(run-hook-with-args 'nndiary-request-update-info-functions
(gnus-info-group info))
t))

View file

@ -249,7 +249,8 @@ when not running under a window system."
:tag "init-kludge-hooks"
:type '(hook))
(defcustom hfy-post-html-hooks nil
(define-obsolete-variable-alias 'hfy-post-html-hooks 'hfy-post-html-hook "24.3")
(defcustom hfy-post-html-hook nil
"List of functions to call after creating and filling the HTML buffer.
These functions will be called with the HTML buffer as the current buffer."
:group 'htmlfontify
@ -1786,7 +1787,7 @@ FILE, if set, is the file name."
;;(message "inserting footer")
(insert (funcall hfy-page-footer file)))
;; call any post html-generation hooks:
(run-hooks 'hfy-post-html-hooks)
(run-hooks 'hfy-post-html-hook)
;; return the html buffer
(set-buffer-modified-p nil)
html-buffer))

View file

@ -308,8 +308,17 @@ be determined."
"Determine the type of image file FILE from its name.
Value is a symbol specifying the image type, or nil if type cannot
be determined."
(assoc-default file image-type-file-name-regexps 'string-match-p))
(let (type first)
(or
(catch 'found
(dolist (elem image-type-file-name-regexps)
(when (string-match-p (car elem) file)
(setq type (cdr elem))
(or first (setq first type))
(if (image-type-available-p type)
(throw 'found type)))))
;; If nothing seems to be supported, return the first type that matched.
first)))
;;;###autoload
(defun image-type (source &optional type data-p)
@ -798,7 +807,7 @@ to enable all types that ImageMagick supports.
The variable `imagemagick-types-inhibit' overrides this variable.
If you change this without outside of Customize, you must call
If you change this without using customize, you must call
`imagemagick-register-types' afterwards.
If Emacs is compiled without ImageMagick support, this variable

View file

@ -243,15 +243,14 @@ Used by `mail-yank-original' via `mail-indent-citation'."
:type 'integer
:group 'sendmail)
;; FIXME make it really obsolete.
(defvar mail-yank-hooks nil
"Obsolete hook for modifying a citation just inserted in the mail buffer.
Each hook function can find the citation between (point) and (mark t).
And each hook function should leave point and mark around the citation
text as modified.
This is a normal hook, misnamed for historical reasons.
It is semi-obsolete and mail agents should no longer use it.")
It is obsolete and mail agents should no longer use it.")
(make-obsolete-variable 'mail-yank-hooks 'mail-citation-hook "19.34")
;;;###autoload
(defcustom mail-citation-hook nil

View file

@ -1,3 +1,7 @@
2012-10-23 Stefan Monnier <monnier@iro.umontreal.ca>
* mh-letter.el (mh-yank-hooks): Use make-obsolete-variable.
2012-04-25 Stefan Monnier <monnier@iro.umontreal.ca>
* mh-utils.el (minibuffer-completing-file-name): Don't declare, unused.

View file

@ -3189,7 +3189,9 @@ function used to insert the signature with
:group 'mh-letter
:package-version '(MH-E . "8.0"))
(defcustom-mh mh-kill-folder-suppress-prompt-hooks '(mh-search-p)
(define-obsolete-variable-alias 'mh-kill-folder-suppress-prompt-hooks
'mh-kill-folder-suppress-prompt-functions "24.3")
(defcustom-mh mh-kill-folder-suppress-prompt-functions '(mh-search-p)
"Abnormal hook run at the beginning of \\<mh-folder-mode-map>\\[mh-kill-folder].
The hook functions are called with no arguments and should return

View file

@ -66,8 +66,9 @@ Each hook function can find the citation between point and mark.
And each hook function should leave point and mark around the
citation text as modified.
This is a normal hook, misnamed for historical reasons. It is
semi-obsolete and is only used if `mail-citation-hook' is nil.")
This is a normal hook, misnamed for historical reasons.
It is obsolete and is only used if `mail-citation-hook' is nil.")
(make-obsolete-variable 'mh-yank-hooks 'mail-citation-hook "19.34")

View file

@ -871,6 +871,7 @@ completion candidates than this number."
(defvar completion-all-sorted-completions nil)
(make-variable-buffer-local 'completion-all-sorted-completions)
(defvar-local completion--all-sorted-completions-location nil)
(defvar completion-cycling nil)
(defvar completion-fail-discreetly nil
@ -1048,14 +1049,19 @@ scroll the window of possible completions."
(defun completion--cache-all-sorted-completions (comps)
(add-hook 'after-change-functions
'completion--flush-all-sorted-completions nil t)
'completion--flush-all-sorted-completions nil t)
(setq completion--all-sorted-completions-location
(cons (copy-marker (field-beginning)) (copy-marker (field-end))))
(setq completion-all-sorted-completions comps))
(defun completion--flush-all-sorted-completions (&rest _ignore)
(remove-hook 'after-change-functions
'completion--flush-all-sorted-completions t)
(setq completion-cycling nil)
(setq completion-all-sorted-completions nil))
(defun completion--flush-all-sorted-completions (&optional start end _len)
(unless (and start end
(or (> start (cdr completion--all-sorted-completions-location))
(< end (car completion--all-sorted-completions-location))))
(remove-hook 'after-change-functions
'completion--flush-all-sorted-completions t)
(setq completion-cycling nil)
(setq completion-all-sorted-completions nil)))
(defun completion--metadata (string base md-at-point table pred)
;; Like completion-metadata, but for the specific case of getting the
@ -1758,7 +1764,10 @@ exit."
(when completion-in-region-mode-predicate
(completion-in-region-mode 1)
(setq completion-in-region--data
(list (current-buffer) start end collection)))
(list (if (markerp start) start (copy-marker start))
(copy-marker end) collection)))
;; FIXME: `minibuffer-complete' should call `completion-in-region' rather
;; than the other way around!
(unwind-protect
(call-interactively 'minibuffer-complete)
(delete-overlay ol)))))
@ -1782,12 +1791,12 @@ exit."
(or unread-command-events ;Don't pop down the completions in the middle of
;mouse-drag-region/mouse-set-point.
(and completion-in-region--data
(and (eq (car completion-in-region--data)
(and (eq (marker-buffer (nth 0 completion-in-region--data))
(current-buffer))
(>= (point) (nth 1 completion-in-region--data))
(>= (point) (nth 0 completion-in-region--data))
(<= (point)
(save-excursion
(goto-char (nth 2 completion-in-region--data))
(goto-char (nth 1 completion-in-region--data))
(line-end-position)))
(funcall completion-in-region-mode--predicate)))
(completion-in-region-mode -1)))
@ -1892,17 +1901,19 @@ The completion method is determined by `completion-at-point-functions'."
(let ((res (run-hook-wrapped 'completion-at-point-functions
#'completion--capf-wrapper 'all)))
(pcase res
(`(,_ . ,(and (pred functionp) f)) (funcall f))
(`(,hookfun . (,start ,end ,collection . ,plist))
(let* ((completion-extra-properties plist)
(completion-in-region-mode-predicate
(lambda ()
;; We're still in the same completion field.
(eq (car-safe (funcall hookfun)) start))))
(completion-in-region start end collection
(plist-get plist :predicate))))
;; Maybe completion already happened and the function returned t.
(_ (cdr res)))))
(`(,_ . ,(and (pred functionp) f)) (funcall f))
(`(,hookfun . (,start ,end ,collection . ,plist))
(unless (markerp start) (setq start (copy-marker start)))
(let* ((completion-extra-properties plist)
(completion-in-region-mode-predicate
(lambda ()
;; We're still in the same completion field.
(let ((newstart (car-safe (funcall hookfun))))
(and newstart (= newstart start))))))
(completion-in-region start end collection
(plist-get plist :predicate))))
;; Maybe completion already happened and the function returned t.
(_ (cdr res)))))
(defun completion-help-at-point ()
"Display the completions on the text around point.
@ -1914,32 +1925,34 @@ The completion method is determined by `completion-at-point-functions'."
(pcase res
(`(,_ . ,(and (pred functionp) f))
(message "Don't know how to show completions for %S" f))
(`(,hookfun . (,start ,end ,collection . ,plist))
(let* ((minibuffer-completion-table collection)
(minibuffer-completion-predicate (plist-get plist :predicate))
(completion-extra-properties plist)
(completion-in-region-mode-predicate
(lambda ()
;; We're still in the same completion field.
(eq (car-safe (funcall hookfun)) start)))
(ol (make-overlay start end nil nil t)))
;; FIXME: We should somehow (ab)use completion-in-region-function or
;; introduce a corresponding hook (plus another for word-completion,
;; and another for force-completion, maybe?).
(overlay-put ol 'field 'completion)
(overlay-put ol 'priority 100)
(completion-in-region-mode 1)
(setq completion-in-region--data
(list (current-buffer) start end collection))
(unwind-protect
(call-interactively 'minibuffer-completion-help)
(delete-overlay ol))))
(`(,hookfun . ,_)
;; The hook function already performed completion :-(
;; Not much we can do at this point.
(message "%s already performed completion!" hookfun)
nil)
(_ (message "Nothing to complete at point")))))
(`(,hookfun . (,start ,end ,collection . ,plist))
(unless (markerp start) (setq start (copy-marker start)))
(let* ((minibuffer-completion-table collection)
(minibuffer-completion-predicate (plist-get plist :predicate))
(completion-extra-properties plist)
(completion-in-region-mode-predicate
(lambda ()
;; We're still in the same completion field.
(let ((newstart (car-safe (funcall hookfun))))
(and newstart (= newstart start)))))
(ol (make-overlay start end nil nil t)))
;; FIXME: We should somehow (ab)use completion-in-region-function or
;; introduce a corresponding hook (plus another for word-completion,
;; and another for force-completion, maybe?).
(overlay-put ol 'field 'completion)
(overlay-put ol 'priority 100)
(completion-in-region-mode 1)
(setq completion-in-region--data
(list start (copy-marker end) collection))
(unwind-protect
(call-interactively 'minibuffer-completion-help)
(delete-overlay ol))))
(`(,hookfun . ,_)
;; The hook function already performed completion :-(
;; Not much we can do at this point.
(message "%s already performed completion!" hookfun)
nil)
(_ (message "Nothing to complete at point")))))
;;; Key bindings.

View file

@ -152,7 +152,9 @@ Otherwise, return result of last form in BODY, or all other errors."
(dbus-error (when dbus-debug (signal (car err) (cdr err))))))
(font-lock-add-keywords 'emacs-lisp-mode '("\\<dbus-ignore-errors\\>"))
(defvar dbus-event-error-hooks nil
(define-obsolete-variable-alias 'dbus-event-error-hooks
'dbus-event-error-functions "24.3")
(defvar dbus-event-error-functions nil
"Functions to be called when a D-Bus error happens in the event handler.
Every function must accept two arguments, the event and the error variable
caught in `condition-case' by `dbus-error'.")
@ -947,7 +949,7 @@ If the HANDLER returns a `dbus-error', it is propagated as return message."
(dbus-method-error-internal
(nth 1 event) (nth 4 event) (nth 3 event) (cadr err))))
;; Propagate D-Bus error messages.
(run-hook-with-args 'dbus-event-error-hooks event err)
(run-hook-with-args 'dbus-event-error-functions event err)
(when (or dbus-debug (= dbus-message-type-error (nth 2 event)))
(signal (car err) (cdr err))))))

View file

@ -300,7 +300,9 @@ See `rcirc-dim-nick' face."
:type '(repeat string)
:group 'rcirc)
(defcustom rcirc-print-hooks nil
(define-obsolete-variable-alias 'rcirc-print-hooks
'rcirc-print-functions "24.3")
(defcustom rcirc-print-functions nil
"Hook run after text is printed.
Called with 5 arguments, PROCESS, SENDER, RESPONSE, TARGET and TEXT."
:type 'hook
@ -647,7 +649,9 @@ is non-nil."
"] "
text)))))
(defvar rcirc-sentinel-hooks nil
(define-obsolete-variable-alias 'rcirc-sentinel-hooks
'rcirc-sentinel-functions "24.3")
(defvar rcirc-sentinel-functions nil
"Hook functions called when the process sentinel is called.
Functions are called with PROCESS and SENTINEL arguments.")
@ -664,7 +668,7 @@ Functions are called with PROCESS and SENTINEL arguments.")
sentinel
(process-status process)) (not rcirc-target))
(rcirc-disconnect-buffer)))
(run-hook-with-args 'rcirc-sentinel-hooks process sentinel))))
(run-hook-with-args 'rcirc-sentinel-functions process sentinel))))
(defun rcirc-disconnect-buffer (&optional buffer)
(with-current-buffer (or buffer (current-buffer))
@ -684,7 +688,9 @@ Functions are called with PROCESS and SENTINEL arguments.")
(process-list))
ps))
(defvar rcirc-receive-message-hooks nil
(define-obsolete-variable-alias 'rcirc-receive-message-hooks
'rcirc-receive-message-functions "24.3")
(defvar rcirc-receive-message-functions nil
"Hook functions run when a message is received from server.
Function is called with PROCESS, COMMAND, SENDER, ARGS and LINE.")
(defun rcirc-filter (process output)
@ -738,7 +744,7 @@ Function is called with PROCESS, COMMAND, SENDER, ARGS and LINE.")
(if (not (fboundp handler))
(rcirc-handler-generic process cmd sender args text)
(funcall handler process sender args text))
(run-hook-with-args 'rcirc-receive-message-hooks
(run-hook-with-args 'rcirc-receive-message-functions
process cmd sender args text)))
(message "UNHANDLED: %s" text)))
@ -1625,7 +1631,7 @@ record activity."
(rcirc-log process sender response target text))
(sit-for 0) ; displayed text before hook
(run-hook-with-args 'rcirc-print-hooks
(run-hook-with-args 'rcirc-print-functions
process sender response target text)))))
(defun rcirc-generate-log-filename (process target)
@ -1927,7 +1933,9 @@ With prefix ARG, go to the next low priority buffer with activity."
(key-description (this-command-keys))
" for low priority activity."))))))))
(defvar rcirc-activity-hooks nil
(define-obsolete-variable-alias 'rcirc-activity-hooks
'rcirc-activity-functions "24.3")
(defvar rcirc-activity-functions nil
"Hook to be run when there is channel activity.
Functions are called with a single argument, the buffer with the
@ -1950,7 +1958,7 @@ activity. Only run if the buffer is not visible and
(unless (and (equal rcirc-activity old-activity)
(member type old-types))
(rcirc-update-activity-string)))))
(run-hook-with-args 'rcirc-activity-hooks buffer))
(run-hook-with-args 'rcirc-activity-functions buffer))
(defun rcirc-clear-activity (buffer)
"Clear the BUFFER activity."

View file

@ -1677,11 +1677,11 @@ If ARGUMENT is non-nil, use it as argument for
(tramp-set-connection-property
vec "smbserver-version" smbserver-version))))
;; Set chunksize. Otherwise, `tramp-send-string' might
;; try it itself.
;; Set chunksize to 1. smbclient reads its input
;; character by character; if we send the string
;; at once, it is read painfully slow.
(tramp-set-connection-property p "smb-share" share)
(tramp-set-connection-property
p "chunksize" tramp-chunksize))
(tramp-set-connection-property p "chunksize" 1))
;; Check for the error reason. If it was due to wrong
;; password, reestablish the connection. We cannot
@ -1717,7 +1717,7 @@ Returns nil if an error message has appeared."
(while (and (not found) (not err) (memq (process-status p) '(run open)))
;; Accept pending output.
(tramp-accept-process-output p)
(tramp-accept-process-output p 0.1)
;; Search for prompt.
(goto-char (point-min))
@ -1731,7 +1731,7 @@ Returns nil if an error message has appeared."
(while (and (not found) (memq (process-status p) '(run open)))
;; Accept pending output.
(tramp-accept-process-output p)
(tramp-accept-process-output p 0.1)
;; Search for prompt.
(goto-char (point-min))

View file

@ -24,7 +24,13 @@
;;; Commentary:
;; A replacement for simple.el's comment-related functions.
;; This library contains functions and variables for commenting and
;; uncommenting source code.
;; Prior to calling any `comment-*' function, you should ensure that
;; `comment-normalize-vars' is first called to set up the appropriate
;; variables; except for the `comment-*' commands, which call
;; `comment-normalize-vars' automatically as a subroutine.
;;; Bugs:
@ -326,10 +332,11 @@ terminated by the end of line (i.e. `comment-end' is empty)."
;;;###autoload
(defun comment-normalize-vars (&optional noerror)
"Check and setup the variables needed by other commenting functions.
Any command calling functions from newcomment.el should call this function
before any other, so the rest of the code can assume that the variables are
properly set."
"Check and set up variables needed by other commenting functions.
All the `comment-*' commands call this function to set up various
variables, like `comment-start', to ensure that the commenting
functions work correctly. Lisp callers of any other `comment-*'
function should first call this function explicitly."
(unless (and (not comment-start) noerror)
(unless comment-start
(let ((cs (read-string "No comment syntax is defined. Use: ")))

View file

@ -1703,7 +1703,9 @@ Key bindings:
(message "Using CC Mode version %s" c-version)
(c-keep-region-active))
(defvar c-prepare-bug-report-hooks nil)
(define-obsolete-variable-alias 'c-prepare-bug-report-hooks
'c-prepare-bug-report-hook "24.3")
(defvar c-prepare-bug-report-hook nil)
;; Dynamic variables used by reporter.
(defvar reporter-prompt-for-summary-p)
@ -1770,7 +1772,7 @@ Key bindings:
lookup-syntax-properties))
vars)
(lambda ()
(run-hooks 'c-prepare-bug-report-hooks)
(run-hooks 'c-prepare-bug-report-hook)
(insert (format "Buffer Style: %s\nc-emacs-features: %s\n"
style c-features)))))))

View file

@ -1568,12 +1568,20 @@ Returns the compilation buffer created."
;; Then evaluate a cd command if any, but don't perform it yet, else
;; start-command would do it again through the shell: (cd "..") AND
;; sh -c "cd ..; make"
(cd (if (string-match "\\`\\s *cd\\(?:\\s +\\(\\S +?\\)\\)?\\s *[;&\n]"
command)
(if (match-end 1)
(substitute-env-vars (match-string 1 command))
"~")
default-directory))
(cd (cond
((not (string-match "\\`\\s *cd\\(?:\\s +\\(\\S +?\\|'[^']*'\\|\"\\(?:[^\"`$\\]\\|\\\\.\\)*\"\\)\\)?\\s *[;&\n]"
command))
default-directory)
((not (match-end 1)) "~")
((eq (aref command (match-beginning 1)) ?\')
(substring command (1+ (match-beginning 1))
(1- (match-end 1))))
((eq (aref command (match-beginning 1)) ?\")
(replace-regexp-in-string
"\\\\\\(.\\)" "\\1"
(substring command (1+ (match-beginning 1))
(1- (match-end 1)))))
(t (substitute-env-vars (match-string 1 command)))))
(erase-buffer)
;; Select the desired mode.
(if (not (eq mode t))

View file

@ -148,7 +148,8 @@ Used to gray out relevant toolbar icons.")
([run] menu-item "Run" gud-run
:enable (not gud-running)
:visible (memq gud-minor-mode '(gdbmi gdb dbx jdb)))
([go] menu-item (if gdb-active-process "Continue" "Run") gud-go
([go] menu-item (if (bound-and-true-p gdb-active-process)
"Continue" "Run") gud-go
:visible (and (eq gud-minor-mode 'gdbmi)
(gdb-show-run-p)))
([stop] menu-item "Stop" gud-stop-subjob
@ -178,7 +179,7 @@ Used to gray out relevant toolbar icons.")
'(gdbmi gdb dbx xdb jdb pdb)))
([pp] menu-item "Print S-expression" gud-pp
:enable (and (not gud-running)
gdb-active-process)
(bound-and-true-p gdb-active-process))
:visible (and (string-equal
(buffer-local-value
'gud-target-name gud-comint-buffer) "emacs")

View file

@ -182,7 +182,8 @@ and you want to simplify them for the mode line
(defconst which-func-current
'(:eval (replace-regexp-in-string
"%" "%%"
(gethash (selected-window) which-func-table which-func-unknown))))
(or (gethash (selected-window) which-func-table)
which-func-unknown))))
;;;###autoload (put 'which-func-current 'risky-local-variable t)
(defvar which-func-mode nil

View file

@ -289,6 +289,10 @@ recently executed command not bound to an input event\"."
(interactive)
(let ((repeat-message-function fun))
(setq this-command 'repeat)
;; Beware: messing with `real-this-command' is *bad*, but we
;; need it so `last-repeatable-command' can be recognized
;; later (bug#12232).
(setq real-this-command 'repeat)
(call-interactively 'repeat))))))
map)))))

View file

@ -971,7 +971,6 @@ Amongst another things, it parses the command-line arguments."
(not (eq 0 (cdr tool-bar-lines)))))))
(let ((old-scalable-fonts-allowed scalable-fonts-allowed)
(old-font-list-limit font-list-limit)
(old-face-ignored-fonts face-ignored-fonts))
;; Run the site-start library if it exists. The point of this file is
@ -1162,7 +1161,6 @@ the `--debug-init' option to view a complete error backtrace."
;; face realization, clear the face cache so that new faces will
;; be realized.
(unless (and (eq scalable-fonts-allowed old-scalable-fonts-allowed)
(eq font-list-limit old-font-list-limit)
(eq face-ignored-fonts old-face-ignored-fonts))
(clear-face-cache)))

View file

@ -1260,12 +1260,10 @@ is converted into a string by expressing it in decimal."
(define-obsolete-variable-alias 'executing-macro 'executing-kbd-macro
"before 19.34")
(defvaralias 'x-lost-selection-hooks 'x-lost-selection-functions)
(make-obsolete-variable 'x-lost-selection-hooks
'x-lost-selection-functions "22.1")
(defvaralias 'x-sent-selection-hooks 'x-sent-selection-functions)
(make-obsolete-variable 'x-sent-selection-hooks
'x-sent-selection-functions "22.1")
(define-obsolete-variable-alias 'x-lost-selection-hooks
'x-lost-selection-functions "22.1")
(define-obsolete-variable-alias 'x-sent-selection-hooks
'x-sent-selection-functions "22.1")
;; This was introduced in 21.4 for pre-unicode unification. That
;; usage was rendered obsolete in 23.1 which uses Unicode internally.
@ -3151,7 +3149,7 @@ in which case `save-window-excursion' cannot help."
(unwind-protect (progn ,@body)
(set-window-configuration ,c)))))
(defun temp-output-buffer-show (buffer)
(defun internal-temp-output-buffer-show (buffer)
"Internal function for `with-output-to-temp-buffer'."
(with-current-buffer buffer
(set-buffer-modified-p nil)
@ -3235,7 +3233,7 @@ if it uses `temp-buffer-show-function'."
(run-hooks 'temp-buffer-setup-hook)))))
(standard-output ,buf))
(prog1 (progn ,@body)
(temp-output-buffer-show ,buf)))))
(internal-temp-output-buffer-show ,buf)))))
(defmacro with-temp-file (file &rest body)
"Create a new buffer, evaluate BODY there, and write the buffer to FILE.

View file

@ -123,6 +123,7 @@
(defvar sun-raw-prefix-hooks nil
"List of forms to evaluate after setting sun-raw-prefix.")
(make-obsolete-variable 'sun-raw-prefix-hooks 'term-setup-hook "21.1")

View file

@ -581,8 +581,9 @@ next hunk if TRY-HARDER is non-nil; otherwise signal an error."
(with-local-quit
(when (buffer-live-p buffer)
(with-current-buffer buffer
(goto-char point)
(diff-refine-hunk))))))))))
(save-excursion
(goto-char point)
(diff-refine-hunk)))))))))))
(easy-mmode-define-navigation
diff-file diff-file-header-re "file" diff-end-of-file)

View file

@ -217,8 +217,9 @@ This can be toggled with `ediff-toggle-filename-truncation'."
:type 'hook
:group 'ediff-mult)
(defcustom ediff-before-session-group-setup-hooks nil
"Hooks to run before Ediff arranges the window for group-level operations.
(defcustom ediff-before-session-group-setup-hooks
nil ;FIXME: Bad name (should be -hook or -functions) and never run??
"Hook run before Ediff arranges the window for group-level operations.
It is used by commands such as `ediff-directories'.
This hook can be used to save the previous window config, which can be restored
on `ediff-quit', `ediff-suspend', or `ediff-quit-session-group-hook'."

View file

@ -5828,7 +5828,7 @@ buffer with the name BUFFER-OR-NAME and return that buffer."
"If non-nil, `switch-to-buffer' tries to preserve `window-point'.
If this is nil, `switch-to-buffer' displays the buffer at that
buffer's `point'. If this is `already-displayed', it tries to
display the buffer at its pevious position in the selected
display the buffer at its previous position in the selected
window, provided the buffer is currently displayed in some other
window on any visible or iconified frame. If this is t, it
unconditionally tries to display the buffer at its previous

View file

@ -1,3 +1,50 @@
2012-10-23 Kenichi Handa <handa@gnu.org>
The following change is to make face-font-rescale-alist work
correctly for non-ASCII fonts.
* font.c (font_open_entity): Don't handle Vface_font_rescale_alist.
(font_open_for_lface): Handle Vface_font_rescale_alist.
2012-10-23 Chong Yidong <cyd@gnu.org>
* xfaces.c (Vfont_list_limit): Move unused variable to faces.el.
2012-10-21 Jan Djärv <jan.h.d@swipnet.se>
* nsfont.m (nsfont_open, ns_glyph_metrics): Force integer advancement
for screen font.
(nsfont_draw): Turn off LCD-smoothing (Bug#11484).
* xterm.c (x_focus_changed): Check if daemonp when sending focus in
event (Bug#12681).
2012-10-21 Glenn Morris <rgm@gnu.org>
* lisp.mk (lisp): Add cp51932.el and eucjp-ms.el.
2012-10-20 Paul Eggert <eggert@cs.ucla.edu>
Port to OpenBSD 5.1.
* frame.c (Fmouse_position, Fmouse_pixel_position):
* xdisp.c (produce_stretch_glyph):
Declare local vars only when they're needed.
This is clearer and avoids a warning on OpenBSD about unused vars.
* frame.h (FRAME_WINDOW_P): Always evaluate its argument.
This is safer, and avoids OpenBSD warnings about unused vars.
* keyboard.c (record_menu_key): Remove unnecessary decl.
(poll_timer): Define only if POLL_FOR_INPUT is defined.
* unexelf.c (ELFSIZE) [!ElfW]: Do not define if already defined,
as our definition clashes with OpenBSD's.
* xfaces.c (load_face_colors, check_lface_attrs)
(get_lface_attributes_no_remap, get_lface_attributes)
(lface_fully_specified_p, x_supports_face_attributes_p)
(tty_supports_face_attributes_p, face_fontset, realize_face)
(realize_x_face, realize_tty_face):
Declare parameters to be Lisp_Object[LFACE_VECTOR_SIZE], not
merely Lisp_Object *. This is more informative and avoids
a warning on OpenBSD about accessing beyond an object's size.
2012-10-20 Chong Yidong <cyd@gnu.org>
* lread.c (Fload): Doc fix (Bug#12592).

View file

@ -2816,14 +2816,11 @@ font_open_entity (FRAME_PTR f, Lisp_Object entity, int pixel_size)
Lisp_Object objlist, size, val, font_object;
struct font *font;
int min_width, height;
int scaled_pixel_size = pixel_size;
eassert (FONT_ENTITY_P (entity));
size = AREF (entity, FONT_SIZE_INDEX);
if (XINT (size) != 0)
scaled_pixel_size = pixel_size = XINT (size);
else if (CONSP (Vface_font_rescale_alist))
scaled_pixel_size = pixel_size * font_rescale_ratio (entity);
pixel_size = XINT (size);
val = AREF (entity, FONT_TYPE_INDEX);
for (driver_list = f->font_driver_list;
@ -2845,7 +2842,7 @@ font_open_entity (FRAME_PTR f, Lisp_Object entity, int pixel_size)
}
}
font_object = driver_list->driver->open (f, entity, scaled_pixel_size);
font_object = driver_list->driver->open (f, entity, pixel_size);
if (!NILP (font_object))
ASET (font_object, FONT_SIZE_INDEX, make_number (pixel_size));
FONT_ADD_LOG ("open", entity, font_object);
@ -3230,31 +3227,36 @@ font_open_for_lface (FRAME_PTR f, Lisp_Object entity, Lisp_Object *attrs, Lisp_O
if (INTEGERP (AREF (entity, FONT_SIZE_INDEX))
&& XINT (AREF (entity, FONT_SIZE_INDEX)) > 0)
size = XINT (AREF (entity, FONT_SIZE_INDEX));
else if (FONT_SPEC_P (spec) && ! NILP (AREF (spec, FONT_SIZE_INDEX)))
size = font_pixel_size (f, spec);
else
{
double pt;
if (INTEGERP (attrs[LFACE_HEIGHT_INDEX]))
pt = XINT (attrs[LFACE_HEIGHT_INDEX]);
if (FONT_SPEC_P (spec) && ! NILP (AREF (spec, FONT_SIZE_INDEX)))
size = font_pixel_size (f, spec);
else
{
struct face *def = FACE_FROM_ID (f, DEFAULT_FACE_ID);
Lisp_Object height = def->lface[LFACE_HEIGHT_INDEX];
eassert (INTEGERP (height));
pt = XINT (height);
}
double pt;
if (INTEGERP (attrs[LFACE_HEIGHT_INDEX]))
pt = XINT (attrs[LFACE_HEIGHT_INDEX]);
else
{
struct face *def = FACE_FROM_ID (f, DEFAULT_FACE_ID);
Lisp_Object height = def->lface[LFACE_HEIGHT_INDEX];
eassert (INTEGERP (height));
pt = XINT (height);
}
pt /= 10;
size = POINT_TO_PIXEL (pt, f->resy);
pt /= 10;
size = POINT_TO_PIXEL (pt, f->resy);
#ifdef HAVE_NS
if (size == 0)
{
Lisp_Object ffsize = get_frame_param (f, Qfontsize);
size = NUMBERP (ffsize) ? POINT_TO_PIXEL (XINT (ffsize), f->resy) : 0;
}
if (size == 0)
{
Lisp_Object ffsize = get_frame_param (f, Qfontsize);
size = NUMBERP (ffsize) ? POINT_TO_PIXEL (XINT (ffsize), f->resy) : 0;
}
#endif
}
size *= font_rescale_ratio (entity);
}
return font_open_entity (f, entity, size);
}

View file

@ -1501,10 +1501,7 @@ and returns whatever that function returns. */)
{
FRAME_PTR f;
Lisp_Object lispy_dummy;
enum scroll_bar_part party_dummy;
Lisp_Object x, y, retval;
int col, row;
Time long_dummy;
struct gcpro gcpro1;
f = SELECTED_FRAME ();
@ -1513,14 +1510,19 @@ and returns whatever that function returns. */)
#if defined (HAVE_MOUSE) || defined (HAVE_GPM)
/* It's okay for the hook to refrain from storing anything. */
if (FRAME_TERMINAL (f)->mouse_position_hook)
(*FRAME_TERMINAL (f)->mouse_position_hook) (&f, -1,
&lispy_dummy, &party_dummy,
&x, &y,
&long_dummy);
{
enum scroll_bar_part party_dummy;
Time time_dummy;
(*FRAME_TERMINAL (f)->mouse_position_hook) (&f, -1,
&lispy_dummy, &party_dummy,
&x, &y,
&time_dummy);
}
if (! NILP (x))
{
col = XINT (x);
row = XINT (y);
int col = XINT (x);
int row = XINT (y);
pixel_to_glyph_coords (f, col, row, &col, &row, NULL, 1);
XSETINT (x, col);
XSETINT (y, row);
@ -1547,9 +1549,7 @@ and nil for X and Y. */)
{
FRAME_PTR f;
Lisp_Object lispy_dummy;
enum scroll_bar_part party_dummy;
Lisp_Object x, y;
Time long_dummy;
f = SELECTED_FRAME ();
x = y = Qnil;
@ -1557,10 +1557,15 @@ and nil for X and Y. */)
#if defined (HAVE_MOUSE) || defined (HAVE_GPM)
/* It's okay for the hook to refrain from storing anything. */
if (FRAME_TERMINAL (f)->mouse_position_hook)
(*FRAME_TERMINAL (f)->mouse_position_hook) (&f, -1,
&lispy_dummy, &party_dummy,
&x, &y,
&long_dummy);
{
enum scroll_bar_part party_dummy;
Time time_dummy;
(*FRAME_TERMINAL (f)->mouse_position_hook) (&f, -1,
&lispy_dummy, &party_dummy,
&x, &y,
&time_dummy);
}
#endif
XSETFRAME (lispy_dummy, f);
return Fcons (lispy_dummy, Fcons (x, y));

View file

@ -646,7 +646,7 @@ typedef struct frame *FRAME_PTR;
#define FRAME_WINDOW_P(f) FRAME_NS_P(f)
#endif
#ifndef FRAME_WINDOW_P
#define FRAME_WINDOW_P(f) (0)
#define FRAME_WINDOW_P(f) ((void) (f), 0)
#endif
/* Return a pointer to the structure holding information about the

View file

@ -368,7 +368,6 @@ static Lisp_Object command_loop (void);
static Lisp_Object Qextended_command_history;
EMACS_TIME timer_check (void);
static void record_menu_key (Lisp_Object c);
static void echo_now (void);
static ptrdiff_t echo_length (void);
@ -1966,13 +1965,13 @@ safe_run_hooks (Lisp_Object hook)
int poll_suppress_count;
#ifdef POLL_FOR_INPUT
/* Asynchronous timer for polling. */
static struct atimer *poll_timer;
#ifdef POLL_FOR_INPUT
/* Poll for input, so that we catch a C-g if it comes in. This
function is called from x_make_frame_visible, see comment
there. */

View file

@ -308,7 +308,7 @@ enum Lisp_Fwd_Type
First, there are already a couple of Lisp types that can be used if
your new type does not need to be exposed to Lisp programs nor
displayed to users. These are Lisp_Save_Value, a Lisp_Misc
subtype, and PVEC_OTHER, a kind of vectorlike object. The former
subtype; and PVEC_OTHER, a kind of vectorlike object. The former
is suitable for temporarily stashing away pointers and integers in
a Lisp object (see the existing uses of make_save_value and
XSAVE_VALUE). The latter is useful for vector-like Lisp objects
@ -322,7 +322,7 @@ enum Lisp_Fwd_Type
To define a new data type, add one more Lisp_Misc subtype or one
more pseudovector subtype. Pseudovectors are more suitable for
objects with several slots that need to support fast random access,
whil Lisp_Misc types are foreverything else. A pseudovector object
while Lisp_Misc types are for everything else. A pseudovector object
provides one or more slots for Lisp objects, followed by struct
members that are accessible only from C. A Lisp_Misc object is a
wrapper for a C struct that can contain anything you like.

View file

@ -35,7 +35,8 @@
## no-byte-compile ones.
## Confusingly, term/internal is not in loadup, but is unconditionally
## loaded by pc-win, which is.
## loaded by pc-win, which is. Ditto for international/cp51932 and
## international/eucjp-ms, loaded from language/japanese.
## Note that this list should not include lisp files which might not
## be present, like site-load.el and site-init.el; this makefile
@ -94,6 +95,8 @@ lisp = \
$(lispsource)/language/greek.elc \
$(lispsource)/language/hebrew.elc \
$(lispsource)/language/japanese.elc \
$(lispsource)/international/cp51932.el \
$(lispsource)/international/eucjp-ms.el \
$(lispsource)/language/korean.elc \
$(lispsource)/language/lao.elc \
$(lispsource)/language/tai-viet.elc \

View file

@ -797,7 +797,13 @@ when setting family in ns_spec_to_descriptor(). */
block_input ();
/* for metrics */
#ifdef NS_IMPL_COCOA
sfont = [nsfont screenFontWithRenderingMode:
NSFontAntialiasedIntegerAdvancementsRenderingMode];
#else
sfont = [nsfont screenFont];
#endif
if (sfont == nil)
sfont = nsfont;
@ -1229,6 +1235,7 @@ is false when (FROM > 0 || TO < S->nchars). */
else
CGContextSetShouldAntialias (gcontext, 1);
CGContextSetShouldSmoothFonts (gcontext, NO);
CGContextSetTextMatrix (gcontext, fliptf);
if (bgCol != nil)
@ -1372,7 +1379,12 @@ is false when (FROM > 0 || TO < S->nchars). */
#endif
block_input ();
sfont = [font_info->nsfont screenFont];
#ifdef NS_IMPL_COCOA
sfont = [font_info->nsfont screenFontWithRenderingMode:
NSFontAntialiasedIntegerAdvancementsRenderingMode];
#else
sfont = [font_info->nsfont screenFont];
#endif
font_info->metrics[block] = xzalloc (0x100 * sizeof (struct font_metrics));
if (!(font_info->metrics[block]))

View file

@ -507,10 +507,12 @@ typedef struct {
#ifndef ElfW
# define ElfBitsW(bits, type) Elf##bits##_##type
# ifdef _LP64
# define ELFSIZE 64
# else
# define ELFSIZE 32
# ifndef ELFSIZE
# ifdef _LP64
# define ELFSIZE 64
# else
# define ELFSIZE 32
# endif
# endif
/* This macro expands `bits' before invoking ElfBitsW. */
# define ElfExpandBitsW(bits, type) ElfBitsW (bits, type)

View file

@ -211,7 +211,7 @@ static void w32_show_hourglass (struct frame *);
static void w32_hide_hourglass (void);
#ifdef WINDOWSNT
/* From w32inevet.c */
/* From w32inevt.c */
extern int faked_key;
#endif /* WINDOWSNT */
@ -7711,4 +7711,3 @@ emacs_abort (void)
break;
}
}

View file

@ -24318,17 +24318,16 @@ produce_stretch_glyph (struct it *it)
Lisp_Object prop, plist;
int width = 0, height = 0, align_to = -1;
int zero_width_ok_p = 0;
int ascent = 0;
double tem;
struct face *face = NULL;
struct font *font = NULL;
#ifdef HAVE_WINDOW_SYSTEM
int ascent = 0;
int zero_height_ok_p = 0;
if (FRAME_WINDOW_P (it->f))
{
face = FACE_FROM_ID (it->f, it->face_id);
struct face *face = FACE_FROM_ID (it->f, it->face_id);
font = face->font ? face->font : FRAME_FONT (it->f);
PREPARE_FACE_FOR_DISPLAY (it->f, face);
}

View file

@ -371,8 +371,6 @@ Lisp_Object Vface_alternative_font_registry_alist;
static Lisp_Object Qscalable_fonts_allowed;
#define DEFAULT_FONT_LIST_LIMIT 100
/* The symbols `foreground-color' and `background-color' which can be
used as part of a `face' property. This is for compatibility with
Emacs 20.2. */
@ -1323,7 +1321,8 @@ load_color (struct frame *f, struct face *face, Lisp_Object name,
try to emulate gray colors with a stipple from Vface_default_stipple. */
static void
load_face_colors (struct frame *f, struct face *face, Lisp_Object *attrs)
load_face_colors (struct frame *f, struct face *face,
Lisp_Object attrs[LFACE_VECTOR_SIZE])
{
Lisp_Object fg, bg;
@ -1802,7 +1801,7 @@ the WIDTH times as wide as FACE on FRAME. */)
/* Check consistency of Lisp face attribute vector ATTRS. */
static void
check_lface_attrs (Lisp_Object *attrs)
check_lface_attrs (Lisp_Object attrs[LFACE_VECTOR_SIZE])
{
eassert (UNSPECIFIEDP (attrs[LFACE_FAMILY_INDEX])
|| IGNORE_DEFFACE_P (attrs[LFACE_FAMILY_INDEX])
@ -2049,7 +2048,8 @@ lface_from_face_name (struct frame *f, Lisp_Object face_name, int signal_p)
static int
get_lface_attributes_no_remap (struct frame *f, Lisp_Object face_name,
Lisp_Object *attrs, int signal_p)
Lisp_Object attrs[LFACE_VECTOR_SIZE],
int signal_p)
{
Lisp_Object lface;
@ -2071,7 +2071,7 @@ get_lface_attributes_no_remap (struct frame *f, Lisp_Object face_name,
static int
get_lface_attributes (struct frame *f, Lisp_Object face_name,
Lisp_Object *attrs, int signal_p,
Lisp_Object attrs[LFACE_VECTOR_SIZE], int signal_p,
struct named_merge_point *named_merge_points)
{
Lisp_Object face_remapping;
@ -2108,7 +2108,7 @@ get_lface_attributes (struct frame *f, Lisp_Object face_name,
specified, i.e. are non-nil. */
static int
lface_fully_specified_p (Lisp_Object *attrs)
lface_fully_specified_p (Lisp_Object attrs[LFACE_VECTOR_SIZE])
{
int i;
@ -4760,7 +4760,8 @@ DEFUN ("face-attributes-as-vector", Fface_attributes_as_vector,
\(2) `close in spirit' to what the attributes specify, if not exact. */
static int
x_supports_face_attributes_p (struct frame *f, Lisp_Object *attrs,
x_supports_face_attributes_p (struct frame *f,
Lisp_Object attrs[LFACE_VECTOR_SIZE],
struct face *def_face)
{
Lisp_Object *def_attrs = def_face->lface;
@ -4862,7 +4863,8 @@ x_supports_face_attributes_p (struct frame *f, Lisp_Object *attrs,
substitution of a `dim' face for italic. */
static int
tty_supports_face_attributes_p (struct frame *f, Lisp_Object *attrs,
tty_supports_face_attributes_p (struct frame *f,
Lisp_Object attrs[LFACE_VECTOR_SIZE],
struct face *def_face)
{
int weight, slant;
@ -5245,7 +5247,7 @@ be found. Value is ALIST. */)
attribute of ATTRS doesn't name a fontset. */
static int
face_fontset (Lisp_Object *attrs)
face_fontset (Lisp_Object attrs[LFACE_VECTOR_SIZE])
{
Lisp_Object name;
@ -5474,7 +5476,8 @@ realize_named_face (struct frame *f, Lisp_Object symbol, int id)
face. Value is a pointer to the newly created realized face. */
static struct face *
realize_face (struct face_cache *cache, Lisp_Object *attrs, int former_face_id)
realize_face (struct face_cache *cache, Lisp_Object attrs[LFACE_VECTOR_SIZE],
int former_face_id)
{
struct face *face;
@ -5551,7 +5554,7 @@ realize_non_ascii_face (struct frame *f, Lisp_Object font_object,
created realized face. */
static struct face *
realize_x_face (struct face_cache *cache, Lisp_Object *attrs)
realize_x_face (struct face_cache *cache, Lisp_Object attrs[LFACE_VECTOR_SIZE])
{
struct face *face = NULL;
#ifdef HAVE_WINDOW_SYSTEM
@ -5878,7 +5881,8 @@ map_tty_color (struct frame *f, struct face *face,
Value is a pointer to the newly created realized face. */
static struct face *
realize_tty_face (struct face_cache *cache, Lisp_Object *attrs)
realize_tty_face (struct face_cache *cache,
Lisp_Object attrs[LFACE_VECTOR_SIZE])
{
struct face *face;
int weight, slant;
@ -6594,12 +6598,6 @@ syms_of_xfaces (void)
defsubr (&Sdump_colors);
#endif
DEFVAR_LISP ("font-list-limit", Vfont_list_limit,
doc: /* Limit for font matching.
If an integer > 0, font matching functions won't load more than
that number of fonts when searching for a matching font. */);
Vfont_list_limit = make_number (DEFAULT_FONT_LIST_LIMIT);
DEFVAR_LISP ("face-new-frame-defaults", Vface_new_frame_defaults,
doc: /* List of global face definitions (for internal use only.) */);
Vface_new_frame_defaults = Qnil;

View file

@ -3457,7 +3457,8 @@ x_focus_changed (int type, int state, struct x_display_info *dpyinfo, struct fra
/* Don't stop displaying the initial startup message
for a switch-frame event we don't need. */
if (NILP (Vterminal_frame)
/* When run as a deamon, Vterminal_frame is always NIL. */
if ((NILP (Vterminal_frame) || EQ (Fdaemonp(), Qt))
&& CONSP (Vframe_list)
&& !NILP (XCDR (Vframe_list)))
{