1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-02 11:21:42 +00:00

Merge from trunk

This commit is contained in:
Stefan Monnier 2011-03-06 16:22:16 -05:00
commit 0d6459dfb5
280 changed files with 17698 additions and 14132 deletions

View File

@ -1,3 +1,50 @@
2011-03-06 Glenn Morris <rgm@gnu.org>
* configure.in (FREETYPE_LIBS): Actually set it to something.
2011-03-02 Paul Eggert <eggert@cs.ucla.edu>
Work around some portability problems with symlinks.
* Makefile.in (GNULIB_MODULES): Add lstat, readlink, symlink.
* configure.in (lstat, HAVE_LSTAT): Remove special hack.
* lib/dosname.h, lib/lstat.c, lib/readlink.c, lib/stat.c:
* lib/symlink.c, m4/lstat.m4, m4/readlink.m4, m4/stat.m4:
* m4/symlink.m4:
New files, automatically generated from gnulib.
* aclocal.m4, configure, lib/Makefile.in, lib/gnulib.mk:
* m4/gl-comp.m4, src/config.in, config.sub: Regenerate.
2011-02-26 Eli Zaretskii <eliz@gnu.org>
* .bzrignore: Ignore new lib/*.in-h files.
* config.bat: Rename stdint.in.h and sys_stat.in.h. Call
depfiles.bat even if lib/deps already exist.
2011-02-25 Paul Eggert <eggert@cs.ucla.edu>
* configure, lib/Makefile.in, lib/getopt_int.h, lib/gnulib.mk:
* lib/stdlib.in.h, m4/stdlib_h.m4: Regenerate to incorporate
recent changes to configure.in and to gnulib.
2011-02-24 Glenn Morris <rgm@gnu.org>
* configure.in: Replace obsolete AC_OUTPUT() with AC_CONFIG_FILES(),
AC_CONFIG_COMMANDS(), and AC_OUTPUT sans arguments.
2011-02-22 Paul Eggert <eggert@cs.ucla.edu>
Assume S_ISLNK etc. work, since gnulib supports this.
* Makefile.in (GNULIB_MODULES): Add sys_stat.
* configure.in: Check for lstat and set HAVE_LSTAT=0 if not.
Pretend to be using the gnulib lstat module for benefit of sys/stat.h.
* configure, lib/Makefile.in, lib/gnulib.mk: Regenerate.
2011-02-21 Paul Eggert <eggert@cs.ucla.edu>
* lib/min-max.h: New file, for "min" and "max".
2011-02-21 Christoph Scholtes <cschol2112@gmail.com>
* lib/makefile.w32-in: ($(BLD)/md5.$(O)): Added dependency on
@ -7604,7 +7651,7 @@
* Makefile.in (lib-src/Makefile, src/Makefile, oldXMenu/Makefile):
Depend on vpath.sed.
Replace sed comand for VPATH with @vpath_sed@.
Replace sed command for VPATH with @vpath_sed@.
* configure.in: Substitute variable `vpath_sed'.
If not in $srcdir and $srcdir is configured,
@ -8945,7 +8992,7 @@
there, and then copy it in, to make sure we get a real file.
* make-dist: Don't try to distribute *.defns files any more. The
only such file was for simula.el, which has been superceded by a
only such file was for simula.el, which has been superseded by a
version which doesn't have a separate .defns file.
1992-05-28 Ken Raeburn (Raeburn@Cygnus.COM)

View File

@ -9,6 +9,10 @@ before bootstrapping:
$ ./configure
(Normally there is no need to run `autoconf' etc. If you do need it,
the relevant command is `autoreconf -I m4'. Be aware that this will
likely lead to conflicts next time you update from Bazaar.)
Some of the files that are included in the Emacs tarball, such as
byte-compiled Lisp files, are not stored in Bazaar. Therefore, to
build from Bazaar you must run "make bootstrap" instead of just "make":

View File

@ -332,7 +332,7 @@ DOS_gnulib_comp.m4 = gl-comp.m4
# as per $(gnulib_srcdir)/DEPENDENCIES.
GNULIB_MODULES = \
crypto/md5 dtoastr filemode getloadavg getopt-gnu \
ignore-value mktime strftime
ignore-value lstat mktime readlink strftime symlink sys_stat
GNULIB_TOOL_FLAGS = \
--import --no-changelog --no-vc-files --makefile-name=gnulib.mk
sync-from-gnulib: $(gnulib_srcdir)

8
aclocal.m4 vendored
View File

@ -13,8 +13,8 @@
m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],,
[m4_warning([this file was generated for autoconf 2.68.
m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.67],,
[m4_warning([this file was generated for autoconf 2.67.
You have another version of autoconf. It may work, but is not guaranteed to.
If you have problems, you may need to regenerate the build system entirely.
To do so, use the procedure documented by the package, typically `autoreconf'.])])
@ -994,15 +994,19 @@ m4_include([m4/gl-comp.m4])
m4_include([m4/gnulib-common.m4])
m4_include([m4/include_next.m4])
m4_include([m4/longlong.m4])
m4_include([m4/lstat.m4])
m4_include([m4/md5.m4])
m4_include([m4/mktime.m4])
m4_include([m4/multiarch.m4])
m4_include([m4/readlink.m4])
m4_include([m4/st_dm_mode.m4])
m4_include([m4/stat.m4])
m4_include([m4/stdbool.m4])
m4_include([m4/stddef_h.m4])
m4_include([m4/stdint.m4])
m4_include([m4/stdlib_h.m4])
m4_include([m4/strftime.m4])
m4_include([m4/symlink.m4])
m4_include([m4/sys_stat_h.m4])
m4_include([m4/time_h.m4])
m4_include([m4/time_r.m4])

View File

@ -1,3 +1,7 @@
2011-02-23 Juanma Barranquero <lekktu@gmail.com>
* notes/bugtracker (bugtracker_debbugs_url): Fix typo.
2011-02-19 Eli Zaretskii <eliz@gnu.org>
* admin.el (set-version): Add msdos/sed2v2.inp.

View File

@ -270,6 +270,9 @@ Does not make other difference."
(sit-for 1)
;; (debug 'after-merge)
;; Check the conflicts.
;; FIXME if using the helpful bzr changelog_merge plugin,
;; there are normally no conflicts in ChangeLogs.
;; But we still want the dates fixing, like bzrmerge-resolve does.
(let ((conflicted nil)
(files ()))
(goto-char (point-min))

View File

@ -489,7 +489,7 @@ Here "{id}" is a literal string, a placeholder that will be replaced
by the bug number you specify after `--fixes debbugs:' in the bzr
command line (123 in the example above).
In the bazaar.conf file, this setting should go into the [DEFAULTS]
In the bazaar.conf file, this setting should go into the [DEFAULT]
section.
In the locations.conf file, it should go into the branch-specific

View File

@ -75,6 +75,14 @@ This will make merging ChangeLogs a lot smoother. It merges new
entries to the top of the file, rather than trying to fit them in
mid-way through.
Sigh. This plugin has a drawback. People often like to edit older
ChangeLog entries, not at the head of the file. Frequently they do
this in the same commit as making new entries. Using this plugin
will merge ALL changed entries (including older ones) to the top of
the destination file.
Maybe the default Emacs behavior without this plugin is better, I dunno.
1) Get clean, up-to-date copies of the emacs-23 and trunk branches.
Check for any uncommitted changes with bzr status.
@ -112,9 +120,17 @@ and is due to a technical limitation of bzr. The log data for those
revisions gets merged, the actual changes themselves do not.
http://lists.gnu.org/archive/html/emacs-devel/2011-01/msg00609.html )
Note that ChangeLog entries are automatically merged to the top with
today's date, but you still might want to check them to see that too
much is not being included, or whitespace between entries is not missing.
In particular, check the ChangeLog entries (eg in case too many
entries have been included or whitespace between entries needs fixing).
bzrmerge tries to fix up the dates to today's date, but it only does
this where there are conflicts. If you used the changelog_merge plugin,
there won't be any conflicts, and (at time of writing) you will need
to adjust dates by hand. In any case, if someone made multiple
ChangeLog entries on different days in the branch, you may wish to
collapse them all to a single entry for that author in the trunk
(because in the trunk they all appear under the same date).
Obviously, if there are multiple changes to the same file by different
authors, don't break the logical ordering in doing this.
Notes:

View File

@ -280,17 +280,20 @@ cd lib
Rem Rename files like djtar on plain DOS filesystem would.
If Exist c++defs.h update c++defs.h cxxdefs.h
If Exist getopt.in.h update getopt.in.h getopt.in-h
If Exist stddef.in.h update stddef.in.h stddef.in-h
If Exist stdbool.in.h update stdbool.in.h stdbool.in-h
If Exist stddef.in.h update stddef.in.h stddef.in-h
If Exist stdint.in.h update stdint.in.h stdint.in-h
If Exist stdlib.in.h update stdlib.in.h stdlib.in-h
If Exist sys_stat.in.h update sys_stat.in.h sys_stat.in-h
If Exist time.in.h update time.in.h time.in-h
If Exist unistd.in.h update unistd.in.h unistd.in-h
sed -f ../msdos/sedlibcf.inp < Makefile.in > makefile.tmp
sed -f ../msdos/sedlibmk.inp < makefile.tmp > Makefile
rm -f makefile.tmp
Rem Create .Po files for new files in lib/
If Not Exist deps\stamp mkdir deps
If Not Exist deps\stamp for %%f in (*.c) do @call ..\msdos\depfiles.bat %%f
If Not Exist deps\stamp echo deps-stamp > deps\stamp
for %%f in (*.c) do @call ..\msdos\depfiles.bat %%f
echo deps-stamp > deps\stamp
cd ..
rem ----------------------------------------------------------------------
Echo Configuring the lisp directory...

4
config.sub vendored
View File

@ -4,7 +4,7 @@
# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
# 2011 Free Software Foundation, Inc.
timestamp='2011-02-02'
timestamp='2011-02-24'
# This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software
@ -76,7 +76,7 @@ version="\
GNU config.sub ($timestamp)
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free
Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO

1522
configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -162,7 +162,7 @@ OPTION_DEFAULT_ON([m17n-flt],[don't use m17n-flt for text shaping])
OPTION_DEFAULT_ON([toolkit-scroll-bars],[don't use Motif or Xaw3d scroll bars])
OPTION_DEFAULT_ON([xaw3d],[don't use Xaw3d])
OPTION_DEFAULT_ON([xim],[don't use X11 XIM])
OPTION_DEFAULT_OFF([ns],[use nextstep (Cocoa or GNUstep) windowing system])
OPTION_DEFAULT_OFF([ns],[use NeXTstep (Cocoa or GNUstep) windowing system])
OPTION_DEFAULT_ON([gpm],[don't use -lgpm for mouse support on a GNU/Linux console])
OPTION_DEFAULT_ON([dbus],[don't compile with D-Bus support])
@ -2244,14 +2244,22 @@ if test "${HAVE_X11}" = "yes"; then
fi # "$HAVE_XFT" != no
fi # "x${with_xft}" != "xno"
dnl For the "Does Emacs use" message at the end.
if test "$HAVE_XFT" != "yes"; then
HAVE_XFT=no
fi
## We used to allow building with FreeType and without Xft.
## However, the ftx font backend driver is not in good shape.
HAVE_FREETYPE=$HAVE_XFT
if test "$HAVE_XFT" != "yes"; then
dnl For the "Does Emacs use" message at the end.
HAVE_XFT=no
HAVE_FREETYPE=no
else
dnl Strict linkers fail with
dnl ftfont.o: undefined reference to symbol 'FT_New_Face'
dnl if -lfreetype is not specified.
dnl The following is needed to set FREETYPE_LIBS.
PKG_CHECK_MODULES(FREETYPE, freetype2, HAVE_FREETYPE=yes,
HAVE_FREETYPE=no)
test "$HAVE_FREETYPE" = "no" && AC_MSG_ERROR(libxft requires libfreetype)
fi
HAVE_LIBOTF=no
if test "${HAVE_FREETYPE}" = "yes"; then
@ -3697,6 +3705,18 @@ fi
test "${exec_prefix}" != NONE &&
exec_prefix=`echo "${exec_prefix}" | sed 's,\([^/]\)/*$,\1,'`]
AC_CONFIG_FILES([Makefile lib/Makefile lib-src/Makefile oldXMenu/Makefile \
doc/emacs/Makefile doc/misc/Makefile doc/lispintro/Makefile \
doc/lispref/Makefile src/Makefile \
lwlib/Makefile lisp/Makefile leim/Makefile test/automated/Makefile])
dnl Make the necessary directories, if they don't exist.
AC_CONFIG_COMMANDS([mkdirs], [
for dir in etc lisp ; do
test -d ${dir} || mkdir ${dir}
done
])
dnl You might wonder (I did) why epaths.h is generated by running make,
dnl rather than just letting configure generate it from epaths.in.
dnl One reason is that the various paths are not fully expanded (see above);
@ -3705,22 +3725,18 @@ dnl Secondly, the GNU Coding standards require that one should be able
dnl to run `make prefix=/some/where/else' and override the values set
dnl by configure. This also explains the `move-if-change' test and
dnl the use of force in the `epaths-force' rule in Makefile.in.
AC_OUTPUT(Makefile lib/Makefile lib-src/Makefile oldXMenu/Makefile \
doc/emacs/Makefile doc/misc/Makefile doc/lispintro/Makefile \
doc/lispref/Makefile src/Makefile \
lwlib/Makefile lisp/Makefile leim/Makefile test/automated/Makefile, [
### Make the necessary directories, if they don't exist.
for dir in etc lisp ; do
test -d ${dir} || mkdir ${dir}
done
AC_CONFIG_COMMANDS([epaths], [
echo creating src/epaths.h
${MAKE-make} epaths-force
], [GCC="$GCC" NON_GNU_CPP="$NON_GNU_CPP" CPP="$CPP" CPPFLAGS="$CPPFLAGS"])
AC_CONFIG_COMMANDS([gdbinit], [
if test ! -f src/.gdbinit && test -f $srcdir/src/.gdbinit; then
echo creating src/.gdbinit
echo source $srcdir/src/.gdbinit > src/.gdbinit
fi
])
], [GCC="$GCC" NON_GNU_CPP="$NON_GNU_CPP" CPP="$CPP" CPPFLAGS="$CPPFLAGS"])
AC_OUTPUT
dnl configure.in ends here

View File

@ -1,3 +1,33 @@
2011-03-06 Chong Yidong <cyd@stupidchicken.com>
* search.texi (Isearch Yank): C-y now bound to isearch-yank-kill.
2011-03-03 Drake Wilson <drake@begriffli.ch> (tiny change)
* misc.texi (emacsclient Options): Add q/quiet.
2011-03-02 Glenn Morris <rgm@gnu.org>
* mule.texi (Communication Coding) <x-select-request-type>:
Remove duplicate (essentially) paragraph. (Bug#8148)
2011-03-01 Christoph Scholtes <cschol2112@googlemail.com>
* maintaining.texi (Format of ChangeLog): Add reference to
add-log-full-name.
(Change Log Commands): Add documentation for combining multiple
symbols in one change.
2011-03-01 Glenn Morris <rgm@gnu.org>
* custom.texi (Directory Variables):
Give an example of excluding subdirectories.
2011-02-28 Eli Zaretskii <eliz@gnu.org>
* search.texi (Regexp Search): Move index entries about regexps to the
"Regexps" node. Add index entries for regexp search. (Bug#8096)
2011-02-19 Glenn Morris <rgm@gnu.org>
* dired.texi (Dired): Dired-X version number was dropped.

View File

@ -1331,7 +1331,8 @@ corresponding alist applies to all the files in that subdirectory.
(tab-width . 4)
(fill-column . 80)))
(c-mode . ((c-file-style . "BSD")))
(java-mode . ((c-file-style . "BSD")))
(java-mode . ((c-file-style . "BSD")
(subdirs . nil)))
("src/imported"
. ((nil . ((change-log-default-name . "ChangeLog.local"))))))
@end example
@ -1340,8 +1341,10 @@ corresponding alist applies to all the files in that subdirectory.
This example shows some settings for a hypothetical project. It sets
@samp{indent-tabs-mode}, @code{tab-width}, and @code{fill-column} for
any file in the project's directory tree, and it sets the indentation
style for any C or Java source file. Finally, it specifies a different
@file{ChangeLog} file name for any file in the @file{src/imported}
style for any C or Java source file. The special @code{subdirs} element
indicates that the Java mode settings are only to be applied in the
current directory, not in any subdirectories. Finally, it specifies a
different @file{ChangeLog} file name for any file in the @file{src/imported}
subdirectory of the directory where you put the @file{.dir-locals.el}
file.

View File

@ -1486,6 +1486,10 @@ changed.
non-@code{nil}, @kbd{C-x 4 a} adds to any existing item for the file
rather than starting a new item.
You can combine multiple changes of the same nature. If you don't
enter any text after the initial @kbd{C-x 4 a}, any subsequent
@kbd{C-x 4 a} adds another symbol to the change.
@vindex add-log-always-start-new-record
If @code{add-log-always-start-new-record} is non-@code{nil},
@kbd{C-x 4 a} always makes a new entry, even if the last entry
@ -1535,13 +1539,14 @@ insert a VC log entry into a Change Log buffer by typing @kbd{C-x v a}
@node Format of ChangeLog
@subsection Format of ChangeLog
A change log entry starts with a header line that contains the current
date, your name, and your email address (taken from the variable
@code{add-log-mailing-address}). Aside from these header lines, every
line in the change log starts with a space or a tab. The bulk of the
entry consists of @dfn{items}, each of which starts with a line starting
with whitespace and a star. Here are two entries, both dated in May
1993, with two items and one item respectively.
A change log entry starts with a header line that contains the
current date, your name (taken from the variable
@code{add-log-full-name}), and your email address (taken from the
variable @code{add-log-mailing-address}). Aside from these header
lines, every line in the change log starts with a space or a tab. The
bulk of the entry consists of @dfn{items}, each of which starts with a
line starting with whitespace and a star. Here are two entries, both
dated in May 1993, with two items and one item respectively.
@iftex
@medbreak

View File

@ -1672,6 +1672,11 @@ all server buffers are finished. You can take as long as you like to
edit the server buffers within Emacs, and they are @emph{not} killed
when you type @kbd{C-x #} in them.
@item -q
@itemx --quiet
Do not let @command{emacsclient} display messages about waiting for
Emacs or connecting to remote server sockets.
@item -s @var{server-name}
@itemx --socket-name=@var{server-name}
Connect to the Emacs server named @var{server-name}. The server name

View File

@ -1153,15 +1153,6 @@ specified by one of the environment variables @env{LC_ALL},
specified above, whose value is nonempty is the one that determines
the text representation.)
@vindex x-select-request-type
The variable @code{x-select-request-type} specifies a selection data
type of selection to request from the X server. The default value is
@code{nil}, which means Emacs tries @code{COMPOUND_TEXT} and
@code{UTF8_STRING}, and uses whichever result seems more appropriate.
You can explicitly specify the data type by setting the variable to
one of the symbols @code{COMPOUND_TEXT}, @code{UTF8_STRING},
@code{STRING} and @code{TEXT}.
@node File Name Coding
@section Coding Systems for File Names

View File

@ -271,19 +271,24 @@ keybindings. These keybindings are part of the keymap
@node Isearch Yank
@subsection Isearch Yanking
Within incremental search, you can use @kbd{C-w} and @kbd{C-y} to grab
text from the buffer into the search string. This makes it convenient
to search for another occurrence of text at point.
Within incremental search, @kbd{C-y} (@code{isearch-yank-kill})
copies text from the kill ring into the search string. It uses the
same text that @kbd{C-y}, outside of incremental search, would
normally yank into the buffer. @kbd{Mouse-2} in the echo area does
the same. @xref{Yanking}.
@kbd{C-w} copies the character or word after point and adds it to
the search string, advancing point over it. (The decision, whether to
copy a character or a word, is heuristic.)
@kbd{C-w} (@code{isearch-yank-word-or-char}) grabs the next
character or word at point, and adds it to the search string. This is
convenient for searching for another occurrence of the text at point.
(The decision, whether to copy a character or a word, is heuristic.)
@kbd{C-y} is similar to @kbd{C-w} but copies all the rest of the
current line into the search string. If point is already at the end
of a line, it grabs the entire next line. If the search is currently
case-insensitive, both @kbd{C-y} and @kbd{C-w} convert the text they
copy to lower case, so that the search remains case-insensitive.
Similarly, @kbd{M-s C-e} (@code{isearch-yank-line}) grabs the rest
of the current line, and adds it to the search string. If point is
already at the end of a line, it grabs the entire next line.
If the search is currently case-insensitive, both @kbd{C-w} and
@kbd{M-s C-e} convert the text they copy to lower case, so that the
search remains case-insensitive.
@kbd{C-M-w} and @kbd{C-M-y} modify the search string by only one
character at a time: @kbd{C-M-w} deletes the last character from the
@ -293,10 +298,6 @@ after point into the search string is to enter the minibuffer by
@kbd{M-e} and to type @kbd{C-f} at the end of the search string in the
minibuffer.
The character @kbd{M-y} copies text from the kill ring into the
search string. It uses the same text that @kbd{C-y} would yank.
@kbd{Mouse-2} in the echo area does the same. @xref{Yanking}.
@node Isearch Scroll
@subsection Scrolling During Incremental Search
@ -468,8 +469,8 @@ apply to the lazy highlight, which always matches whole words.
@node Regexp Search
@section Regular Expression Search
@cindex regular expression
@cindex regexp
@cindex regexp search
@cindex search for a regular expression
A @dfn{regular expression} (or @dfn{regexp} for short) is a pattern
that denotes a class of alternative strings to match. GNU Emacs
@ -543,6 +544,8 @@ Search}.
@node Regexps
@section Syntax of Regular Expressions
@cindex syntax of regexps
@cindex regular expression
@cindex regexp
This manual describes regular expression features that users
typically use. @xref{Regular Expressions,,, elisp, The Emacs Lisp

File diff suppressed because it is too large Load Diff

9032
doc/lispref/ChangeLog.trunk Normal file

File diff suppressed because it is too large Load Diff

View File

@ -80,6 +80,7 @@ srcs = \
$(srcdir)/numbers.texi \
$(srcdir)/objects.texi \
$(srcdir)/os.texi \
$(srcdir)/package.texi \
$(srcdir)/positions.texi \
$(srcdir)/processes.texi \
$(srcdir)/searching.texi \

View File

@ -1399,6 +1399,7 @@ Preparing Lisp code for distribution
* Packaging Basics:: The basic concepts of Emacs Lisp packages.
* Simple Packages:: How to package a single .el file.
* Multi-file Packages:: How to package multiple files.
* Package Archives:: Maintaining package archives.
Starting Up Emacs

View File

@ -1041,7 +1041,8 @@ because they eliminate symbolic links as a cause of name variation.
@defun file-truename filename
The function @code{file-truename} returns the truename of the file
@var{filename}. The argument must be an absolute file name.
@var{filename}. If the argument is not an absolute file name,
this function first expands it against @code{default-directory}.
This function does not expand environment variables. Only
@code{substitute-in-file-name} does that. @xref{Definition of

View File

@ -433,18 +433,17 @@ expression, thus moving point forward one word.
@cindex minibuffer history
@cindex history list
A @dfn{minibuffer history list} records previous minibuffer inputs so
the user can reuse them conveniently. A history list is actually a
symbol, not a list; it is a variable whose value is a list of strings
(previous inputs), most recent first.
A @dfn{minibuffer history list} records previous minibuffer inputs
so the user can reuse them conveniently. It is a variable whose value
is a list of strings (previous inputs), most recent first.
There are many separate history lists, used for different kinds of
inputs. It's the Lisp programmer's job to specify the right history
list for each use of the minibuffer.
There are many separate minibuffer history lists, used for different
kinds of inputs. It's the Lisp programmer's job to specify the right
history list for each use of the minibuffer.
You specify the history list with the optional @var{hist} argument
to either @code{read-from-minibuffer} or @code{completing-read}. Here
are the possible values for it:
You specify a minibuffer history list with the optional @var{hist}
argument to @code{read-from-minibuffer} or @code{completing-read}.
Here are the possible values for it:
@table @asis
@item @var{variable}

View File

@ -7,186 +7,223 @@
@chapter Preparing Lisp code for distribution
@cindex packaging
Emacs provides a standard way for Emacs Lisp code to be distributed
to users. This approach lets users easily download, install,
uninstall, and upgrade Lisp code that they might want to use.
Emacs provides a standard way to distribute Emacs Lisp code to
users. A @dfn{package} is a collection of one or more files,
formatted and bundled in such a way that users can easily download,
install, uninstall, and upgrade it.
A @dfn{package} is simply one or more files, formatted and bundled
in a particular way. Typically a package includes primarily Emacs
Lisp code, but it is possible to create other kinds of packages as
well.
The following sections describe how to create a package, and how to
put it in a @dfn{package archive} for others to download.
@menu
* Packaging Basics:: The basic concepts of Emacs Lisp packages.
* Simple Packages:: How to package a single .el file.
* Multi-file Packages:: How to package multiple files.
* Package Archives:: Maintaining package archives.
@end menu
@node Packaging Basics
@section Packaging Basics
@cindex packaging basics
A package has a few attributes:
@cindex package attributes
A package is either a @dfn{simple package} or a @dfn{multi-file
package}. A simple package is stored in a package archive as a single
Emacs Lisp file, while a multi-file package is stored as a tar file
(containing multiple Lisp files, and possibly non-Lisp files such as a
manual).
In ordinary usage, the difference between simple packages and
multi-file packages is relatively unimportant; the Package Menu
interface makes no distinction between them. However, the procedure
for creating them differs, as explained in the following sections.
Each package (whether simple or multi-file) has certain
@dfn{attributes}:
@table @asis
@item Name
A string, the name of the package. This attribute is mandatory. If
it does not exist, the package cannot be installed by the package
manager.
A short word (e.g. @samp{auctex}). This is usually also the symbol
prefix used in the program (@pxref{Coding Conventions}).
@item Version
A version number, which is anything that can be parsed by
@code{version-to-list}. This attribute is mandatory. If it does not
exist, the package cannot be installed by the package manager.
A version number, in a form that the function @code{version-to-list}
understands (e.g. @samp{11.86}). Each release of a package should be
accompanied by an increase in the version number.
@item Brief description
This is shown to the user in the package menu buffer. It is just a
single line. On a terminal with 80 characters per line, there are
only 36 characters available in the package menu mode for showing the
brief description, so it is best to keep it very brief. If no brief
name is given, an empty string is used.
This is shown when the package is listed in the Package Menu. It
should occupy a single line, ideally in 36 characters or less.
@item Long description
This can be a @file{README} file or the like. This is available to
the user before the package is installed, via the package menu. It
should more fully describe the package and its capabilities, so a user
can read it to decide whether he wants to install the package. This
attribute is optional.
This is shown in the buffer created by @kbd{C-h P}
(@code{describe-package}), following the package's brief description
and installation status. It normally spans multiple lines, and should
fully describe the package and its capabilities.
@item Dependencies
This is a list of other packages and their minimal acceptable
versions. This is used both at download time (to make sure all the
needed code is available) and at activation time (to ensure a package
is only activated if all its dependencies have been successfully
activated). This attribute is optional.
@item Manual
A package can optionally include an Info manual.
A list of other packages (possibly including minimal acceptable
version numbers) on which this package depends. The list may be
empty, meaning this package has no dependencies. Otherwise,
installing this package also automatically installs its dependencies;
if any dependency cannot be found, the package cannot be installed.
@end table
Conceptually, a package goes through several state transitions (in
reality some of these transitions are grouped together):
Installing a package, either via the Package Menu, or via the
command @code{package-install-file}, creates a subdirectory of
@code{package-user-dir} named @file{@var{name}-@var{version}}, where
@var{name} is the package's name and @var{version} its version
(e.g. @file{~/.emacs.d/elpa/auctex-11.86/}). We call this the
package's @dfn{content directory}. It is where Emacs puts the
package's contents (the single Lisp file for a simple package, or the
files extracted from a multi-file package).
@table @asis
@item Download
Fetch the package from somewhere.
Emacs then searches every Lisp file in the content directory for
autoload magic comments (@pxref{Autoload}). These autoload
definitions are saved to a file named @file{@var{name}-autoloads.el}
in the content directory. They are typically used to autoload the
principal user commands defined in the package, but they can also
perform other tasks, such as adding an element to
@code{auto-mode-alist} (@pxref{Auto Major Mode}). During this time,
Emacs will also byte-compile the Lisp files.
@item Install
Unpack the package, or write a @file{.el} file into the appropriate
install directory. This step also includes extracting autoloads and
byte-compiling the Emacs Lisp code.
After installation, and (by default) each time Emacs is started, the
installed package is @dfn{activated}. During activation, Emacs adds
the package's content directory to @code{load-path}, and evaluates the
autoload definitions in @file{@var{name}-autoloads.el}.
@item Activate
Update @code{load-path} and @code{Info-directory-list} and evaluate
the autoloads, so that the package is ready for the user to use.
@end table
It is best for users if packages do not do too much work at
activation time. The best approach is to have activation consist of
some autoloads and little more.
Note that a package typically does @emph{not} autoload every
function and variable defined within it---only the handful of commands
typically called to begin using the package.
@node Simple Packages
@section Simple Packages
@cindex single file packages
The simplest package consists of a single Emacs Lisp source file.
In this case, all the attributes of the package (@pxref{Packaging
Basics}) are taken from this file.
A simple package consists of a single Emacs Lisp source file. The
file must conform to the Emacs Lisp library header conventions
(@pxref{Library Headers}). The package's attributes are taken from
the various headers, as illustrated by the following example:
The package system expects this @file{.el} file to conform to the
Emacs Lisp library header conventions. @xref{Library Headers}.
@example
@group
;;; superfrobnicator.el --- Frobnicate and bifurcate flanges
The name of the package is the same as the base name of the
@file{.el} file, as written in the first comment line. For example,
given the header line:
;; Copyright (C) 2011 Free Software Foundation, Inc.
@end group
@smallexample
;;; superfrobnicator.el --- frobnicate and bifurcate flanges
@end smallexample
;; Author: J. R. Hacker <jrh@@example.com>
;; Version: 1.3
;; Package-Requires: ((flange "1.0"))
;; Keywords: frobnicate
the package name will be @samp{superfrobnicator}.
@dots{}
The short description of the package is also taken from the first
line of the file.
;;; Commentary:
If the file has a ``Commentary'' header, then it is used as the long
description.
;; This package provides a minor mode to frobnicate and/or
;; bifurcate any flanges you desire. To activate it, just type
@dots{}
The version of the package comes either from the ``Package-Version''
header, if it exists, or from the ``Version'' header. A package is
required to have a version number. Each release of a package must be
accompanied by an increase in the version number.
;;;###autoload
(define-minor-mode superfrobnicator-mode
@dots{}
@end example
If the file has a ``Package-Requires'' header, then that is used as
the package dependencies. Otherwise, the package is assumed not to
have any dependencies.
The name of the package is the same as the base name of the file, as
written on the first line. Here, it is @samp{superfrobnicator}.
A single-file package cannot have an Info manual.
The brief description is also taken from the first line. Here, it
is @samp{Frobnicate and bifurcate flanges}.
The file will be scanned for autoload cookies at install time.
@xref{Autoload}.
The version number comes from the @samp{Package-Version} header, if
it exists, or from the @samp{Version} header otherwise. One or the
other @emph{must} be present. Here, the version number is 1.3.
If the file has a @samp{;;; Commentary:} section, this section is
used as the long description. (When displaying the description, Emacs
omits the @samp{;;; Commentary:} line, as well as the leading comment
characters in the commentary itself.)
If the file has a @samp{Package-Requires} header, that is used as
the package dependencies. In the above example, the package depends
on the @samp{flange} package, version 1.0 or higher. @xref{Library
Headers}, for a description of the @samp{Package-Requires} header. If
the header is omitted, the package has no dependencies.
The file ought to also contain one or more autoload magic comments,
as explained in @ref{Packaging Basics}. In the above example, a magic
comment autoloads @code{superfrobnicator-mode}.
@xref{Package Archives}, for a explanation of how to add a
single-file package to a package archive.
@node Multi-file Packages
@section Multi-file Packages
@cindex multi-file packages
A multi-file package is just a @file{.tar} file. While less
convenient to create than a single-file package, a multi-file package
also offers more features: it can include an Info manual, multiple
Emacs Lisp files, and also other data files needed by a package.
A multi-file package is less convenient to create than a single-file
package, but it offers more features: it can include multiple Emacs
Lisp files, an Info manual, and other file types (such as images).
The contents of the @file{.tar} file must all appear beneath a
single directory, named after the package and version. Files can
appear in subdirectories of this top-most directory, but Emacs Lisp
code will only be found (and thus byte-compiled) at the top-most
level. Also, the @file{.tar} file is typically also given this same
name. For example, if you are distributing version 1.3 of the
superfrobnicator, the package file would be named
``superfrobnicator-1.3.tar'' and the contents would all appear in the
directory @file{superfrobnicator-1.3} in that @file{.tar}.
Prior to installation, a multi-file package is stored in a package
archive as a tar file. The tar file must be named
@file{@var{name}-@var{version}.tar}, where @var{name} is the package
name and @var{version} is the version number. Its contents, once
extracted, must all appear in a directory named
@file{@var{name}-@var{version}}, the @dfn{content directory}
(@pxref{Packaging Basics}). Files may also extract into
subdirectories of the content directory.
The package must include a @file{-pkg.el} file, named after the
package. In our example above, this file would be called
@file{superfrobnicator-pkg.el}. This file must have a single form in
it, a call to @code{define-package}. The package dependencies and
brief description are taken from this form.
One of the files in the content directory must be named
@file{@var{name}-pkg.el}. It must contain a single Lisp form,
consisting of a call to the function @code{define-package}, described
below. This defines the package's version, brief description, and
requirements.
For example, if we distribute version 1.3 of the superfrobnicator as
a multi-file package, the tar file would be
@file{superfrobnicator-1.3.tar}. Its contents would extract into the
directory @file{superfrobnicator-1.3}, and one of these would be the
file @file{superfrobnicator-pkg.el}.
@defun define-package name version &optional docstring requirements
Define a package. @var{name} is the name of the package, a string.
@var{version} is the package's version, a string. It must be in a
form that can be understood by @code{version-to-list}.
@var{docstring} is the short description of the package.
This function defines a package. @var{name} is the package name, a
string. @var{version} is the version, as a string of a form that can
be understood by the function @code{version-to-list}. @var{docstring}
is the brief description.
@var{requirements} is a list of required packages and their versions.
Each element in this list should have the form @code{(@var{dep-name}
@var{dep-version})}, where @var{dep-name} is a symbol whose name is
the dependency's package name, and @var{dep-version} is the
dependency's version (a string).
@end defun
If a @file{README} file exists in the content directory, then it is
used as the long description.
If the content directory contains a file named @file{README}, this
file is used as the long description.
If the package has an Info manual, you should distribute the needed
info files, plus a @file{dir} file made with @command{install-info}.
If the content directory contains a file named @file{dir}, this is
assumed to be an Info directory file made with @command{install-info}.
@xref{Invoking install-info, Invoking install-info, Invoking
install-info, texinfo, Texinfo}.
install-info, texinfo, Texinfo}. The Info files listed in this
directory file should also be present in the content directory. In
this case, Emacs will automatically add the content directory to
@code{Info-directory-list} when the package is activated.
Do not include any @file{.elc} files in the package. Those will be
created at install time. Note that there is no way to control the
order in which files are byte-compiled; your package must be robust
here.
Do not include any @file{.elc} files in the package. Those are
created when the package is installed. Note that there is no way to
control the order in which files are byte-compiled.
The installation process will scan all the @file{.el} files in the
package for autoload cookies. @xref{Autoload}. They are extracted
into a @file{-autoloads.el} file (e.g.,
@file{superfrobnicator-autoloads.el}), so do not include a file of
that name in your package.
Do not include any file named @file{@var{name}-autoloads.el}. This
file is reserved for the package's autoload definitions
(@pxref{Packaging Basics}). It is created automatically when the
package is installed, by searching all the Lisp files in the package
for autoload magic comments.
Any other files in the @file{.tar} file are simply unpacked when the
package is installed. This can be useful if your package needs
auxiliary data files --- e.g., icons or sounds.
Emacs Lisp code installed via the package manager must take special
care to be location-independent. One easy way to do this is to make
references to auxiliary data files relative to @var{load-file-name}.
For example:
If the multi-file package contains auxiliary data files (such as
images), the package's Lisp code can refer to these files via the
variable @code{load-file-name} (@pxref{Loading}). Here is an example:
@smallexample
(defconst superfrobnicator-base (file-name-directory load-file-name))
@ -194,3 +231,8 @@ For example:
(defun superfrobnicator-fetch-image (file)
(expand-file-name file superfrobnicator-base))
@end smallexample
@node Package Archives
@section Creating and Maintaining Package Archives
To be done.

View File

@ -266,10 +266,9 @@ subprocess by @code{call-process-region} is encoded using a coding
system, much like text written into a file. @xref{Coding Systems}.
@defun call-process program &optional infile destination display &rest args
This function calls @var{program} in a separate process and waits for
it to finish.
This function calls @var{program} and waits for it to finish.
The standard input for the process comes from file @var{infile} if
The standard input for the new process comes from file @var{infile} if
@var{infile} is not @code{nil}, and from the null device otherwise.
The argument @var{destination} says where to put the process output.
Here are the possibilities:
@ -488,10 +487,10 @@ inputinput@point{}
@end defun
@defun call-process-shell-command command &optional infile destination display &rest args
This function executes the shell command @var{command} synchronously
in a separate process. The final arguments @var{args} are additional
arguments to add at the end of @var{command}. The other arguments
are handled as in @code{call-process}.
This function executes the shell command @var{command} synchronously.
The final arguments @var{args} are additional arguments to add at the
end of @var{command}. The other arguments are handled as in
@code{call-process}.
@end defun
@defun process-file-shell-command command &optional infile destination display &rest args
@ -506,12 +505,12 @@ then returns the command's output as a string.
@end defun
@defun process-lines program &rest args
This function runs @var{program} in a separate process, waits for it
to finish, and returns its output as a list of strings. Each string
in the list holds a single line of text output by the program; the
end-of-line characters are stripped from each line. The arguments
beyond @var{program}, @var{args}, are strings that specify
command-line arguments with which to run the program.
This function runs @var{program}, waits for it to finish, and returns
its output as a list of strings. Each string in the list holds a
single line of text output by the program; the end-of-line characters
are stripped from each line. The arguments beyond @var{program},
@var{args}, are strings that specify command-line arguments with which
to run the program.
If @var{program} exits with a non-zero exit status, this function
signals an error.

View File

@ -1767,7 +1767,8 @@ directory-local variables. The name of the file is
The MS-DOS version of Emacs uses @file{_dir-locals.el} instead, due to
limitations of the DOS filesystems.
}. A file by that name in a directory causes Emacs to apply its
settings to any file in that directory or any of its subdirectories.
settings to any file in that directory or any of its subdirectories
(optionally, you can exclude subdirectories; see below).
If some of the subdirectories have their own @file{.dir-locals.el}
files, Emacs uses the settings from the deepest file it finds starting
from the file's directory and moving up the directory tree. The file
@ -1798,7 +1799,10 @@ file's buffer turns on a mode that is derived from @var{major-mode},
then the all the variables in the associated @var{alist} are applied;
@var{alist} should be of the form @code{(@var{name} . @var{value})}.
A special value @code{nil} for @var{major-mode} means the settings are
applicable to any mode.
applicable to any mode. In @var{alist}, you can use a special
@var{name}: @code{subdirs}. If the associated value is
@code{nil}, the alist is only applied to files in the relevant
directory, not to those in any subdirectories.
With the second form of @var{variables}, if @var{directory} is the
initial substring of the file's directory, then @var{list} is applied
@ -1806,12 +1810,19 @@ recursively by following the above rules; @var{list} should be of one
of the two forms accepted by this function in @var{variables}.
@end defun
@defun dir-locals-set-directory-class directory class
@defun dir-locals-set-directory-class directory class &optional mtime
This function assigns @var{class} to all the files in @code{directory}
and its subdirectories. Thereafter, all the variable settings
specified for @var{class} will be applied to any visited file in
@var{directory} and its children. @var{class} must have been already
defined by @code{dir-locals-set-class-variables}
defined by @code{dir-locals-set-class-variables}.
Emacs uses this function internally when it loads directory variables
from a @code{.dir-locals.el} file. In that case, the optional
argument @var{mtime} holds the file modification time (as returned by
@code{file-attributes}). Emacs uses this time to check stored
local variables are still valid. If you are assigning a class
directly, not via a file, this argument should be @code{nil}.
@end defun
@defvar dir-locals-class-alist
@ -1821,8 +1832,9 @@ settings. It is updated by @code{dir-locals-set-class-variables}.
@defvar dir-locals-directory-cache
This alist holds directory names, their assigned class names, and
modification times of the associated directory local variables file.
It is updated by @code{dir-locals-set-directory-class}.
modification times of the associated directory local variables file
(if there is one). The function @code{dir-locals-set-directory-class}
updates this list.
@end defvar
@node Frame-Local Variables

View File

@ -1,3 +1,73 @@
2011-03-06 Jay Belanger <jay.p.belanger@gmail.com>
* calc.texi (Logarithmic Units): Rename calc-logunits-dblevel
and calc-logunits-nplevel to calc-dblevel and calc-nplevel,
respectively.
(Musical Notes): New section.
(Customizing Calc): Mention the customizable variable
calc-note-threshold.
2011-03-03 Glenn Morris <rgm@gnu.org>
* url.texi (Dealing with HTTP documents): Remove reference to
function url-decode-text-part; never seems to have existed. (Bug#6038)
(Configuration): Update url-configuration-directory description.
2011-03-02 Glenn Morris <rgm@gnu.org>
* dired-x.texi (Multiple Dired Directories): Remove mentions
of dired-default-directory-alist and dired-default-directory.
Move dired-smart-shell-command here...
(Miscellaneous Commands): ... from here.
2011-03-02 Paul Eggert <eggert@cs.ucla.edu>
* texinfo.tex: Update to version 2011-02-24.09.
2011-03-02 Glenn Morris <rgm@gnu.org>
* dired-x.texi (Omitting Variables): Refer to add-dir-local-variable
instead of the obsoleted dired-omit-here-always.
2011-02-28 Michael Albinus <michael.albinus@gmx.de>
* tramp.texi (Frequently Asked Questions): Add Emacs 24 to
supported systems.
2011-02-28 Glenn Morris <rgm@gnu.org>
* dbus.texi (Type Conversion): Grammar fix.
2011-02-23 Michael Albinus <michael.albinus@gmx.de>
* tramp.texi: Use consistently "Emacs" (instead of "GNU Emacs") and
"Debian GNU/Linux".
* trampver.texi [xemacs]: Set emacsothername to "Emacs".
2011-02-23 Glenn Morris <rgm@gnu.org>
* dired-x.texi (Features): Minor rephrasing.
(Local Variables): Fix typos.
* edt.texi, erc.texi, gnus.texi, idlwave.texi, mh-e.texi:
Standardize some Emacs/XEmacs terminology.
* dired-x.texi (Features): Don't advertise obsolete local variables.
Simplify layout.
(Omitting Variables): Update local variables example.
(Local Variables): Say this is obsolete. Fix description of
dired-enable-local-variables possible values.
2011-02-22 Teodor Zlatanov <tzz@lifelogs.com>
* auth.texi (Help for users): Mention ~/.netrc is also searched by
default now.
2011-02-21 Lars Ingebrigtsen <larsi@gnus.org>
* gnus.texi (Article Date): Clarify gnus-article-update-date-headers.
2011-02-20 Lars Ingebrigtsen <larsi@gnus.org>
* gnus.texi (Window Layout): Document layout names.

View File

@ -127,8 +127,8 @@ you will be pwned as the kids say.
``Netrc'' files are usually called @code{.authinfo} or @code{.netrc};
nowadays @code{.authinfo} seems to be more popular and the auth-source
library encourages this confusion by making it the default, as you'll
see later.
library encourages this confusion by accepting both, as you'll see
later.
If you have problems with the search, set @code{auth-source-debug} to
@code{t} and see what host, port, and user the library is checking in
@ -159,7 +159,7 @@ and simplest configuration is:
;;; mostly equivalent (see below about fallbacks) but shorter:
(setq auth-sources '((:source "~/.authinfo.gpg")))
;;; even shorter and the @emph{default}:
(setq auth-sources '("~/.authinfo.gpg" "~/.authinfo"))
(setq auth-sources '("~/.authinfo.gpg" "~/.authinfo" "~/.netrc"))
;;; use the Secrets API @var{Login} collection (@pxref{Secret Service API})
(setq auth-sources '("secrets:Login"))
@end lisp
@ -184,8 +184,8 @@ the defaults: any host and any port are looked up in the netrc
file @code{~/.authinfo.gpg}, which is a GnuPG encrypted file
(@pxref{GnuPG and EasyPG Assistant Configuration}).
If that fails, the unencrypted netrc file @code{~/.authinfo} will
be used.
If that fails, the unencrypted netrc files @code{~/.authinfo} and
@code{~/.netrc} will be used.
The typical netrc line example is without a port.

View File

@ -27676,6 +27676,7 @@ begin with the @kbd{u} prefix key.
* Predefined Units::
* User-Defined Units::
* Logarithmic Units::
* Musical Notes::
@end menu
@node Basic Operations on Units, The Units Table, Units, Units
@ -28121,7 +28122,7 @@ was already a set of user-defined units in your Calc init file, it
is replaced by the new set. (@xref{General Mode Commands}, for a way to
tell Calc to use a different file for the Calc init file.)
@node Logarithmic Units, , User-Defined Units, Units
@node Logarithmic Units, Musical Notes, User-Defined Units, Units
@section Logarithmic Units
The units @code{dB} (decibels) and @code{Np} (nepers) are logarithmic
@ -28251,18 +28252,18 @@ The @kbd{H l q} [@code{fieldquant}] command behaves like @kbd{l q} but
computes field quantities instead of power quantities.
@kindex l d
@pindex calc-logunits-dblevel
@pindex calc-dblevel
@tindex dbpowerlevel
@tindex dbfieldlevel
@kindex l n
@pindex calc-logunits-nplevel
@pindex calc-nplevel
@tindex nppowerlevel
@tindex npfieldlevel
The @kbd{l d} (@code{calc-logunits-dblevel}) [@code{dbpowerlevel}]
The @kbd{l d} (@code{calc-dblevel}) [@code{dbpowerlevel}]
command will compute the decibel level of a power quantity using the
default reference level; @kbd{H l d} [@code{dbfieldlevel}] will
compute the decibel level of a field quantity. The commands @kbd{l n}
(@code{calc-logunits-nplevel}) [@code{nppowerlevel}] and @kbd{H l n}
(@code{calc-nplevel}) [@code{nppowerlevel}] and @kbd{H l n}
[@code{npfieldlevel}] will similarly compute neper levels. With the
capital @kbd{O} prefix these commands will read a reference level
from the stack; in an algebraic formula the reference level can be
@ -28363,6 +28364,76 @@ a logarithmic unit by a number; the @kbd{l /}
logarithmic unit by a number. Note that the reference quantities don't
play a role in this arithmetic.
@node Musical Notes, , Logarithmic Units, Units
@section Musical Notes
Calc can convert between musical notes and their associated
frequencies. Notes can be given using either scientific pitch
notation or midi numbers. Since these note systems are basically
logarithmic scales, Calc uses the @kbd{l} prefix for functions
operating on notes.
Scientific pitch notation refers to a note by giving a letter
A through G, possibly followed by a flat or sharp) with a subscript
indicating an octave number. Each octave starts with C and ends with
B and
@c increasing each note by a semitone will result
@c in the sequence @expr{C}, @expr{C} sharp, @expr{D}, @expr{E} flat, @expr{E},
@c @expr{F}, @expr{F} sharp, @expr{G}, @expr{A} flat, @expr{A}, @expr{B}
@c flat and @expr{B}.
the octave numbered 0 was chosen to correspond to the lowest
audible frequency. Using this system, middle C (about 261.625 Hz)
corresponds to the note @expr{C} in octave 4 and is denoted
@expr{C_4}. Any frequency can be described by giving a note plus an
offset in cents (where a cent is a ratio of frequencies so that a
semitone consists of 100 cents).
The midi note number system assigns numbers to notes so that
@expr{C_(-1)} corresponds to the midi note number 0 and @expr{G_9}
corresponds to the midi note number 127. A midi controller can have
up to 128 keys and each midi note number from 0 to 127 corresponds to
a possible key.
@kindex l s
@pindex calc-spn
@tindex spn
The @kbd{l s} (@code{calc-spn}) [@code{spn}] command converts either
a frequency or a midi number to scientific pitch notation. For
example, @code{500 Hz} gets converted to
@code{B_4 + 21.3094853649 cents} and @code{84} to @code{C_6}.
@kindex l m
@pindex calc-midi
@tindex midi
The @kbd{l m} (@code{calc-midi}) [@code{midi}] command converts either
a frequency or a note given in scientific pitch notation to the
corresponding midi number. For example, @code{C_6} gets converted to 84
and @code{440 Hz} to 69.
@kindex l f
@pindex calc-freq
@tindex freq
The @kbd{l f} (@code{calc-freq}) [@code{freq}] command converts either
either a midi number or a note given in scientific pitch notation to
the corresponding frequency. For example, @code{Asharp_2 + 30 cents}
gets converted to @code{118.578040134 Hz} and @code{55} to
@code{195.99771799 Hz}.
Since the frequencies of notes are not usually given exactly (and are
typically irrational), the customizable variable
@code{calc-note-threshold} determines how close (in cents) a frequency
needs to be to a note to be recognized as that note
(@pxref{Customizing Calc}). This variable has a default value of
@code{1}. For example, middle @var{C} is approximately
@expr{261.625565302 Hz}; this frequency is often shortened to
@expr{261.625 Hz}. Without @code{calc-note-threshold} (or a value of
@expr{0}), Calc would convert @code{261.625 Hz} to scientific pitch
notation @code{B_3 + 99.9962592773 cents}; with the default value of
@code{1}, Calc converts @code{261.625 Hz} to @code{C_4}.
@node Store and Recall, Graphics, Units, Top
@chapter Storing and Recalling
@ -35481,6 +35552,15 @@ and the default value of @code{calc-logunits-field-reference} is
@code{"20 uPa"}.
@end defvar
@defvar calc-note-threshold
See @ref{Musical Notes}.@*
The variable @code{calc-note-threshold} is a number (written as a
string) which determines how close (in cents) a frequency needs to be
to a note to be recognized as that note.
The default value of @code{calc-note-threshold} is 1.
@end defvar
@defvar calc-highlight-selections-with-faces
@defvarx calc-selected-face
@defvarx calc-nonselected-face
@ -36129,26 +36209,29 @@ keystrokes are not listed in this summary.
@r{ v x@: I k T @: @: @:ltpt@:(x,v)}
@c
@r{ a b@: l + @: @: 2 @:lupoweradd@:(a,b)}
@r{ a b@: H l + @: @: 2 @:lufieldadd@:(a,b)}
@r{ a b@: l - @: @: 2 @:lupowersub@:(a,b)}
@r{ a b@: H l - @: @: 2 @:lufieldsub@:(a,b)}
@r{ a b@: l * @: @: 2 @:lupowermul@:(a,b)}
@r{ a b@: H l * @: @: 2 @:lufieldmul@:(a,b)}
@r{ a b@: l / @: @: 2 @:lupowerdiv@:(a,b)}
@r{ a b@: H l / @: @: 2 @:lufielddiv@:(a,b)}
@r{ a@: l d @: @: 1 @:dbpowerlevel@:(a)}
@r{ a b@: O l d @: @: 2 @:dbpowerlevel@:(a,b)}
@r{ a@: H l d @: @: 1 @:dbfieldlevel@:(a)}
@r{ a b@: O H l d @: @: 2 @:dbfieldlevel@:(a,b)}
@r{ a@: l n @: @: 1 @:nppowerlevel@:(a)}
@r{ a b@: O l n @: @: 2 @:nppowerlevel@:(a,b)}
@r{ a@: H l n @: @: 1 @:npfieldlevel@:(a)}
@r{ a b@: O H l n @: @: 2 @:npfieldlevel@:(a,b)}
@r{ a@: l q @: @: 1 @:powerquant@:(a)}
@r{ a b@: O l q @: @: 2 @:powerquant@:(a,b)}
@r{ a@: H l q @: @: 1 @:fieldquant@:(a)}
@r{ a b@: O H l q @: @: 2 @:fieldquant@:(a,b)}
@r{ a b@: l + @: @: @:lupoweradd@:(a,b)}
@r{ a b@: H l + @: @: @:lufieldadd@:(a,b)}
@r{ a b@: l - @: @: @:lupowersub@:(a,b)}
@r{ a b@: H l - @: @: @:lufieldsub@:(a,b)}
@r{ a b@: l * @: @: @:lupowermul@:(a,b)}
@r{ a b@: H l * @: @: @:lufieldmul@:(a,b)}
@r{ a b@: l / @: @: @:lupowerdiv@:(a,b)}
@r{ a b@: H l / @: @: @:lufielddiv@:(a,b)}
@r{ a@: l d @: @: @:dbpowerlevel@:(a)}
@r{ a b@: O l d @: @: @:dbpowerlevel@:(a,b)}
@r{ a@: H l d @: @: @:dbfieldlevel@:(a)}
@r{ a b@: O H l d @: @: @:dbfieldlevel@:(a,b)}
@r{ a@: l n @: @: @:nppowerlevel@:(a)}
@r{ a b@: O l n @: @: @:nppowerlevel@:(a,b)}
@r{ a@: H l n @: @: @:npfieldlevel@:(a)}
@r{ a b@: O H l n @: @: @:npfieldlevel@:(a,b)}
@r{ a@: l q @: @: @:powerquant@:(a)}
@r{ a b@: O l q @: @: @:powerquant@:(a,b)}
@r{ a@: H l q @: @: @:fieldquant@:(a)}
@r{ a b@: O H l q @: @: @:fieldquant@:(a,b)}
@r{ a@: l s @: @: @:spn@:(a)}
@r{ a@: l m @: @: @:midi@:(a)}
@r{ a@: l f @: @: @:freq@:(a)}
@c
@r{ @: m a @: @: 12,13 @:calc-algebraic-mode@:}

View File

@ -893,10 +893,10 @@ applied, when the corresponding D-Bus message is created:
@end example
Other Lisp objects, like symbols or hash tables, are not accepted as
input parameter.
input parameters.
If it is necessary to use another D-Bus type, a corresponding type
symbol can be preceeded to the corresponding Lisp object. Basic D-Bus
symbol can be prepended to the corresponding Lisp object. Basic D-Bus
types are represented by the type symbols @code{:byte},
@code{:boolean}, @code{:int16}, @code{:uint16}, @code{:int32},
@code{:uint32}, @code{:int64}, @code{:uint64}, @code{:double},

View File

@ -129,48 +129,33 @@ original @file{dired-x.el}).
@section Features
@cindex Features
Some features provided by Dired Extra
Some features provided by Dired Extra:
@enumerate
@item
Omitting uninteresting files from Dired listing.
@itemize @bullet
@xref{Omitting Files in Dired}.
@end itemize
Omitting uninteresting files from Dired listing
(@pxref{Omitting Files in Dired}).
@item
Local variables for Dired directories.
@itemize @bullet
@xref{Local Variables}.
@end itemize
Guessing shell commands in Dired buffers
(@pxref{Shell Command Guessing}).
@item
Guessing shell commands in Dired buffers.
@itemize @bullet
@xref{Shell Command Guessing}.
@end itemize
@item
Running Dired command in non-Dired buffers.
@itemize @bullet
@xref{Virtual Dired}.
@end itemize
Running Dired command in non-Dired buffers
(@pxref{Virtual Dired}).
@item
Finding a file mentioned in a buffer
@itemize @bullet
@xref{Find File At Point}.
@end itemize
(@pxref{Find File At Point}).
@item
Commands using file marking.
@itemize @bullet
@xref{Advanced Mark Commands}.
@end itemize
Commands using file marking
(@pxref{Advanced Mark Commands}).
@end enumerate
@noindent
@file{dired-x.el} binds some functions to keys in Dired Mode (@pxref{Key
Index}) and also binds @kbd{C-x C-j} and @kbd{C-x 4 C-j} @emph{globally} to
@code{dired-jump} (@pxref{Miscellaneous Commands}). It may also bind @kbd{C-x
C-f} and @kbd{C-x 4 C-f} to @code{dired-x-find-file} and
@code{dired-x-find-file-other-window}, respectively (@pxref{Find File At
Point}).
@code{dired-jump} (@pxref{Miscellaneous Commands}). Optionally, it
also binds @kbd{C-x C-f} and @kbd{C-x 4 C-f} to
@code{dired-x-find-file} and @code{dired-x-find-file-other-window},
respectively (@pxref{Find File At Point}).
@node Technical Details, , Features, Introduction
@section Technical Details
@ -351,28 +336,17 @@ inside your @code{dired-mode-hook} to have omitting initially turned on in
@emph{every} Dired buffer (@pxref{Installation}). You can then use @kbd{M-o} to
unomit in that buffer.
To enable omitting automatically only in certain directories one can use Dired
Local Variables and put
To enable omitting automatically only in certain directories you can add
a directory local setting
(@pxref{Directory Variables,,,emacs,The Gnu Emacs manual}) for Dired mode
@example
Local Variables:
dired-omit-mode: t
End:
((dired-mode . ((dired-omit-mode . t))))
@end example
@noindent
into a file @file{.dired} (the default value of
@code{dired-local-variables-file}) in that directory (@pxref{Local Variables}).
@table @code
@findex dired-omit-here-always
@item dired-omit-here-always
This is an interactive function that creates a local variables file exactly
like the example above (if it does not already exist) in the file
@code{dired-local-variables-file} in the current directory and then refreshes
the directory listing (@pxref{Local Variables}).
@end table
to a @file{.dir-locals.el} file in that directory. You can use the
command @code{add-dir-local-variable} to do this.
@vindex dired-omit-files
@item dired-omit-files
@ -490,7 +464,6 @@ Loading @file{dired-x.el} will install Dired Omit by putting
call @code{dired-extra-startup}, which in turn calls @code{dired-omit-startup}
in your @code{dired-mode-hook}.
@c FIXME does the standard dir-locals mechanism obsolete this?
@node Local Variables, Shell Command Guessing, Omitting Files in Dired, Top
@chapter Local Variables for Dired Directories
@ -498,10 +471,15 @@ in your @code{dired-mode-hook}.
@vindex dired-local-variables-file
@vindex dired-enable-local-variables
@noindent
When Dired visits a directory, it looks for a file whose name is the value of
variable @code{dired-local-variables-file} (default: @file{.dired}). If such
a file is found, Dired will temporarily insert it into the Dired buffer and
run @code{hack-local-variables}.
This Dired-X feature is obsolete as of Emacs 24.1. The standard Emacs
directory local variables mechanism (@pxref{Directory
Variables,,,emacs,The Gnu Emacs manual}) replaces it. For an example of
the new mechanims, @pxref{Omitting Variables}.
When Dired visits a directory, it looks for a file whose name is the
value of variable @code{dired-local-variables-file} (default: @file{.dired}).
If such a file is found, Dired will temporarily insert it into the Dired
buffer and run @code{hack-local-variables}.
@noindent
For example, if the user puts
@ -527,7 +505,7 @@ omitted automatically
@noindent
You can set @code{dired-local-variables-file} to @code{nil} to suppress this.
The value of @code{dired-enable-local-variables} controls if and how these
local variables are read. This variable exists so that if may override the
local variables are read. This variable exists so that it may override the
default value of @code{enable-local-variables}.
@noindent
@ -551,12 +529,10 @@ into the Dired buffer and run @code{hack-local-variables}.
@item dired-enable-local-variables
Default: @code{t}
Controls the use of local-variables lists in Dired. The value can be @code{t},
@code{nil}, or something else. A value of @code{t} means local-variables
lists are obeyed in the @code{dired-local-variables-file}; @code{nil} means
they are ignored; anything else means query. This variable temporarily
overrides the value of @code{enable-local-variables} when the Dired Local
Variables are hacked.
Controls the use of local-variables lists in Dired. This variable
temporarily overrides the value of @code{enable-local-variables} when
the Dired Local Variables are hacked. It takes the same values as that
variable. A value of @code{nil} means to ignore any Dired Local Variables.
@end table
@node Shell Command Guessing, Virtual Dired, Local Variables, Top
@ -891,24 +867,12 @@ some commands it is appropriate that they use the current Dired
directory instead of @code{default-directory}, e.g., @code{find-file} and
@code{compile}.
A general mechanism is provided for special handling of the working
directory in special major modes:
@table @code
@item dired-default-directory-alist
@vindex dired-default-directory-alist
Default: @code{((dired-mode . (dired-current-directory)))}
Alist of major modes and their notion of @code{default-directory}, as a
Lisp expression to evaluate. A resulting value of @code{nil} is ignored
in favor of @code{default-directory}.
@item dired-default-directory
@findex dired-default-directory
Use this function like you would use the variable
@code{default-directory}, except that @code{dired-default-directory}
also consults the variable @code{dired-default-directory-alist}.
@end table
@findex dired-smart-shell-command
@findex shell-command
@kindex M-!
The command @code{dired-smart-shell-command}, bound to @kbd{M-!} in
Dired buffers, is like @code{shell-command}, but it runs with
@code{default-directory} bound to the current Dired directory.
@node Find File At Point, Miscellaneous Commands, Multiple Dired Directories, Top
@section Find File At Point
@ -1017,12 +981,6 @@ inserted subdirectories.
@end table
@table @code
@item dired-smart-shell-command
@findex dired-smart-shell-command
@findex shell-command
@kindex M-!
Like function @code{shell-command}, but in the current Dired directory.
Bound to @kbd{M-!} in Dired buffers.
@item dired-jump
@findex dired-jump

View File

@ -87,7 +87,7 @@ informing you that the emulation has been enabled: ``Default EDT keymap
active''.
You can have the EDT Emulation start up automatically, each time you
initiate a GNU Emacs session, by adding the following line to your
initiate an Emacs session, by adding the following line to your
@file{.emacs} file:
@example
@ -218,7 +218,7 @@ user quits without saving those buffers.
@item
Emulate EDT Keypad Mode commands closely so that current EDT users will
find that it easy and comfortable to use GNU Emacs with a small learning
find that it easy and comfortable to use Emacs with a small learning
curve.
@item
@ -237,7 +237,7 @@ Provide an easy way to restore @strong{all} original Emacs key bindings,
just as they existed before the EDT emulation was first invoked.
@item
Support GNU Emacs 19 and higher. XEmacs 19, and above, is also supported.
Support Emacs and XEmacs 19 and higher.
@item
Supports highlighting of marked text within the EDT emulation on all
@ -285,13 +285,13 @@ apply to you.
@node Starting emulation
@chapter How to Get Started
Start up GNU Emacs and enter @kbd{M-x edt-emulation-on} to begin the
Start up Emacs and enter @kbd{M-x edt-emulation-on} to begin the
emulation. After initialization is complete, the following message will
appear below the status line informing you that the emulation has been
enabled: ``Default EDT keymap active''.
You can have the EDT Emulation start up automatically, each time you
initiate a GNU Emacs session, by adding the following line to your
initiate an Emacs session, by adding the following line to your
@file{.emacs} file:
@example
@ -306,7 +306,7 @@ in the EDT Default Mode).
It is easy to customize key bindings in the EDT Emulation
(@pxref{Customizing}). Customizations are placed in a file called
@file{edt-user.el}. The Emacs @file{etc/} directory contains an
example. If @file{edt-user.el} is found in your GNU Emacs load path
example. If @file{edt-user.el} is found in your Emacs load path
during EDT Emulation initialization, then the following message will
appear below the status line indicating that the emulation has been
enabled, enhanced by your own customizations: ``User EDT custom keymap
@ -321,8 +321,8 @@ restores the original key bindings in effect just prior to invoking the
emulation.
Emacs binds keys to @acronym{ASCII} control characters and so does the
real EDT. Where EDT key bindings and GNU Emacs key bindings conflict,
the default GNU Emacs key bindings are retained by the EDT emulation by
real EDT. Where EDT key bindings and Emacs key bindings conflict,
the default Emacs key bindings are retained by the EDT emulation by
default. If you are a diehard EDT user you may not like this. The
@ref{Control keys} section explains how to change this so that the EDT
bindings to @acronym{ASCII} control characters override the default
@ -364,7 +364,7 @@ older SunOS release configured with a Sun Type 5 keyboard:
@example
! File: .xmodmaprc
!
! Set up Sun Type 5 keypad for use with the GNU Emacs EDT Emulation
! Set up Sun Type 5 keypad for use with the Emacs EDT Emulation
!
keycode 53 = KP_Divide
keycode 54 = KP_Multiply
@ -436,7 +436,7 @@ things up nicely.
@example
! File: .xmodmaprc
!
! Set up PC keypad under GNU/Linux for the GNU Emacs EDT Emulation
! Set up PC keypad under GNU/Linux for the Emacs EDT Emulation
!
clear mod2
keycode 77 = F12
@ -518,7 +518,7 @@ assign Num_Lock back to mod2.
@example
! File: .xmodmaprc
!
! Set up PC keypad under GNU/Linux for the GNU Emacs EDT Emulation
! Set up PC keypad under GNU/Linux for the Emacs EDT Emulation
!
clear mod2
keycode 77 = F12
@ -541,7 +541,7 @@ In general, you will find that this emulation of EDT replicates most,
but not all, of EDT's most used Keypad Mode editing functions and
behavior. It is not perfect, but most EDT users who have tried the
emulation agree that it is quite good enough to make it easy for
die-hard EDT users to move over to using GNU Emacs.
die-hard EDT users to move over to using Emacs.
Here's a list of the most important differences between EDT and this GNU
Emacs EDT Emulation. The list is short but you must be aware of these
@ -783,7 +783,7 @@ terminals on the same system, you need not look at @file{edt-user.el2}.
@end ignore
First, you need to have your own private lisp directory, say
@file{~/lisp}, and you should add it to the GNU Emacs load path.
@file{~/lisp}, and you should add it to the Emacs load path.
@strong{Please note:} A few sites have different load-path requirements,
so the above directions may need some modification if your site has such
@ -898,8 +898,8 @@ Here are some examples:
@node Control keys
@section Enabling EDT Control Key Sequence Bindings
Where EDT key bindings and GNU Emacs key bindings conflict, the default
GNU Emacs key bindings are retained by default. Some diehard EDT users
Where EDT key bindings and Emacs key bindings conflict, the default
Emacs key bindings are retained by default. Some diehard EDT users
may not like this. So, if the variable
@code{edt-use-EDT-control-key-bindings} is set to true in a user's
@file{.emacs} file, then the default EDT Emulation mode will enable most

View File

@ -36,7 +36,7 @@ and modified without restriction.
@titlepage
@title ERC manual
@subtitle a full-featured IRC client
@subtitle for GNU Emacs and XEmacs
@subtitle for Emacs and XEmacs
@c The following two commands
@c start the copyright page.

View File

@ -1042,11 +1042,11 @@ Emacs now supports using both X displays and ttys in the same session
@item
Emacs can be started as a daemon in the background.
@cindex NeXTSTEP port
@cindex NeXTstep port
@cindex GNUstep port
@cindex Mac OS X Cocoa
@item
There is a new NeXTSTEP port of Emacs. This supports GNUstep and Mac OS
There is a new NeXTstep port of Emacs. This supports GNUstep and Mac OS
X (via the Cocoa libraries). The Carbon port of Emacs, which supported
Mac OS X in Emacs 22, has been removed.

View File

@ -9502,8 +9502,11 @@ Say how much time has elapsed between the article was posted and now
Date: 6 weeks, 4 days, 1 hour, 3 minutes, 8 seconds ago
@end example
This line is updated continually by default. If you wish to switch
that off, say:
This line is updated continually by default. The frequency (in
seconds) is controlled by the @code{gnus-article-update-date-headers}
variable.
If you wish to switch updating off, say:
@vindex gnus-article-update-date-headers
@lisp
@ -22495,7 +22498,7 @@ variables should be either strings or symbols naming functions that
return a string. When the mouse passes over text with this property
set, a balloon window will appear and display the string. Please
refer to @ref{Tooltips, ,Tooltips, emacs, The Emacs Manual},
(in GNU Emacs) or the doc string of @code{balloon-help-mode} (in
(in Emacs) or the doc string of @code{balloon-help-mode} (in
XEmacs) for more information on this. (For technical reasons, the
guillemets have been approximated as @samp{<<} and @samp{>>} in this
paragraph.)
@ -27763,7 +27766,7 @@ to install Gnus after compiling it, give @file{make.bat} @code{/copy} as
the second parameter.
@file{make.bat} has been rewritten from scratch, it now features
automatic recognition of XEmacs and GNU Emacs, generates
automatic recognition of XEmacs and Emacs, generates
@file{gnus-load.el}, checks if errors occur while compilation and
generation of info files and reports them at the end of the build
process. It now uses @code{makeinfo} if it is available and falls

View File

@ -4275,7 +4275,7 @@ browse-url-browser-function} or similar when attempting to load IDLWAVE
under XEmacs.}
You don't have the @samp{browse-url} (or other required) XEmacs package.
Unlike GNU Emacs, XEmacs distributes many packages separately from the
Unlike Emacs, XEmacs distributes many packages separately from the
main program. IDLWAVE is actually among these, but is not always the
most up to date. When installing IDLWAVE as an XEmacs package, it
should prompt you for required additional packages. When installing it

View File

@ -211,9 +211,9 @@ However, MH-E was the tip of the iceberg, and I discovered more and
more niceties about GNU Emacs and MH@. Now I'm fully hooked on both of
them.
The MH-E package is distributed with GNU Emacs@footnote{Version
@value{VERSION} of MH-E appeared in GNU Emacs 23.1. It is supported
in GNU Emacs 21 and 22, as well as XEmacs 21 (except for versions
The MH-E package is distributed with Emacs@footnote{Version
@value{VERSION} of MH-E appeared in Emacs 23.1. It is supported
in Emacs 21 and 22, as well as XEmacs 21 (except for versions
21.5.9-21.5.16). It is compatible with MH versions 6.8.4 and higher,
all versions of nmh, and GNU mailutils 1.0 and higher.}, so you
shouldn't have to do anything special to use it. Gnus is also

View File

@ -64,7 +64,7 @@ developing GNU and promoting software freedom.''
@macro obsolete{old,new}
@sp 1
@strong{Compatibility}:
@code{\new\} introduced in @semantic{} version 2.0 supercedes
@code{\new\} introduced in @semantic{} version 2.0 supersedes
@code{\old\} which is now obsolete.
@end macro

View File

@ -3,7 +3,7 @@
% Load plain if necessary, i.e., if running under initex.
\expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
%
\def\texinfoversion{2011-02-14.11}
\def\texinfoversion{2011-02-24.09}
%
% Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995,
% 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
@ -218,7 +218,7 @@
\tracingmacros2
\tracingrestores1
\showboxbreadth\maxdimen \showboxdepth\maxdimen
\ifx\eTeXversion\undefined\else % etex gives us more logging
\ifx\eTeXversion\thisisundefined\else % etex gives us more logging
\tracingscantokens1
\tracingifs1
\tracinggroups1
@ -611,7 +611,7 @@
\else\ifx\temp\offword \plainnonfrenchspacing
\else
\errhelp = \EMsimple
\errmessage{Unknown @frenchspacing option `\temp', must be on/off}%
\errmessage{Unknown @frenchspacing option `\temp', must be on|off}%
\fi\fi
}
@ -1082,9 +1082,8 @@
\newif\ifpdfmakepagedest
% when pdftex is run in dvi mode, \pdfoutput is defined (so \pdfoutput=1
% can be set). So we test for \relax and 0 as well as \undefined,
% borrowed from ifpdf.sty.
\ifx\pdfoutput\undefined
% can be set). So we test for \relax and 0 as well as being undefined.
\ifx\pdfoutput\thisisundefined
\else
\ifx\pdfoutput\relax
\else
@ -1516,7 +1515,7 @@
% if we are producing pdf, and we have \pdffontattr, then define cmaps.
% (\pdffontattr was introduced many years ago, but people still run
% older pdftex's; it's easy to conditionalize, so we do.)
\ifpdf \ifx\pdffontattr\undefined \else
\ifpdf \ifx\pdffontattr\thisisundefined \else
\begingroup
\catcode`\^^M=\active \def^^M{^^J}% Output line endings as the ^^J char.
\catcode`\%=12 \immediate\pdfobj stream {%!PS-Adobe-3.0 Resource-CMap
@ -1783,7 +1782,7 @@
% Use cm as the default font prefix.
% To specify the font prefix, you must define \fontprefix
% before you read in texinfo.tex.
\ifx\fontprefix\undefined
\ifx\fontprefix\thisisundefined
\def\fontprefix{cm}
\fi
% Support font families that don't use the same naming scheme as CM.
@ -2297,12 +2296,11 @@
\let\markupsetuplqkbd \markupsetnoligaturesquoteleft
% Allow an option to not replace quotes with a regular directed right
% quote/apostrophe (char 0x27), but instead use the undirected quote
% from cmtt (char 0x0d). The undirected quote is ugly, so don't make it
% the default, but it works for pasting with more pdf viewers (at least
% evince), the lilypond developers report. xpdf does work with the
% regular 0x27.
% Allow an option to not use regular directed right quote/apostrophe
% (char 0x27), but instead the undirected quote from cmtt (char 0x0d).
% The undirected quote is ugly, so don't make it the default, but it
% works for pasting with more pdf viewers (at least evince), the
% lilypond developers report. xpdf does work with the regular 0x27.
%
\def\codequoteright{%
\expandafter\ifx\csname SETtxicodequoteundirected\endcsname\relax
@ -2326,6 +2324,36 @@
\else \char'22 \fi
}
% Commands to set the quote options.
%
\parseargdef\codequoteundirected{%
\def\temp{#1}%
\ifx\temp\onword
\expandafter\let\csname SETtxicodequoteundirected\endcsname
= t%
\else\ifx\temp\offword
\expandafter\let\csname SETtxicodequoteundirected\endcsname
= \relax
\else
\errhelp = \EMsimple
\errmessage{Unknown @codequoteundirected value `\temp', must be on|off}%
\fi\fi
}
%
\parseargdef\codequotebacktick{%
\def\temp{#1}%
\ifx\temp\onword
\expandafter\let\csname SETtxicodequotebacktick\endcsname
= t%
\else\ifx\temp\offword
\expandafter\let\csname SETtxicodequotebacktick\endcsname
= \relax
\else
\errhelp = \EMsimple
\errmessage{Unknown @codequotebacktick value `\temp', must be on|off}%
\fi\fi
}
% [Knuth] pp. 380,381,391, disable Spanish ligatures ?` and !` of \tt font.
\def\noligaturesquoteleft{\relax\lq}
@ -2527,7 +2555,7 @@
\allowcodebreaksfalse
\else
\errhelp = \EMsimple
\errmessage{Unknown @allowcodebreaks option `\txiarg'}%
\errmessage{Unknown @allowcodebreaks option `\txiarg', must be true|false}%
\fi\fi
}
@ -3109,7 +3137,7 @@
% Textures 1.7.7 (preloaded format=plain 93.10.14) (68K) 16 APR 2004 02:38
% so we'll define it if necessary.
%
\ifx\Orb\undefined
\ifx\Orb\thisisundefined
\def\Orb{\mathhexbox20D}
\fi
@ -3384,7 +3412,7 @@
% This produces Day Month Year style of output.
% Only define if not already defined, in case a txi-??.tex file has set
% up a different format (e.g., txi-cs.tex does this).
\ifx\today\undefined
\ifx\today\thisisundefined
\def\today{%
\number\day\space
\ifcase\month
@ -6465,7 +6493,7 @@
%
\def\Equotation{%
\par
\ifx\quotationauthor\undefined\else
\ifx\quotationauthor\thisisundefined\else
% indent a bit.
\leftline{\kern 2\leftskip \sl ---\quotationauthor}%
\fi
@ -7000,7 +7028,7 @@
% To do this right we need a feature of e-TeX, \scantokens,
% which we arrange to emulate with a temporary file in ordinary TeX.
\ifx\eTeXversion\undefined
\ifx\eTeXversion\thisisundefined
\newwrite\macscribble
\def\scantokens#1{%
\toks0={#1}%
@ -7422,6 +7450,27 @@
\fi
}
% @xrefautosectiontitle on|off says whether @section(ing) names are used
% automatically in xrefs, if the third arg is not explicitly specified.
% This was provided as a "secret" @set xref-automatic-section-title
% variable, now it's official.
%
\parseargdef\xrefautomaticsectiontitle{%
\def\temp{#1}%
\ifx\temp\onword
\expandafter\let\csname SETxref-automatic-section-title\endcsname
= \empty
\else\ifx\temp\offword
\expandafter\let\csname SETxref-automatic-section-title\endcsname
= \relax
\else
\errhelp = \EMsimple
\errmessage{Unknown @xrefautomaticsectiontitle value `\temp',
must be on|off}%
\fi\fi
}
% @xref, @pxref, and @ref generate cross-references. For \xrefX, #1 is
% the node name, #2 the name of the Info cross-reference, #3 the printed
% node name, #4 the name of the Info file, #5 the name of the printed
@ -7438,7 +7487,7 @@
\setbox0=\hbox{\printedrefname\unskip}%
\ifdim \wd0 = 0pt
% No printed node name was explicitly given.
\expandafter\ifx\csname SETxref-automatic-section-title\endcsname\relax
\expandafter\ifx\csname SETxref-automatic-section-title\endcsname \relax
% Use the node name inside the square brackets.
\def\printedrefname{\ignorespaces #1}%
\else
@ -7908,7 +7957,7 @@
it from ftp://tug.org/tex/epsf.tex.}
%
\def\image#1{%
\ifx\epsfbox\undefined
\ifx\epsfbox\thisiundefined
\ifwarnednoepsf \else
\errhelp = \noepsfhelp
\errmessage{epsf.tex not found, images will be ignored}%

View File

@ -369,13 +369,12 @@ behind the scenes when you open a file with @value{tramp}.
@cindex obtaining Tramp
@value{tramp} is freely available on the Internet and the latest
release may be downloaded from
@uref{ftp://ftp.gnu.org/gnu/tramp/}. This release includes the full
documentation and code for @value{tramp}, suitable for installation.
But GNU Emacs (22 or later) includes @value{tramp} already, and there
is a @value{tramp} package for XEmacs, as well. So maybe it is easier
to just use those. But if you want the bleeding edge, read
on@dots{...}
release may be downloaded from @uref{ftp://ftp.gnu.org/gnu/tramp/}.
This release includes the full documentation and code for
@value{tramp}, suitable for installation. But Emacs (22 or later)
includes @value{tramp} already, and there is a @value{tramp} package
for XEmacs, as well. So maybe it is easier to just use those. But if
you want the bleeding edge, read on@dots{...}
For the especially brave, @value{tramp} is available from CVS. The CVS
version is the latest version of the code and may contain incomplete
@ -445,10 +444,10 @@ GVFS integration started in February 2009.
@end ifset
In December 2001, @value{tramp} has been added to the XEmacs package
repository. Being part of the GNU Emacs repository happened in June
2002, the first release including @value{tramp} was GNU Emacs 22.1.
repository. Being part of the Emacs repository happened in June 2002,
the first release including @value{tramp} was Emacs 22.1.
@value{tramp} is also a GNU/Linux Debian package since February 2001.
@value{tramp} is also a Debian GNU/Linux package since February 2001.
@c Installation chapter is necessary only in case of standalone
@ -1704,9 +1703,10 @@ By default, this is set to a reasonable set of defaults for most
machines. The symbol @code{tramp-default-remote-path} is a place
holder, it is replaced by the list of directories received via the
command @command{getconf PATH} on your remote machine. For example,
on GNU Debian this is @file{/bin:/usr/bin}, whereas on Solaris this is
@file{/usr/xpg4/bin:/usr/ccs/bin:/usr/bin:/opt/SUNWspro/bin}. It is
recommended to apply this symbol on top of @code{tramp-remote-path}.
on Debian GNU/Linux this is @file{/bin:/usr/bin}, whereas on Solaris
this is @file{/usr/xpg4/bin:/usr/ccs/bin:/usr/bin:/opt/SUNWspro/bin}.
It is recommended to apply this symbol on top of
@code{tramp-remote-path}.
It is possible, however, that your local (or remote ;) system
administrator has put the tools you want in some obscure local
@ -2740,8 +2740,8 @@ There is also a Savannah project page.
@item
Which systems does it work on?
The package has been used successfully on GNU Emacs 22, GNU Emacs 23,
XEmacs 21 (starting with 21.4), and SXEmacs 22.
The package has been used successfully on Emacs 22, Emacs 23, Emacs
24, XEmacs 21 (starting with 21.4), and SXEmacs 22.
The package was intended to work on Unix, and it really expects a
Unix-like system on the remote end (except the @option{smb} method),
@ -3583,9 +3583,9 @@ printed and deleted.
But I have decided that this is too fragile to reliably work, so on some
systems you'll have to do without the uuencode methods.
@item The @value{tramp} filename syntax differs between GNU Emacs and XEmacs.
@item The @value{tramp} filename syntax differs between Emacs and XEmacs.
The GNU Emacs maintainers wish to use a unified filename syntax for
The Emacs maintainers wish to use a unified filename syntax for
Ange-FTP and @value{tramp} so that users don't have to learn a new
syntax. It is sufficient to learn some extensions to the old syntax.

View File

@ -63,7 +63,7 @@
@set postfixhop /
@set ipv6prefix
@set ipv6postfix
@set emacsothername GNU Emacs
@set emacsothername Emacs
@set emacsotherdir emacs
@set emacsotherfilename tramp-emacs.html
@end ifset

View File

@ -116,7 +116,10 @@ The meaning of the @var{path} component depends on the service.
@cindex @file{~/.url}
@cindex configuration files
The directory in which URL configuration files, the cache etc.,
reside. Default @file{~/.url}.
reside. The old default was @file{~/.url}, and this directory
is still used if it exists. The new default is a @file{url/}
directory in @code{user-emacs-directory}, which is normally
@file{~/.emacs.d}.
@end defvar
@node Parsed URLs
@ -383,20 +386,7 @@ Currently this is just the raw header contents.
HTTP URLs are retrieved into a buffer containing the HTTP headers
followed by the body. Since the headers are quasi-MIME, they may be
processed using the MIME library. @xref{Top,, Emacs MIME,
emacs-mime, The Emacs MIME Manual}. The URL package provides a
function to do this in general:
@defun url-decode-text-part handle &optional coding
This function decodes charset-encoded text in the current buffer. In
Emacs, the buffer is expected to be unibyte initially and is set to
multibyte after decoding.
HANDLE is the MIME handle of the original part. CODING is an explicit
coding to use, overriding what the MIME headers specify.
The coding system used for the decoding is returned.
Note that this function doesn't deal with @samp{http-equiv} charset
specifications in HTML @samp{<meta>} elements.
@end defun
emacs-mime, The Emacs MIME Manual}.
@node file/ftp
@section file and ftp

View File

@ -1,3 +1,7 @@
2011-03-06 Juanma Barranquero <lekktu@gmail.com>
* srecode/el.srt: Fix typo.
2011-02-21 Chong Yidong <cyd@stupidchicken.com>
* themes/tango-dark-theme.el: Tweak background on low-color
@ -117,7 +121,7 @@
* NEWS: Mention new Tramp method "ksu".
2010-12-13 W. Martin Borgert <debacle@debian.org> (tiny change)
2010-12-13 W. Martin Borgert <debacle@debian.org> (tiny change)
* schema/schemas.xml: Add DocBook (Bug#7491).

View File

@ -71,6 +71,9 @@ from load-path. -Q now implies this.
client frame in parent X window ID, via XEmbed. This works like the
--parent-id argument to Emacs.
+++
*** New emacsclient argument -q/--quiet suppresses some status messages.
*** If emacsclient shuts down as a result of Emacs signalling an
error, its exit status is 1.
@ -176,6 +179,8 @@ higher-resolution time stamps.
and SIGHUP, and upon SIGINT in batch mode.
** kill-emacs-hook is now also run in batch mode.
If you have code that adds something to kill-emacs-hook, you should
consider if it is still appropriate to add it in the noninteractive case.
** New scrolling commands `scroll-up-command' and `scroll-down-command'
(bound to C-v/[next] and M-v/[prior]) does not signal errors at top/bottom
@ -242,6 +247,15 @@ replaced with Lisp commands `doc-file-to-man' and `doc-file-to-info'.
* Editing Changes in Emacs 24.1
** Search changes
+++
*** C-y in Isearch is now bound to isearch-yank-kill, instead of
isearch-yank-line.
+++
*** M-s C-e in Isearch is now bound to isearch-yank-line.
+++
** There is a new command `count-words-region', which does what you expect.
@ -330,7 +344,7 @@ prompts for a number to count from and for a format string.
** The Landmark game is now invoked with `landmark', not `lm'.
** Prolog mode has been completely revamped, with lots of additional
functionality such as more intelligent indentation, electricty, support for
functionality such as more intelligent indentation, electricity, support for
more variants, including Mercury, and a lot more.
** shell-mode can track your cwd by reading it from your prompt.
@ -347,6 +361,17 @@ Just set shell-dir-cookie-re to an appropriate regexp.
** browse-url has gotten a new variable that is used for mailto: URLs,
`browse-url-mailto-function', which defaults to `browse-url-mail'.
** Directory local variables can apply to file-less buffers, in certain modes
(eg dired, vc-dir, log-edit). For example, adding
"(diff-mode . ((mode . whitespace)))" to your .dir-locals.el file,
will turn on `whitespace-mode' for *vc-diff* buffers. Modes should
call `hack-dir-local-variables-non-file-buffer' to support this.
+++
** You can prevent directory local variables from applying to subdirectories.
Add an element (subdirs . nil) to the alist portion of any variables
settings to indicate said section should not be applied to subdirectories.
** ERC changes
*** New vars `erc-autojoin-timing' and `erc-autojoin-delay'.
@ -380,6 +405,8 @@ You can get a comparable behavior with:
** Calendar, Diary, and Appt
*** New function `diary-hebrew-birthday'.
---
*** The obsolete (since Emacs 22.1) method of enabling the appt package
by adding appt-make-list to diary-hook has been removed. Use appt-activate.
@ -412,16 +439,12 @@ choose a color via list-colors-display.
*** dired-jump and dired-jump-other-window called with a prefix argument
read a file name from the minibuffer instead of using buffer-file-name.
** Directory local variables can apply to file-less buffers.
For example, adding "(diff-mode . ((mode . whitespace)))" to your
.dir-locals.el file, will turn on `whitespace-mode' for *vc-diff* buffers.
+++
*** The `dired local variables' feature provided by Dired-x is obsolete.
The standard directory local variables feature replaces it.
** SQL Mode enhancements.
*** Several variables have been marked as safe local variables. The
variables `sql-product', `sql-user', `sql-server', `sql-database' and
`sql-port' can now be safely used as local variables.
*** `sql-dialect' is a synonym for `sql-product'.
*** Added ability to login with a port on MySQL and Postgres.
@ -530,7 +553,7 @@ objects shown and the details available are product specific.
**** List all objects.
Using `M-x sql-list-all', `C-c C-l a' or selecting "SQL->List all
objects" will list all the objects in the database. At a minimum it
lists the tables and views in the database. Preceeding the command by
lists the tables and views in the database. Preceding the command by
universal argument may provide additional details or extend the
listing to include other schemas objects. The list will appear in a
separate window in view-mode.
@ -538,7 +561,7 @@ separate window in view-mode.
**** List Table details.
Using `M-x sql-list-table', `C-c C-l t' or selecting "SQL->List Table
details" will ask for the name of a database table or view and display
the list of columns in the relation. Preceeding the comand with the
the list of columns in the relation. Preceding the command with the
universal argument may provide additional details about each column.
The list will appear in a separate window in view-mode.
@ -553,7 +576,7 @@ In general, the SQL*Plus option SCAN should always be set OFF under
SQL interactive mode and this option used in its place.
*** SQL interactive mode will replace tabs with spaces.
This prevents the comand interpretter for MySQL and Postgres from
This prevents the command interpreter for MySQL and Postgres from
listing object name completions when being sent text via
`sql-send-*' functions.
@ -562,7 +585,7 @@ listing object name completions when being sent text via
** sregex.el is now obsolete, since rx.el is a strict superset.
** s-region.el and pc-select are now declared obsolete,
superceded by shift-select-mode enabled by default in 23.1.
superseded by shift-select-mode enabled by default in 23.1.
** pc-mode.el is also declared obsolete.
** gdb-mi
@ -642,6 +665,8 @@ Notifications API. It requires D-Bus for communication.
** soap-client.el supports access to SOAP web services from Emacs.
soap-inspect.el is an interactive inspector for SOAP WSDL structures.
** xmodmap-generic-mode for xmodmap files.
* Incompatible Lisp Changes in Emacs 24.1
@ -710,6 +735,7 @@ sc.el, x-menu.el, rnews.el, rnewspost.el
* Lisp changes in Emacs 24.1
** byte-compile-disable-print-circle is obsolete.
** Removed the stack-trace-on-error variable.
Also the debugger can now "continue" from an error, which means it will jump
to the error handler as if the debugger had not been invoked instead of
@ -800,10 +826,9 @@ displayed with a "spinning bar".
runtime checks.
** New configure.bat option --distfiles to specify files to be
included in binary distribution
included in binary distribution
** New make target `dist' to create binary disttribution for Windows
platform
** New make target `dist' to create binary distribution for MS Windows
----------------------------------------------------------------------

View File

@ -129,7 +129,7 @@ starting from the first line of text below the header line.
* Changes in Emacs 23.3 on non-free operating systems
** The nextstep port can have different modifiers for the left and right
** The NeXTstep port can have different modifiers for the left and right
alt/option key by customizing the value for ns-right-alternate-modifier.
@ -697,7 +697,7 @@ a GIF library.
*** Emacs now supports multi-page TIFF images.
** New NeXTSTEP-based port.
** New NeXTstep-based port.
This provides support for GNUstep (via the GNUstep libraries) and Mac
OS X (via the Cocoa libraries).
@ -707,7 +707,7 @@ other emacsen (e.g. X11 build) use --disable-ns-self-contained. See
nextstep/README and nextstep/INSTALL in the Emacs source directory.
** Mac OS X is no longer supported via Carbon.
Use the NeXTSTEP port, described above.
Use the NeXTstep port, described above.
** The new configuration option "--with-dbus" enables D-Bus language
bindings for Emacs.
@ -1746,7 +1746,7 @@ directories in which `ffap-rfc' will first search for RFCs.
*** hide-ifdef-mode allows shadowing ifdef-blocks instead of hiding them.
See option `hide-ifdef-shadow' and function `hide-ifdef-toggle-shadowing'.
*** `icomplete-prospects-height' now supercedes `icomplete-prospects-length'.
*** `icomplete-prospects-height' now supersedes `icomplete-prospects-length'.
*** Info displays breadcrumbs in the header of the page.
See Info-breadcrumbs-depth to control it.

View File

@ -261,7 +261,7 @@ template defgroup :indent :blank
----
(defgroup $?MODESYM$-mode nil
"$MODESYM$ group."
:group 'langauges)
:group 'languages)
----
bind "g"

View File

@ -1,3 +1,7 @@
2011-02-28 Juanma Barranquero <lekktu@gmail.com>
* quail/ethiopic.el ("ethiopic"): Fix tpo in docstring.
2011-01-28 Paul Eggert <eggert@cs.ucla.edu>
Redo spelling of Makefile variables to conform to POSIX.
@ -27,8 +31,8 @@
2010-08-28 Kenichi Handa <handa@m17n.org>
* quail/japanese.el (quail-japanese-update-translation): Fix
handling of invalid key.
* quail/japanese.el (quail-japanese-update-translation):
Fix handling of invalid key.
2010-08-15 Andreas Schwab <schwab@linux-m68k.org>
@ -46,8 +50,7 @@
2010-08-13 Kenichi Handa <handa@m17n.org>
* quail/greek.el ("greek-postfix"): Add rules for Greek style
quotes.
* quail/greek.el ("greek-postfix"): Add rules for Greek style quotes.
2010-08-09 Kenichi Handa <handa@m17n.org>

View File

@ -1,6 +1,6 @@
;;; ja-dic.el --- dictionary for Japanese input method -*-coding: euc-japan; byte-compile-disable-print-circle:t; -*-
;;; ja-dic.el --- dictionary for Japanese input method -*-coding: euc-japan; -*-
;; Generated by the command `skkdic-convert'
;; Date: Tue Feb 16 15:59:19 2010
;; Date: Sat Feb 26 10:26:11 2011
;; Original SKK dictionary file: ../SKK-DIC/SKK-JISYO.L
;; This file is part of GNU Emacs.
@ -16984,7 +16984,6 @@
;; Setting okuri-nasi entries.
(skkdic-set-okuri-nasi
"をんな 女"
""
"あ 嗚 明 安 襾 哇 娃 椏 亞 唖 痾 婀 阿 彼 吾 亜"
"あーくとう アーク灯"

View File

@ -39,7 +39,7 @@
;; This was `cyrillic-jcuken'. Alexander Mikhailian
;; <mikhailian@altern.org> says: "cyrillic-jcuken" is actually
;; russian. It is ok but a bit outdated. This layout has been used
;; in typewriters for ages but it has been superceeded on desktops by
;; in typewriters for ages but it has been superseded on desktops by
;; a variation of this layout, implemented in M$ Windows software.
;; The Windows layout is greatly preferred because of the comma and
;; period being placed more conviniently and, of course, because of

View File

@ -62,7 +62,7 @@ S-SPC or `M-x ethio-insert-ethio-space'
C-' or `M-x ethio-gemination'
Compose the character before the point with the Ethiopic gemination mark.
If the characater is already composed, decompose it and remove the
If the character is already composed, decompose it and remove the
gemination mark."
;; The following keys should work as defined in lisp/language/ethio-util,

View File

@ -1,3 +1,118 @@
2011-03-03 Drake Wilson <drake@begriffli.ch> (tiny change)
* emacsclient.c (longopts): Add quiet.
(decode_options): Handle q/quiet.
(print_help_and_exit): Add q/quiet.
(main): Suppress some messages if quiet option is used.
2011-02-26 Eli Zaretskii <eliz@gnu.org>
* Makefile.in (fakemail${EXEEXT}): Depend on lib/ignore-value.h.
* emacsclient.c (xstrdup) [WINDOWSNT]: Function added back.
(w32_getenv): Use xstrdup to return all values in malloc'ed
storage.
2011-02-26 Paul Eggert <eggert@cs.ucla.edu>
* ebrowse.c (parse_qualified_param_ident_or_type): Make it clear
to reader (and to the compiler) that the loop always executes at
least once. This prevents a warning with recent GCC.
(BROWSE_STRUCT): Remove unused macro.
* fakemail.c: Include <ignore-value.h>.
(put_line): Explicitly ignore fwrite return value, for benefit of
recent glibc + gcc.
(close_the_streams): Diagnose output errors instead of merely
exiting with nonzero status.
(my_fclose, main): Diagnose input errors, and exit with nonzero status.
Formerly, input errors were silently ignored.
* ebrowse.c (putstr): Rename from PUTSTR and turn into a function.
All callers changed. This is cleaner, and avoids GCC warnings about
passing NULL to fputs.
(insert_keyword): Rename parameter to avoid shadowing diagnostic.
2011-02-25 Paul Eggert <eggert@cs.ucla.edu>
* emacsclient.c (main): Avoid dangling 'if'.
(xstrdup): Remove; no longer needed.
(get_current_dir_name, w32_getenv, get_server_config, find_tty):
(set_local_socket, main):
Use const char *, not char *, for pointers that are not assigned
through.
(IF_LINT): New macro.
(set_local_socket, main): Use it to suppress warnings with
GCC -Wuninitialized.
* emacsclient.c: Redo local variables to avoid shadowing problems.
(message, socket_status, start_daemon_and_retry_set_socket):
Rename locals.
(main): Move decl of "i".
* etags.c (ISUPPER): Move to inside the only #ifdef where it's used.
This avoids an unused-macro warning with some GCC settings.
* make-docfile.c (write_globals): Change char * to char const *
to avoid a GCC "assignment discards qualifiers" diagnostic
in some configurations.
(scan_c_file): Refactor local variable decls to make their scope
more accurate and to avoid a GCC -Wuninitialized diagnostic.
2011-02-22 Eli Zaretskii <eliz@gnu.org>
* etags.c (canonicalize_filename, ISUPPER): Fix last change.
* makefile.w32-in ($(BLD)/ebrowse.$(O), $(BLD)/pop.$(O)): Depend
on ../lib/min-max.h.
2011-02-22 Paul Eggert <eggert@cs.ucla.edu>
etags: Downcase drive letters, for consistency with Emacs proper.
* etags.c (upcase): Remove; no longer used.
(canonicalize_filename): Downcase drive letters.
Assume S_ISLNK etc. work, since gnulib supports this.
* etags.c (S_ISREG): Remove.
2011-02-22 Paul Eggert <eggert@cs.ucla.edu>
Assume S_ISLNK etc. work, since gnulib supports this.
* etags.c (S_ISREG): Remove.
2011-02-22 Juanma Barranquero <lekktu@gmail.com>
* makefile.w32-in (obj): Remove filemode.o.
2011-02-21 Paul Eggert <eggert@cs.ucla.edu>
New file "lib/min-max.h".
* ebrowse.c (min, max): Define them by including <min-max.h>
instead of defining it ourselves.
* pop.c (min): Likewise.
* Makefile.in (ebrowse${EXEEXT}, pop.o): Depend on min-max.h.
* movemail.c (popmail): Report fchown failure instead of ignoring it.
But if the file already has the right ownership, don't worry about it.
* make-docfile.c (input_buffer): Rename variables to avoid shadowing.
* test-distrib.c (buf): Make this local, to avoid shadowing.
* movemail.c (main, pop_retr): Rename locals to avoid shadowing.
(progname, sfi, sfo, ibuffer, obuffer): Remove unused vars.
(DONE): Remove unused macro.
(DIRECTORY_SEP, IS_DIRECTORY_SEP, IS_FROM_LINE):
Define these macros only in the contexts that need them.
* pop.c (index): Remove unused macro.
(KPOP_PORT): Define only if KERBEROS is defined.
Declare file-scope functions and variables static if not exported.
This is more consistent, and is nicer with gcc -Wstrict-prototypes.
* ebrowse.c, emacsclient.c, fakemail.c, make-docfile.c, movemail.c:
* profile.c, test-distrib.c, update-game-score.c:
Declare non-'main' functions and variables to be static.
* ebrowse.c: Omit redundant function prototypes.
2011-02-21 Eli Zaretskii <eliz@gnu.org>
* makefile.w32-in ($(BLD)/ctags.$(O), $(BLD)/emacsclient.$(O))
@ -39,7 +154,7 @@
2011-02-05 Paul Eggert <eggert@cs.ucla.edu>
* emacsclient.c: conform to C89 pointer rules
* emacsclient.c: Conform to C89 pointer rules.
(file_name_absolute_p): Accept const char *, not const unsigned
char *, to satisfy C89 rules.
@ -197,7 +312,7 @@
* test-distrib.c (cool_read):
* movemail.c (main, concat):
* make-docfile.c (scan_file, write_c_args):
* emacsclient.c (get_server_config): Fix -Wconversion warning.
* emacsclient.c (get_server_config): Fix -Wconversion warning.
(egetenv): Move conditional definition earlier.
(progname): Use const.
* sorted-doc.c (xstrdup): Use const.
@ -557,7 +672,7 @@
autoconf, not cpp.
(ALL_CFLAGS): Use them as make variables.
2010-04-07 Christoph <cschol2112@googlemail.com> (tiny change)
2010-04-07 Christoph Scholtes <cschol2112@googlemail.com>
* makefile.w32-in (OTHER_PLATFORM_SUPPORT): Use parenthesis
for macros for nmake compatibility.

View File

@ -325,7 +325,7 @@ etags${EXEEXT}: ${srcdir}/etags.c $(REGEXPDEPS) ../src/config.h
-DVERSION="\"${version}\"" ${srcdir}/etags.c \
$(REGEXPOBJ) $(LOADLIBES) -o etags
ebrowse${EXEEXT}: ${srcdir}/ebrowse.c ../src/config.h
ebrowse${EXEEXT}: ${srcdir}/ebrowse.c ${srcdir}/../lib/min-max.h ../src/config.h
$(CC) ${ALL_CFLAGS} -DVERSION="\"${version}\"" \
${srcdir}/ebrowse.c $(LOADLIBES) -o ebrowse
@ -350,10 +350,10 @@ movemail${EXEEXT}: movemail.o pop.o
movemail.o: ${srcdir}/movemail.c ../src/config.h
$(CC) -c ${CPP_CFLAGS} ${MOVE_FLAGS} ${srcdir}/movemail.c
pop.o: ${srcdir}/pop.c ../src/config.h
pop.o: ${srcdir}/pop.c ${srcdir}/../lib/min-max.h ../src/config.h
$(CC) -c ${CPP_CFLAGS} ${MOVE_FLAGS} ${srcdir}/pop.c
fakemail${EXEEXT}: ${srcdir}/fakemail.c ../src/config.h
fakemail${EXEEXT}: ${srcdir}/fakemail.c ${srcdir}/../lib/ignore-value.h ../src/config.h
$(CC) ${ALL_CFLAGS} ${srcdir}/fakemail.c $(LOADLIBES) -o fakemail
emacsclient${EXEEXT}: ${srcdir}/emacsclient.c ../src/config.h

View File

@ -41,12 +41,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#define streq(X, Y) (*(X) == *(Y) && strcmp ((X) + 1, (Y) + 1) == 0)
/* The ubiquitous `max' and `min' macros. */
#ifndef max
#define max(X, Y) ((X) > (Y) ? (X) : (Y))
#define min(X, Y) ((X) < (Y) ? (X) : (Y))
#endif
#include <min-max.h>
/* Files are read in chunks of this number of bytes. */
@ -82,7 +77,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#define TREE_HEADER_STRUCT "[ebrowse-hs "
#define TREE_STRUCT "[ebrowse-ts "
#define MEMBER_STRUCT "[ebrowse-ms "
#define BROWSE_STRUCT "[ebrowse-bs "
#define CLASS_STRUCT "[ebrowse-cs "
/* The name of the symbol table entry for global functions, variables,
@ -465,59 +459,16 @@ struct search_path *search_path_tail;
/* Function prototypes. */
int yylex (void);
void yyparse (void);
void re_init_parser (void);
const char *token_string (int);
char *matching_regexp (void);
void init_sym (void);
struct sym *add_sym (const char *, struct sym *);
void add_link (struct sym *, struct sym *);
void add_member_defn (struct sym *, char *, char *,
int, unsigned, int, int, int);
void add_member_decl (struct sym *, char *, char *, int,
unsigned, int, int, int, int);
void dump_roots (FILE *);
void *xmalloc (int);
void xfree (void *);
void add_global_defn (char *, char *, int, unsigned, int, int, int);
void add_global_decl (char *, char *, int, unsigned, int, int, int);
void add_define (char *, char *, int);
void mark_inherited_virtual (void);
void leave_namespace (void);
void enter_namespace (char *);
void register_namespace_alias (char *, struct link *);
void insert_keyword (const char *, int);
void re_init_scanner (void);
void init_scanner (void);
void process_file (char *);
void add_search_path (char *);
FILE *open_file (char *);
int process_pp_line (void);
int dump_members (FILE *, struct member *);
void dump_sym (FILE *, struct sym *);
int dump_tree (FILE *, struct sym *);
struct member *find_member (struct sym *, char *, int, int, unsigned);
struct member *add_member (struct sym *, char *, int, int, unsigned);
void mark_virtual (struct sym *);
struct sym *make_namespace (char *, struct sym *);
char *sym_scope (struct sym *);
char *sym_scope_1 (struct sym *);
int skip_to (int);
void skip_matching (void);
void member (struct sym *, int);
void class_body (struct sym *, int);
void class_definition (struct sym *, int, int, int);
void declaration (int);
unsigned parm_list (int *);
char *operator_name (int *);
struct sym *parse_classname (void);
struct sym *parse_qualified_ident_or_type (char **);
void parse_qualified_param_ident_or_type (char **);
int globals (int);
void yyerror (const char *, const char *);
void usage (int) NO_RETURN;
void version (void) NO_RETURN;
static char *matching_regexp (void);
static struct sym *add_sym (const char *, struct sym *);
static void add_global_defn (char *, char *, int, unsigned, int, int, int);
static void add_global_decl (char *, char *, int, unsigned, int, int, int);
static struct member *add_member (struct sym *, char *, int, int, unsigned);
static void class_definition (struct sym *, int, int, int);
static char *operator_name (int *);
static void parse_qualified_param_ident_or_type (char **);
static void usage (int) NO_RETURN;
static void version (void) NO_RETURN;
@ -528,7 +479,7 @@ void version (void) NO_RETURN;
/* Print an error in a printf-like style with the current input file
name and line number. */
void
static void
yyerror (const char *format, const char *s)
{
fprintf (stderr, "%s:%d: ", filename, yyline);
@ -540,7 +491,7 @@ yyerror (const char *format, const char *s)
/* Like malloc but print an error and exit if not enough memory is
available. */
void *
static void *
xmalloc (int nbytes)
{
void *p = malloc (nbytes);
@ -555,7 +506,7 @@ xmalloc (int nbytes)
/* Like realloc but print an error and exit if out of memory. */
void *
static void *
xrealloc (void *p, int sz)
{
p = realloc (p, sz);
@ -571,7 +522,7 @@ xrealloc (void *p, int sz)
/* Like strdup, but print an error and exit if not enough memory is
available.. If S is null, return null. */
char *
static char *
xstrdup (char *s)
{
if (s)
@ -588,7 +539,7 @@ xstrdup (char *s)
/* Initialize the symbol table. This currently only sets up the
special symbol for globals (`*Globals*'). */
void
static void
init_sym (void)
{
global_symbols = add_sym (GLOBALS_NAME, NULL);
@ -602,7 +553,7 @@ init_sym (void)
If a symbol for NAME already exists, return that. Otherwise
create a new symbol and set it to default values. */
struct sym *
static struct sym *
add_sym (const char *name, struct sym *nested_in_class)
{
struct sym *sym;
@ -643,7 +594,7 @@ add_sym (const char *name, struct sym *nested_in_class)
/* Add links between superclass SUPER and subclass SUB. */
void
static void
add_link (struct sym *super, struct sym *sub)
{
struct link *lnk, *lnk2, *p, *prev;
@ -683,7 +634,7 @@ add_link (struct sym *super, struct sym *sub)
parameter types of functions. Value is a pointer to the member
found or null if not found. */
struct member *
static struct member *
find_member (struct sym *cls, char *name, int var, int sc, unsigned int hash)
{
struct member **list;
@ -733,7 +684,7 @@ find_member (struct sym *cls, char *name, int var, int sc, unsigned int hash)
a bit set giving additional information about the member (see the
F_* defines). */
void
static void
add_member_decl (struct sym *cls, char *name, char *regexp, int pos, unsigned int hash, int var, int sc, int vis, int flags)
{
struct member *m;
@ -781,7 +732,7 @@ add_member_decl (struct sym *cls, char *name, char *regexp, int pos, unsigned in
a bit set giving additional information about the member (see the
F_* defines). */
void
static void
add_member_defn (struct sym *cls, char *name, char *regexp, int pos, unsigned int hash, int var, int sc, int flags)
{
struct member *m;
@ -823,7 +774,7 @@ add_member_defn (struct sym *cls, char *name, char *regexp, int pos, unsigned in
REGEXP is a regular expression matching the define in the source,
if it is non-null. POS is the position in the file. */
void
static void
add_define (char *name, char *regexp, int pos)
{
add_global_defn (name, regexp, pos, 0, 1, SC_FRIEND, F_DEFINE);
@ -841,7 +792,7 @@ add_define (char *name, char *regexp, int pos)
a bit set giving additional information about the member (see the
F_* defines). */
void
static void
add_global_defn (char *name, char *regexp, int pos, unsigned int hash, int var, int sc, int flags)
{
int i;
@ -872,7 +823,7 @@ add_global_defn (char *name, char *regexp, int pos, unsigned int hash, int var,
a bit set giving additional information about the member (see the
F_* defines). */
void
static void
add_global_decl (char *name, char *regexp, int pos, unsigned int hash, int var, int sc, int flags)
{
/* Add declaration only if not already declared. Header files must
@ -911,7 +862,7 @@ add_global_decl (char *name, char *regexp, int pos, unsigned int hash, int var,
member. HASH is a hash code for the parameter types of a function.
Value is a pointer to the member's structure. */
struct member *
static struct member *
add_member (struct sym *cls, char *name, int var, int sc, unsigned int hash)
{
struct member *m = (struct member *) xmalloc (sizeof *m + strlen (name));
@ -982,7 +933,7 @@ add_member (struct sym *cls, char *name, int var, int sc, unsigned int hash)
recursively, marking functions as virtual that are declared virtual
in base classes. */
void
static void
mark_virtual (struct sym *r)
{
struct link *p;
@ -1006,7 +957,7 @@ mark_virtual (struct sym *r)
/* For all roots of the class tree, mark functions as virtual that
are virtual because of a virtual declaration in a base class. */
void
static void
mark_inherited_virtual (void)
{
struct sym *r;
@ -1021,7 +972,7 @@ mark_inherited_virtual (void)
/* Create and return a symbol for a namespace with name NAME. */
struct sym *
static struct sym *
make_namespace (char *name, struct sym *context)
{
struct sym *s = (struct sym *) xmalloc (sizeof *s + strlen (name));
@ -1036,7 +987,7 @@ make_namespace (char *name, struct sym *context)
/* Find the symbol for namespace NAME. If not found, retrun NULL */
struct sym *
static struct sym *
check_namespace (char *name, struct sym *context)
{
struct sym *p = NULL;
@ -1053,7 +1004,7 @@ check_namespace (char *name, struct sym *context)
/* Find the symbol for namespace NAME. If not found, add a new symbol
for NAME to all_namespaces. */
struct sym *
static struct sym *
find_namespace (char *name, struct sym *context)
{
struct sym *p = check_namespace (name, context);
@ -1067,7 +1018,7 @@ find_namespace (char *name, struct sym *context)
/* Find namespace alias with name NAME. If not found return NULL. */
struct link *
static struct link *
check_namespace_alias (char *name)
{
struct link *p = NULL;
@ -1091,7 +1042,7 @@ check_namespace_alias (char *name)
/* Register the name NEW_NAME as an alias for namespace list OLD_NAME. */
void
static void
register_namespace_alias (char *new_name, struct link *old_name)
{
unsigned h;
@ -1119,7 +1070,7 @@ register_namespace_alias (char *new_name, struct link *old_name)
/* Enter namespace with name NAME. */
void
static void
enter_namespace (char *name)
{
struct sym *p = find_namespace (name, current_namespace);
@ -1140,7 +1091,7 @@ enter_namespace (char *name)
/* Leave the current namespace. */
void
static void
leave_namespace (void)
{
assert (namespace_sp > 0);
@ -1156,22 +1107,23 @@ leave_namespace (void)
/* Write string S to the output file FP in a Lisp-readable form.
If S is null, write out `()'. */
#define PUTSTR(s, fp) \
do { \
if (!s) \
{ \
putc ('(', fp); \
putc (')', fp); \
putc (' ', fp); \
} \
else \
{ \
putc ('"', fp); \
fputs (s, fp); \
putc ('"', fp); \
putc (' ', fp); \
} \
} while (0)
static inline void
putstr (const char *s, FILE *fp)
{
if (!s)
{
putc ('(', fp);
putc (')', fp);
putc (' ', fp);
}
else
{
putc ('"', fp);
fputs (s, fp);
putc ('"', fp);
putc (' ', fp);
}
}
/* A dynamically allocated buffer for constructing a scope name. */
@ -1182,7 +1134,7 @@ int scope_buffer_len;
/* Make sure scope_buffer has enough room to add LEN chars to it. */
void
static void
ensure_scope_buffer_room (int len)
{
if (scope_buffer_len + len >= scope_buffer_size)
@ -1198,7 +1150,7 @@ ensure_scope_buffer_room (int len)
namespaces to scope_buffer. Value is a pointer to the complete
scope name constructed. */
char *
static char *
sym_scope_1 (struct sym *p)
{
int len;
@ -1232,7 +1184,7 @@ sym_scope_1 (struct sym *p)
/* Return the scope of symbol P in printed representation, i.e.
as it would appear in a C*+ source file. */
char *
static char *
sym_scope (struct sym *p)
{
if (!scope_buffer)
@ -1254,7 +1206,7 @@ sym_scope (struct sym *p)
/* Dump the list of members M to file FP. Value is the length of the
list. */
int
static int
dump_members (FILE *fp, struct member *m)
{
int n;
@ -1264,16 +1216,16 @@ dump_members (FILE *fp, struct member *m)
for (n = 0; m; m = m->next, ++n)
{
fputs (MEMBER_STRUCT, fp);
PUTSTR (m->name, fp);
PUTSTR (NULL, fp); /* FIXME? scope for globals */
putstr (m->name, fp);
putstr (NULL, fp); /* FIXME? scope for globals */
fprintf (fp, "%u ", (unsigned) m->flags);
PUTSTR (m->filename, fp);
PUTSTR (m->regexp, fp);
putstr (m->filename, fp);
putstr (m->regexp, fp);
fprintf (fp, "%u ", (unsigned) m->pos);
fprintf (fp, "%u ", (unsigned) m->vis);
putc (' ', fp);
PUTSTR (m->def_filename, fp);
PUTSTR (m->def_regexp, fp);
putstr (m->def_filename, fp);
putstr (m->def_regexp, fp);
fprintf (fp, "%u", (unsigned) m->def_pos);
putc (']', fp);
putc ('\n', fp);
@ -1287,24 +1239,24 @@ dump_members (FILE *fp, struct member *m)
/* Dump class ROOT to stream FP. */
void
static void
dump_sym (FILE *fp, struct sym *root)
{
fputs (CLASS_STRUCT, fp);
PUTSTR (root->name, fp);
putstr (root->name, fp);
/* Print scope, if any. */
if (root->namesp)
PUTSTR (sym_scope (root), fp);
putstr (sym_scope (root), fp);
else
PUTSTR (NULL, fp);
putstr (NULL, fp);
/* Print flags. */
fprintf (fp, "%u", root->flags);
PUTSTR (root->filename, fp);
PUTSTR (root->regexp, fp);
putstr (root->filename, fp);
putstr (root->regexp, fp);
fprintf (fp, "%u", (unsigned) root->pos);
PUTSTR (root->sfilename, fp);
putstr (root->sfilename, fp);
putc (']', fp);
putc ('\n', fp);
}
@ -1313,7 +1265,7 @@ dump_sym (FILE *fp, struct sym *root)
/* Dump class ROOT and its subclasses to file FP. Value is the
number of classes written. */
int
static int
dump_tree (FILE *fp, struct sym *root)
{
struct link *lk;
@ -1360,7 +1312,7 @@ dump_tree (FILE *fp, struct sym *root)
/* Dump the entire class tree to file FP. */
void
static void
dump_roots (FILE *fp)
{
int i, n = 0;
@ -1371,7 +1323,7 @@ dump_roots (FILE *fp)
if (!f_append)
{
fputs (TREE_HEADER_STRUCT, fp);
PUTSTR (EBROWSE_FILE_VERSION, fp);
putstr (EBROWSE_FILE_VERSION, fp);
putc ('\"', fp);
if (!f_structs)
@ -1434,7 +1386,7 @@ do { \
/* Process a preprocessor line. Value is the next character from the
input buffer not consumed. */
int
static int
process_pp_line (void)
{
int in_comment = 0, in_string = 0;
@ -1505,7 +1457,7 @@ process_pp_line (void)
/* Value is the next token from the input buffer. */
int
static int
yylex (void)
{
int c;
@ -1927,7 +1879,7 @@ static char *matching_regexp_buffer, *matching_regexp_end_buf;
position in the input buffer, or maybe a bit more if that string is
shorter than min_regexp. */
char *
static char *
matching_regexp (void)
{
char *p;
@ -1978,7 +1930,7 @@ matching_regexp (void)
/* Return a printable representation of token T. */
const char *
static const char *
token_string (int t)
{
static char b[3];
@ -2095,7 +2047,7 @@ token_string (int t)
/* Reinitialize the scanner for a new input file. */
void
static void
re_init_scanner (void)
{
in = inbuffer;
@ -2110,11 +2062,11 @@ re_init_scanner (void)
}
/* Insert a keyword NAME with token value TK into the keyword hash
/* Insert a keyword NAME with token value TKV into the keyword hash
table. */
void
insert_keyword (const char *name, int tk)
static void
insert_keyword (const char *name, int tkv)
{
const char *s;
unsigned h = 0;
@ -2125,7 +2077,7 @@ insert_keyword (const char *name, int tk)
h %= KEYWORD_TABLE_SIZE;
k->name = name;
k->tk = tk;
k->tk = tkv;
k->next = keyword_table[h];
keyword_table[h] = k;
}
@ -2134,7 +2086,7 @@ insert_keyword (const char *name, int tk)
/* Initialize the scanner for the first file. This sets up the
character class vectors and fills the keyword hash table. */
void
static void
init_scanner (void)
{
int i;
@ -2278,7 +2230,7 @@ init_scanner (void)
/* Skip forward until a given token TOKEN or YYEOF is seen and return
the current lookahead token after skipping. */
int
static int
skip_to (int token)
{
while (!LOOKING_AT2 (YYEOF, token))
@ -2289,7 +2241,7 @@ skip_to (int token)
/* Skip over pairs of tokens (parentheses, square brackets,
angle brackets, curly brackets) matching the current lookahead. */
void
static void
skip_matching (void)
{
int open, close, n;
@ -2332,7 +2284,7 @@ skip_matching (void)
}
}
void
static void
skip_initializer (void)
{
for (;;)
@ -2359,7 +2311,7 @@ skip_initializer (void)
/* Build qualified namespace alias (A::B::c) and return it. */
struct link *
static struct link *
match_qualified_namespace_alias (void)
{
struct link *head = NULL;
@ -2396,7 +2348,7 @@ match_qualified_namespace_alias (void)
/* Re-initialize the parser by resetting the lookahead token. */
void
static void
re_init_parser (void)
{
tk = -1;
@ -2409,7 +2361,7 @@ re_init_parser (void)
Returns a hash code for the parameter types. This value is used to
distinguish between overloaded functions. */
unsigned
static unsigned
parm_list (int *flags)
{
unsigned hash = 0;
@ -2522,7 +2474,7 @@ parm_list (int *flags)
/* Print position info to stdout. */
void
static void
print_info (void)
{
if (info_position >= 0 && BUFFER_POS () <= info_position)
@ -2537,7 +2489,7 @@ print_info (void)
the access specifier for the member (private, protected,
public). */
void
static void
member (struct sym *cls, int vis)
{
char *id = NULL;
@ -2746,7 +2698,7 @@ member (struct sym *cls, int vis)
/* Parse the body of class CLS. TAG is the tag of the class (struct,
union, class). */
void
static void
class_body (struct sym *cls, int tag)
{
int vis = tag == CLASS ? PRIVATE : PUBLIC;
@ -2807,7 +2759,7 @@ class_body (struct sym *cls, int tag)
qualified ident has the form `X<..>::Y<...>::T<...>. Returns a
symbol for that class. */
struct sym *
static struct sym *
parse_classname (void)
{
struct sym *last_class = NULL;
@ -2837,7 +2789,7 @@ parse_classname (void)
implicitly static operator has been parsed. Value is a pointer to
a static buffer holding the constructed operator name string. */
char *
static char *
operator_name (int *sc)
{
static int id_size = 0;
@ -2927,7 +2879,7 @@ operator_name (int *sc)
`X::Y::z'. This IDENT is returned in LAST_ID. Value is the
symbol structure for the ident. */
struct sym *
static struct sym *
parse_qualified_ident_or_type (char **last_id)
{
struct sym *cls = NULL;
@ -2992,14 +2944,16 @@ parse_qualified_ident_or_type (char **last_id)
`X::Y::z'. This IDENT is returned in LAST_ID. Value is the
symbol structure for the ident. */
void
static void
parse_qualified_param_ident_or_type (char **last_id)
{
struct sym *cls = NULL;
static char *id = NULL;
static int id_size = 0;
while (LOOKING_AT (IDENT))
assert (LOOKING_AT (IDENT));
do
{
int len = strlen (yytext) + 1;
if (len > id_size)
@ -3022,6 +2976,7 @@ parse_qualified_param_ident_or_type (char **last_id)
else
break;
}
while (LOOKING_AT (IDENT));
}
@ -3034,7 +2989,7 @@ parse_qualified_param_ident_or_type (char **last_id)
Current lookahead is the class name. */
void
static void
class_definition (struct sym *containing, int tag, int flags, int nested)
{
struct sym *current;
@ -3131,7 +3086,7 @@ class_definition (struct sym *containing, int tag, int flags, int nested)
the storage class of *ID. FLAGS is a bit set giving additional
information about the member (see the F_* defines). */
void
static void
add_declarator (struct sym **cls, char **id, int flags, int sc)
{
if (LOOKING_AT2 (';', ','))
@ -3174,7 +3129,7 @@ add_declarator (struct sym **cls, char **id, int flags, int sc)
/* Parse a declaration. */
void
static void
declaration (int flags)
{
char *id = NULL;
@ -3328,7 +3283,7 @@ declaration (int flags)
parsing in an `extern "C"' block. Value is 1 if EOF is reached, 0
otherwise. */
int
static int
globals (int start_flags)
{
int anonymous;
@ -3446,7 +3401,7 @@ globals (int start_flags)
/* Parse the current input file. */
void
static void
yyparse (void)
{
while (globals (0) == 0)
@ -3462,7 +3417,7 @@ yyparse (void)
/* Add the list of paths PATH_LIST to the current search path for
input files. */
void
static void
add_search_path (char *path_list)
{
while (*path_list)
@ -3497,7 +3452,7 @@ add_search_path (char *path_list)
opened. Try to find FILE in search_path first, then try the
unchanged file name. */
FILE *
static FILE *
open_file (char *file)
{
FILE *fp = NULL;
@ -3556,7 +3511,7 @@ Usage: ebrowse [options] {files}\n\
--version display version info\n\
"
void
static void
usage (int error)
{
puts (USAGE);
@ -3571,7 +3526,7 @@ usage (int error)
# define VERSION "21"
#endif
void
static void
version (void)
{
/* Makes it easier to update automatically. */
@ -3587,7 +3542,7 @@ version (void)
/* Parse one input file FILE, adding classes and members to the symbol
table. */
void
static void
process_file (char *file)
{
FILE *fp;
@ -3642,7 +3597,7 @@ process_file (char *file)
containing its contents without the terminating newline. Value
is null when EOF is reached. */
char *
static char *
read_line (FILE *fp)
{
static char *buffer;

View File

@ -112,6 +112,13 @@ char *(getcwd) (char *, size_t);
/* Additional space when allocating buffers for filenames, etc. */
#define EXTRA_SPACE 100
/* Use this to suppress gcc's `...may be used before initialized' warnings. */
#ifdef lint
# define IF_LINT(Code) Code
#else
# define IF_LINT(Code) /* empty */
#endif
/* Name used to invoke this program. */
const char *progname;
@ -122,6 +129,9 @@ char **main_argv;
/* Nonzero means don't wait for a response from Emacs. --no-wait. */
int nowait = 0;
/* Nonzero means don't print messages for successful operations. --quiet. */
int quiet = 0;
/* Nonzero means args are expressions to be evaluated. --eval. */
int eval = 0;
@ -150,13 +160,14 @@ const char *server_file = NULL;
/* PID of the Emacs server process. */
int emacs_pid = 0;
void print_help_and_exit (void) NO_RETURN;
void fail (void) NO_RETURN;
static void print_help_and_exit (void) NO_RETURN;
static void fail (void) NO_RETURN;
struct option longopts[] =
{
{ "no-wait", no_argument, NULL, 'n' },
{ "quiet", no_argument, NULL, 'q' },
{ "eval", no_argument, NULL, 'e' },
{ "help", no_argument, NULL, 'H' },
{ "version", no_argument, NULL, 'V' },
@ -178,7 +189,7 @@ struct option longopts[] =
/* Like malloc but get fatal error if memory is exhausted. */
long *
static long *
xmalloc (unsigned int size)
{
long *result = (long *) malloc (size);
@ -190,20 +201,6 @@ xmalloc (unsigned int size)
return result;
}
/* Like strdup but get a fatal error if memory is exhausted. */
char *
xstrdup (const char *s)
{
char *result = strdup (s);
if (result == NULL)
{
perror ("strdup");
exit (EXIT_FAILURE);
}
return result;
}
/* From sysdep.c */
#if !defined (HAVE_GET_CURRENT_DIR_NAME) || defined (BROKEN_GET_CURRENT_DIR_NAME)
@ -233,7 +230,7 @@ char*
get_current_dir_name (void)
{
char *buf;
char *pwd;
const char *pwd;
struct stat dotstat, pwdstat;
/* If PWD is accurate, use it instead of calling getwd. PWD is
sometimes a nicer name, and using it may avoid a fatal error if a
@ -300,6 +297,20 @@ get_current_dir_name (void)
#ifdef WINDOWSNT
/* Like strdup but get a fatal error if memory is exhausted. */
char *
xstrdup (const char *s)
{
char *result = strdup (s);
if (result == NULL)
{
perror ("strdup");
exit (EXIT_FAILURE);
}
return result;
}
#define REG_ROOT "SOFTWARE\\GNU\\Emacs"
/* Retrieve an environment variable from the Emacs subkeys of the registry.
@ -335,9 +346,11 @@ w32_get_resource (HKEY predefined, char *key, LPDWORD type)
/*
getenv wrapper for Windows
This is needed to duplicate Emacs's behavior, which is to look for environment
variables in the registry if they don't appear in the environment.
*/
Value is allocated on the heap, and can be free'd.
This is needed to duplicate Emacs's behavior, which is to look for
environment variables in the registry if they don't appear in the
environment. */
char *
w32_getenv (char *envvar)
{
@ -345,8 +358,9 @@ w32_getenv (char *envvar)
DWORD dwType;
if (value = getenv (envvar))
/* Found in the environment. */
return value;
/* Found in the environment. strdup it, because values returned
by getenv cannot be free'd. */
return xstrdup (value);
if (! (value = w32_get_resource (HKEY_CURRENT_USER, envvar, &dwType)) &&
! (value = w32_get_resource (HKEY_LOCAL_MACHINE, envvar, &dwType)))
@ -473,14 +487,14 @@ ttyname (int fd)
/* Display a normal or error message.
On Windows, use a message box if compiled as a Windows app. */
void
message (int is_error, const char *message, ...)
static void
message (int is_error, const char *format, ...)
{
char msg[2048];
va_list args;
va_start (args, message);
vsprintf (msg, message, args);
va_start (args, format);
vsprintf (msg, format, args);
va_end (args);
#ifdef WINDOWSNT
@ -504,7 +518,7 @@ message (int is_error, const char *message, ...)
/* Decode the options from argv and argc.
The global variable `optind' will say how many arguments we used up. */
void
static void
decode_options (int argc, char **argv)
{
alternate_editor = egetenv ("ALTERNATE_EDITOR");
@ -513,9 +527,9 @@ decode_options (int argc, char **argv)
{
int opt = getopt_long_only (argc, argv,
#ifndef NO_SOCKETS_IN_FILE_SYSTEM
"VHnea:s:f:d:tc",
"VHneqa:s:f:d:tc",
#else
"VHnea:f:d:tc",
"VHneqa:f:d:tc",
#endif
longopts, 0);
@ -559,6 +573,10 @@ decode_options (int argc, char **argv)
eval = 1;
break;
case 'q':
quiet = 1;
break;
case 'V':
message (FALSE, "emacsclient %s\n", VERSION);
exit (EXIT_SUCCESS);
@ -630,7 +648,7 @@ an empty string");
}
void
static void
print_help_and_exit (void)
{
/* Spaces and tabs are significant in this message; they're chosen so the
@ -650,6 +668,7 @@ The following OPTIONS are accepted:\n\
use the current Emacs frame\n\
-e, --eval Evaluate the FILE arguments as ELisp expressions\n\
-n, --no-wait Don't wait for the server to return\n\
-q, --quiet Don't display messages on success\n\
-d DISPLAY, --display=DISPLAY\n\
Visit the file in the given display\n\
--parent-id=ID Open in parent window ID, via XEmbed\n"
@ -675,7 +694,7 @@ Report bugs with M-x report-emacs-bug.\n", progname);
defined-- exit with an errorcode.
Uses argv, but gets it from the global variable main_argv.
*/
void
static void
fail (void)
{
if (alternate_editor)
@ -718,7 +737,7 @@ HSOCKET emacs_socket = 0;
/* On Windows, the socket library was historically separate from the standard
C library, so errors are handled differently. */
void
static void
sock_err_message (const char *function_name)
{
#ifdef WINDOWSNT
@ -742,7 +761,7 @@ sock_err_message (const char *function_name)
- the data ends in "\n", or
- the buffer is full (but this shouldn't happen)
Otherwise, we just accumulate it. */
void
static void
send_to_emacs (HSOCKET s, const char *data)
{
while (data)
@ -781,7 +800,7 @@ send_to_emacs (HSOCKET s, const char *data)
return value never contains a space.
Does not change the string. Outputs the result to S. */
void
static void
quote_argument (HSOCKET s, const char *str)
{
char *copy = (char *) xmalloc (strlen (str) * 2 + 1);
@ -822,7 +841,7 @@ quote_argument (HSOCKET s, const char *str)
/* The inverse of quote_argument. Removes quoting in string STR by
modifying the string in place. Returns STR. */
char *
static char *
unquote_argument (char *str)
{
char *p, *q;
@ -853,7 +872,7 @@ unquote_argument (char *str)
}
int
static int
file_name_absolute_p (const char *filename)
{
/* Sanity check, it shouldn't happen. */
@ -907,7 +926,7 @@ initialize_sockets (void)
* Read the information needed to set up a TCP comm channel with
* the Emacs server: host, port, and authentication string.
*/
int
static int
get_server_config (struct sockaddr_in *server, char *authentication)
{
char dotted[32];
@ -918,7 +937,7 @@ get_server_config (struct sockaddr_in *server, char *authentication)
config = fopen (server_file, "rb");
else
{
char *home = egetenv ("HOME");
const char *home = egetenv ("HOME");
if (home)
{
@ -965,7 +984,7 @@ get_server_config (struct sockaddr_in *server, char *authentication)
return TRUE;
}
HSOCKET
static HSOCKET
set_tcp_socket (void)
{
HSOCKET s;
@ -976,7 +995,7 @@ set_tcp_socket (void)
if (! get_server_config (&server, auth_string))
return INVALID_SOCKET;
if (server.sin_addr.s_addr != inet_addr ("127.0.0.1"))
if (server.sin_addr.s_addr != inet_addr ("127.0.0.1") && !quiet)
message (FALSE, "%s: connected to remote socket at %s\n",
progname, inet_ntoa (server.sin_addr));
@ -1024,11 +1043,11 @@ strprefix (const char *prefix, const char *string)
and the name in TTY_NAME, and return 1. Otherwise, fail if NOABORT
is zero, or return 0 if NOABORT is non-zero. */
int
find_tty (char **tty_type, char **tty_name, int noabort)
static int
find_tty (const char **tty_type, const char **tty_name, int noabort)
{
char *type = egetenv ("TERM");
char *name = ttyname (fileno (stdout));
const char *type = egetenv ("TERM");
const char *name = ttyname (fileno (stdout));
if (!name)
{
@ -1080,11 +1099,11 @@ find_tty (char **tty_type, char **tty_name, int noabort)
0 - success: none of the above */
static int
socket_status (char *socket_name)
socket_status (char *name)
{
struct stat statbfr;
if (stat (socket_name, &statbfr) == -1)
if (stat (name, &statbfr) == -1)
return 2;
if (statbfr.st_uid != geteuid ())
@ -1097,7 +1116,7 @@ socket_status (char *socket_name)
/* A signal handler that passes the signal to the Emacs process.
Useful for SIGWINCH. */
SIGTYPE
static SIGTYPE
pass_signal_to_emacs (int signalnum)
{
int old_errno = errno;
@ -1112,7 +1131,7 @@ pass_signal_to_emacs (int signalnum)
/* Signal handler for SIGCONT; notify the Emacs process that it can
now resume our tty frame. */
SIGTYPE
static SIGTYPE
handle_sigcont (int signalnum)
{
int old_errno = errno;
@ -1138,7 +1157,7 @@ handle_sigcont (int signalnum)
reality, we may get a SIGTSTP on C-z. Handling this signal and
notifying Emacs about it should get things under control again. */
SIGTYPE
static SIGTYPE
handle_sigtstp (int signalnum)
{
int old_errno = errno;
@ -1162,7 +1181,7 @@ handle_sigtstp (int signalnum)
/* Set up signal handlers before opening a frame on the current tty. */
void
static void
init_signals (void)
{
/* Set up signal handlers. */
@ -1182,7 +1201,7 @@ init_signals (void)
}
HSOCKET
static HSOCKET
set_local_socket (void)
{
HSOCKET s;
@ -1205,7 +1224,7 @@ set_local_socket (void)
int default_sock = !socket_name;
int saved_errno = 0;
const char *server_name = "server";
const char *tmpdir;
const char *tmpdir IF_LINT ( = NULL);
if (socket_name && !strchr (socket_name, '/')
&& !strchr (socket_name, '\\'))
@ -1260,10 +1279,10 @@ set_local_socket (void)
associated with the name. This is reminiscent of the logic
that init_editfns uses to set the global Vuser_full_name. */
char *user_name = (char *) egetenv ("LOGNAME");
const char *user_name = egetenv ("LOGNAME");
if (!user_name)
user_name = (char *) egetenv ("USER");
user_name = egetenv ("USER");
if (user_name)
{
@ -1331,7 +1350,7 @@ To start the server in Emacs, type \"M-x server-start\".\n",
}
#endif /* ! NO_SOCKETS_IN_FILE_SYSTEM */
HSOCKET
static HSOCKET
set_socket (int no_exit_if_error)
{
HSOCKET s;
@ -1447,7 +1466,7 @@ w32_give_focus (void)
/* Start the emacs daemon and try to connect to it. */
void
static void
start_daemon_and_retry_set_socket (void)
{
#ifndef WINDOWSNT
@ -1483,8 +1502,8 @@ start_daemon_and_retry_set_socket (void)
else
{
char emacs[] = "emacs";
char daemon[] = "--daemon";
char *d_argv[] = {emacs, daemon, 0 };
char daemon_option[] = "--daemon";
char *d_argv[] = {emacs, daemon_option, 0 };
if (socket_name != NULL)
{
/* Pass --daemon=socket_name as argument. */
@ -1504,10 +1523,12 @@ start_daemon_and_retry_set_socket (void)
int
main (int argc, char **argv)
{
int i, rl, needlf = 0;
int rl, needlf = 0;
char *cwd, *str;
char string[BUFSIZ+1];
int null_socket_name, null_server_file, start_daemon_if_needed;
int null_socket_name IF_LINT ( = 0);
int null_server_file IF_LINT ( = 0);
int start_daemon_if_needed;
int exit_status = EXIT_SUCCESS;
main_argv = argv;
@ -1543,21 +1564,21 @@ main (int argc, char **argv)
null_server_file = (server_file == NULL);
}
if ((emacs_socket = set_socket (alternate_editor
|| start_daemon_if_needed)) == INVALID_SOCKET)
if (start_daemon_if_needed)
{
/* Reset socket_name and server_file if they were NULL
before the set_socket call. */
if (null_socket_name)
socket_name = NULL;
if (null_server_file)
server_file = NULL;
emacs_socket = set_socket (alternate_editor || start_daemon_if_needed);
if (emacs_socket == INVALID_SOCKET)
{
if (! start_daemon_if_needed)
fail ();
start_daemon_and_retry_set_socket ();
}
else
fail ();
/* Reset socket_name and server_file if they were NULL
before the set_socket call. */
if (null_socket_name)
socket_name = NULL;
if (null_server_file)
server_file = NULL;
start_daemon_and_retry_set_socket ();
}
cwd = get_current_dir_name ();
if (cwd == 0)
@ -1615,7 +1636,7 @@ main (int argc, char **argv)
frame is available. */
if (tty || (current_frame && !eval))
{
char *tty_type, *tty_name;
const char *tty_type, *tty_name;
if (find_tty (&tty_type, &tty_name, !tty))
{
@ -1635,6 +1656,7 @@ main (int argc, char **argv)
if ((argc - optind > 0))
{
int i;
for (i = optind; i < argc; i++)
{
@ -1699,7 +1721,7 @@ main (int argc, char **argv)
send_to_emacs (emacs_socket, "\n");
/* Wait for an answer. */
if (!eval && !tty && !nowait)
if (!eval && !tty && !nowait && !quiet)
{
printf ("Waiting for Emacs...");
needlf = 2;
@ -1722,7 +1744,7 @@ main (int argc, char **argv)
if (rl <= 0)
break;
string[rl] = '\0';
p = string + strlen (string) - 1;

View File

@ -190,10 +190,6 @@ char pot_etags_version[] = "@(#) pot revision number is 17.38.1.4";
# define assert(x) ((void) 0)
#endif
#if !defined (S_ISREG) && defined (S_IFREG)
# define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
#endif
#ifdef NO_LONG_OPTIONS /* define this if you don't have GNU getopt */
# define NO_LONG_OPTIONS TRUE
# define getopt_long(argc,argv,optstr,lopts,lind) getopt (argc, argv, optstr)
@ -243,7 +239,6 @@ If you want regular expression support, you should delete this notice and
#define ISLOWER(c) islower (CHAR(c))
#define lowcase(c) tolower (CHAR(c))
#define upcase(c) toupper (CHAR(c))
/*
@ -5327,7 +5322,7 @@ prolog_skip_comment (linebuffer *plb, FILE *inf)
*/
static int
prolog_pr (char *s, char *last)
/* Name of last clause. */
{
int pos;
@ -5484,7 +5479,7 @@ Erlang_functions (FILE *inf)
*/
static int
erlang_func (char *s, char *last)
/* Name of last clause. */
{
int pos;
@ -6642,7 +6637,7 @@ filename_is_absolute (char *fn)
);
}
/* Upcase DOS drive letter and collapse separators into single slashes.
/* Downcase DOS drive letter and collapse separators into single slashes.
Works in place. */
static void
canonicalize_filename (register char *fn)
@ -6652,8 +6647,9 @@ canonicalize_filename (register char *fn)
#ifdef DOS_NT
/* Canonicalize drive letter case. */
if (fn[0] != '\0' && fn[1] == ':' && ISLOWER (fn[0]))
fn[0] = upcase (fn[0]);
# define ISUPPER(c) isupper (CHAR(c))
if (fn[0] != '\0' && fn[1] == ':' && ISUPPER (fn[0]))
fn[0] = lowcase (fn[0]);
sep = '\\';
#endif

View File

@ -62,6 +62,8 @@ main ()
/* This is to declare cuserid. */
#include <unistd.h>
#include <ignore-value.h>
/* Type definitions */
@ -198,7 +200,7 @@ xrealloc (long int *ptr, int size)
/* Initialize a linebuffer for use */
void
static void
init_linebuffer (struct linebuffer *linebuffer)
{
linebuffer->size = INITIAL_LINE_SIZE;
@ -208,7 +210,7 @@ init_linebuffer (struct linebuffer *linebuffer)
/* Read a line of text from `stream' into `linebuffer'.
Return the length of the line. */
long
static long
readline (struct linebuffer *linebuffer, FILE *stream)
{
char *buffer = linebuffer->buffer;
@ -243,7 +245,7 @@ readline (struct linebuffer *linebuffer, FILE *stream)
If there is no keyword, return NULL and don't alter *REST. */
char *
static char *
get_keyword (register char *field, char **rest)
{
static char keyword[KEYWORD_SIZE];
@ -268,7 +270,7 @@ get_keyword (register char *field, char **rest)
/* Nonzero if the string FIELD starts with a colon-terminated keyword. */
boolean
static boolean
has_keyword (char *field)
{
char *ignored;
@ -285,7 +287,7 @@ has_keyword (char *field)
We don't pay attention to overflowing WHERE;
the caller has to make it big enough. */
char *
static char *
add_field (line_list the_list, register char *field, register char *where)
{
register char c;
@ -341,7 +343,7 @@ add_field (line_list the_list, register char *field, register char *where)
return where;
}
line_list
static line_list
make_file_preface (void)
{
char *the_string, *temp;
@ -385,7 +387,7 @@ make_file_preface (void)
return result;
}
void
static void
write_line_list (register line_list the_list, FILE *the_stream)
{
for ( ;
@ -398,20 +400,20 @@ write_line_list (register line_list the_list, FILE *the_stream)
return;
}
int
static int
close_the_streams (void)
{
register stream_list rem;
for (rem = the_streams;
rem != ((stream_list) NULL);
rem = rem->rest_streams)
no_problems = (no_problems &&
((*rem->action) (rem->handle) == 0));
if (no_problems && (*rem->action) (rem->handle) != 0)
error ("output error", NULL);
the_streams = ((stream_list) NULL);
return (no_problems ? EXIT_SUCCESS : EXIT_FAILURE);
}
void
static void
add_a_stream (FILE *the_stream, int (*closing_action) (FILE *))
{
stream_list old = the_streams;
@ -422,15 +424,17 @@ add_a_stream (FILE *the_stream, int (*closing_action) (FILE *))
return;
}
int
static int
my_fclose (FILE *the_file)
{
putc ('\n', the_file);
fflush (the_file);
if (ferror (the_file))
return EOF;
return fclose (the_file);
}
boolean
static boolean
open_a_file (char *name)
{
FILE *the_stream = fopen (name, "a");
@ -445,7 +449,7 @@ open_a_file (char *name)
return false;
}
void
static void
put_string (char *s)
{
register stream_list rem;
@ -456,7 +460,7 @@ put_string (char *s)
return;
}
void
static void
put_line (const char *string)
{
register stream_list rem;
@ -496,7 +500,7 @@ put_line (const char *string)
}
}
/* Output that much, then break the line. */
fwrite (s, 1, breakpos - s, rem->handle);
ignore_value (fwrite (s, 1, breakpos - s, rem->handle));
column = 8;
/* Skip whitespace and prepare to print more addresses. */
@ -516,7 +520,7 @@ put_line (const char *string)
the header name), and THE_LIST holds the continuation lines if any.
Call open_a_file for each file. */
void
static void
setup_files (register line_list the_list, register char *field)
{
register char *start;
@ -552,7 +556,7 @@ setup_files (register line_list the_list, register char *field)
/* Compute the total size of all recipient names stored in THE_HEADER.
The result says how big to make the buffer to pass to parse_header. */
int
static int
args_size (header the_header)
{
register header old = the_header;
@ -583,7 +587,7 @@ args_size (header the_header)
Also, if the header has any FCC fields, call setup_files for each one. */
void
static void
parse_header (header the_header, register char *where)
{
register header old = the_header;
@ -615,7 +619,7 @@ parse_header (header the_header, register char *where)
one for each line in that field.
Continuation lines are grouped in the headers they continue. */
header
static header
read_header (void)
{
register header the_header = ((header) NULL);
@ -669,7 +673,7 @@ read_header (void)
return the_header->next;
}
void
static void
write_header (header the_header)
{
register header old = the_header;
@ -729,6 +733,9 @@ main (int argc, char **argv)
put_string (buf);
}
if (no_problems && (ferror (stdin) || fclose (stdin) != 0))
error ("input error", NULL);
exit (close_the_streams ());
}

View File

@ -66,12 +66,12 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#define IS_DIRECTORY_SEP(_c_) ((_c_) == DIRECTORY_SEP)
#endif
int scan_file (char *filename);
int scan_lisp_file (const char *filename, const char *mode);
int scan_c_file (char *filename, const char *mode);
void fatal (const char *s1, const char *s2) NO_RETURN;
void start_globals (void);
void write_globals (void);
static int scan_file (char *filename);
static int scan_lisp_file (const char *filename, const char *mode);
static int scan_c_file (char *filename, const char *mode);
static void fatal (const char *s1, const char *s2) NO_RETURN;
static void start_globals (void);
static void write_globals (void);
#ifdef MSDOS
/* s/msdos.h defines this as sys_chdir, but we're not linking with the
@ -93,7 +93,7 @@ int generate_globals;
/* Print error message. `s1' is printf control string, `s2' is arg for it. */
/* VARARGS1 */
void
static void
error (const char *s1, const char *s2)
{
fprintf (stderr, "%s: ", progname);
@ -104,7 +104,7 @@ error (const char *s1, const char *s2)
/* Print error message and exit. */
/* VARARGS1 */
void
static void
fatal (const char *s1, const char *s2)
{
error (s1, s2);
@ -113,7 +113,7 @@ fatal (const char *s1, const char *s2)
/* Like malloc but get fatal error if memory is exhausted. */
void *
static void *
xmalloc (unsigned int size)
{
void *result = (void *) malloc (size);
@ -124,7 +124,7 @@ xmalloc (unsigned int size)
/* Like realloc but get fatal error if memory is exhausted. */
void *
static void *
xrealloc (void *arg, unsigned int size)
{
void *result = (void *) realloc (arg, size);
@ -212,7 +212,7 @@ main (int argc, char **argv)
}
/* Add a source file name boundary marker in the output file. */
void
static void
put_filename (char *filename)
{
char *tmp;
@ -231,7 +231,7 @@ put_filename (char *filename)
/* Read file FILENAME and output its doc strings to outfile. */
/* Return 1 if file is not found, 0 if it is found. */
int
static int
scan_file (char *filename)
{
@ -247,7 +247,7 @@ scan_file (char *filename)
return scan_c_file (filename, READ_TEXT);
}
void
static void
start_globals (void)
{
fprintf (outfile, "/* This file was auto-generated by make-docfile. */\n");
@ -255,7 +255,7 @@ start_globals (void)
fprintf (outfile, "struct emacs_globals {\n");
}
char buf[128];
static char input_buffer[128];
/* Some state during the execution of `read_c_string_or_comment'. */
struct rcsoc_state
@ -388,14 +388,14 @@ scan_keyword_or_put_char (int ch, struct rcsoc_state *state)
at the beginning of a line will be removed, and *SAW_USAGE set to
true if any were encountered. */
int
static int
read_c_string_or_comment (FILE *infile, int printflag, int comment, int *saw_usage)
{
register int c;
struct rcsoc_state state;
state.in_file = infile;
state.buf_ptr = (printflag < 0 ? buf : 0);
state.buf_ptr = (printflag < 0 ? input_buffer : 0);
state.out_file = (printflag > 0 ? outfile : 0);
state.pending_spaces = 0;
state.pending_newlines = 0;
@ -476,7 +476,7 @@ read_c_string_or_comment (FILE *infile, int printflag, int comment, int *saw_usa
/* Write to file OUT the argument names of function FUNC, whose text is in BUF.
MINARGS and MAXARGS are the minimum and maximum number of arguments. */
void
static void
write_c_args (FILE *out, char *func, char *buf, int minargs, int maxargs)
{
register char *p;
@ -610,14 +610,14 @@ compare_globals (const void *a, const void *b)
return strcmp (ga->name, gb->name);
}
void
static void
write_globals (void)
{
int i;
qsort (globals, num_globals, sizeof (struct global), compare_globals);
for (i = 0; i < num_globals; ++i)
{
char *type;
char const *type;
switch (globals[i].type)
{
@ -652,18 +652,14 @@ write_globals (void)
Looks for DEFUN constructs such as are defined in ../src/lisp.h.
Accepts any word starting DEF... so it finds DEFSIMPLE and DEFPRED. */
int
static int
scan_c_file (char *filename, const char *mode)
{
FILE *infile;
register int c;
register int commas;
register int defunflag;
register int defvarperbufferflag;
register int defvarflag;
int minargs, maxargs;
int extension = filename[strlen (filename) - 1];
enum global_type type;
if (extension == 'o')
filename[strlen (filename) - 1] = 'c';
@ -693,6 +689,10 @@ scan_c_file (char *filename, const char *mode)
while (!feof (infile))
{
int doc_keyword = 0;
int defunflag = 0;
int defvarperbufferflag = 0;
int defvarflag = 0;
enum global_type type = INVALID;
if (c != '\n' && c != '\r')
{
@ -726,7 +726,6 @@ scan_c_file (char *filename, const char *mode)
continue;
defvarflag = 1;
defunflag = 0;
c = getc (infile);
defvarperbufferflag = (c == 'P');
@ -738,8 +737,6 @@ scan_c_file (char *filename, const char *mode)
type = LISP_OBJECT;
else if (c == 'B')
type = BOOLEAN;
else
type = INVALID;
}
c = getc (infile);
@ -758,8 +755,6 @@ scan_c_file (char *filename, const char *mode)
continue;
c = getc (infile);
defunflag = c == 'U';
defvarflag = 0;
defvarperbufferflag = 0;
}
else continue;
@ -795,15 +790,15 @@ scan_c_file (char *filename, const char *mode)
/* Read in the identifier. */
do
{
buf[i++] = c;
input_buffer[i++] = c;
c = getc (infile);
}
while (! (c == ',' || c == ' ' || c == '\t' ||
c == '\n' || c == '\r'));
buf[i] = '\0';
input_buffer[i] = '\0';
name = xmalloc (i + 1);
memcpy (name, buf, i + 1);
memcpy (name, input_buffer, i + 1);
add_global (type, name);
continue;
}
@ -888,7 +883,7 @@ scan_c_file (char *filename, const char *mode)
putc (037, outfile);
putc (defvarflag ? 'V' : 'F', outfile);
fprintf (outfile, "%s\n", buf);
fprintf (outfile, "%s\n", input_buffer);
if (comment)
getc (infile); /* Skip past `*' */
@ -931,11 +926,12 @@ scan_c_file (char *filename, const char *mode)
*p = '\0';
/* Output them. */
fprintf (outfile, "\n\n");
write_c_args (outfile, buf, argbuf, minargs, maxargs);
write_c_args (outfile, input_buffer, argbuf, minargs, maxargs);
}
else if (defunflag && maxargs == -1 && !saw_usage)
/* The DOC should provide the usage form. */
fprintf (stderr, "Missing `usage' for function `%s'.\n", buf);
fprintf (stderr, "Missing `usage' for function `%s'.\n",
input_buffer);
}
}
eof:
@ -979,7 +975,7 @@ scan_c_file (char *filename, const char *mode)
An entry is output only if DOCSTRING has \ newline just after the opening "
*/
void
static void
skip_white (FILE *infile)
{
char c = ' ';
@ -988,7 +984,7 @@ skip_white (FILE *infile)
ungetc (c, infile);
}
void
static void
read_lisp_symbol (FILE *infile, char *buffer)
{
char c;
@ -1016,7 +1012,7 @@ read_lisp_symbol (FILE *infile, char *buffer)
skip_white (infile);
}
int
static int
scan_lisp_file (const char *filename, const char *mode)
{
FILE *infile;

View File

@ -135,7 +135,7 @@ obj = dosfns.o msdos.o \
cm.o term.o terminal.o xfaces.o \
emacs.o keyboard.o macros.o keymap.o sysdep.o \
buffer.o filelock.o insdel.o marker.o \
minibuf.o fileio.o dired.o filemode.o \
minibuf.o fileio.o dired.o \
cmds.o casetab.o casefiddle.o indent.o search.o regex.o undo.o \
alloc.o data.o doc.o editfns.o callint.o \
eval.o floatfns.o fns.o print.o lread.o \
@ -381,6 +381,13 @@ $(BLD)/ctags.$(O) : \
$(SRC)/ntlib.h \
$(EMACS_ROOT)/lib/getopt.h
$(BLD)/ebrowse.$(O) : \
$(SRC)/ebrowse.c \
$(EMACS_ROOT)/lib/min-max.h \
$(EMACS_ROOT)/src/s/ms-w32.h \
$(EMACS_ROOT)/src/m/intel386.h \
$(EMACS_ROOT)/lib-src/../src/config.h
$(BLD)/emacsclient.$(O) : \
$(SRC)/emacsclient.c \
$(EMACS_ROOT)/nt/inc/sys/stat.h \
@ -447,6 +454,7 @@ $(BLD)/ntlib.$(O) : \
$(BLD)/pop.$(O) : \
$(SRC)/pop.c \
$(SRC)/pop.h \
$(EMACS_ROOT)/lib/min-max.h \
$(SRC)/ntlib.h
$(BLD)/profile.$(O) : \

View File

@ -80,13 +80,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#undef access
#endif /* MSDOS */
#ifndef DIRECTORY_SEP
#define DIRECTORY_SEP '/'
#endif
#ifndef IS_DIRECTORY_SEP
#define IS_DIRECTORY_SEP(_c_) ((_c_) == DIRECTORY_SEP)
#endif
#ifdef WINDOWSNT
#include "ntlib.h"
#undef access
@ -161,7 +154,7 @@ static int mbx_delimit_end (FILE *mbf);
#endif
/* Nonzero means this is name of a lock file to delete on fatal error. */
char *delete_lockname;
static char *delete_lockname;
int
main (int argc, char **argv)
@ -169,7 +162,7 @@ main (int argc, char **argv)
char *inname, *outname;
int indesc, outdesc;
ssize_t nread;
int status;
int wait_status;
int c, preserve_mail = 0;
#ifndef MAIL_USE_SYSTEM_LOCK
@ -269,6 +262,13 @@ main (int argc, char **argv)
if (! spool_name)
#endif
{
#ifndef DIRECTORY_SEP
#define DIRECTORY_SEP '/'
#endif
#ifndef IS_DIRECTORY_SEP
#define IS_DIRECTORY_SEP(_c_) ((_c_) == DIRECTORY_SEP)
#endif
/* Use a lock file named after our first argument with .lock appended:
If it exists, the mail file is locked. */
/* Note: this locking mechanism is *required* by the mailer
@ -527,11 +527,11 @@ main (int argc, char **argv)
exit (EXIT_SUCCESS);
}
wait (&status);
if (!WIFEXITED (status))
wait (&wait_status);
if (!WIFEXITED (wait_status))
exit (EXIT_FAILURE);
else if (WRETCODE (status) != 0)
exit (WRETCODE (status));
else if (WRETCODE (wait_status) != 0)
exit (WRETCODE (wait_status));
#if !defined (MAIL_USE_MMDF) && !defined (MAIL_USE_SYSTEM_LOCK)
#ifdef MAIL_USE_MAILLOCK
@ -670,14 +670,8 @@ xmalloc (unsigned int size)
#define NOTOK (-1)
#define OK 0
#define DONE 1
char *progname;
FILE *sfi;
FILE *sfo;
char ibuffer[BUFSIZ];
char obuffer[BUFSIZ];
char Errmsg[200]; /* POP errors, at least, can exceed
static char Errmsg[200]; /* POP errors, at least, can exceed
the original length of 80. */
/*
@ -736,7 +730,18 @@ popmail (char *mailbox, char *outfile, int preserve, char *password, int reverse
error ("Error in open: %s, %s", strerror (errno), outfile);
return EXIT_FAILURE;
}
fchown (mbfi, getuid (), -1);
if (fchown (mbfi, getuid (), -1) != 0)
{
int fchown_errno = errno;
struct stat st;
if (fstat (mbfi, &st) != 0 || st.st_uid != getuid ())
{
pop_close (server);
error ("Error in fchown: %s, %s", strerror (fchown_errno), outfile);
return EXIT_FAILURE;
}
}
if ((mbf = fdopen (mbfi, "wb")) == NULL)
{
@ -828,10 +833,10 @@ pop_retr (popserver server, int msgno, FILE *arg)
if (pop_retrieve_first (server, msgno, &line))
{
char *error = concat ("Error from POP server: ", pop_error, "");
strncpy (Errmsg, error, sizeof (Errmsg));
char *msg = concat ("Error from POP server: ", pop_error, "");
strncpy (Errmsg, msg, sizeof (Errmsg));
Errmsg[sizeof (Errmsg)-1] = '\0';
free(error);
free (msg);
return (NOTOK);
}
@ -850,27 +855,26 @@ pop_retr (popserver server, int msgno, FILE *arg)
if (ret)
{
char *error = concat ("Error from POP server: ", pop_error, "");
strncpy (Errmsg, error, sizeof (Errmsg));
char *msg = concat ("Error from POP server: ", pop_error, "");
strncpy (Errmsg, msg, sizeof (Errmsg));
Errmsg[sizeof (Errmsg)-1] = '\0';
free(error);
free (msg);
return (NOTOK);
}
return (OK);
}
/* Do this as a macro instead of using strcmp to save on execution time. */
#define IS_FROM_LINE(a) ((a[0] == 'F') \
&& (a[1] == 'r') \
&& (a[2] == 'o') \
&& (a[3] == 'm') \
&& (a[4] == ' '))
static int
mbx_write (char *line, int len, FILE *mbf)
{
#ifdef MOVEMAIL_QUOTE_POP_FROM_LINES
/* Do this as a macro instead of using strcmp to save on execution time. */
# define IS_FROM_LINE(a) ((a[0] == 'F') \
&& (a[1] == 'r') \
&& (a[2] == 'o') \
&& (a[3] == 'm') \
&& (a[4] == ' '))
if (IS_FROM_LINE (line))
{
if (fputc ('>', mbf) == EOF)

View File

@ -67,7 +67,6 @@ extern struct servent *hes_getservbyname (/* char *, char * */);
#include <stdio.h>
#ifdef STDC_HEADERS
#include <string.h>
#define index strchr
#endif
#include <unistd.h>
@ -91,6 +90,8 @@ extern struct servent *hes_getservbyname (/* char *, char * */);
# endif
#endif /* KERBEROS */
#include <min-max.h>
#ifdef KERBEROS
#ifndef KERBEROS5
extern int krb_sendauth (/* long, int, KTEXT, char *, char *, char *,
@ -122,19 +123,15 @@ static char *find_crlf (char *, int);
to be bigger than the original
value of 80 */
#define POP_PORT 110
#define KPOP_PORT 1109
#define POP_SERVICE "pop3" /* we don't want the POP2 port! */
#ifdef KERBEROS
#define KPOP_PORT 1109
#define KPOP_SERVICE "kpop" /* never used: look for 20060515 to see why */
#endif
char pop_error[ERROR_MAX];
int pop_debug = 0;
#ifndef min
#define min(a,b) (((a) < (b)) ? (a) : (b))
#endif
/*
* Function: pop_open (char *host, char *username, char *password,
* int flags)

View File

@ -38,7 +38,7 @@ static char time_string[30];
/* Reset the stopwatch to zero. */
void
static void
reset_watch (void)
{
EMACS_GET_TIME (TV1);
@ -49,7 +49,7 @@ reset_watch (void)
is returned as a string with the format <seconds>.<micro-seconds>
If reset_watch was not called yet, exit. */
char *
static char *
get_time (void)
{
if (watch_not_started)

View File

@ -26,18 +26,16 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
/* Break string in two parts to avoid buggy C compilers that ignore characters
after nulls in strings. */
char string1[] = "Testing distribution of nonprinting chars:\n\
static char string1[] = "Testing distribution of nonprinting chars:\n\
Should be 0177: \177 Should be 0377: \377 Should be 0212: \212.\n\
Should be 0000: ";
char string2[] = ".\n\
static char string2[] = ".\n\
This file is read by the `test-distribution' program.\n\
If you change it, you will make that program fail.\n";
char buf[300];
/* Like `read' but keeps trying until it gets SIZE bytes or reaches eof. */
int
static int
cool_read (int fd, char *buf, size_t size)
{
ssize_t num;
@ -57,6 +55,7 @@ int
main (int argc, char **argv)
{
int fd;
char buf[300];
if (argc != 2)
{

View File

@ -57,7 +57,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
extern char *optarg;
extern int optind, opterr;
int usage (int err) NO_RETURN;
static int usage (int err) NO_RETURN;
#define MAX_ATTEMPTS 5
#define MAX_SCORES 200
@ -68,7 +68,7 @@ int usage (int err) NO_RETURN;
#define difftime(t1, t0) (double)((t1) - (t0))
#endif
int
static int
usage (int err)
{
fprintf (stdout, "Usage: update-game-score [-m MAX ] [ -r ] game/scorefile SCORE DATA\n");
@ -80,8 +80,8 @@ usage (int err)
exit (err);
}
int lock_file (const char *filename, void **state);
int unlock_file (const char *filename, void *state);
static int lock_file (const char *filename, void **state);
static int unlock_file (const char *filename, void *state);
struct score_entry
{
@ -90,24 +90,24 @@ struct score_entry
char *data;
};
int read_scores (const char *filename, struct score_entry **scores,
int *count);
int push_score (struct score_entry **scores, int *count,
int newscore, char *username, char *newdata);
void sort_scores (struct score_entry *scores, int count, int reverse);
int write_scores (const char *filename, const struct score_entry *scores,
int count);
static int read_scores (const char *filename, struct score_entry **scores,
int *count);
static int push_score (struct score_entry **scores, int *count,
int newscore, char *username, char *newdata);
static void sort_scores (struct score_entry *scores, int count, int reverse);
static int write_scores (const char *filename,
const struct score_entry *scores, int count);
void lose (const char *msg) NO_RETURN;
static void lose (const char *msg) NO_RETURN;
void
static void
lose (const char *msg)
{
fprintf (stderr, "%s\n", msg);
exit (EXIT_FAILURE);
}
void lose_syserr (const char *msg) NO_RETURN;
static void lose_syserr (const char *msg) NO_RETURN;
/* Taken from sysdep.c. */
#ifndef HAVE_STRERROR
@ -126,14 +126,14 @@ strerror (errnum)
#endif /* not WINDOWSNT */
#endif /* ! HAVE_STRERROR */
void
static void
lose_syserr (const char *msg)
{
fprintf (stderr, "%s: %s\n", msg, strerror (errno));
exit (EXIT_FAILURE);
}
char *
static char *
get_user_id (void)
{
char *name;
@ -154,7 +154,7 @@ get_user_id (void)
return buf->pw_name;
}
const char *
static const char *
get_prefix (int running_suid, const char *user_prefix)
{
if (!running_suid && user_prefix == NULL)
@ -258,7 +258,7 @@ main (int argc, char **argv)
exit (EXIT_SUCCESS);
}
int
static int
read_score (FILE *f, struct score_entry *score)
{
int c;
@ -342,7 +342,7 @@ read_score (FILE *f, struct score_entry *score)
return 0;
}
int
static int
read_scores (const char *filename, struct score_entry **scores, int *count)
{
int readval, scorecount, cursize;
@ -375,7 +375,7 @@ read_scores (const char *filename, struct score_entry **scores, int *count)
return 0;
}
int
static int
score_compare (const void *a, const void *b)
{
const struct score_entry *sa = (const struct score_entry *) a;
@ -383,7 +383,7 @@ score_compare (const void *a, const void *b)
return (sb->score > sa->score) - (sb->score < sa->score);
}
int
static int
score_compare_reverse (const void *a, const void *b)
{
const struct score_entry *sa = (const struct score_entry *) a;
@ -407,14 +407,14 @@ push_score (struct score_entry **scores, int *count, int newscore, char *usernam
return 0;
}
void
static void
sort_scores (struct score_entry *scores, int count, int reverse)
{
qsort (scores, count, sizeof (struct score_entry),
reverse ? score_compare_reverse : score_compare);
}
int
static int
write_scores (const char *filename, const struct score_entry *scores, int count)
{
FILE *f;
@ -443,7 +443,7 @@ write_scores (const char *filename, const struct score_entry *scores, int count)
return 0;
}
int
static int
lock_file (const char *filename, void **state)
{
int fd;
@ -484,7 +484,7 @@ lock_file (const char *filename, void **state)
return 0;
}
int
static int
unlock_file (const char *filename, void *state)
{
char *lockpath = (char *) state;

View File

@ -24,7 +24,7 @@
# the same distribution terms as the rest of that program.
#
# Generated by gnulib-tool.
# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=. --makefile-name=gnulib.mk --no-libtool --macro-prefix=gl --no-vc-files crypto/md5 dtoastr filemode getloadavg getopt-gnu ignore-value mktime strftime
# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=. --makefile-name=gnulib.mk --no-libtool --macro-prefix=gl --no-vc-files crypto/md5 dtoastr filemode getloadavg getopt-gnu ignore-value lstat mktime readlink strftime symlink sys_stat
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
@ -55,11 +55,13 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \
$(top_srcdir)/m4/getopt.m4 $(top_srcdir)/m4/gl-comp.m4 \
$(top_srcdir)/m4/gnulib-common.m4 \
$(top_srcdir)/m4/include_next.m4 $(top_srcdir)/m4/longlong.m4 \
$(top_srcdir)/m4/md5.m4 $(top_srcdir)/m4/mktime.m4 \
$(top_srcdir)/m4/multiarch.m4 $(top_srcdir)/m4/st_dm_mode.m4 \
$(top_srcdir)/m4/stdbool.m4 $(top_srcdir)/m4/stddef_h.m4 \
$(top_srcdir)/m4/stdint.m4 $(top_srcdir)/m4/stdlib_h.m4 \
$(top_srcdir)/m4/strftime.m4 $(top_srcdir)/m4/sys_stat_h.m4 \
$(top_srcdir)/m4/lstat.m4 $(top_srcdir)/m4/md5.m4 \
$(top_srcdir)/m4/mktime.m4 $(top_srcdir)/m4/multiarch.m4 \
$(top_srcdir)/m4/readlink.m4 $(top_srcdir)/m4/st_dm_mode.m4 \
$(top_srcdir)/m4/stat.m4 $(top_srcdir)/m4/stdbool.m4 \
$(top_srcdir)/m4/stddef_h.m4 $(top_srcdir)/m4/stdint.m4 \
$(top_srcdir)/m4/stdlib_h.m4 $(top_srcdir)/m4/strftime.m4 \
$(top_srcdir)/m4/symlink.m4 $(top_srcdir)/m4/sys_stat_h.m4 \
$(top_srcdir)/m4/time_h.m4 $(top_srcdir)/m4/time_r.m4 \
$(top_srcdir)/m4/tm_gmtoff.m4 $(top_srcdir)/m4/unistd_h.m4 \
$(top_srcdir)/m4/wchar_t.m4 $(top_srcdir)/configure.in
@ -179,6 +181,7 @@ GNULIB_LINKAT = @GNULIB_LINKAT@
GNULIB_LSEEK = @GNULIB_LSEEK@
GNULIB_LSTAT = @GNULIB_LSTAT@
GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@
GNULIB_MBTOWC = @GNULIB_MBTOWC@
GNULIB_MKDIRAT = @GNULIB_MKDIRAT@
GNULIB_MKDTEMP = @GNULIB_MKDTEMP@
GNULIB_MKFIFO = @GNULIB_MKFIFO@
@ -225,6 +228,7 @@ GNULIB_UNLOCKPT = @GNULIB_UNLOCKPT@
GNULIB_UNSETENV = @GNULIB_UNSETENV@
GNULIB_USLEEP = @GNULIB_USLEEP@
GNULIB_UTIMENSAT = @GNULIB_UTIMENSAT@
GNULIB_WCTOMB = @GNULIB_WCTOMB@
GNULIB_WRITE = @GNULIB_WRITE@
GNULIB__EXIT = @GNULIB__EXIT@
GNU_OBJC_CFLAGS = @GNU_OBJC_CFLAGS@
@ -452,6 +456,7 @@ REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@
REPLACE_LSEEK = @REPLACE_LSEEK@
REPLACE_LSTAT = @REPLACE_LSTAT@
REPLACE_MALLOC = @REPLACE_MALLOC@
REPLACE_MBTOWC = @REPLACE_MBTOWC@
REPLACE_MKDIR = @REPLACE_MKDIR@
REPLACE_MKFIFO = @REPLACE_MKFIFO@
REPLACE_MKNOD = @REPLACE_MKNOD@
@ -478,6 +483,7 @@ REPLACE_UNLINKAT = @REPLACE_UNLINKAT@
REPLACE_UNSETENV = @REPLACE_UNSETENV@
REPLACE_USLEEP = @REPLACE_USLEEP@
REPLACE_UTIMENSAT = @REPLACE_UTIMENSAT@
REPLACE_WCTOMB = @REPLACE_WCTOMB@
REPLACE_WRITE = @REPLACE_WRITE@
RSVG_CFLAGS = @RSVG_CFLAGS@
RSVG_LIBS = @RSVG_LIBS@
@ -598,10 +604,11 @@ BUILT_SOURCES = arg-nonnull.h c++defs.h $(GETOPT_H) $(STDBOOL_H) \
$(STDDEF_H) $(STDINT_H) stdlib.h sys/stat.h time.h unistd.h \
warn-on-use.h
EXTRA_DIST = $(top_srcdir)/./arg-nonnull.h $(top_srcdir)/./c++defs.h \
md5.c md5.h ftoastr.c ftoastr.h filemode.c filemode.h \
getloadavg.c getopt.c getopt.in.h getopt1.c getopt_int.h \
intprops.h mktime-internal.h mktime.c stdbool.in.h stddef.in.h \
stdint.in.h stdlib.in.h strftime.c strftime.h sys_stat.in.h \
md5.c md5.h dosname.h ftoastr.c ftoastr.h filemode.c \
filemode.h getloadavg.c getopt.c getopt.in.h getopt1.c \
getopt_int.h intprops.h lstat.c mktime-internal.h mktime.c \
readlink.c stat.c stdbool.in.h stddef.in.h stdint.in.h \
stdlib.in.h strftime.c strftime.h symlink.c sys_stat.in.h \
time.in.h time_r.c unistd.in.h $(top_srcdir)/./warn-on-use.h
MOSTLYCLEANDIRS = sys
MOSTLYCLEANFILES = core *.stackdump arg-nonnull.h arg-nonnull.h-t \
@ -615,7 +622,8 @@ libgnu_a_SOURCES = dtoastr.c gettext.h ignore-value.h
libgnu_a_LIBADD = $(gl_LIBOBJS)
libgnu_a_DEPENDENCIES = $(gl_LIBOBJS)
EXTRA_libgnu_a_SOURCES = md5.c ftoastr.c filemode.c getloadavg.c \
getopt.c getopt1.c mktime.c strftime.c time_r.c
getopt.c getopt1.c lstat.c mktime.c readlink.c stat.c \
strftime.c symlink.c time_r.c
ARG_NONNULL_H = arg-nonnull.h
CXXDEFS_H = c++defs.h
WARN_ON_USE_H = warn-on-use.h
@ -674,9 +682,13 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getloadavg.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getopt.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getopt1.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lstat.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/md5.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mktime.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/readlink.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stat.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strftime.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/symlink.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/time_r.Po@am__quote@
.c.o:
@ -1001,6 +1013,7 @@ stdlib.h: stdlib.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
-e 's|@''GNULIB_GETSUBOPT''@|$(GNULIB_GETSUBOPT)|g' \
-e 's|@''GNULIB_GRANTPT''@|$(GNULIB_GRANTPT)|g' \
-e 's|@''GNULIB_MALLOC_POSIX''@|$(GNULIB_MALLOC_POSIX)|g' \
-e 's|@''GNULIB_MBTOWC''@|$(GNULIB_MBTOWC)|g' \
-e 's|@''GNULIB_MKDTEMP''@|$(GNULIB_MKDTEMP)|g' \
-e 's|@''GNULIB_MKOSTEMP''@|$(GNULIB_MKOSTEMP)|g' \
-e 's|@''GNULIB_MKOSTEMPS''@|$(GNULIB_MKOSTEMPS)|g' \
@ -1019,6 +1032,7 @@ stdlib.h: stdlib.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
-e 's|@''GNULIB_SYSTEM_POSIX''@|$(GNULIB_SYSTEM_POSIX)|g' \
-e 's|@''GNULIB_UNLOCKPT''@|$(GNULIB_UNLOCKPT)|g' \
-e 's|@''GNULIB_UNSETENV''@|$(GNULIB_UNSETENV)|g' \
-e 's|@''GNULIB_WCTOMB''@|$(GNULIB_WCTOMB)|g' \
< $(srcdir)/stdlib.in.h | \
sed -e 's|@''HAVE__EXIT''@|$(HAVE__EXIT)|g' \
-e 's|@''HAVE_ATOLL''@|$(HAVE_ATOLL)|g' \
@ -1047,6 +1061,7 @@ stdlib.h: stdlib.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
-e 's|@''REPLACE_CALLOC''@|$(REPLACE_CALLOC)|g' \
-e 's|@''REPLACE_CANONICALIZE_FILE_NAME''@|$(REPLACE_CANONICALIZE_FILE_NAME)|g' \
-e 's|@''REPLACE_MALLOC''@|$(REPLACE_MALLOC)|g' \
-e 's|@''REPLACE_MBTOWC''@|$(REPLACE_MBTOWC)|g' \
-e 's|@''REPLACE_MKSTEMP''@|$(REPLACE_MKSTEMP)|g' \
-e 's|@''REPLACE_PUTENV''@|$(REPLACE_PUTENV)|g' \
-e 's|@''REPLACE_REALLOC''@|$(REPLACE_REALLOC)|g' \
@ -1054,6 +1069,7 @@ stdlib.h: stdlib.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
-e 's|@''REPLACE_SETENV''@|$(REPLACE_SETENV)|g' \
-e 's|@''REPLACE_STRTOD''@|$(REPLACE_STRTOD)|g' \
-e 's|@''REPLACE_UNSETENV''@|$(REPLACE_UNSETENV)|g' \
-e 's|@''REPLACE_WCTOMB''@|$(REPLACE_WCTOMB)|g' \
-e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
-e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
-e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \

53
lib/dosname.h Normal file
View File

@ -0,0 +1,53 @@
/* File names on MS-DOS/Windows systems.
Copyright (C) 2000-2001, 2004-2006, 2009-2011 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
From Paul Eggert and Jim Meyering. */
#ifndef _DOSNAME_H
#define _DOSNAME_H
#if (defined _WIN32 || defined __WIN32__ || \
defined __MSDOS__ || defined __CYGWIN__ || \
defined __EMX__ || defined __DJGPP__)
/* This internal macro assumes ASCII, but all hosts that support drive
letters use ASCII. */
# define _IS_DRIVE_LETTER(C) (((unsigned int) (C) | ('a' - 'A')) - 'a' \
<= 'z' - 'a')
# define FILE_SYSTEM_PREFIX_LEN(Filename) \
(_IS_DRIVE_LETTER ((Filename)[0]) && (Filename)[1] == ':' ? 2 : 0)
# ifndef __CYGWIN__
# define FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE 1
# endif
# define ISSLASH(C) ((C) == '/' || (C) == '\\')
#else
# define FILE_SYSTEM_PREFIX_LEN(Filename) 0
# define ISSLASH(C) ((C) == '/')
#endif
#ifndef FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE
# define FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE 0
#endif
#if FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE
# define IS_ABSOLUTE_FILE_NAME(F) ISSLASH ((F)[FILE_SYSTEM_PREFIX_LEN (F)])
# else
# define IS_ABSOLUTE_FILE_NAME(F) \
(ISSLASH ((F)[0]) || FILE_SYSTEM_PREFIX_LEN (F) != 0)
#endif
#define IS_RELATIVE_FILE_NAME(F) (! IS_ABSOLUTE_FILE_NAME (F))
#endif /* DOSNAME_H_ */

View File

@ -108,7 +108,7 @@ struct _getopt_data
#if defined _LIBC && defined USE_NONOPTION_FLAGS
int __nonoption_flags_max_len;
int __nonoption_flags_len;
# endif
#endif
};
/* The initializer is necessary to set OPTIND and OPTERR to their

View File

@ -9,7 +9,7 @@
# the same distribution terms as the rest of that program.
#
# Generated by gnulib-tool.
# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=. --makefile-name=gnulib.mk --no-libtool --macro-prefix=gl --no-vc-files crypto/md5 dtoastr filemode getloadavg getopt-gnu ignore-value mktime strftime
# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=. --makefile-name=gnulib.mk --no-libtool --macro-prefix=gl --no-vc-files crypto/md5 dtoastr filemode getloadavg getopt-gnu ignore-value lstat mktime readlink strftime symlink sys_stat
MOSTLYCLEANFILES += core *.stackdump
@ -78,6 +78,13 @@ EXTRA_libgnu_a_SOURCES += md5.c
## end gnulib module crypto/md5
## begin gnulib module dosname
EXTRA_DIST += dosname.h
## end gnulib module dosname
## begin gnulib module dtoastr
libgnu_a_SOURCES += dtoastr.c
@ -151,6 +158,15 @@ EXTRA_DIST += intprops.h
## end gnulib module intprops
## begin gnulib module lstat
EXTRA_DIST += lstat.c
EXTRA_libgnu_a_SOURCES += lstat.c
## end gnulib module lstat
## begin gnulib module mktime
@ -160,6 +176,24 @@ EXTRA_libgnu_a_SOURCES += mktime.c
## end gnulib module mktime
## begin gnulib module readlink
EXTRA_DIST += readlink.c
EXTRA_libgnu_a_SOURCES += readlink.c
## end gnulib module readlink
## begin gnulib module stat
EXTRA_DIST += stat.c
EXTRA_libgnu_a_SOURCES += stat.c
## end gnulib module stat
## begin gnulib module stdbool
BUILT_SOURCES += $(STDBOOL_H)
@ -267,6 +301,7 @@ stdlib.h: stdlib.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
-e 's|@''GNULIB_GETSUBOPT''@|$(GNULIB_GETSUBOPT)|g' \
-e 's|@''GNULIB_GRANTPT''@|$(GNULIB_GRANTPT)|g' \
-e 's|@''GNULIB_MALLOC_POSIX''@|$(GNULIB_MALLOC_POSIX)|g' \
-e 's|@''GNULIB_MBTOWC''@|$(GNULIB_MBTOWC)|g' \
-e 's|@''GNULIB_MKDTEMP''@|$(GNULIB_MKDTEMP)|g' \
-e 's|@''GNULIB_MKOSTEMP''@|$(GNULIB_MKOSTEMP)|g' \
-e 's|@''GNULIB_MKOSTEMPS''@|$(GNULIB_MKOSTEMPS)|g' \
@ -285,6 +320,7 @@ stdlib.h: stdlib.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
-e 's|@''GNULIB_SYSTEM_POSIX''@|$(GNULIB_SYSTEM_POSIX)|g' \
-e 's|@''GNULIB_UNLOCKPT''@|$(GNULIB_UNLOCKPT)|g' \
-e 's|@''GNULIB_UNSETENV''@|$(GNULIB_UNSETENV)|g' \
-e 's|@''GNULIB_WCTOMB''@|$(GNULIB_WCTOMB)|g' \
< $(srcdir)/stdlib.in.h | \
sed -e 's|@''HAVE__EXIT''@|$(HAVE__EXIT)|g' \
-e 's|@''HAVE_ATOLL''@|$(HAVE_ATOLL)|g' \
@ -313,6 +349,7 @@ stdlib.h: stdlib.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
-e 's|@''REPLACE_CALLOC''@|$(REPLACE_CALLOC)|g' \
-e 's|@''REPLACE_CANONICALIZE_FILE_NAME''@|$(REPLACE_CANONICALIZE_FILE_NAME)|g' \
-e 's|@''REPLACE_MALLOC''@|$(REPLACE_MALLOC)|g' \
-e 's|@''REPLACE_MBTOWC''@|$(REPLACE_MBTOWC)|g' \
-e 's|@''REPLACE_MKSTEMP''@|$(REPLACE_MKSTEMP)|g' \
-e 's|@''REPLACE_PUTENV''@|$(REPLACE_PUTENV)|g' \
-e 's|@''REPLACE_REALLOC''@|$(REPLACE_REALLOC)|g' \
@ -320,6 +357,7 @@ stdlib.h: stdlib.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
-e 's|@''REPLACE_SETENV''@|$(REPLACE_SETENV)|g' \
-e 's|@''REPLACE_STRTOD''@|$(REPLACE_STRTOD)|g' \
-e 's|@''REPLACE_UNSETENV''@|$(REPLACE_UNSETENV)|g' \
-e 's|@''REPLACE_WCTOMB''@|$(REPLACE_WCTOMB)|g' \
-e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
-e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
-e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \
@ -340,6 +378,15 @@ EXTRA_libgnu_a_SOURCES += strftime.c
## end gnulib module strftime
## begin gnulib module symlink
EXTRA_DIST += symlink.c
EXTRA_libgnu_a_SOURCES += symlink.c
## end gnulib module symlink
## begin gnulib module sys_stat
BUILT_SOURCES += sys/stat.h

91
lib/lstat.c Normal file
View File

@ -0,0 +1,91 @@
/* Work around a bug of lstat on some systems
Copyright (C) 1997-2006, 2008-2011 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
/* written by Jim Meyering */
#include <config.h>
#if !HAVE_LSTAT
/* On systems that lack symlinks, our replacement <sys/stat.h> already
defined lstat as stat, so there is nothing further to do other than
avoid an empty file. */
typedef int dummy;
#else /* HAVE_LSTAT */
/* Get the original definition of lstat. It might be defined as a macro. */
# define __need_system_sys_stat_h
# include <sys/types.h>
# include <sys/stat.h>
# undef __need_system_sys_stat_h
static inline int
orig_lstat (const char *filename, struct stat *buf)
{
return lstat (filename, buf);
}
/* Specification. */
# include <sys/stat.h>
# include <string.h>
# include <errno.h>
/* lstat works differently on Linux and Solaris systems. POSIX (see
`pathname resolution' in the glossary) requires that programs like
`ls' take into consideration the fact that FILE has a trailing slash
when FILE is a symbolic link. On Linux and Solaris 10 systems, the
lstat function already has the desired semantics (in treating
`lstat ("symlink/", sbuf)' just like `lstat ("symlink/.", sbuf)',
but on Solaris 9 and earlier it does not.
If FILE has a trailing slash and specifies a symbolic link,
then use stat() to get more info on the referent of FILE.
If the referent is a non-directory, then set errno to ENOTDIR
and return -1. Otherwise, return stat's result. */
int
rpl_lstat (const char *file, struct stat *sbuf)
{
size_t len;
int lstat_result = orig_lstat (file, sbuf);
if (lstat_result != 0)
return lstat_result;
/* This replacement file can blindly check against '/' rather than
using the ISSLASH macro, because all platforms with '\\' either
lack symlinks (mingw) or have working lstat (cygwin) and thus do
not compile this file. 0 len should have already been filtered
out above, with a failure return of ENOENT. */
len = strlen (file);
if (file[len - 1] != '/' || S_ISDIR (sbuf->st_mode))
return 0;
/* At this point, a trailing slash is only permitted on
symlink-to-dir; but it should have found information on the
directory, not the symlink. Call stat() to get info about the
link's referent. Our replacement stat guarantees valid results,
even if the symlink is not pointing to a directory. */
if (!S_ISLNK (sbuf->st_mode))
{
errno = ENOTDIR;
return -1;
}
return stat (file, sbuf);
}
#endif /* HAVE_LSTAT */

6
lib/min-max.h Normal file
View File

@ -0,0 +1,6 @@
#ifndef min
# define min(a,b) ((a) < (b) ? (a) : (b))
#endif
#ifndef max
# define max(a,b) ((a) > (b) ? (a) : (b))
#endif

74
lib/readlink.c Normal file
View File

@ -0,0 +1,74 @@
/* Stub for readlink().
Copyright (C) 2003-2007, 2009-2011 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include <config.h>
/* Specification. */
#include <unistd.h>
#include <errno.h>
#include <string.h>
#include <sys/stat.h>
#if !HAVE_READLINK
/* readlink() substitute for systems that don't have a readlink() function,
such as DJGPP 2.03 and mingw32. */
ssize_t
readlink (const char *name, char *buf _GL_UNUSED,
size_t bufsize _GL_UNUSED)
{
struct stat statbuf;
/* In general we should use lstat() here, not stat(). But on platforms
without symbolic links, lstat() - if it exists - would be equivalent to
stat(), therefore we can use stat(). This saves us a configure check. */
if (stat (name, &statbuf) >= 0)
errno = EINVAL;
return -1;
}
#else /* HAVE_READLINK */
# undef readlink
/* readlink() wrapper that uses correct types, for systems like cygwin
1.5.x where readlink returns int, and which rejects trailing slash,
for Solaris 9. */
ssize_t
rpl_readlink (const char *name, char *buf, size_t bufsize)
{
# if READLINK_TRAILING_SLASH_BUG
size_t len = strlen (name);
if (len && name[len - 1] == '/')
{
/* Even if name without the slash is a symlink to a directory,
both lstat() and stat() must resolve the trailing slash to
the directory rather than the symlink. We can therefore
safely use stat() to distinguish between EINVAL and
ENOTDIR/ENOENT, avoiding extra overhead of rpl_lstat(). */
struct stat st;
if (stat (name, &st) == 0)
errno = EINVAL;
return -1;
}
# endif /* READLINK_TRAILING_SLASH_BUG */
return readlink (name, buf, bufsize);
}
#endif /* HAVE_READLINK */

105
lib/stat.c Normal file
View File

@ -0,0 +1,105 @@
/* Work around platform bugs in stat.
Copyright (C) 2009-2011 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
/* written by Eric Blake */
#include <config.h>
/* Get the original definition of stat. It might be defined as a macro. */
#define __need_system_sys_stat_h
#include <sys/types.h>
#include <sys/stat.h>
#undef __need_system_sys_stat_h
static inline int
orig_stat (const char *filename, struct stat *buf)
{
return stat (filename, buf);
}
/* Specification. */
#include <sys/stat.h>
#include <errno.h>
#include <limits.h>
#include <stdbool.h>
#include <string.h>
#include "dosname.h"
/* Store information about NAME into ST. Work around bugs with
trailing slashes. Mingw has other bugs (such as st_ino always
being 0 on success) which this wrapper does not work around. But
at least this implementation provides the ability to emulate fchdir
correctly. */
int
rpl_stat (char const *name, struct stat *st)
{
int result = orig_stat (name, st);
#if REPLACE_FUNC_STAT_FILE
/* Solaris 9 mistakenly succeeds when given a non-directory with a
trailing slash. */
if (result == 0 && !S_ISDIR (st->st_mode))
{
size_t len = strlen (name);
if (ISSLASH (name[len - 1]))
{
errno = ENOTDIR;
return -1;
}
}
#endif /* REPLACE_FUNC_STAT_FILE */
#if REPLACE_FUNC_STAT_DIR
if (result == -1 && errno == ENOENT)
{
/* Due to mingw's oddities, there are some directories (like
c:\) where stat() only succeeds with a trailing slash, and
other directories (like c:\windows) where stat() only
succeeds without a trailing slash. But we want the two to be
synonymous, since chdir() manages either style. Likewise, Mingw also
reports ENOENT for names longer than PATH_MAX, when we want
ENAMETOOLONG, and for stat("file/"), when we want ENOTDIR.
Fortunately, mingw PATH_MAX is small enough for stack
allocation. */
char fixed_name[PATH_MAX + 1] = {0};
size_t len = strlen (name);
bool check_dir = false;
if (PATH_MAX <= len)
errno = ENAMETOOLONG;
else if (len)
{
strcpy (fixed_name, name);
if (ISSLASH (fixed_name[len - 1]))
{
check_dir = true;
while (len && ISSLASH (fixed_name[len - 1]))
fixed_name[--len] = '\0';
if (!len)
fixed_name[0] = '/';
}
else
fixed_name[len++] = '/';
result = orig_stat (fixed_name, st);
if (result == 0 && check_dir && !S_ISDIR (st->st_mode))
{
result = -1;
errno = ENOTDIR;
}
}
}
#endif /* REPLACE_FUNC_STAT_DIR */
return result;
}

View File

@ -274,6 +274,21 @@ _GL_WARN_ON_USE (malloc, "malloc is not POSIX compliant everywhere - "
"use gnulib module malloc-posix for portability");
#endif
/* Convert a multibyte character to a wide character. */
#if @GNULIB_MBTOWC@
# if @REPLACE_MBTOWC@
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
# undef mbtowc
# define mbtowc rpl_mbtowc
# endif
_GL_FUNCDECL_RPL (mbtowc, int, (wchar_t *pwc, const char *s, size_t n));
_GL_CXXALIAS_RPL (mbtowc, int, (wchar_t *pwc, const char *s, size_t n));
# else
_GL_CXXALIAS_SYS (mbtowc, int, (wchar_t *pwc, const char *s, size_t n));
# endif
_GL_CXXALIASWARN (mbtowc);
#endif
#if @GNULIB_MKDTEMP@
/* Create a unique temporary directory from TEMPLATE.
The last six characters of TEMPLATE must be "XXXXXX";
@ -723,6 +738,21 @@ _GL_WARN_ON_USE (unsetenv, "unsetenv is unportable - "
# endif
#endif
/* Convert a wide character to a multibyte character. */
#if @GNULIB_WCTOMB@
# if @REPLACE_WCTOMB@
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
# undef wctomb
# define wctomb rpl_wctomb
# endif
_GL_FUNCDECL_RPL (wctomb, int, (char *s, wchar_t wc));
_GL_CXXALIAS_RPL (wctomb, int, (char *s, wchar_t wc));
# else
_GL_CXXALIAS_SYS (wctomb, int, (char *s, wchar_t wc));
# endif
_GL_CXXALIASWARN (wctomb);
#endif
#endif /* _GL_STDLIB_H */
#endif /* _GL_STDLIB_H */

57
lib/symlink.c Normal file
View File

@ -0,0 +1,57 @@
/* Stub for symlink().
Copyright (C) 2009-2011 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include <config.h>
/* Specification. */
#include <unistd.h>
#include <errno.h>
#include <string.h>
#include <sys/stat.h>
#if HAVE_SYMLINK
# undef symlink
/* Create a symlink, but reject trailing slash. */
int
rpl_symlink (char const *contents, char const *name)
{
size_t len = strlen (name);
if (len && name[len - 1] == '/')
{
struct stat st;
if (lstat (name, &st) == 0)
errno = EEXIST;
return -1;
}
return symlink (contents, name);
}
#else /* !HAVE_SYMLINK */
/* The system does not support symlinks. */
int
symlink (char const *contents _GL_UNUSED,
char const *name _GL_UNUSED)
{
errno = ENOSYS;
return -1;
}
#endif /* !HAVE_SYMLINK */

View File

@ -20591,7 +20591,7 @@
* viper-cmd.el (viper-change-state): Got rid of make-local-hook.
(viper-special-read-and-insert-char): Make C-m work right in the r
comand.
command.
(viper-buffer-search-enable): Fixed format string.
* viper-ex.el (ex-token-alist): Use ex-set-visited-file-name

View File

@ -10699,9 +10699,6 @@
output of the next command. Reported by M Jared Finder
<jared@hpalace.com>.
* net/tramp-vc.el (vc-user-login-name): Wrap defadvice with a test
for `process-file', in order to let it work for older Emacsen too.
2006-04-17 Ralf Angeli <angeli@iwi.uni-sb.de>
* textmodes/tex-mode.el (tex-font-lock-match-suscript): New function.
@ -11678,7 +11675,7 @@
make underlining work for wide characters.
(org-goto-map, org-agenda-mode-map, org-mode-map): Explicitly bind
TAB to `org-cycle', to make sure that no binding in
`outline-mode-map' can supercede it.
`outline-mode-map' can supersede it.
2006-03-14 Ken Manheimer <ken.manheimer@gmail.com>
@ -19139,7 +19136,7 @@
* pgg.el (pgg-decrypt): Passing along PASSPHRASE in call to
pgg-decrypt-region.
(pgg-pending-timers): A new hash for tracking the passphrase cache
timers, so that new ones supercede old ones.
timers, so that new ones supersede old ones.
(pgg-add-passphrase-to-cache): Rename from
`pgg-add-passphrase-cache' to reduce confusion (all callers
changed). Modified to cancel old timers when new ones are added.
@ -19225,7 +19222,7 @@
* pgg.el (pgg-decrypt): Passing along PASSPHRASE in call to
pgg-decrypt-region.
(pgg-pending-timers): A new hash for tracking the passphrase cache
timers, so that new ones supercede old ones.
timers, so that new ones supersede old ones.
(pgg-add-passphrase-to-cache): Rename from
`pgg-add-passphrase-cache' to reduce confusion (all callers
changed). Modified to cancel old timers when new ones are added.

View File

@ -4906,7 +4906,7 @@
* two-column.el: Doc fixes.
* loaddefs.el (function-keymap): Definition deleted; this has been
superceded by function-key-map.
superseded by function-key-map.
* gomoku.el (gomoku-mode-map): Use function key symbols, instead
of the keypad.el facilities.
@ -6056,7 +6056,7 @@
and `fill-column'. Code now actually sets `left-margin' and
`fill-column', as advertised.
* text-mode.el (change-log-mode): Function deleted, since it's
been superceded by the one in add-log.el.
been superseded by the one in add-log.el.
1992-06-14 Richard Stallman (rms@mole.gnu.ai.mit.edu)
@ -6070,7 +6070,7 @@
1992-06-12 Jim Blandy (jimb@pogo.cs.oberlin.edu)
* isearch-mode.el: New package, which will probably supercede
* isearch-mode.el: New package, which will probably supersede
isearch.el.
(isearch-mode-map, isearch-mode-meta-map): When initializing
these, remember that vectors are no longer keymaps.
@ -10009,7 +10009,7 @@
display-time-string.
(rmail-pop-up): Default display-time-hook to automatically retrieve
new mail if the variable rmail-pop-up is non-nil.
(add-clock-handler): Removed; superceded by timer.el.
(add-clock-handler): Removed; superseded by timer.el.
* loaddefs.el: Removed add-clock-handler.
@ -10032,7 +10032,7 @@
* loaddefs.el: Autoload for diff.
* files.el (diff): Superceded by diff.el.
* files.el (diff): Superseded by diff.el.
(diff-switches-function): Still needs to be merged into diff.el.
* diff.el: New file.

File diff suppressed because it is too large Load Diff

View File

@ -2013,7 +2013,7 @@ Optional FORCE means force reassignment of the region property."
;; item body), to bias the registered values.
;;
;; This is not necessary/useful when the item is being decorated, because
;; that always must be preceeded by a fresh item parse.
;; that always must be preceded by a fresh item parse.
(if (not (eq field :body-end))
(widget-get item-widget :from)

View File

@ -234,7 +234,7 @@ Use vector format for the keys:
- put literal keys after a '?' question mark, eg: '?a', '?.'
- enclose control, shift, or meta-modified keys as sequences within
parentheses, with the literal key, as above, preceded by the name(s)
of the modifers, eg: [(control ?a)]
of the modifiers, eg: [(control ?a)]
See the existing keys for examples.
Functions can be bound to multiple keys, but binding keys to
@ -255,13 +255,13 @@ prevails."
This is in contrast to the majority of allout-mode bindings on
`allout-prefixed-bindings', whose bindings are created with a
preceeding command key.
preceding command key.
Use vector format for the keys:
- put literal keys after a '?' question mark, eg: '?a', '?.'
- enclose control, shift, or meta-modified keys as sequences within
parentheses, with the literal key, as above, preceded by the name(s)
of the modifers, eg: [(control ?a)]
of the modifiers, eg: [(control ?a)]
See the existing keys for examples."
:type 'allout-keybindings-binding
:group 'allout-keybindings
@ -339,7 +339,7 @@ The types of elements in the layout specification are:
-- positive numbers open to the relative depth indicated by the
number, but do not force already opened subtopics to be closed.
-- 0 means to close topic -- hide all subitems.
: -- repeat spec -- apply the preceeding element to all siblings at
: -- repeat spec -- apply the preceding element to all siblings at
current level, *up to* those siblings that would be covered by specs
following the `:' on the list. Ie, apply to all topics at level but
trailing ones accounted for by trailing specs. (Only the first of
@ -1642,7 +1642,7 @@ So `allout-post-command-business' should not reactivate it...")
(defun allout-init (mode)
"DEPRECATED - configure allout activation by customizing
`allout-auto-activation'. This function remains around, limited
from what it did before, for backwards compatability.
from what it did before, for backwards compatibility.
MODE is the activation mode - see `allout-auto-activation' for
valid values."
@ -3125,7 +3125,7 @@ situation."
nil)
;; rationale: if any intervening items were at a lower depth, we
;; would now be on the first offspring at the target depth -- ie,
;; the preceeding item (per the search direction) must be at a
;; the preceding item (per the search direction) must be at a
;; lesser depth. that's all we need to check.
(if backward (allout-next-heading) (allout-previous-heading))
(if (< allout-recent-depth target-depth)
@ -4246,7 +4246,7 @@ With a negative argument, the item is shifted out using
With an argument greater than one, shift-in the item but not its
offspring, making the item into a sibling of its former children,
and a child of sibling that formerly preceeded it.
and a child of sibling that formerly preceded it.
You are not allowed to shift the first offspring of a topic
inwards, because that would yield a \"containment
@ -5364,7 +5364,7 @@ header and body. The elements of that list are:
(goto-char start)
(beginning-of-line)
;; Goto initial topic, and register preceeding stuff, if any:
;; Goto initial topic, and register preceding stuff, if any:
(if (> (allout-goto-prefix-doublechecked) start)
;; First topic follows beginning point -- register preliminary stuff:
(setq result

View File

@ -2181,7 +2181,8 @@ This also runs `bookmark-exit-hook'."
(bookmark-time-to-save-p t)
(bookmark-save)))
(add-hook 'kill-emacs-hook 'bookmark-exit-hook-internal)
(unless noninteractive
(add-hook 'kill-emacs-hook 'bookmark-exit-hook-internal))
(defun bookmark-unload-function ()
"Unload the Bookmark library."

View File

@ -423,12 +423,16 @@
(define-key calc-mode-map "l" nil)
(define-key calc-mode-map "lq" 'calc-logunits-quantity)
(define-key calc-mode-map "ld" 'calc-logunits-dblevel)
(define-key calc-mode-map "ln" 'calc-logunits-nplevel)
(define-key calc-mode-map "ld" 'calc-dblevel)
(define-key calc-mode-map "ln" 'calc-nplevel)
(define-key calc-mode-map "l+" 'calc-logunits-add)
(define-key calc-mode-map "l-" 'calc-logunits-sub)
(define-key calc-mode-map "l*" 'calc-logunits-mul)
(define-key calc-mode-map "l/" 'calc-logunits-divide)
(define-key calc-mode-map "ls" 'calc-spn)
(define-key calc-mode-map "lm" 'calc-midi)
(define-key calc-mode-map "lf" 'calc-freq)
(define-key calc-mode-map "l?" 'calc-l-prefix-help)
(define-key calc-mode-map "m" nil)
@ -944,7 +948,7 @@ calcFunc-lupoweradd calcFunc-lufieldsub calcFunc-lupowersub
calcFunc-lufieldmul calcFunc-lupowermul calcFunc-lufielddiv
calcFunc-lupowerdiv calcFunc-fieldquant calcFunc-powerquant
calcFunc-dbfieldlevel calcFunc-dbpowerlevel calcFunc-npfieldlevel
calcFunc-nppowerlevel
calcFunc-nppowerlevel calcFunc-spn calcFunc-midi calcFunc-freq
math-build-units-table math-build-units-table-buffer
math-check-unit-name math-convert-temperature math-convert-units
math-extract-units math-remove-units math-simplify-units
@ -1061,7 +1065,7 @@ calc-full-help calc-g-prefix-help calc-help-prefix
calc-hyperbolic-prefix-help calc-inv-hyp-prefix-help calc-option-prefix-help
calc-inverse-prefix-help calc-j-prefix-help calc-k-prefix-help
calc-m-prefix-help calc-r-prefix-help calc-s-prefix-help
calc-t-prefix-help calc-u-prefix-help calc-ul-prefix-help
calc-t-prefix-help calc-u-prefix-help calc-l-prefix-help
calc-v-prefix-help)
("calc-incom" calc-begin-complex calc-begin-vector calc-comma
@ -1176,9 +1180,10 @@ calc-convert-temperature calc-convert-units calc-define-unit
calc-enter-units-table calc-explain-units calc-extract-units
calc-get-unit-definition calc-permanent-units calc-quick-units
calc-remove-units calc-simplify-units calc-undefine-unit
calc-view-units-table calc-logunits-quantity calc-logunits-dblevel
calc-logunits-nplevel calc-logunits-add calc-logunits-sub
calc-logunits-mul calc-logunits-divide)
calc-view-units-table calc-logunits-quantity calc-dblevel
calc-nplevel calc-logunits-add calc-logunits-sub
calc-logunits-mul calc-logunits-divide calc-spn calc-midi
calc-freq)
("calc-vec" calc-arrange-vector calc-build-vector calc-cnorm
calc-conj-transpose calc-cons calc-cross calc-kron calc-diag

View File

@ -1574,7 +1574,7 @@ If this can't be done, return NIL."
(if calc-infinite-mode
'(neg (var inf var-inf))
(math-reject-arg x "*Logarithm of zero")))
(calc-symbolic-mode (signal 'inexact-result nil))
(calc-symbolic-mode (signal 'inexact-result nil))
((Math-numberp x)
(math-with-extra-prec 2
(let ((xf (math-float x)))

View File

@ -960,7 +960,10 @@ If EXPR is nil, return nil."
(if (eq base 'pi)
(math-pi)
expr)))
(if (Math-primp expr)
(if (or
(Math-primp expr)
(and (eq (car-safe expr) 'calcFunc-subscr)
(eq (car-safe (nth 1 expr)) 'var)))
expr
(cons (car expr)
(mapcar 'math-to-standard-rec (cdr expr))))))
@ -1559,6 +1562,20 @@ If EXPR is nil, return nil."
(defvar math-logunits '((var dB var-dB)
(var Np var-Np)))
(defun math-conditional-apply (fn &rest args)
"Evaluate f(args) unless in symbolic mode.
In symbolic mode, return the list (fn args)."
(if calc-symbolic-mode
(cons fn args)
(apply fn args)))
(defun math-conditional-pow (a b)
"Evaluate a^b unless in symbolic mode.
In symbolic mode, return the list (^ a b)."
(if calc-symbolic-mode
(list '^ a b)
(math-pow a b)))
(defun math-extract-logunits (expr)
(if (memq (car-safe expr) '(* /))
(cons (car expr)
@ -1585,24 +1602,24 @@ If EXPR is nil, return nil."
(if (equal aunit '(var dB var-dB))
(let ((coef (if power 10 20)))
(math-mul coef
(calcFunc-log10
(math-conditional-apply 'calcFunc-log10
(if neg
(math-sub
(math-pow 10 (math-div acoeff coef))
(math-pow 10 (math-div bcoeff coef)))
(math-conditional-pow 10 (math-div acoeff coef))
(math-conditional-pow 10 (math-div bcoeff coef)))
(math-add
(math-pow 10 (math-div acoeff coef))
(math-pow 10 (math-div bcoeff coef)))))))
(math-conditional-pow 10 (math-div acoeff coef))
(math-conditional-pow 10 (math-div bcoeff coef)))))))
(let ((coef (if power 2 1)))
(math-div
(calcFunc-ln
(math-conditional-apply 'calcFunc-ln
(if neg
(math-sub
(calcFunc-exp (math-mul coef acoeff))
(calcFunc-exp (math-mul coef bcoeff)))
(math-conditional-apply 'calcFunc-exp (math-mul coef acoeff))
(math-conditional-apply 'calcFunc-exp (math-mul coef bcoeff)))
(math-add
(calcFunc-exp (math-mul coef acoeff))
(calcFunc-exp (math-mul coef bcoeff)))))
(math-conditional-apply 'calcFunc-exp (math-mul coef acoeff))
(math-conditional-apply 'calcFunc-exp (math-mul coef bcoeff)))))
coef)))
units)))))))
@ -1666,14 +1683,14 @@ If EXPR is nil, return nil."
(math-add
coef
(math-mul (if power 10 20)
(calcFunc-log10 number)))
(math-conditional-apply 'calcFunc-log10 number)))
units)))
(t
(math-simplify
(math-mul
(math-add
coef
(math-div (calcFunc-ln number) (if power 2 1)))
(math-div (math-conditional-apply 'calcFunc-ln number) (if power 2 1)))
units))))
(calc-record-why "*Improper units" nil))))
@ -1692,14 +1709,14 @@ If EXPR is nil, return nil."
(math-sub
coef
(math-mul (if power 10 20)
(calcFunc-log10 b)))
(math-conditional-apply 'calcFunc-log10 b)))
units)))
(t
(math-simplify
(math-mul
(math-sub
coef
(math-div (calcFunc-ln b) (if power 2 1)))
(math-div (math-conditional-apply 'calcFunc-ln b) (if power 2 1)))
units)))))))))
(defun calcFunc-lufieldtimes (a b)
@ -1747,14 +1764,14 @@ If EXPR is nil, return nil."
(if (equal lunit '(var dB var-dB))
(math-mul
ref
(math-pow
(math-conditional-pow
10
(math-div
coeff
(if power 10 20))))
(math-mul
ref
(calcFunc-exp
(math-conditional-apply 'calcFunc-exp
(if power
(math-mul 2 coeff)
coeff))))
@ -1787,15 +1804,16 @@ If EXPR is nil, return nil."
(defun math-logunits-level (val ref db power)
"Compute the value of VAL in decibels or nepers."
(let* ((ratio (math-simplify-units (math-div val ref)))
(ratiou (math-simplify-units (math-remove-units ratio)))
(units (math-simplify (math-extract-units ratio))))
(math-mul
(if db
(math-mul
(math-mul (if power 10 20)
(calcFunc-log10 ratio))
(math-conditional-apply 'calcFunc-log10 ratiou))
'(var dB var-dB))
(math-mul
(math-div (calcFunc-ln ratio) (if power 2 1))
(math-div (math-conditional-apply 'calcFunc-ln ratiou) (if power 2 1))
'(var Np var-Np)))
units)))
@ -1819,7 +1837,7 @@ If EXPR is nil, return nil."
(setq ref (math-read-expr calc-logunits-power-reference)))
(math-logunits-level val ref nil t))
(defun calc-logunits-dblevel (arg)
(defun calc-dblevel (arg)
(interactive "P")
(calc-slow-wrapper
(if (calc-is-hyperbolic)
@ -1830,7 +1848,7 @@ If EXPR is nil, return nil."
(calc-binary-op "ludb" 'calcFunc-dbpowerlevel arg)
(calc-unary-op "ludb" 'calcFunc-dbpowerlevel arg)))))
(defun calc-logunits-nplevel (arg)
(defun calc-nplevel (arg)
(interactive "P")
(calc-slow-wrapper
(if (calc-is-hyperbolic)
@ -1841,6 +1859,222 @@ If EXPR is nil, return nil."
(calc-binary-op "lunp" 'calcFunc-nppowerlevel arg)
(calc-unary-op "lunp" 'calcFunc-nppowerlevel arg)))))
;;; Musical notes
(defvar calc-note-threshold)
(defun math-midi-round (num)
"Round NUM to an integer N if NUM is within calc-note-threshold cents of N."
(let* ((n (math-round num))
(diff (math-abs
(math-sub num n))))
(if (< (math-compare diff
(math-div (math-read-expr calc-note-threshold) 100)) 0)
n
num)))
(defconst math-notes
'(((var C var-C) . 0)
((var Csharp var-Csharp) . 1)
; ((var C♯ var-C♯) . 1)
((var Dflat var-Dflat) . 1)
; ((var D♭ var-D♭) . 1)
((var D var-D) . 2)
((var Dsharp var-Dsharp) . 3)
; ((var D♯ var-D♯) . 3)
((var E var-E) . 4)
((var F var-F) . 5)
((var Fsharp var-Fsharp) . 6)
; ((var F♯ var-F♯) . 6)
((var Gflat var-Gflat) . 6)
; ((var G♭ var-G♭) . 6)
((var G var-G) . 7)
((var Gsharp var-Gsharp) . 8)
; ((var G♯ var-G♯) . 8)
((var A var-A) . 9)
((var Asharp var-Asharp) . 10)
; ((var A♯ var-A♯) . 10)
((var Bflat var-Bflat) . 10)
; ((var B♭ var-B♭) . 10)
((var B var-B) . 11))
"An alist of notes with their number of semitones above C.")
(defun math-freqp (freq)
"Non-nil if FREQ is a positive number times the unit Hz.
If non-nil, return the coefficient of Hz."
(let ((freqcoef (math-simplify-units
(math-div freq '(var Hz var-Hz)))))
(if (Math-posp freqcoef) freqcoef)))
(defun math-midip (num)
"Non-nil if NUM is a possible MIDI note number.
If non-nil, return NUM."
(if (Math-numberp num) num))
(defun math-spnp (spn)
"Non-nil if NUM is a scientific pitch note (note + cents).
If non-nil, return a list consisting of the note and the cents coefficient."
(let (note cents rnote rcents)
(if (eq (car-safe spn) '+)
(setq note (nth 1 spn)
cents (nth 2 spn))
(setq note spn
cents nil))
(cond
((and ;; NOTE is a note, CENTS is nil or cents.
(eq (car-safe note) 'calcFunc-subscr)
(assoc (nth 1 note) math-notes)
(integerp (nth 2 note))
(setq rnote note)
(or
(not cents)
(Math-numberp (setq rcents
(math-simplify
(math-div cents '(var cents var-cents)))))))
(list rnote rcents))
((and ;; CENTS is a note, NOTE is cents.
(eq (car-safe cents) 'calcFunc-subscr)
(assoc (nth 1 cents) math-notes)
(integerp (nth 2 cents))
(setq rnote cents)
(or
(not note)
(Math-numberp (setq rcents
(math-simplify
(math-div note '(var cents var-cents)))))))
(list rnote rcents)))))
(defun math-freq-to-midi (freq)
"Return the midi note number corresponding to FREQ Hz."
(let ((midi (math-add
69
(math-mul
12
(calcFunc-log
(math-div freq 440)
2)))))
(math-midi-round midi)))
(defun math-spn-to-midi (spn)
"Return the MIDI number corresponding to SPN."
(let* ((note (cdr (assoc (nth 1 (car spn)) math-notes)))
(octave (math-add (nth 2 (car spn)) 1))
(cents (nth 1 spn))
(midi (math-add
(math-mul 12 octave)
note)))
(if cents
(math-add midi (math-div cents 100))
midi)))
(defun math-midi-to-spn (midi)
"Return the scientific pitch notation corresponding to midi number MIDI."
(let (midin cents)
(if (math-integerp midi)
(setq midin midi
cents nil)
(setq midin (math-floor midi)
cents (math-mul 100 (math-sub midi midin))))
(let* ((nr ;; This should be (math-idivmod midin 12), but with
;; better behavior for negative midin.
(if (Math-negp midin)
(let ((dm (math-idivmod (math-neg midin) 12)))
(if (= (cdr dm) 0)
(cons (math-neg (car dm)) 0)
(cons
(math-sub (math-neg (car dm)) 1)
(math-sub 12 (cdr dm)))))
(math-idivmod midin 12)))
(n (math-sub (car nr) 1))
(note (car (rassoc (cdr nr) math-notes))))
(if cents
(list '+ (list 'calcFunc-subscr note n)
(list '* cents '(var cents var-cents)))
(list 'calcFunc-subscr note n)))))
(defun math-freq-to-spn (freq)
"Return the scientific pitch notation corresponding to FREQ Hz."
(math-with-extra-prec 3
(math-midi-to-spn (math-freq-to-midi freq))))
(defun math-midi-to-freq (midi)
"Return the frequency of the note with midi number MIDI."
(list '*
(math-mul
440
(math-pow
2
(math-div
(math-sub
midi
69)
12)))
'(var Hz var-Hz)))
(defun math-spn-to-freq (spn)
"Return the frequency of the note with scientific pitch notation SPN."
(math-midi-to-freq (math-spn-to-midi spn)))
(defun calcFunc-spn (expr)
"Return EXPR written as scientific pitch notation + cents."
;; Get the coeffecient of Hz
(let (note)
(cond
((setq note (math-freqp expr))
(math-freq-to-spn note))
((setq note (math-midip expr))
(math-midi-to-spn note))
((math-spnp expr)
expr)
(t
(math-reject-arg expr "*Improper expression")))))
(defun calcFunc-midi (expr)
"Return EXPR written as a MIDI number."
(let (note)
(cond
((setq note (math-freqp expr))
(math-freq-to-midi note))
((setq note (math-spnp expr))
(math-spn-to-midi note))
((math-midip expr)
expr)
(t
(math-reject-arg expr "*Improper expression")))))
(defun calcFunc-freq (expr)
"Return the frequency corresponding to EXPR."
(let (note)
(cond
((setq note (math-midip expr))
(math-midi-to-freq note))
((setq note (math-spnp expr))
(math-spn-to-freq note))
((math-freqp expr)
expr)
(t
(math-reject-arg expr "*Improper expression")))))
(defun calc-freq (arg)
"Return the frequency corresponding to the expression on the stack."
(interactive "P")
(calc-slow-wrapper
(calc-unary-op "freq" 'calcFunc-freq arg)))
(defun calc-midi (arg)
"Return the MIDI number corresponding to the expression on the stack."
(interactive "P")
(calc-slow-wrapper
(calc-unary-op "midi" 'calcFunc-midi arg)))
(defun calc-spn (arg)
"Return the scientific pitch notation corresponding to the expression on the stack."
(interactive "P")
(calc-slow-wrapper
(calc-unary-op "spn" 'calcFunc-spn arg)))
(provide 'calc-units)
;; Local variables:

View File

@ -759,12 +759,13 @@
(math-reject-arg n "*Index out of range")))))
(defun calcFunc-subscr (mat n &optional m)
(setq mat (calcFunc-mrow mat n))
(if m
(if (math-num-integerp n)
(calcFunc-mrow mat m)
(calcFunc-mcol mat m))
mat))
(if (eq (car-safe mat) 'var) nil
(setq mat (calcFunc-mrow mat n))
(if m
(if (math-num-integerp n)
(calcFunc-mrow mat m)
(calcFunc-mcol mat m))
mat)))
;;; Get the Nth column of a matrix.
(defun math-mat-col (mat n)

View File

@ -446,6 +446,11 @@ by displaying the sub-formula in `calc-selected-face'."
:group 'calc
:type '(string))
(defcustom calc-note-threshold "1"
"The number of cents that a frequency should be near a note
to be identified as that note."
:type 'string
:group 'calc)
(defface calc-nonselected-face
'((t :inherit shadow

View File

@ -792,6 +792,20 @@ from the cursor position."
(define-obsolete-function-alias 'list-yahrzeit-dates
'calendar-hebrew-list-yahrzeits "23.1")
(defun calendar-hebrew-birthday (date year)
"Absolute date of the anniversary of Hebrew birth DATE, in Hebrew YEAR."
(let ((b-day (calendar-extract-day date))
(b-month (calendar-extract-month date))
(b-year (calendar-extract-year date)))
;; If it's Adar in a normal Hebrew year or Adar II in a Hebrew leap year...
(if (= b-month (calendar-hebrew-last-month-of-year b-year))
;; ...then use the same day in last month of Hebrew year.
(calendar-hebrew-to-absolute
(list (calendar-hebrew-last-month-of-year year) b-day year))
;; Else use the normal anniversary of the birth date,
;; or the corresponding day in years without that date.
(+ (calendar-hebrew-to-absolute (list b-month 1 year)) b-day -1))))
(defvar date)
;; To be called from diary-list-sexp-entries, where DATE is bound.
@ -800,6 +814,37 @@ from the cursor position."
"Hebrew calendar equivalent of date diary entry."
(format "Hebrew date (until sunset): %s" (calendar-hebrew-date-string date)))
(defvar entry)
(declare-function diary-ordinal-suffix "diary-lib" (n))
;;;###diary-autoload
(defun diary-hebrew-birthday (month day year &optional after-sunset)
"Hebrew birthday diary entry.
Entry applies if date is birthdate (MONTH DAY YEAR), or the day before.
The order of the input parameters changes according to
`calendar-date-style' (e.g. to DAY MONTH YEAR in the European style).
Assumes the associated diary entry is the name of the person.
Although the date of birth is specified by the *civil* calendar,
this function determines the proper Hebrew calendar birthday.
If the optional argument AFTER-SUNSET is non-nil, this means the
birth occurred after local sunset on the given civil date.
In this case, the following civil date corresponds to the Hebrew birthday."
(let* ((h-date (calendar-hebrew-from-absolute
(+ (calendar-absolute-from-gregorian
(diary-make-date month day year))
(if after-sunset 1 0))))
(h-year (calendar-extract-year h-date)) ; birth-day
(d (calendar-absolute-from-gregorian date)) ; today
(h-yr (calendar-extract-year (calendar-hebrew-from-absolute d)))
(age (- h-yr h-year)) ; current H year - birth H-year
(b-date (calendar-hebrew-birthday h-date h-yr)))
(and (> age 0) (memq b-date (list d (1+ d)))
(format "%s's %d%s Hebrew birthday%s" entry age
(diary-ordinal-suffix age)
(if (= b-date d) "" " (evening)")))))
;;;###diary-autoload
(defun diary-hebrew-omer (&optional mark)
"Omer count diary entry.
@ -829,8 +874,6 @@ use when highlighting the day in the calendar."
;;;###diary-autoload
(define-obsolete-function-alias 'diary-omer 'diary-hebrew-omer "23.1")
(defvar entry)
(autoload 'diary-make-date "diary-lib")
(declare-function diary-ordinal-suffix "diary-lib" (n))

View File

@ -100,7 +100,7 @@ Usually bound to the dimension of a single symbol or command.")
:type list
:documentation "List of tags defining local text.
This can be nil, or a list where the last element can be a string
representing text that may be incomplete. Preceeding elements
representing text that may be incomplete. Preceding elements
must be semantic tags representing variables or functions
called in a dereference sequence.")
(prefixclass :initarg :prefixclass

View File

@ -1264,7 +1264,7 @@ inserted into the current context.")
;; generated by a collector. This format is in semanticdb search
;; form. This vaguely standard form is a bit challenging to navigate
;; because the tags do not contain buffer info, but the file associated
;; with the tags preceed the tag in the list.
;; with the tags precedes the tag in the list.
;;
;; Basic displayors don't care, and can strip the results.
;; Advanced highlighting displayors need to know when they need

View File

@ -426,7 +426,7 @@ See `semantic-edits-change-leaf-tag' for details on parents."
;; confirmed as the lineage of `overlapped-tags'
;; which must have a value by now.
;; Loop over the search list to find the preceeding CDR.
;; Loop over the search list to find the preceding CDR.
;; Fortunatly, (car overlapped-tags) happens to be
;; the first tag positionally.
(let ((tokstart (semantic-tag-start (car overlapped-tags))))
@ -874,7 +874,7 @@ pre-positioned to a convenient location."
))
(message "To Remove Middle Tag: (%s)"
(semantic-format-tag-name first)))
;; Find in the cache the preceeding tag
;; Find in the cache the preceding tag
(while (and cachestart (not (eq first (car (cdr cachestart)))))
(setq cachestart (cdr cachestart)))
;; Find the last tag

View File

@ -296,7 +296,7 @@ local definitions."
(define-overloadable-function semantic-format-tag-canonical-name (tag &optional parent color)
"Return a canonical name for TAG.
A canonical name includes the names of any parents or namespaces preceeding
A canonical name includes the names of any parents or namespaces preceding
the tag.
Optional argument PARENT is the parent type if TAG is a detail.
Optional argument COLOR means highlight the prototype with font-lock colors.")

View File

@ -256,7 +256,7 @@ Optional argument COLOR indicates that color should be mixed in."
(define-mode-local-override semantic-documentation-for-tag
java-mode (&optional tag nosnarf)
"Find documentation from TAG and return it as a clean string.
Java have documentation set in a comment preceeding TAG's definition.
Java has documentation set in a comment preceding TAG's definition.
Attempt to strip out comment syntactic sugar, unless optional argument
NOSNARF is non-nil.
If NOSNARF is 'lex, then return the semantic lex token."

View File

@ -920,6 +920,8 @@ it were the arg to `interactive' (which see) to interactively read the value.
If the variable has a `custom-type' property, it must be a widget and the
`:prompt-value' property of that widget will be used for reading the value.
If the variable also has a `custom-get' property, that is used for finding
the current value of the variable, otherwise `symbol-value' is used.
If optional COMMENT argument is non-nil, also prompt for a comment and return
it as the third element in the list."
@ -941,7 +943,9 @@ it as the third element in the list."
(widget-prompt-value type
prompt
(if (boundp var)
(symbol-value var))
(funcall
(or (get var 'custom-get) 'symbol-value)
var))
(not (boundp var))))
(t
(eval-minibuffer prompt))))))
@ -1599,7 +1603,7 @@ Otherwise use brackets."
'editable-field
:size 40 :help-echo echo
:action `(lambda (widget &optional event)
(customize-apropos (widget-value widget))))))
(customize-apropos (split-string (widget-value widget)))))))
(widget-insert " ")
(widget-create-child-and-convert
search-widget 'push-button

View File

@ -611,7 +611,8 @@ Furthermore, it clears the variables listed in `desktop-globals-to-clear'."
(delete-other-windows))
;; ----------------------------------------------------------------------------
(add-hook 'kill-emacs-hook 'desktop-kill)
(unless noninteractive
(add-hook 'kill-emacs-hook 'desktop-kill))
(defun desktop-kill ()
"If `desktop-save-mode' is non-nil, do what `desktop-save' says to do.

View File

@ -1025,9 +1025,9 @@ See Info node `(emacs)Subdir switches' for more details."
;; Keeps any marks that may be present in column one (doing this
;; here is faster than with dired-add-entry's optional arg).
;; Does not update other dired buffers. Use dired-relist-entry for that.
(let ((char (following-char))
(opoint (line-beginning-position))
(buffer-read-only))
(let* ((opoint (line-beginning-position))
(char (char-after opoint))
(buffer-read-only))
(delete-region opoint (progn (forward-line 1) (point)))
(if file
(progn

View File

@ -145,6 +145,8 @@ See Info node `(dired-x) Omitting Variables' for more information."
(let ((dired-omit-size-limit nil)) (dired-omit-expunge))
(revert-buffer)))
(put 'dired-omit-mode 'safe-local-variable 'booleanp)
;; For backward compatibility
(define-obsolete-variable-alias 'dired-omit-files-p 'dired-omit-mode "22.1")
@ -185,15 +187,19 @@ If nil, there is no maximum size."
(defcustom dired-enable-local-variables t
"Control use of local-variables lists in Dired.
The value can be t, nil or something else.
A value of t means local-variables lists are obeyed;
nil means they are ignored; anything else means query.
This temporarily overrides the value of `enable-local-variables' when
listing a directory. See also `dired-local-variables-file'."
:type 'boolean
:risky t
:type '(choice (const :tag "Query Unsafe" t)
(const :tag "Safe Only" :safe)
(const :tag "Do all" :all)
(const :tag "Ignore" nil)
(other :tag "Query" other))
:group 'dired-x)
(make-obsolete-variable 'dired-enable-local-variables
"use a standard `dir-locals-file' instead." "24.1")
(defcustom dired-guess-shell-gnutar
(catch 'found
(dolist (exe '("tar" "gtar"))
@ -430,6 +436,7 @@ move to its line in dired."
(dired-omit-mode)
(dired-goto-file file)))))))
;;;###autoload
(defun dired-jump-other-window (&optional file-name)
"Like \\[dired-jump] (`dired-jump') but in other window."
(interactive
@ -698,15 +705,26 @@ Also useful for `auto-mode-alist' like this:
(dired-current-directory)
default-directory)))
"Alist of major modes and their opinion on `default-directory'.
This is given as a Lisp expression to evaluate. A resulting value of
nil is ignored in favor of `default-directory'.")
Each element has the form (MAJOR . EXPRESSION).
The function `dired-default-directory' evaluates EXPRESSION to
determine a default directory.")
(put 'dired-default-directory-alist 'risky-local-variable t) ; gets eval'd
(make-obsolete-variable 'dired-default-directory-alist
"this feature is due to be removed." "24.1")
(defun dired-default-directory ()
"Usage like variable `default-directory'.
Knows about the special cases in variable `dired-default-directory-alist'."
"Return the `dired-default-directory-alist' entry for the current major-mode.
If none, return `default-directory'."
(or (eval (cdr (assq major-mode dired-default-directory-alist)))
default-directory))
;; It looks like this was intended to be something of a "general" feature,
;; but it only ever seems to have been used in dired-smart-shell-command,
;; and does not seem worth keeping around (?).
(make-obsolete 'dired-default-directory
"this feature is due to be removed." "24.1")
(defun dired-smart-shell-command (command &optional output-buffer error-buffer)
"Like function `shell-command', but in the current Virtual Dired directory."
(interactive
@ -717,32 +735,33 @@ Knows about the special cases in variable `dired-default-directory-alist'."
((eq major-mode 'dired-mode) (dired-get-filename t t))))
current-prefix-arg
shell-command-default-error-buffer))
(let ((default-directory (dired-default-directory)))
(let ((default-directory (or (and (eq major-mode 'dired-mode)
(dired-current-directory))
default-directory)))
(shell-command command output-buffer error-buffer)))
;;; LOCAL VARIABLES FOR DIRED BUFFERS.
;; Brief Description:
;;;
;; Brief Description (This feature is obsolete as of Emacs 24.1)
;;
;; * `dired-extra-startup' is part of the `dired-mode-hook'.
;;;
;;
;; * `dired-extra-startup' calls `dired-hack-local-variables'
;;;
;;
;; * `dired-hack-local-variables' checks the value of
;;; `dired-local-variables-file'
;;;
;; `dired-local-variables-file'
;;
;; * Check if `dired-local-variables-file' is a non-nil string and is a
;;; filename found in the directory of the Dired Buffer being created.
;;;
;; filename found in the directory of the Dired Buffer being created.
;;
;; * If `dired-local-variables-file' satisfies the above, then temporarily
;;; include it in the Dired Buffer at the bottom.
;;;
;; include it in the Dired Buffer at the bottom.
;;
;; * Set `enable-local-variables' temporarily to the user variable
;;; `dired-enable-local-variables' and run `hack-local-variables' on the
;;; Dired Buffer.
;; `dired-enable-local-variables' and run `hack-local-variables' on the
;; Dired Buffer.
;; FIXME do standard dir-locals obsolete this?
(defcustom dired-local-variables-file (convert-standard-filename ".dired")
"Filename, as string, containing local dired buffer variables to be hacked.
If this file found in current directory, then it will be inserted into dired
@ -752,6 +771,8 @@ See also `dired-enable-local-variables'."
:type 'file
:group 'dired)
(make-obsolete-variable 'dired-local-variables-file 'dir-locals-file "24.1")
(defun dired-hack-local-variables ()
"Evaluate local variables in `dired-local-variables-file' for dired buffer."
(and (stringp dired-local-variables-file)
@ -767,29 +788,42 @@ See also `dired-enable-local-variables'."
(insert "\^L\n")
(insert-file-contents dired-local-variables-file))
;; Hack 'em.
(let ((buffer-file-name dired-local-variables-file))
(hack-local-variables))
(unwind-protect
(let ((buffer-file-name dired-local-variables-file))
(hack-local-variables))
;; Delete this stuff: `eobp' is used to find last subdir by dired.el.
(delete-region opoint (point-max)))
;; Make sure that the modeline shows the proper information.
(dired-sort-set-modeline)
;; Delete this stuff: `eobp' is used to find last subdir by dired.el.
(delete-region opoint (point-max)))))
(dired-sort-set-modeline))))
(make-obsolete 'dired-hack-local-variables
'hack-dir-local-variables-non-file-buffer "24.1")
;; Does not seem worth a dedicated command.
;; See the more general features in files-x.el.
(defun dired-omit-here-always ()
"Create `dired-local-variables-file' for omitting and reverts directory.
Sets `dired-omit-mode' to t in a local variables file that is readable by
dired."
"Create `dir-locals-file' setting `dired-omit-mode' to t in `dired-mode'.
If in a Dired buffer, reverts it."
(interactive)
(if (file-exists-p dired-local-variables-file)
(message "File `./%s' already exists." dired-local-variables-file)
;; Create `dired-local-variables-file'.
(with-current-buffer (get-buffer-create " *dot-dired*")
(erase-buffer)
(insert "Local Variables:\ndired-omit-mode: t\nEnd:\n")
(write-file dired-local-variables-file)
(kill-buffer))
(error "Old-style dired-local-variables-file `./%s' found;
replace it with a dir-locals-file `./%s'"
dired-local-variables-file
dir-locals-file))
(if (file-exists-p dir-locals-file)
(message "File `./%s' already exists." dir-locals-file)
(with-temp-buffer
(insert "\
\((dired-mode . ((subdirs . nil)
(dired-omit-mode . t))))\n")
(write-file dir-locals-file))
;; Run extra-hooks and revert directory.
(dired-extra-startup)
(dired-revert)))
(when (derived-mode-p 'dired-mode)
(hack-dir-local-variables-non-file-buffer)
(dired-extra-startup)
(dired-revert))))
(make-obsolete 'dired-omit-here-always 'add-dir-local-variable "24.1")
;;; GUESS SHELL COMMAND.
@ -826,11 +860,11 @@ dired."
;; NOTE: Use `gunzip -c' instead of `zcat' on `.gz' files. Some do not
;; install GNU zip's version of zcat.
(declare-function Man-support-local-filenames "man" ())
(autoload 'Man-support-local-filenames "man")
(defvar dired-guess-shell-alist-default
(list
(list "\\.tar$"
(list "\\.tar\\'"
'(if dired-guess-shell-gnutar
(concat dired-guess-shell-gnutar " xvf")
"tar xvf")
@ -848,7 +882,7 @@ dired."
;; REGEXPS for compressed archives must come before the .Z rule to
;; be recognized:
(list "\\.tar\\.Z$"
(list "\\.tar\\.Z\\'"
;; Untar it.
'(if dired-guess-shell-gnutar
(concat dired-guess-shell-gnutar " zxvf")
@ -858,7 +892,7 @@ dired."
" " dired-guess-shell-znew-switches))
;; gzip'ed archives
(list "\\.t\\(ar\\.\\)?gz$"
(list "\\.t\\(ar\\.\\)?gz\\'"
'(if dired-guess-shell-gnutar
(concat dired-guess-shell-gnutar " zxvf")
(concat "gunzip -qc * | tar xvf -"))
@ -878,7 +912,7 @@ dired."
(concat "gunzip -qc * | tar tvf -")))
;; bzip2'ed archives
(list "\\.t\\(ar\\.bz2\\|bz\\)$"
(list "\\.t\\(ar\\.bz2\\|bz\\)\\'"
"bunzip2 -c * | tar xvf -"
;; Extract files into a separate subdirectory
'(concat "mkdir " (file-name-sans-extension file)
@ -888,7 +922,7 @@ dired."
"bunzip2")
;; xz'ed archives
(list "\\.t\\(ar\\.\\)?xz$"
(list "\\.t\\(ar\\.\\)?xz\\'"
"unxz -c * | tar xvf -"
;; Extract files into a separate subdirectory
'(concat "mkdir " (file-name-sans-extension file)
@ -897,94 +931,103 @@ dired."
;; Optional decompression.
"unxz")
'("\\.shar\\.Z$" "zcat * | unshar")
'("\\.shar\\.g?z$" "gunzip -qc * | unshar")
'("\\.shar\\.Z\\'" "zcat * | unshar")
'("\\.shar\\.g?z\\'" "gunzip -qc * | unshar")
'("\\.e?ps$" "ghostview" "xloadimage" "lpr")
(list "\\.e?ps\\.g?z$" "gunzip -qc * | ghostview -"
'("\\.e?ps\\'" "ghostview" "xloadimage" "lpr")
(list "\\.e?ps\\.g?z\\'" "gunzip -qc * | ghostview -"
;; Optional decompression.
'(concat "gunzip" (if dired-guess-shell-gzip-quiet " -q")))
(list "\\.e?ps\\.Z$" "zcat * | ghostview -"
(list "\\.e?ps\\.Z\\'" "zcat * | ghostview -"
;; Optional conversion to gzip format.
'(concat "znew" (if dired-guess-shell-gzip-quiet " -q")
" " dired-guess-shell-znew-switches))
'("\\.patch$" "cat * | patch")
(list "\\.patch\\.g?z$" "gunzip -qc * | patch"
'("\\.patch\\'" "cat * | patch")
(list "\\.patch\\.g?z\\'" "gunzip -qc * | patch"
;; Optional decompression.
'(concat "gunzip" (if dired-guess-shell-gzip-quiet " -q")))
(list "\\.patch\\.Z$" "zcat * | patch"
(list "\\.patch\\.Z\\'" "zcat * | patch"
;; Optional conversion to gzip format.
'(concat "znew" (if dired-guess-shell-gzip-quiet " -q")
" " dired-guess-shell-znew-switches))
;; The following four extensions are useful with dired-man ("N" key)
(list "\\.\\(?:[0-9]\\|man\\)$" '(progn (require 'man)
(if (Man-support-local-filenames)
"man -l"
"cat * | tbl | nroff -man -h")))
(list "\\.\\(?:[0-9]\\|man\\)\\.g?z$" '(progn (require 'man)
(if (Man-support-local-filenames)
"man -l"
"gunzip -qc * | tbl | nroff -man -h"))
;; FIXME "man ./" does not work with dired-do-shell-command,
;; because there seems to be no way for us to modify the filename,
;; only the command. Hmph. `dired-man' works though.
(list "\\.\\(?:[0-9]\\|man\\)\\'" '(let ((loc (Man-support-local-filenames)))
(cond ((eq loc 'man-db) "man -l")
((eq loc 'man) "man ./")
(t
"cat * | tbl | nroff -man -h"))))
(list "\\.\\(?:[0-9]\\|man\\)\\.g?z\\'"
'(let ((loc (Man-support-local-filenames)))
(cond ((eq loc 'man-db)
"man -l")
((eq loc 'man)
"man ./")
(t "gunzip -qc * | tbl | nroff -man -h")))
;; Optional decompression.
'(concat "gunzip" (if dired-guess-shell-gzip-quiet " -q")))
(list "\\.[0-9]\\.Z$" '(progn (require 'man)
(if (Man-support-local-filenames)
"man -l"
"zcat * | tbl | nroff -man -h"))
(list "\\.[0-9]\\.Z\\'" '(let ((loc (Man-support-local-filenames)))
(cond ((eq loc 'man-db) "man -l")
((eq loc 'man) "man ./")
(t "zcat * | tbl | nroff -man -h")))
;; Optional conversion to gzip format.
'(concat "znew" (if dired-guess-shell-gzip-quiet " -q")
" " dired-guess-shell-znew-switches))
'("\\.pod$" "perldoc" "pod2man * | nroff -man")
'("\\.pod\\'" "perldoc" "pod2man * | nroff -man")
'("\\.dvi$" "xdvi" "dvips") ; preview and printing
'("\\.au$" "play") ; play Sun audiofiles
'("\\.mpe?g$\\|\\.avi$" "xine -p")
'("\\.ogg$" "ogg123")
'("\\.mp3$" "mpg123")
'("\\.wav$" "play")
'("\\.uu$" "uudecode") ; for uudecoded files
'("\\.hqx$" "mcvert")
'("\\.sh$" "sh") ; execute shell scripts
'("\\.xbm$" "bitmap") ; view X11 bitmaps
'("\\.gp$" "gnuplot")
'("\\.p[bgpn]m$" "xloadimage")
'("\\.gif$" "xloadimage") ; view gif pictures
'("\\.tif$" "xloadimage")
'("\\.png$" "display") ; xloadimage 4.1 doesn't grok PNG
'("\\.jpe?g$" "xloadimage")
'("\\.fig$" "xfig") ; edit fig pictures
'("\\.out$" "xgraph") ; for plotting purposes.
'("\\.tex$" "latex" "tex")
'("\\.texi\\(nfo\\)?$" "makeinfo" "texi2dvi")
'("\\.pdf$" "xpdf")
'("\\.doc$" "antiword" "strings")
'("\\.rpm$" "rpm -qilp" "rpm -ivh")
'("\\.dia$" "dia")
'("\\.mgp$" "mgp")
'("\\.dvi\\'" "xdvi" "dvips") ; preview and printing
'("\\.au\\'" "play") ; play Sun audiofiles
'("\\.mpe?g\\'\\|\\.avi\\'" "xine -p")
'("\\.ogg\\'" "ogg123")
'("\\.mp3\\'" "mpg123")
'("\\.wav\\'" "play")
'("\\.uu\\'" "uudecode") ; for uudecoded files
'("\\.hqx\\'" "mcvert")
'("\\.sh\\'" "sh") ; execute shell scripts
'("\\.xbm\\'" "bitmap") ; view X11 bitmaps
'("\\.gp\\'" "gnuplot")
'("\\.p[bgpn]m\\'" "xloadimage")
'("\\.gif\\'" "xloadimage") ; view gif pictures
'("\\.tif\\'" "xloadimage")
'("\\.png\\'" "display") ; xloadimage 4.1 doesn't grok PNG
'("\\.jpe?g\\'" "xloadimage")
'("\\.fig\\'" "xfig") ; edit fig pictures
'("\\.out\\'" "xgraph") ; for plotting purposes.
'("\\.tex\\'" "latex" "tex")
'("\\.texi\\(nfo\\)?\\'" "makeinfo" "texi2dvi")
'("\\.pdf\\'" "xpdf")
'("\\.doc\\'" "antiword" "strings")
'("\\.rpm\\'" "rpm -qilp" "rpm -ivh")
'("\\.dia\\'" "dia")
'("\\.mgp\\'" "mgp")
;; Some other popular archivers.
(list "\\.zip$" "unzip" "unzip -l"
(list "\\.zip\\'" "unzip" "unzip -l"
;; Extract files into a separate subdirectory
'(concat "unzip" (if dired-guess-shell-gzip-quiet " -q")
" -d " (file-name-sans-extension file)))
'("\\.zoo$" "zoo x//")
'("\\.lzh$" "lharc x")
'("\\.arc$" "arc x")
'("\\.shar$" "unshar")
'("\\.zoo\\'" "zoo x//")
'("\\.lzh\\'" "lharc x")
'("\\.arc\\'" "arc x")
'("\\.shar\\'" "unshar")
'("\\.rar\\'" "unrar x")
'("\\.7z\\'" "7z x")
;; Compression.
(list "\\.g?z$" '(concat "gunzip" (if dired-guess-shell-gzip-quiet " -q")))
(list "\\.dz$" "dictunzip")
(list "\\.bz2$" "bunzip2")
(list "\\.xz$" "unxz")
(list "\\.Z$" "uncompress"
(list "\\.g?z\\'" '(concat "gunzip" (if dired-guess-shell-gzip-quiet " -q")))
(list "\\.dz\\'" "dictunzip")
(list "\\.bz2\\'" "bunzip2")
(list "\\.xz\\'" "unxz")
(list "\\.Z\\'" "uncompress"
;; Optional conversion to gzip format.
'(concat "znew" (if dired-guess-shell-gzip-quiet " -q")
" " dired-guess-shell-znew-switches))
'("\\.sign?$" "gpg --verify"))
'("\\.sign?\\'" "gpg --verify"))
"Default alist used for shell command guessing.
See `dired-guess-shell-alist-user'.")

View File

@ -249,9 +249,19 @@ Local to each dired buffer. May be a list, in which case the car is the
directory name and the cdr is the list of files to mention.
The directory name must be absolute, but need not be fully expanded.")
;; Beware of "-l;reboot" etc. See bug#3230.
(defun dired-safe-switches-p (switches)
"Return non-nil if string SWITCHES does not look risky for dired."
(or (not switches)
(and (stringp switches)
(< (length switches) 100) ; arbitrary
(string-match "\\` *-[- [:alnum:]]+\\'" switches))))
(defvar dired-actual-switches nil
"The value of `dired-listing-switches' used to make this buffer's text.")
(put 'dired-actual-switches 'safe-local-variable 'dired-safe-switches-p)
(defvar dired-re-inode-size "[0-9 \t]*"
"Regexp for optional initial inode and file size as made by `ls -i -s'.")
@ -601,9 +611,12 @@ Don't use that together with FILTER."
(if current-prefix-arg
(read-string "Dired listing switches: "
dired-listing-switches))
;; If a dialog is about to be used, call read-directory-name so
;; the dialog code knows we want directories. Some dialogs can
;; only select directories or files when popped up, not both.
;; If a dialog is used, call `read-directory-name' so the
;; dialog code knows we want directories. Some dialogs
;; can only select directories or files when popped up,
;; not both. If no dialog is used, call `read-file-name'
;; because the user may want completion of file names for
;; use in a wildcard pattern.
(if (next-read-file-uses-dialog-p)
(read-directory-name (format "Dired %s(directory): " str)
nil default-directory nil)
@ -1860,6 +1873,7 @@ Keybindings:
(set (make-local-variable 'desktop-save-buffer)
'dired-desktop-buffer-misc-data)
(setq dired-switches-alist nil)
(hack-dir-local-variables-non-file-buffer) ; before sorting
(dired-sort-other dired-actual-switches t)
(when (featurep 'dnd)
(set (make-local-variable 'dnd-protocol-alist)
@ -3615,7 +3629,7 @@ Ask means pop up a menu for the user to select one of copy, move or link."
;;;;;; dired-run-shell-command dired-do-shell-command dired-do-async-shell-command
;;;;;; dired-clean-directory dired-do-print dired-do-touch dired-do-chown
;;;;;; dired-do-chgrp dired-do-chmod dired-compare-directories dired-backup-diff
;;;;;; dired-diff) "dired-aux" "dired-aux.el" "9d6333fab9c0f1b49e0bf2a536b8f245")
;;;;;; dired-diff) "dired-aux" "dired-aux.el" "154cdfbf451aedec60c5012b625ff329")
;;; Generated autoloads from dired-aux.el
(autoload 'dired-diff "dired-aux" "\
@ -4073,8 +4087,8 @@ true then the type of the file linked to by FILE is printed instead.
;;;***
;;;### (autoloads (dired-do-relsymlink dired-jump) "dired-x" "dired-x.el"
;;;;;; "86d436093caa9ae80f7b73915c6a4b4c")
;;;### (autoloads (dired-do-relsymlink dired-jump-other-window dired-jump)
;;;;;; "dired-x" "dired-x.el" "87fd4ae2fdade7e0f11c4a0b1cfdeda2")
;;; Generated autoloads from dired-x.el
(autoload 'dired-jump "dired-x" "\
@ -4089,6 +4103,11 @@ move to its line in dired.
\(fn &optional OTHER-WINDOW FILE-NAME)" t nil)
(autoload 'dired-jump-other-window "dired-x" "\
Like \\[dired-jump] (`dired-jump') but in other window.
\(fn &optional FILE-NAME)" t nil)
(autoload 'dired-do-relsymlink "dired-x" "\
Relative symlink all marked (or next ARG) files into a directory.
Otherwise make a relative symbolic link to the current file.

View File

@ -1,4 +1,4 @@
;;; assoc.el --- insert/delete/sort functions on association lists
;;; assoc.el --- insert/delete functions on association lists
;; Copyright (C) 1996, 2001-2011 Free Software Foundation, Inc.
@ -35,7 +35,7 @@ head is one matching KEY. Returns the sorted list and doesn't affect
the order of any other key-value pair. Side effect sets alist to new
sorted list."
(set alist-symbol
(sort (copy-alist (eval alist-symbol))
(sort (copy-alist (symbol-value alist-symbol))
(function (lambda (a b) (equal (car a) key))))))
@ -75,7 +75,7 @@ of the alist (with value nil if VALUE is nil or not supplied)."
(lexical-let ((elem (aelement key value))
alist)
(asort alist-symbol key)
(setq alist (eval alist-symbol))
(setq alist (symbol-value alist-symbol))
(cond ((null alist) (set alist-symbol elem))
((anot-head-p alist key) (set alist-symbol (nconc elem alist)))
(value (setcar alist (car elem)))
@ -87,7 +87,7 @@ of the alist (with value nil if VALUE is nil or not supplied)."
Alist is referenced by ALIST-SYMBOL and the key-value pair to remove
is pair matching KEY. Returns the altered alist."
(asort alist-symbol key)
(lexical-let ((alist (eval alist-symbol)))
(lexical-let ((alist (symbol-value alist-symbol)))
(cond ((null alist) nil)
((anot-head-p alist key) alist)
(t (set alist-symbol (cdr alist))))))
@ -133,7 +133,7 @@ extra values are ignored. Returns the created alist."
(t
(amake alist-symbol keycdr valcdr)
(aput alist-symbol keycar valcar))))
(eval alist-symbol))
(symbol-value alist-symbol))
(provide 'assoc)

View File

@ -537,7 +537,8 @@ Return non-nil if and only if FILE adds no autoloads to OUTFILE
(defun autoload-save-buffers ()
(while autoload-modified-buffers
(with-current-buffer (pop autoload-modified-buffers)
(save-buffer))))
(let ((version-control 'never))
(save-buffer)))))
;;;###autoload
(defun update-file-autoloads (file &optional save-after)
@ -569,8 +570,9 @@ removes any prior now out-of-date autoload entries."
(with-current-buffer
;; We used to use `raw-text' to read this file, but this causes
;; problems when the file contains non-ASCII characters.
(find-file-noselect
(autoload-ensure-default-file (autoload-generated-file)))
(let ((enable-local-variables :safe))
(find-file-noselect
(autoload-ensure-default-file (autoload-generated-file))))
;; This is to make generated-autoload-file have Unix EOLs, so
;; that it is portable to all platforms.
(or (eq 0 (coding-system-eol-type buffer-file-coding-system))
@ -656,8 +658,9 @@ directory or directories specified."
(autoload-modified-buffers nil))
(with-current-buffer
(find-file-noselect
(autoload-ensure-default-file (autoload-generated-file)))
(let ((enable-local-variables :safe))
(find-file-noselect
(autoload-ensure-default-file (autoload-generated-file))))
(save-excursion
;; Canonicalize file names and remove the autoload file itself.
@ -721,7 +724,8 @@ directory or directories specified."
(current-buffer) nil nil no-autoloads this-time)
(insert generate-autoload-section-trailer))
(save-buffer)
(let ((version-control 'never))
(save-buffer))
;; In case autoload entries were added to other files because of
;; file-local autoload-generated-file settings.
(autoload-save-buffers))))

View File

@ -238,6 +238,7 @@ the functions you loaded will not be able to run.")
(defvar byte-compile-disable-print-circle nil
"If non-nil, disable `print-circle' on printing a byte-compiled code.")
(make-obsolete-variable 'byte-compile-disable-print-circle nil "24.1")
;;;###autoload(put 'byte-compile-disable-print-circle 'safe-local-variable 'booleanp)
(defcustom byte-compile-dynamic-docstrings t

Some files were not shown because too many files have changed in this diff Show More