merge trunk

This commit is contained in:
Kenichi Handa 2011-07-07 08:28:00 +09:00
commit d2a0a50628
282 changed files with 14774 additions and 7649 deletions

View file

@ -1,3 +1,39 @@
2011-07-05 Jan Djärv <jan.h.d@swipnet.se>
* configure.in (HAVE_GCONF): Allow both HAVE_GCONF and HAVE_GSETTINGS.
2011-07-01 Glenn Morris <rgm@gnu.org>
* configure.in (SETTINGS_CFLAGS, SETTINGS_LIBS) [HAVE_GCONF]: Fix typo.
2011-06-30 Lars Magne Ingebrigtsen <larsi@gnus.org>
* configure.in (HAVE_GSETTINGS): Fix syntax for GSETTINGS tests,
which made ./configure infloop.
2011-06-30 Jan Djärv <jan.h.d@swipnet.se>
* configure.in (gsettings): New option and check for GSettings.
2011-06-29 Glenn Morris <rgm@gnu.org>
* configure.in: Try to test for the required crt*.o files.
2011-06-27 Bill Wohler <wohler@newt.com>
* .bzrignore: Add lisp/mh-e/mh-autoloads.el and lisp/mh-e/mh-cus-load.el.
2011-06-25 Paul Eggert <eggert@cs.ucla.edu>
Use gnulib's dup2 module instead of rolling our own.
* Makefile.in (GNULIB_MODULES): Add dup2.
* configure.in: Do not check for dup2; gnulib does that now.
* lib/dup2.c, m4/dup2.m4: New files, from gnulib.
2011-06-23 Paul Eggert <eggert@cs.ucla.edu>
* lib/getopt.c, lib/stat.c, m4/gl-comp.m4: Merge from gnulib.
2011-06-22 Paul Eggert <eggert@cs.ucla.edu>
Use gnulib's alloca-opt module.

View file

@ -68,10 +68,12 @@ etc.) before "make bootstrap" or "make"; the rest of the procedure is
applicable to those systems as well.
Because the Bazaar version of Emacs is a work in progress, it will
sometimes fail to build. Please wait a day or so (and check the bug
and development mailing list archives) before reporting such problems.
In most cases, the problem is known about and is just waiting for
someone to fix it.
sometimes fail to build. Please wait a day or so (and check the
archives of the emacs-buildstatus, emacs-devel, and bug-gnu-emacs
mailing lists) before reporting such problems. In most cases, the
problem is known about and is just waiting for someone to fix it.
This is especially true for Lisp compilation errors, which are almost
never platform-specific.

View file

@ -334,6 +334,7 @@ DOS_gnulib_comp.m4 = gl-comp.m4
GNULIB_MODULES = \
alloca-opt \
careadlinkat crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512 dtoastr \
dup2 \
filemode getloadavg getopt-gnu ignore-value intprops lstat mktime readlink \
socklen stdarg stdio strftime strtoumax symlink sys_stat
GNULIB_TOOL_FLAGS = \

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 --conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files careadlinkat crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512 dtoastr filemode getloadavg getopt-gnu ignore-value intprops lstat mktime readlink socklen stdarg stdio strftime strtoumax symlink sys_stat
# 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 --conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files alloca-opt careadlinkat crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512 dtoastr dup2 filemode getloadavg getopt-gnu ignore-value intprops lstat mktime readlink socklen stdarg stdio strftime strtoumax symlink sys_stat
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
@ -51,7 +51,8 @@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
subdir = lib
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \
$(top_srcdir)/m4/c-strtod.m4 $(top_srcdir)/m4/extensions.m4 \
$(top_srcdir)/m4/alloca.m4 $(top_srcdir)/m4/c-strtod.m4 \
$(top_srcdir)/m4/dup2.m4 $(top_srcdir)/m4/extensions.m4 \
$(top_srcdir)/m4/filemode.m4 $(top_srcdir)/m4/getloadavg.m4 \
$(top_srcdir)/m4/getopt.m4 $(top_srcdir)/m4/gl-comp.m4 \
$(top_srcdir)/m4/gnulib-common.m4 \
@ -104,6 +105,7 @@ CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
ALLOCA = @ALLOCA@
ALLOCA_H = @ALLOCA_H@
ALSA_CFLAGS = @ALSA_CFLAGS@
ALSA_LIBS = @ALSA_LIBS@
AMTAR = @AMTAR@
@ -304,6 +306,8 @@ GNULIB_WRITE = @GNULIB_WRITE@
GNULIB__EXIT = @GNULIB__EXIT@
GNU_OBJC_CFLAGS = @GNU_OBJC_CFLAGS@
GREP = @GREP@
GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
GSETTINGS_LIBS = @GSETTINGS_LIBS@
GTK_CFLAGS = @GTK_CFLAGS@
GTK_LIBS = @GTK_LIBS@
GTK_OBJ = @GTK_OBJ@
@ -617,6 +621,8 @@ REPLACE_WCTOMB = @REPLACE_WCTOMB@
REPLACE_WRITE = @REPLACE_WRITE@
RSVG_CFLAGS = @RSVG_CFLAGS@
RSVG_LIBS = @RSVG_LIBS@
SETTINGS_CFLAGS = @SETTINGS_CFLAGS@
SETTINGS_LIBS = @SETTINGS_LIBS@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@
@ -732,35 +738,36 @@ x_default_search_path = @x_default_search_path@
# statements but through direct file reference. Therefore this snippet must be
# present in all Makefile.am that need it. This is ensured by the applicability
# 'all' defined above.
BUILT_SOURCES = arg-nonnull.h c++defs.h $(GETOPT_H) inttypes.h \
$(STDARG_H) $(STDBOOL_H) $(STDDEF_H) $(STDINT_H) stdio.h \
stdlib.h sys/stat.h time.h unistd.h warn-on-use.h
EXTRA_DIST = allocator.h $(top_srcdir)/./arg-nonnull.h \
BUILT_SOURCES = $(ALLOCA_H) arg-nonnull.h c++defs.h $(GETOPT_H) \
inttypes.h $(STDARG_H) $(STDBOOL_H) $(STDDEF_H) $(STDINT_H) \
stdio.h stdlib.h sys/stat.h time.h unistd.h warn-on-use.h
EXTRA_DIST = alloca.in.h allocator.h $(top_srcdir)/./arg-nonnull.h \
$(top_srcdir)/./c++defs.h careadlinkat.h md5.h sha1.h sha256.h \
sha512.h dosname.h ftoastr.c ftoastr.h filemode.h getloadavg.c \
getopt.c getopt.in.h getopt1.c getopt_int.h ignore-value.h \
intprops.h inttypes.in.h lstat.c mktime-internal.h mktime.c \
readlink.c stat.c stdarg.in.h stdbool.in.h stddef.in.h \
stdint.in.h stdio.in.h stdlib.in.h strftime.h strtol.c \
strtoul.c strtoull.c strtoimax.c strtoumax.c symlink.c \
sys_stat.in.h time.in.h time_r.c u64.h unistd.in.h verify.h \
$(top_srcdir)/./warn-on-use.h
sha512.h dosname.h ftoastr.c ftoastr.h dup2.c filemode.h \
getloadavg.c getopt.c getopt.in.h getopt1.c getopt_int.h \
ignore-value.h intprops.h inttypes.in.h lstat.c \
mktime-internal.h mktime.c readlink.c stat.c stdarg.in.h \
stdbool.in.h stddef.in.h stdint.in.h stdio.in.h stdlib.in.h \
strftime.h strtol.c strtoul.c strtoull.c strtoimax.c \
strtoumax.c symlink.c sys_stat.in.h time.in.h time_r.c u64.h \
unistd.in.h verify.h $(top_srcdir)/./warn-on-use.h
MOSTLYCLEANDIRS = sys
MOSTLYCLEANFILES = core *.stackdump arg-nonnull.h arg-nonnull.h-t \
c++defs.h c++defs.h-t getopt.h getopt.h-t inttypes.h \
inttypes.h-t stdarg.h stdarg.h-t stdbool.h stdbool.h-t \
stddef.h stddef.h-t stdint.h stdint.h-t stdio.h stdio.h-t \
stdlib.h stdlib.h-t sys/stat.h sys/stat.h-t time.h time.h-t \
unistd.h unistd.h-t warn-on-use.h warn-on-use.h-t
MOSTLYCLEANFILES = core *.stackdump alloca.h alloca.h-t arg-nonnull.h \
arg-nonnull.h-t c++defs.h c++defs.h-t getopt.h getopt.h-t \
inttypes.h inttypes.h-t stdarg.h stdarg.h-t stdbool.h \
stdbool.h-t stddef.h stddef.h-t stdint.h stdint.h-t stdio.h \
stdio.h-t stdlib.h stdlib.h-t sys/stat.h sys/stat.h-t time.h \
time.h-t unistd.h unistd.h-t warn-on-use.h warn-on-use.h-t
noinst_LIBRARIES = libgnu.a
DEFAULT_INCLUDES = -I. -I../src -I$(top_srcdir)/src
libgnu_a_SOURCES = allocator.c careadlinkat.c md5.c sha1.c sha256.c \
sha512.c dtoastr.c filemode.c $(am__append_1) strftime.c
libgnu_a_LIBADD = $(gl_LIBOBJS)
libgnu_a_DEPENDENCIES = $(gl_LIBOBJS)
EXTRA_libgnu_a_SOURCES = ftoastr.c getloadavg.c getopt.c getopt1.c \
lstat.c mktime.c readlink.c stat.c strtol.c strtoul.c \
strtoull.c strtoimax.c strtoumax.c symlink.c time_r.c
EXTRA_libgnu_a_SOURCES = ftoastr.c dup2.c getloadavg.c getopt.c \
getopt1.c lstat.c mktime.c readlink.c stat.c strtol.c \
strtoul.c strtoull.c strtoimax.c strtoumax.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
@ -816,6 +823,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/allocator.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/careadlinkat.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dtoastr.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dup2.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/filemode.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ftoastr.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getloadavg.Po@am__quote@
@ -1052,6 +1060,17 @@ uninstall-am:
mostlyclean-generic mostlyclean-local pdf pdf-am ps ps-am tags \
uninstall uninstall-am
# We need the following in order to create <alloca.h> when the system
# doesn't have one that works with the given compiler.
@GL_GENERATE_ALLOCA_H_TRUE@alloca.h: alloca.in.h $(top_builddir)/config.status
@GL_GENERATE_ALLOCA_H_TRUE@ $(AM_V_GEN)rm -f $@-t $@ && \
@GL_GENERATE_ALLOCA_H_TRUE@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
@GL_GENERATE_ALLOCA_H_TRUE@ cat $(srcdir)/alloca.in.h; \
@GL_GENERATE_ALLOCA_H_TRUE@ } > $@-t && \
@GL_GENERATE_ALLOCA_H_TRUE@ mv -f $@-t $@
@GL_GENERATE_ALLOCA_H_FALSE@alloca.h: $(top_builddir)/config.status
@GL_GENERATE_ALLOCA_H_FALSE@ rm -f $@
# The arg-nonnull.h that gets inserted into generated .h files is the same as
# build-aux/arg-nonnull.h, except that it has the copyright header cut off.
arg-nonnull.h: $(top_srcdir)/./arg-nonnull.h

2
autogen/aclocal.m4 vendored
View file

@ -985,7 +985,9 @@ AC_SUBST([am__untar])
]) # _AM_PROG_TAR
m4_include([m4/00gnulib.m4])
m4_include([m4/alloca.m4])
m4_include([m4/c-strtod.m4])
m4_include([m4/dup2.m4])
m4_include([m4/extensions.m4])
m4_include([m4/filemode.m4])
m4_include([m4/getloadavg.m4])

View file

@ -104,7 +104,8 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
/* Define to 1 if you have the `alarm' function. */
#undef HAVE_ALARM
/* Define to 1 if you have `alloca', as a function or macro. */
/* Define to 1 if you have 'alloca' after including <alloca.h>, a header that
may be supplied by this distribution. */
#undef HAVE_ALLOCA
/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
@ -303,6 +304,9 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
/* Define to 1 if you have the `grantpt' function. */
#undef HAVE_GRANTPT
/* Define to 1 if using GSettings. */
#undef HAVE_GSETTINGS
/* Define to 1 if using GTK 3 or later. */
#undef HAVE_GTK3
@ -1290,6 +1294,12 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#undef volatile
/* On AIX 3 this must be included before any other include file. */
#include <alloca.h>
#if ! HAVE_ALLOCA
# error "alloca not available on this machine"
#endif
/* Define AMPERSAND_FULL_NAME if you use the convention
that & in the full name stands for the login id. */
/* Turned on June 1996 supposing nobody will mind it. */
@ -1366,20 +1376,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include <string.h>
#include <stdlib.h>
#ifdef HAVE_ALLOCA_H
# include <alloca.h>
#elif defined __GNUC__
# define alloca __builtin_alloca
#elif defined _AIX
# define alloca __alloca
#else
# include <stddef.h>
# ifdef __cplusplus
extern "C"
# endif
void *alloca (size_t);
#endif
#ifndef HAVE_STRCHR
#define strchr(a, b) index (a, b)
#endif

1229
autogen/configure vendored

File diff suppressed because it is too large Load diff

View file

@ -172,6 +172,7 @@ 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])
OPTION_DEFAULT_ON([gconf],[don't compile with GConf support])
OPTION_DEFAULT_ON([gsettings],[don't compile with GSettings support])
OPTION_DEFAULT_ON([selinux],[don't compile with SELinux support])
OPTION_DEFAULT_ON([gnutls],[don't use -lgnutls for SSL/TLS support])
@ -988,54 +989,6 @@ dnl Do this early because it can frob feature test macros for Unix-98 &c.
AC_SYS_LARGEFILE
## If user specified a crt-dir, use that unconditionally.
if test "X$CRT_DIR" = "X"; then
case "$canonical" in
x86_64-*-linux-gnu* | s390x-*-linux-gnu*)
## On x86-64 and s390x GNU/Linux distributions, the standard library
## can be in a variety of places. We only try /usr/lib64 and /usr/lib.
## For anything else (eg /usr/lib32), it is up the user to specify
## the location (bug#5655).
## Test for crtn.o, not just the directory, because sometimes the
## directory exists but does not have the relevant files (bug#1287).
## FIXME better to test for binary compatibility somehow.
test -e /usr/lib64/crtn.o && CRT_DIR=/usr/lib64
;;
powerpc64-*-linux-gnu* | sparc64-*-linux-gnu*) CRT_DIR=/usr/lib64 ;;
esac
case "$opsys" in
hpux10-20) CRT_DIR=/lib ;;
esac
## Default is /usr/lib.
test "X$CRT_DIR" = "X" && CRT_DIR=/usr/lib
## If we're using gcc, try to determine it automatically by asking
## gcc. [If this doesn't work, CRT_DIR will remain at the
## system-dependent default from above.]
if test "x${GCC}" = xyes; then
crt_file=`$CC --print-file-name=crt1.o 2>/dev/null`
case "$crt_file" in
*/*)
CRT_DIR=`AS_DIRNAME(["$crt_file"])`
;;
esac
fi
else
## Some platforms don't use any of these files, so it is not
## appropriate to put this test outside the if block.
test -e $CRT_DIR/crtn.o || test -e $CRT_DIR/crt0.o || \
AC_MSG_ERROR([crt*.o not found in specified location.])
fi
AC_SUBST(CRT_DIR)
LIB_MATH=-lm
LIB_STANDARD=
START_FILES=
@ -1076,6 +1029,80 @@ esac
AC_SUBST(LIB_MATH)
AC_SUBST(START_FILES)
dnl Not all platforms use crtn.o files. Check if the current one does.
crt_files=
for file in x $LIB_STANDARD $START_FILES; do
case "$file" in
*CRT_DIR*) crt_files="$crt_files `echo $file | sed -e 's|.*/||'`" ;;
esac
done
if test "x$crt_files" != x; then
## If user specified a crt-dir, use that unconditionally.
crt_gcc=no
if test "X$CRT_DIR" = "X"; then
CRT_DIR=/usr/lib # default
case "$canonical" in
x86_64-*-linux-gnu* | s390x-*-linux-gnu*)
## On x86-64 and s390x GNU/Linux distributions, the standard library
## can be in a variety of places. We only try /usr/lib64 and /usr/lib.
## For anything else (eg /usr/lib32), it is up the user to specify
## the location (bug#5655).
## Test for crtn.o, not just the directory, because sometimes the
## directory exists but does not have the relevant files (bug#1287).
## FIXME better to test for binary compatibility somehow.
test -e /usr/lib64/crtn.o && CRT_DIR=/usr/lib64
;;
powerpc64-*-linux-gnu* | sparc64-*-linux-gnu*) CRT_DIR=/usr/lib64 ;;
esac
case "$opsys" in
hpux10-20) CRT_DIR=/lib ;;
esac
test "x${GCC}" = xyes && crt_gcc=yes
fi # CRT_DIR = ""
crt_missing=
for file in $crt_files; do
## If we're using gcc, try to determine it automatically by asking
## gcc. [If this doesn't work, CRT_DIR will remain at the
## system-dependent default from above.]
if test $crt_gcc = yes && test ! -e $CRT_DIR/$file; then
crt_file=`$CC --print-file-name=$file 2>/dev/null`
case "$crt_file" in
*/*)
CRT_DIR=`AS_DIRNAME(["$crt_file"])`
;;
esac
fi
dnl We expect all the files to be in a single directory, so after the
dnl first there is no point asking gcc.
crt_gcc=no
test -e $CRT_DIR/$file || crt_missing="$crt_missing $file"
done # $crt_files
test "x$crt_missing" = x || \
AC_MSG_ERROR([Required file(s) not found:$crt_missing
Try using the --with-crt-dir option.])
fi # crt_files != ""
AC_SUBST(CRT_DIR)
dnl This function definition taken from Gnome 2.0
dnl PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not)
dnl defines GSTUFF_LIBS, GSTUFF_CFLAGS, see pkg-config man page
@ -1955,6 +1982,17 @@ if test "${with_dbus}" = "yes"; then
fi
AC_SUBST(DBUS_OBJ)
dnl GSettings has been tested under GNU/Linux only.
HAVE_GSETTINGS=no
if test "${HAVE_X11}" = "yes" && test "${with_gsettings}" = "yes"; then
PKG_CHECK_MODULES(GSETTINGS, glib-2.0 >= 2.26, HAVE_GSETTINGS=yes, HAVE_GSETTINGS=no)
if test "$HAVE_GSETTINGS" = "yes"; then
AC_DEFINE(HAVE_GSETTINGS, 1, [Define to 1 if using GSettings.])
SETTINGS_CFLAGS="$GSETTINGS_CFLAGS"
SETTINGS_LIBS="$GSETTINGS_LIBS"
fi
fi
dnl GConf has been tested under GNU/Linux only.
dnl The version is really arbitrary, it is about the same age as Gtk+ 2.6.
HAVE_GCONF=no
@ -1963,10 +2001,24 @@ if test "${HAVE_X11}" = "yes" && test "${with_gconf}" = "yes"; then
if test "$HAVE_GCONF" = yes; then
AC_DEFINE(HAVE_GCONF, 1, [Define to 1 if using GConf.])
dnl Newer GConf doesn't link with g_objects, so this is not defined.
AC_CHECK_FUNCS([g_type_init])
SETTINGS_CFLAGS="$SETTINGS_CFLAGS $GCONF_CFLAGS"
SETTINGS_LIBS="$SETTINGS_LIBS $GCONF_LIBS"
fi
fi
if test "$HAVE_GSETTINGS" = "yes" || test "$HAVE_GCONF" = "yes"; then
SAVE_CFLAGS="$CFLAGS"
SAVE_LDFLAGS="$LDFLAGS"
CFLAGS="$SETTINGS_CFLAGS $CFLAGS"
LDFLAGS="$SETTINGS_LIBS $LDFLAGS"
AC_CHECK_FUNCS([g_type_init])
CFLAGS="$SAVE_CFLAGS"
LDFLAGS="$SAVE_LDFLAGS"
fi
AC_SUBST(SETTINGS_CFLAGS)
AC_SUBST(SETTINGS_LIBS)
dnl SELinux is available for GNU/Linux only.
HAVE_LIBSELINUX=no
LIBSELINUX_LIBS=
@ -2645,7 +2697,7 @@ esac
AC_SUBST(BLESSMAIL_TARGET)
AC_CHECK_FUNCS(gethostname getdomainname dup2 \
AC_CHECK_FUNCS(gethostname getdomainname \
rename closedir mkdir rmdir sysinfo getrusage get_current_dir_name \
random lrand48 logb frexp fmod rint cbrt ftime setsid \
strerror fpathconf select euidaccess getpagesize tzset setlocale \
@ -3648,6 +3700,7 @@ echo " Does Emacs use imagemagick? ${HAVE_IMAGEMAGI
echo " Does Emacs use -lgpm? ${HAVE_GPM}"
echo " Does Emacs use -ldbus? ${HAVE_DBUS}"
echo " Does Emacs use -lgconf? ${HAVE_GCONF}"
echo " Does Emacs use GSettings? ${HAVE_GSETTINGS}"
echo " Does Emacs use -lselinux? ${HAVE_LIBSELINUX}"
echo " Does Emacs use -lgnutls (2.6.x or higher)? ${HAVE_GNUTLS}"
echo " Does Emacs use -lxml2? ${HAVE_LIBXML2}"

View file

@ -1,3 +1,39 @@
2011-07-03 Lars Magne Ingebrigtsen <larsi@gnus.org>
* display.texi (Scrolling): `C-v' (etc) are now bound to
`scroll-*-command' (bug#8349).
2011-07-02 Lars Magne Ingebrigtsen <larsi@gnus.org>
* dired.texi (Subdirectories in Dired): Clarify that `C-u k'
doesn't actually delete any files (bug#7125).
* picture-xtra.texi (Rectangles in Picture): Clarify the prefix
argument for `C-c C-k' (bug#7391).
* frames.texi (Fonts): Mention "C-u C-x =" to find out what font
you're currently using (bug#8489).
2011-07-01 Eli Zaretskii <eliz@gnu.org>
* mule.texi (Coding Systems): Move index entries from the previous
change into their proper places.
2011-07-01 Lars Magne Ingebrigtsen <larsi@gnus.org>
* help.texi (Help Files): Document view-external-packages (bug#8902).
* mule.texi (Coding Systems): Put a few more of the coding systems
into the index (bug#8900).
2011-06-26 Glenn Morris <rgm@gnu.org>
* fortran-xtra.texi (Fortran): F90 mode is also for F2008.
2011-06-25 Andreas Rottmann <a.rottmann@gmx.at>
* misc.texi (emacsclient Options): Mention --frame-parameters.
2011-06-09 Glenn Morris <rgm@gnu.org>
* custom.texi (Specifying File Variables):

View file

@ -984,8 +984,9 @@ to the parent directory in the same Dired buffer.
Use the @kbd{l} command (@code{dired-do-redisplay}) to update the
subdirectory's contents. Use @kbd{C-u k} on the subdirectory header
line to delete the subdirectory (@pxref{Dired Updating}). You can also
hide and show inserted subdirectories (@pxref{Hiding Subdirectories}).
line to remove the subdirectory listing (@pxref{Dired Updating}). You
can also hide and show inserted subdirectories (@pxref{Hiding
Subdirectories}).
@ifnottex
@include dired-xtra.texi
@ -1145,9 +1146,9 @@ current file as a last resort.
If you use @kbd{k} with a numeric prefix argument to kill the line
for a file that is a directory, which you have inserted in the Dired
buffer as a subdirectory, it deletes that subdirectory from the buffer
as well. Typing @kbd{C-u k} on the header line for a subdirectory
also deletes the subdirectory from the Dired buffer.
buffer as a subdirectory, it removed that subdirectory line from the
buffer as well. Typing @kbd{C-u k} on the header line for a
subdirectory also removes the subdirectory line from the Dired buffer.
The @kbd{g} command brings back any individual lines that you have
killed in this way, but not subdirectories---you must use @kbd{i} to

View file

@ -61,11 +61,11 @@ order; also, maybe redisplay the screen (@code{recenter-top-bottom}).
@item C-v
@itemx @key{next}
@itemx @key{PageDown}
Scroll forward by nearly a full window (@code{scroll-up}).
Scroll forward by nearly a full window (@code{scroll-up-command}).
@item M-v
@itemx @key{prior}
@itemx @key{PageUp}
Scroll backward (@code{scroll-down}).
Scroll backward (@code{scroll-down-command}).
@item C-M-l
Scroll heuristically to bring useful information onto the screen
(@code{reposition-window}).

View file

@ -10,12 +10,12 @@
@cindex mode, Fortran
@cindex Fortran fixed form and free form
@cindex Fortran 77 and Fortran 90, 95, 2003
@cindex Fortran 77 and Fortran 90, 95, 2003, 2008
@findex f90-mode
@findex fortran-mode
Fortran mode is meant for editing ``fixed form'' (and also ``tab
format'') source code (normally Fortran 77). For editing more modern
``free form'' source code (Fortran 90, 95, 2003), use F90 mode
``free form'' source code (Fortran 90, 95, 2003, 2008), use F90 mode
(@code{f90-mode}). Emacs normally uses Fortran mode for files with
extension @samp{.f}, @samp{.F} or @samp{.for}, and F90 mode for the
extensions @samp{.f90} and @samp{.f95}. Customize

View file

@ -689,6 +689,11 @@ Use the command line option @samp{-fn} (or @samp{--font}). @xref{Font
X}.
@end itemize
To check what font you're currently using, the @kbd{C-u C-x =}
command can be helpful. It'll describe the character under point, and
also say what font it's rendered in, if the window system you're
running under supports that.
@cindex fontconfig
On X, there are four different ways to express a ``font name''. The
first is to use a @dfn{Fontconfig pattern}. Fontconfig patterns have

View file

@ -630,6 +630,9 @@ Display the Emacs copying conditions (@code{describe-copying}).
These are the rules under which you can copy and redistribute Emacs.
@item C-h C-d
Display help for debugging Emacs (@code{view-emacs-debugging}).
@item C-h C-e
Display external packages and information about Emacs
(@code{view-external-packages}).
@item C-h C-f
Display the Emacs frequently-answered-questions list (@code{view-emacs-FAQ}).
@item C-h g

View file

@ -1623,6 +1623,11 @@ text-only terminal frame (@pxref{Frames}). If you omit a filename
argument while supplying the @samp{-c} option, the new frame displays
the @samp{*scratch*} buffer (@pxref{Buffers}).
@item -F
@itemx --frame-parameters=@var{alist}
Set the parameters for a newly-created graphical frame
(@pxref{Frame Parameters}).
@item -d @var{display}
@itemx --display=@var{display}
Tell Emacs to open the given files on the X display @var{display}

View file

@ -761,6 +761,7 @@ aliases for @code{undecided-unix}, @code{undecided-dos}, and
the end-of-line conversion, and leave the character code conversion to
be deduced from the text itself.
@cindex @code{raw-text}, coding system
The coding system @code{raw-text} is good for a file which is mainly
@acronym{ASCII} text, but may contain byte values above 127 which are
not meant to encode non-@acronym{ASCII} characters. With
@ -771,6 +772,7 @@ end-of-line conversion in the usual way, based on the data
encountered, and has the usual three variants to specify the kind of
end-of-line conversion to use.
@cindex @code{no-conversion}, coding system
In contrast, the coding system @code{no-conversion} specifies no
character code conversion at all---none for non-@acronym{ASCII} byte values and
none for end of line. This is useful for reading or writing binary
@ -782,6 +784,7 @@ the @kbd{M-x find-file-literally} command. This uses
@code{no-conversion}, and also suppresses other Emacs features that
might convert the file contents before you see them. @xref{Visiting}.
@cindex @code{emacs-internal}, coding system
The coding system @code{emacs-internal} (or @code{utf-8-emacs},
which is equivalent) means that the file contains non-@acronym{ASCII}
characters stored with the internal Emacs encoding. This coding

View file

@ -245,7 +245,8 @@ rectangle commands may also be useful.
@table @kbd
@item C-c C-k
Clear out the region-rectangle with spaces
(@code{picture-clear-rectangle}). With argument, delete the text.
(@code{picture-clear-rectangle}). With a prefix argument, delete the
text.
@item C-c C-w @var{r}
Similar, but save rectangle contents in register @var{r} first
(@code{picture-clear-rectangle-to-register}).

View file

@ -1,3 +1,64 @@
2011-07-06 Lars Magne Ingebrigtsen <larsi@gnus.org>
* functions.texi (Calling Functions): Link to the "Interactive
Call" node (bug#1001).
2011-07-06 Chong Yidong <cyd@stupidchicken.com>
* customize.texi (Composite Types): Move alist and plist to here
from Simple Types (Bug#7545).
* elisp.texi (Top): Update menu description.
* display.texi (Face Attributes): Document negative line widths
(Bug#6113).
2011-07-03 Tobias C. Rittweiler <tcr@freebits.de> (tiny change)
* searching.texi (Match Data): Note that match data can be
overwritten by most functions (bug#2499).
2011-07-03 Lars Magne Ingebrigtsen <larsi@gnus.org>
* strings.texi (Formatting Strings): Clarify what the "-" and "0"
flags mean (bug#6659).
* functions.texi (What Is a Function): Document the autoload
object (bug#6496).
2011-07-02 Lars Magne Ingebrigtsen <larsi@gnus.org>
* customize.texi (Variable Definitions): Clarify that SETFUNCTION
is only used in the Customize user interface (bug#6089).
* display.texi (Showing Images): Mention the point of sliced
images (bug#7836).
2011-07-02 Eli Zaretskii <eliz@gnu.org>
* variables.texi (Defining Variables, Void Variables)
(Constant Variables): Fix incorrect usage of @kindex.
2011-07-02 Lars Magne Ingebrigtsen <larsi@gnus.org>
* variables.texi (Defining Variables): Add an index entry for
`set-variable' (bug#7262).
(Defining Variables): Use @findex for functions.
* frames.texi (Basic Parameters): Document the `explicit-name'
parameter (bug#6951).
* customize.texi (Type Keywords): Clarify that :value provides a
default value for all types (bug#7386).
* streams.texi (Output Functions): Document `pp'.
2011-06-25 Chong Yidong <cyd@stupidchicken.com>
* keymaps.texi (Searching Keymaps):
* display.texi (Overlay Properties): Fix errors in 2011-05-29
change. Suggested by Johan Bockgård.
2011-06-15 Chong Yidong <cyd@stupidchicken.com>
* text.texi (Special Properties): Clarify role of font-lock-face.

View file

@ -326,11 +326,12 @@ individual types for a description of how to use @code{:options}.
@item :set @var{setfunction}
@kindex set@r{, @code{defcustom} keyword}
Specify @var{setfunction} as the way to change the value of this
option. The function @var{setfunction} should take two arguments, a
symbol (the option name) and the new value, and should do whatever is
necessary to update the value properly for this option (which may not
mean simply setting the option as a Lisp variable). The default for
@var{setfunction} is @code{set-default}.
option when using the Customize user interface. The function
@var{setfunction} should take two arguments, a symbol (the option
name) and the new value, and should do whatever is necessary to update
the value properly for this option (which may not mean simply setting
the option as a Lisp variable). The default for @var{setfunction} is
@code{set-default}.
@item :get @var{getfunction}
@kindex get@r{, @code{defcustom} keyword}
@ -512,8 +513,7 @@ equivalent to @code{(string)}.
Introduction, widget, The Emacs Widget Library}, for details.
@menu
* Simple Types:: Simple customization types: sexp, integer, number,
string, file, directory, alist.
* Simple Types:: Simple customization types: sexp, integer, etc.
* Composite Types:: Build new types from other types or data.
* Splicing into Lists:: Splice elements into list with @code{:inline}.
* Type Keywords:: Keyword-argument pairs in a customization type.
@ -576,22 +576,103 @@ You can use the @code{:options} keyword in a hook variable's
@code{defcustom} to specify a list of functions recommended for use in
the hook; see @ref{Variable Definitions}.
@item alist
The value must be a list of cons-cells, the @sc{car} of each cell
representing a key, and the @sc{cdr} of the same cell representing an
associated value. The user can add and delete key/value pairs, and
edit both the key and the value of each pair.
@item symbol
The value must be a symbol. It appears in the customization buffer as
the name of the symbol.
You can specify the key and value types like this:
@item function
The value must be either a lambda expression or a function name. When
it is a function name, you can do completion with @kbd{M-@key{TAB}}.
@smallexample
(alist :key-type @var{key-type} :value-type @var{value-type})
@end smallexample
@item variable
The value must be a variable name, and you can do completion with
@kbd{M-@key{TAB}}.
@item face
The value must be a symbol which is a face name, and you can do
completion with @kbd{M-@key{TAB}}.
@item boolean
The value is boolean---either @code{nil} or @code{t}. Note that by
using @code{choice} and @code{const} together (see the next section),
you can specify that the value must be @code{nil} or @code{t}, but also
specify the text to describe each value in a way that fits the specific
meaning of the alternative.
@item coding-system
The value must be a coding-system name, and you can do completion with
@kbd{M-@key{TAB}}.
@item color
The value must be a valid color name, and you can do completion with
@kbd{M-@key{TAB}}. A sample is provided.
@end table
@node Composite Types
@subsection Composite Types
@cindex composite types (customization)
When none of the simple types is appropriate, you can use composite
types, which build new types from other types or from specified data.
The specified types or data are called the @dfn{arguments} of the
composite type. The composite type normally looks like this:
@example
(@var{constructor} @var{arguments}@dots{})
@end example
@noindent
where @var{key-type} and @var{value-type} are customization type
specifications. The default key type is @code{sexp}, and the default
value type is @code{sexp}.
but you can also add keyword-value pairs before the arguments, like
this:
@example
(@var{constructor} @r{@{}@var{keyword} @var{value}@r{@}}@dots{} @var{arguments}@dots{})
@end example
Here is a table of constructors and how to use them to write
composite types:
@table @code
@item (cons @var{car-type} @var{cdr-type})
The value must be a cons cell, its @sc{car} must fit @var{car-type}, and
its @sc{cdr} must fit @var{cdr-type}. For example, @code{(cons string
symbol)} is a customization type which matches values such as
@code{("foo" . foo)}.
In the customization buffer, the @sc{car} and the @sc{cdr} are
displayed and edited separately, each according to the type
that you specify for it.
@item (list @var{element-types}@dots{})
The value must be a list with exactly as many elements as the
@var{element-types} given; and each element must fit the
corresponding @var{element-type}.
For example, @code{(list integer string function)} describes a list of
three elements; the first element must be an integer, the second a
string, and the third a function.
In the customization buffer, each element is displayed and edited
separately, according to the type specified for it.
@item (group @var{element-types}@dots{})
This works like @code{list} except for the formatting
of text in the Custom buffer. @code{list} labels each
element value with its tag; @code{group} does not.
@item (vector @var{element-types}@dots{})
Like @code{list} except that the value must be a vector instead of a
list. The elements work the same as in @code{list}.
@item (alist :key-type @var{key-type} :value-type @var{value-type})
The value must be a list of cons-cells, the @sc{car} of each cell
representing a key of customization type @var{key-type}, and the
@sc{cdr} of the same cell representing a value of customization type
@var{value-type}. The user can add and delete key/value pairs, and
edit both the key and the value of each pair.
If omitted, @var{key-type} and @var{value-type} default to
@code{sexp}.
The user can add any key matching the specified key type, but you can
give some keys a preferential treatment by specifying them with the
@ -686,105 +767,11 @@ and the VALUE is a list of that person's pets."
:type '(alist :value-type (repeat string)))
@end smallexample
@item plist
The @code{plist} custom type is similar to the @code{alist} (see above),
except that the information is stored as a property list, i.e. a list of
this form:
@smallexample
(@var{key} @var{value} @var{key} @var{value} @var{key} @var{value} @dots{})
@end smallexample
The default @code{:key-type} for @code{plist} is @code{symbol},
rather than @code{sexp}.
@item symbol
The value must be a symbol. It appears in the customization buffer as
the name of the symbol.
@item function
The value must be either a lambda expression or a function name. When
it is a function name, you can do completion with @kbd{M-@key{TAB}}.
@item variable
The value must be a variable name, and you can do completion with
@kbd{M-@key{TAB}}.
@item face
The value must be a symbol which is a face name, and you can do
completion with @kbd{M-@key{TAB}}.
@item boolean
The value is boolean---either @code{nil} or @code{t}. Note that by
using @code{choice} and @code{const} together (see the next section),
you can specify that the value must be @code{nil} or @code{t}, but also
specify the text to describe each value in a way that fits the specific
meaning of the alternative.
@item coding-system
The value must be a coding-system name, and you can do completion with
@kbd{M-@key{TAB}}.
@item color
The value must be a valid color name, and you can do completion with
@kbd{M-@key{TAB}}. A sample is provided.
@end table
@node Composite Types
@subsection Composite Types
@cindex composite types (customization)
When none of the simple types is appropriate, you can use composite
types, which build new types from other types or from specified data.
The specified types or data are called the @dfn{arguments} of the
composite type. The composite type normally looks like this:
@example
(@var{constructor} @var{arguments}@dots{})
@end example
@noindent
but you can also add keyword-value pairs before the arguments, like
this:
@example
(@var{constructor} @r{@{}@var{keyword} @var{value}@r{@}}@dots{} @var{arguments}@dots{})
@end example
Here is a table of constructors and how to use them to write
composite types:
@table @code
@item (cons @var{car-type} @var{cdr-type})
The value must be a cons cell, its @sc{car} must fit @var{car-type}, and
its @sc{cdr} must fit @var{cdr-type}. For example, @code{(cons string
symbol)} is a customization type which matches values such as
@code{("foo" . foo)}.
In the customization buffer, the @sc{car} and the @sc{cdr} are
displayed and edited separately, each according to the type
that you specify for it.
@item (list @var{element-types}@dots{})
The value must be a list with exactly as many elements as the
@var{element-types} given; and each element must fit the
corresponding @var{element-type}.
For example, @code{(list integer string function)} describes a list of
three elements; the first element must be an integer, the second a
string, and the third a function.
In the customization buffer, each element is displayed and edited
separately, according to the type specified for it.
@item (group @var{element-types}@dots{})
This works like @code{list} except for the formatting
of text in the Custom buffer. @code{list} labels each
element value with its tag; @code{group} does not.
@item (vector @var{element-types}@dots{})
Like @code{list} except that the value must be a vector instead of a
list. The elements work the same as in @code{list}.
@item (plist :key-type @var{key-type} :value-type @var{value-type})
This customization type is similar to @code{alist} (see above), except
that (i) the information is stored as a property list,
(@pxref{Property Lists}), and (ii) @var{key-type}, if omitted,
defaults to @code{symbol} rather than @code{sexp}.
@item (choice @var{alternative-types}@dots{})
The value must fit at least one of @var{alternative-types}.
@ -1035,7 +1022,12 @@ meanings:
@table @code
@item :value @var{default}
This is used for a type that appears as an alternative inside of
Provide a default value.
If @code{nil} is not a valid value for the alternative, then it is
essential to specify a valid default with @code{:value}.
If you use this for a type that appears as an alternative inside of
@code{choice}; it specifies the default value to use, at first, if and
when the user selects this alternative with the menu in the
customization buffer.
@ -1043,9 +1035,6 @@ customization buffer.
Of course, if the actual value of the option fits this alternative, it
will appear showing the actual value, not @var{default}.
If @code{nil} is not a valid value for the alternative, then it is
essential to specify a valid default with @code{:value}.
@item :format @var{format-string}
@kindex format@r{, customization keyword}
This string will be inserted in the buffer to represent the value

View file

@ -1441,9 +1441,9 @@ specify a particular attribute for certain text. @xref{Face
Attributes}.
@item
A cons cell, either of the form @code{(fg-color . @var{color-name})}
or @code{(bg-color . @var{color-name})}. These elements specify just
the foreground color or just the background color.
A cons cell, of the form @code{(foreground-color . @var{color-name})}
or @code{(background-color . @var{color-name})}. These elements
specify just the foreground color or just the background color.
@code{(foreground-color . @var{color-name})} has the same effect as
@code{(:foreground @var{color-name})}; likewise for the background.
@ -2092,7 +2092,10 @@ Draw a box with lines of width 1, in color @var{color}.
@item @code{(:line-width @var{width} :color @var{color} :style @var{style})}
This way you can explicitly specify all aspects of the box. The value
@var{width} specifies the width of the lines to draw; it defaults to 1.
@var{width} specifies the width of the lines to draw; it defaults to
1. A negative width @var{-n} means to draw a line of width @var{n}
that occupies the space of the underlying text, thus avoiding any
increase in the character height or width.
The value @var{color} specifies the color to draw with. The default is
the foreground color of the face for simple boxes, and the background
@ -4700,10 +4703,17 @@ it a @code{display} property which specifies @var{image}. @xref{Display
Property}.
@end defun
@cindex slice, image
@cindex image slice
@defun insert-sliced-image image &optional string area rows cols
This function inserts @var{image} in the current buffer at point, like
@code{insert-image}, but splits the image into @var{rows}x@var{cols}
equally sized slices.
If an image is inserted ``sliced'', then the Emacs display engine will
treat each slice as a separate image, and allow more intuitive
scrolling up/down, instead of jumping up/down the entire image when
paging through a buffer that displays (large) images.
@end defun
@defun put-image image pos &optional string area

View file

@ -508,8 +508,7 @@ Writing Customization Definitions
Customization Types
* Simple Types:: Simple customization types: sexp, integer, number,
string, file, directory, alist.
* Simple Types:: Simple customization types: sexp, integer, etc.
* Composite Types:: Build new types from other types or data.
* Splicing into Lists:: Splice elements into list with @code{:inline}.
* Type Keywords:: Keyword-argument pairs in a customization type.

View file

@ -520,6 +520,11 @@ you don't specify a name, Emacs sets the frame name automatically
If you specify the frame name explicitly when you create the frame, the
name is also used (instead of the name of the Emacs executable) when
looking up X resources for the frame.
@item explicit-name
If the frame name was specified explicitly when the frame was created,
this parameter will be that name. If the frame wasn't explicitly
named, this parameter will be @code{nil}.
@end table
@node Position Parameters

View file

@ -112,6 +112,13 @@ editors; for Lisp programs, the distinction is normally unimportant.
@item byte-code function
A @dfn{byte-code function} is a function that has been compiled by the
byte compiler. @xref{Byte-Code Type}.
@item autoload object
@cindex autoload object
An @dfn{autoload object} is a place-holder for a real function. If
the autoload object is called, it will make Emacs load the file
containing the definition of the real function, and then call the real
function instead.
@end table
@defun functionp object
@ -783,6 +790,12 @@ This function returns @var{arg} and has no side effects.
This function ignores any arguments and returns @code{nil}.
@end defun
Emacs Lisp functions can also be user-visible @dfn{commands}. A
command is a function that has an @dfn{interactive} specification.
You may want to call these functions as if they were called
interactively. See @ref{Interactive Call} for details on how to do
that.
@node Mapping Functions
@section Mapping Functions
@cindex mapping functions

View file

@ -723,13 +723,13 @@ them:
(@var{find-in} overriding-terminal-local-map))
(overriding-local-map
(@var{find-in} overriding-local-map))
(or (@var{find-in} (get-char-property (point) 'keymap))
(@var{find-in-any} emulation-mode-map-alists)
(@var{find-in-any} minor-mode-overriding-map-alist)
(@var{find-in-any} minor-mode-map-alist)
(if (get-text-property (point) 'local-map)
(@var{find-in} (get-char-property (point) 'local-map))
(@var{find-in} (current-local-map)))))
((or (@var{find-in} (get-char-property (point) 'keymap))
(@var{find-in-any} emulation-mode-map-alists)
(@var{find-in-any} minor-mode-overriding-map-alist)
(@var{find-in-any} minor-mode-map-alist)
(if (get-text-property (point) 'local-map)
(@var{find-in} (get-char-property (point) 'local-map))
(@var{find-in} (current-local-map))))))
(@var{find-in} (current-global-map)))
@end lisp

View file

@ -1207,6 +1207,12 @@ search you wish to refer back to and the use of the match data. If you
can't avoid another intervening search, you must save and restore the
match data around it, to prevent it from being overwritten.
Notice that all functions are allowed to overwrite the match data
unless they're explicitly documented not to do so. A consequence is
that functions that are run implictly in the background
(@pxref{Timers}, and @ref{Idle Timers}) should likely save and restore
the match data explicitly.
@menu
* Replacing Match:: Replacing a substring that was matched.
* Simple Match Data:: Accessing single items of match data,

View file

@ -684,6 +684,12 @@ For example, if the current buffer name is @samp{foo},
returns @code{"The buffer is foo"}.
@end defmac
@defun pp object &optional stream
This function outputs @var{object} to @var{stream}, just like
@code{prin1}, but does it in a more ``pretty'' way. That is, it'll
indent and fill the object to make it more readable for humans.
@end defun
@node Output Variables
@section Variables Affecting Output
@cindex output-controlling variables

View file

@ -856,14 +856,16 @@ with @samp{0x} or @samp{0X}. For @samp{%e}, @samp{%f}, and @samp{%g},
the @samp{#} flag means include a decimal point even if the precision
is zero.
The flag @samp{0} ensures that the padding consists of @samp{0}
characters instead of spaces. This flag is ignored for non-numerical
specification characters like @samp{%s}, @samp{%S} and @samp{%c}.
These specification characters accept the @samp{0} flag, but still pad
with @emph{spaces}.
The flag @samp{-} causes the padding inserted by the width
specifier, if any, to be inserted on the right rather than the left.
The flag @samp{0} ensures that the padding consists of @samp{0}
characters instead of spaces, inserted on the left. These flags are
ignored for specification characters for which they do not make sense:
@samp{%s}, @samp{%S} and @samp{%c} accept the @samp{0} flag, but still
pad with @emph{spaces} on the left. If both @samp{-} and @samp{0} are
present and valid, @samp{-} takes precedence.
If both @samp{-} and @samp{0} are present, the @samp{0} flag is
ignored.
@example
@group

View file

@ -99,7 +99,7 @@ x
@node Constant Variables
@section Variables that Never Change
@kindex setting-constant
@cindex @code{setting-constant} error
@cindex keyword symbol
@cindex variable with constant value
@cindex constant variables
@ -288,7 +288,7 @@ has room to execute.
@node Void Variables
@section When a Variable is ``Void''
@kindex void-variable
@cindex @code{void-variable} error
@cindex void variable
If you have never given a symbol any value as a global variable, we
@ -583,7 +583,8 @@ and is a string, and its first character is @samp{*}, then the variable
is a user option. Aliases of user options are also user options.
@end defun
@kindex variable-interactive
@cindex @code{variable-interactive} property
@findex set-variable
If a user option variable has a @code{variable-interactive} property,
the @code{set-variable} command uses that value to control reading the
new value for the variable. The property's value is used as if it were

View file

@ -1,3 +1,7 @@
2011-06-25 Andreas Rottmann <a.rottmann@gmx.at>
* emacsclient.1: Mention --frame-parameters.
2011-03-07 Chong Yidong <cyd@stupidchicken.com>
* Version 23.3 released.

View file

@ -58,6 +58,9 @@ daemon mode and emacsclient will try to connect to it.
.B -c, \-\-create-frame
create a new frame instead of trying to use the current Emacs frame
.TP
.B \-F, \-\-frame-parameters=ALIST
set the parameters of a newly-created frame.
.TP
.B \-d, \-\-display=DISPLAY
tell the server to display the files on the given display.
.TP

View file

@ -1,3 +1,50 @@
2011-07-05 Lars Magne Ingebrigtsen <larsi@gnus.org>
* gnus.texi (Expiring Mail): Document gnus-auto-expirable-marks.
(Filtering New Groups): Clarify how simple the "options -n" format is.
(Agent Expiry): Remove mention of `gnus-request-expire-articles', which
is internal.
2011-07-04 Michael Albinus <michael.albinus@gmx.de>
* tramp.texi (Cleanup remote connections): Add
`tramp-cleanup-this-connection'.
2011-07-03 Lars Magne Ingebrigtsen <larsi@gnus.org>
* gnus.texi (Subscription Methods): Link to "Group Levels" to explain
zombies.
(Checking New Groups): Ditto (bug#8974).
(Checking New Groups): Moved the reference to the right place.
2011-07-03 Dave Abrahams <dave@boostpro.com> (tiny change)
* gnus.texi (Startup Files): Clarify that we're talking about numbered
backups, and not actual vc (bug#8975).
2011-07-03 Kevin Ryde <user42@zip.com.au>
* cl.texi (For Clauses): @items for hash-values and key-bindings
to make them more visible when skimming. Add examples of `using'
clause to them, examples being clearer than a description in
words (bug#6599).
2011-07-01 Alan Mackenzie <acm@muc.de>
* cc-mode.texi (Guessing the Style): New page.
(Styles): Add a short introduction to above.
2011-06-28 Deniz Dogan <deniz@dogan.se>
* rcirc.texi (Configuration): Bug-fix:
`rcirc-default-user-full-name' is now `rcirc-default-full-name'.
Reported by Elias Pipping <pipping@exherbo.org>.
2011-06-26 Lars Magne Ingebrigtsen <larsi@gnus.org>
* gnus.texi (Summary Mail Commands): Document
`gnus-summary-reply-to-list-with-original'.
2011-06-20 Stefan Monnier <monnier@iro.umontreal.ca>
* eshell.texi (Known problems): Fix typo.

View file

@ -287,10 +287,11 @@ Configuration Basics
Styles
* Built-in Styles::
* Choosing a Style::
* Adding Styles::
* File Styles::
* Built-in Styles::
* Choosing a Style::
* Adding Styles::
* Guessing the Style::
* File Styles::
Customizing Auto-newlines
@ -2511,13 +2512,17 @@ groupings of customizations called @dfn{styles}, associate a single name
for any particular style, and pretty easily start editing new or
existing code using these styles.
@menu
* Built-in Styles::
* Choosing a Style::
* Adding Styles::
* File Styles::
@end menu
As an alternative to writing a style definition yourself, you can have
@ccmode{} @dfn{guess} (at least part of) your style by looking at an
already formatted piece of your code, @ref{Guessing the Style}.
@menu
* Built-in Styles::
* Choosing a Style::
* Adding Styles::
* Guessing the Style::
* File Styles::
@end menu
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@node Built-in Styles, Choosing a Style, Styles, Styles
@ -2653,9 +2658,8 @@ This variable always contains the buffer's current style name, as a
string.
@end defvar
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@node Adding Styles, File Styles, Choosing a Style, Styles
@node Adding Styles, Guessing the Style, Choosing a Style, Styles
@comment node-name, next, previous, up
@subsection Adding and Amending Styles
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@ -2742,9 +2746,131 @@ This is the variable that holds the definitions for the styles. It
should not be changed directly; use @code{c-add-style} instead.
@end defvar
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@node Guessing the Style, File Styles, Adding Styles, Styles
@comment node-name, next, previous, up
@subsection Guessing the Style
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Instead of specifying a style, you can get @ccmode{} to @dfn{guess}
your style by examining an already formatted code buffer. @ccmode{}
then determines the ''most frequent'' offset (@pxref{c-offsets-alist})
for each of the syntactic symbols (@pxref{Indentation Engine Basics})
encountered in the buffer, and the ''most frequent'' value of
c-basic-offset (@pxref{Customizing Indentation}), then merges the
current style with these ''guesses'' to form a new style. This
combined style is known as the @dfn{guessed style}.
To do this, call @code{c-guess} (or one of the other 5 guessing
commands) on your sample buffer. The analysis of your code may take
some time.
You can then set the guessed style in any @ccmode{} buffer with
@code{c-guess-install}. You can display the style with
@code{c-guess-view}, and preserve it by copying it into your
@file{.emacs} for future use, preferably after editing it.
@table @asis
@item @kbd{M-x c-guess-no-install}
@itemx @kbd{M-x c-guess-buffer-no-install}
@itemx @kbd{M-x c-guess-region-no-install}
@findex c-guess-no-install
@findex c-guess-buffer-no-install
@findex c-guess-region-no-install
@findex guess-no-install (c-)
@findex guess-buffer-no-install (c-)
@findex guess-region-no-install (c-)
These commands analyze a part of the current buffer and guess the
style from it.
The part of the buffer examined is either the region
(@code{c-guess-region-no-install}), the entire buffer
(@code{c-guess-buffer-no-install}), or the first
@code{c-guess-region-max} bytes (@code{c-guess-no-install}).
Each of these commands can be given an optional prefix argument. This
instructs @ccmode{} to combine the new guesses with the current
guesses before forming the guessed style.
@end table
@table @asis
@item @kbd{M-x c-guess}
@itemx @kbd{M-x c-guess-buffer}
@itemx @kbd{M-x c-guess-region}
@findex c-guess
@findex c-guess-buffer
@findex c-guess-region
@findex guess (c-)
@findex guess-buffer (c-)
@findex guess-region (c-)
These commands analyze a part of the current buffer, guess the style
from it, then install the guessed style on the buffer. The guessed
style is given a name based on the buffer's absolute file name, and
you can then set this style on any @ccmode{} buffer with @kbd{C-c .}.
The part of the buffer examined is either the region
(@code{c-guess-region}), the entire buffer (@code{c-guess-buffer}), or
the first @code{c-guess-region-max} bytes (@code{c-guess}).
Each of these commands can be given an optional prefix argument. This
instructs @ccmode{} to combine the new guesses with the current
guesses before forming the guessed style.
@end table
@defopt c-guess-region-max
@vindex guess-region-max (c-)
This variable, default 50000, is the size in bytes of the buffer
portion examined by c-guess and c-guess-no-install. If set to
@code{nil}, the entire buffer is examined.
@end defopt
@defopt c-guess-offset-threshold
@vindex guess-offset-threshold (c-)
This variable, default 10, is the maximum offset, either outwards or
inwards, which will be taken into account by the analysis process.
Any offset bigger than this will be ignored. For no limit, set this
variable to a large number.
@end defopt
@table @asis
@item @kbd{M-x c-guess-install}
@findex c-guess-install
@findex guess-install (c-)
Set the current buffer's style to the guessed style. This prompts you
to enter an optional new style name to give to the guessed style. By
default, this name is based on the buffer's absolute file name. You
can then use this style like any other.
@item @kbd{M-x c-guess-view}
@findex c-guess-view
@findex guess-view (c-)
Display the most recently guessed style in a temporary buffer. This
display is in the form of a @code{c-add-style} form (@pxref{Adding
Styles}) which can be easily copied to your @file{.emacs}. You will
probably want to edit it first.
The display of the guessed style contains these elements:
@table @asis
@item Placeholder Name
You should replace this with a style name of your own.
@item Parent Style
The style current when the guessing began, from which the guessed
style inherits (@pxref{Config Basics}) the settings which weren't
guessed.
@item Guessed Offsets
These are the core result of the guessing process. Each of them is
marked by a comment.
@item Inherited Offsets
These are syntactic offsets which have been taken over from the parent
style. To avoid possible future conflicts, you should remove either
these offsets or the parent style name.
@end table
@end table
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@node File Styles, , Adding Styles, Styles
@node File Styles, , Guessing the Style, Styles
@comment node-name, next, previous, up
@subsection File Styles
@cindex styles, file local

View file

@ -2449,22 +2449,33 @@ one of these types of clauses with other clauses like @code{for ... to}
or @code{while}.
@item for @var{var} being the hash-keys of @var{hash-table}
This clause iterates over the entries in @var{hash-table}. For each
hash table entry, @var{var} is bound to the entry's key. If you write
@samp{the hash-values} instead, @var{var} is bound to the values
of the entries. The clause may be followed by the additional
term @samp{using (hash-values @var{var2})} (where @code{hash-values}
is the opposite word of the word following @code{the}) to cause
@var{var} and @var{var2} to be bound to the two parts of each
hash table entry.
@itemx for @var{var} being the hash-values of @var{hash-table}
This clause iterates over the entries in @var{hash-table} with
@var{var} bound to each key, or value. A @samp{using} clause can bind
a second variable to the opposite part.
@example
(loop for k being the hash-keys of h
using (hash-values v)
do
(message "key %S -> value %S" k v))
@end example
@item for @var{var} being the key-codes of @var{keymap}
@itemx for @var{var} being the key-bindings of @var{keymap}
This clause iterates over the entries in @var{keymap}.
The iteration does not enter nested keymaps but does enter inherited
(parent) keymaps.
You can use @samp{the key-bindings} to access the commands bound to
the keys rather than the key codes, and you can add a @code{using}
clause to access both the codes and the bindings together.
A @code{using} clause can access both the codes and the bindings
together.
@example
(loop for c being the key-codes of (current-local-map)
using (key-bindings b)
do
(message "key %S -> binding %S" c b))
@end example
@item for @var{var} being the key-seqs of @var{keymap}
This clause iterates over all key sequences defined by @var{keymap}

View file

@ -1167,16 +1167,17 @@ when you do the @kbd{g} command (@pxref{Scanning New Messages}).
@node Checking New Groups
@subsection Checking New Groups
Gnus normally determines whether a group is new or not by comparing the
list of groups from the active file(s) with the lists of subscribed and
dead groups. This isn't a particularly fast method. If
@code{gnus-check-new-newsgroups} is @code{ask-server}, Gnus will ask the
server for new groups since the last time. This is both faster and
cheaper. This also means that you can get rid of the list of killed
groups altogether, so you may set @code{gnus-save-killed-list} to
@code{nil}, which will save time both at startup, at exit, and all over.
Saves disk space, too. Why isn't this the default, then?
Unfortunately, not all servers support this command.
Gnus normally determines whether a group is new or not by comparing
the list of groups from the active file(s) with the lists of
subscribed and dead groups. This isn't a particularly fast method.
If @code{gnus-check-new-newsgroups} is @code{ask-server}, Gnus will
ask the server for new groups since the last time. This is both
faster and cheaper. This also means that you can get rid of the list
of killed groups (@pxref{Group Levels}) altogether, so you may set
@code{gnus-save-killed-list} to @code{nil}, which will save time both
at startup, at exit, and all over. Saves disk space, too. Why isn't
this the default, then? Unfortunately, not all servers support this
command.
I bet I know what you're thinking now: How do I find out whether my
server supports @code{ask-server}? No? Good, because I don't have a
@ -1214,9 +1215,10 @@ Some handy pre-fab functions are:
@item gnus-subscribe-zombies
@vindex gnus-subscribe-zombies
Make all new groups zombies. This is the default. You can browse the
zombies later (with @kbd{A z}) and either kill them all off properly
(with @kbd{S z}), or subscribe to them (with @kbd{u}).
Make all new groups zombies (@pxref{Group Levels}). This is the
default. You can browse the zombies later (with @kbd{A z}) and either
kill them all off properly (with @kbd{S z}), or subscribe to them
(with @kbd{u}).
@item gnus-subscribe-randomly
@vindex gnus-subscribe-randomly
@ -1300,6 +1302,10 @@ subscribing these groups.
@code{gnus-subscribe-options-newsgroup-method} is used instead. This
variable defaults to @code{gnus-subscribe-alphabetically}.
The ``options -n'' format is very simplistic. The syntax above is all
that is supports -- you can force-subscribe hierarchies, or you can
deny hierarchies, and that's it.
@vindex gnus-options-not-subscribe
@vindex gnus-options-subscribe
If you don't want to mess with your @file{.newsrc} file, you can just
@ -1430,7 +1436,7 @@ several servers where not all servers support @code{ask-server}.
The @code{gnus-startup-file} variable says where the startup files are.
The default value is @file{~/.newsrc}, with the Gnus (El Dingo) startup
file being whatever that one is, with a @samp{.eld} appended.
If you want version control for this file, set
If you want to keep multiple numbered backups of this file, set
@code{gnus-backup-startup-file}. It respects the same values as the
@code{version-control} variable.
@ -2360,6 +2366,7 @@ empty subscribed groups and unsubscribed groups, too. Type @kbd{l} to
go back to showing nonempty subscribed groups again. Thus, unsubscribed
groups are hidden, in a way.
@cindex zombie groups
Zombie and killed groups are similar to unsubscribed groups in that they
are hidden by default. But they are different from subscribed and
unsubscribed groups in that Gnus doesn't ask the news server for
@ -5568,6 +5575,13 @@ message (@code{gnus-summary-wide-reply-with-original}). This command uses
the process/prefix convention, but only uses the headers from the
first article to determine the recipients.
@item S L
@kindex S L (Summary)
@findex gnus-summary-reply-to-list-with-original
When replying to a message from a mailing list, send a reply to that
message to the mailing list, and include the original message
(@code{gnus-summary-reply-to-list-with-original}).
@item S v
@kindex S v (Summary)
@findex gnus-summary-very-wide-reply
@ -15638,14 +15652,16 @@ will remain on your system until hell freezes over. This bears
repeating one more time, with some spurious capitalizations: IF you do
NOT mark articles as EXPIRABLE, Gnus will NEVER delete those ARTICLES.
@vindex gnus-auto-expirable-marks
You do not have to mark articles as expirable by hand. Gnus provides
two features, called ``auto-expire'' and ``total-expire'', that can help you
with this. In a nutshell, ``auto-expire'' means that Gnus hits @kbd{E}
for you when you select an article. And ``total-expire'' means that Gnus
considers all articles as expirable that are read. So, in addition to
the articles marked @samp{E}, also the articles marked @samp{r},
@samp{R}, @samp{O}, @samp{K}, @samp{Y} and so on are considered
expirable.
@samp{R}, @samp{O}, @samp{K}, @samp{Y} (and so on) are considered
expirable. @code{gnus-auto-expirable-marks} has the full list of
these marks.
When should either auto-expire or total-expire be used? Most people
who are subscribed to mailing lists split each list into its own group
@ -18994,9 +19010,8 @@ that you're running out of space. Neither are particularly fast or
efficient, and it's not a particularly good idea to interrupt them (with
@kbd{C-g} or anything else) once you've started one of them.
Note that other functions, e.g. @code{gnus-request-expire-articles},
might run @code{gnus-agent-expire} for you to keep the agent
synchronized with the group.
Note that other functions might run @code{gnus-agent-expire} for you
to keep the agent synchronized with the group.
The agent parameter @code{agent-enable-expiration} may be used to
prevent expiration in selected groups.

View file

@ -509,8 +509,8 @@ This variable contains the default user name to report to the server.
It defaults to the login name returned by @code{user-login-name}, just
like @code{rcirc-default-nick}.
@item rcirc-default-user-full-name
@vindex rcirc-default-user-full-name
@item rcirc-default-full-name
@vindex rcirc-default-full-name
@cindex full name
@cindex real name
@cindex surname
@ -519,7 +519,7 @@ to the name returned by @code{user-full-name}. If you want to hide
your full name, you might want to set it to some pseudonym.
@example
(setq rcirc-default-user-full-name "Curious Minds Want To Know")
(setq rcirc-default-full-name "Curious Minds Want To Know")
@end example
@item rcirc-authinfo
@ -926,7 +926,7 @@ The real answer, therefore, is a @code{/reconnect} command:
(delete-process process)
(rcirc-connect server port nick
rcirc-default-user-name
rcirc-default-user-full-name
rcirc-default-full-name
channels))))
@end smallexample

View file

@ -2680,6 +2680,12 @@ handling}), file cache, connection cache (@pxref{Connection caching}),
connection buffers.
@end deffn
@deffn Command tramp-cleanup-this-connection
This command flushes all objects of the current buffer's remote
connection. The same objects are removed as in
@code{tramp-cleanup-connection}.
@end deffn
@deffn Command tramp-cleanup-all-connections
This command flushes objects for all active remote connections. The
same objects are removed as in @code{tramp-cleanup-connection}.

View file

@ -1,3 +1,28 @@
2011-07-06 Lars Magne Ingebrigtsen <larsi@gnus.org>
* NEWS: Clarify that `smtpmail-starttls-credentials' doesn't exist.
2011-07-05 Juanma Barranquero <lekktu@gmail.com>
* NEWS: Document new emacs-lock.el and renaming of old one.
2011-07-05 Manoj Srivastava <srivasta@ieee.org>
* themes/manoj-dark-theme.el (manoj-dark): New file.
2011-03-29 Kevin Ryde <user42@zip.com.au>
* compilation.txt (perl-Test2): New samples.
2011-07-03 Lars Magne Ingebrigtsen <larsi@gnus.org>
* tutorials/TUTORIAL.zh: Remove spurious ")" character on the
first line.
2011-07-01 Alan Mackenzie <acm@muc.de>
* NEWS: CC Mode: New "guessing" of style.
2011-06-21 Leo Liu <sdl.web@gmail.com>
* NEWS: Mention the new primtive secure-hash.

View file

@ -84,6 +84,10 @@ client frame in parent X window ID, via XEmbed. This works like the
+++
*** New emacsclient argument -q/--quiet suppresses some status messages.
+++
*** New emacsclient argument --frame-parameters can be used to set the
frame parameters of a newly-created graphical frame.
*** If emacsclient shuts down as a result of Emacs signalling an
error, its exit status is 1.
@ -107,6 +111,10 @@ and pops down the *Completions* buffer accordingly.
*** `completing-read' can be customized using the new variable
`completing-read-function'.
*** minibuffer-local-filename-must-match-map is not used any more.
Instead, the bindings in minibuffer-local-filename-completion-map are combined
with minibuffer-local-must-match-map.
** auto-mode-case-fold is now enabled by default.
** smtpmail changes
@ -122,8 +130,8 @@ difference), but if it were a direct list of user names and passwords,
you will be prompted for the user name and the password instead, and
they will then be saved to ~/.authinfo.
** Similarly, if you had `smtpmail-starttls-credentials' set, then
then you need to put
** Similarly, `smtpmail-starttls-credentials' no longer exists. If
you had thet set, then then you need to put
machine smtp.whatever.foo port 25 key "~/.my_smtp_tls.key" cert "~/.my_smtp_tls.cert"
@ -467,6 +475,11 @@ Just set shell-dir-cookie-re to an appropriate regexp.
** BibTeX mode
*** BibTeX mode now supports biblatex.
Use the variable bibtex-dialect to select support for different BibTeX dialects.
bibtex-entry-field-alist is now an obsolete alias for
bibtex-BibTeX-entry-alist.
*** New command `bibtex-search-entries' bound to C-c C-a.
*** New `bibtex-entry-format' option `sort-fields', disabled by default.
@ -477,7 +490,7 @@ Just set shell-dir-cookie-re to an appropriate regexp.
** FIXME: xdg-open for browse-url and reportbug, 2010/08.
** Archive Mode has basic support to browse 7z archives.
** Archive Mode has basic support to browse and update 7z archives.
** browse-url has gotten a new variable that is used for mailto: URLs,
`browse-url-mailto-function', which defaults to `browse-url-mail'.
@ -783,6 +796,9 @@ the user for specifics, e.g. a merge source.
**** Currently supported for Bzr, Git, and Mercurial.
*** New option `vc-revert-show-diff' controls whether `vc-revert'
shows a diff while querying the user. It defaults to t.
*** Log entries in some Log View buffers can be toggled to display a
longer description by typing RET (log-view-toggle-entry-display).
In the Log View buffers made by `C-x v L' (vc-print-root-log), you can
@ -796,8 +812,15 @@ binding `log-view-expanded-log-entry-function' to a suitable function.
*** New command `vc-ediff' allows visual comparison of two revisions
of a file similar to `vc-diff', but using ediff backend.
** CC Mode (C, C++, etc.)
*** New feature to "guess" the style in an existing buffer.
** Miscellaneous
+++
*** f90.el has some support for Fortran 2008 syntax.
---
*** `copyright-fix-years' can optionally convert consecutive years to ranges.
@ -839,6 +862,13 @@ soap-inspect.el is an interactive inspector for SOAP WSDL structures.
** xmodmap-generic-mode for xmodmap files.
** New emacs-lock.el package.
(The pre-existing one has been renamed to old-emacs-lock.el and moved
to obsolete/.) Now, Emacs Lock is a proper minor mode
`emacs-lock-mode'. Protection against exiting Emacs and killing the
buffer can be set separately. The mechanism for auto turning off
protection for buffers with inferior processes has been generalized.
* Incompatible Lisp Changes in Emacs 24.1
@ -1080,6 +1110,7 @@ as well as those in the -*- line.
---
** rx.el has a new `group-n' construct for explicitly numbered groups.
** keymaps can inherit from multiple parents.
* Changes in Emacs 24.1 on non-free operating systems

View file

@ -13,15 +13,10 @@ to the FSF.
* Tentative plan for Emacs-24
** Bidi
** lexbind: I haven't checked the status of the code recently, so
I don't know how realistic it is to include it. But it's been around
for a long time, and I trust Miles, so I have hope.
** concurrency: including it as an "experimental" compile-time option
sounds good. Of course there might still be big questions around
"which form of concurrency" we'll want.
** Overhaul of customize: sounds wonderful.
** some kind of color-theme: agreed.
** better support for dynamic embedded graphics: I like this idea (my
mpc.el code could use it for the volume widget), tho I wonder if the
resulting efficiency will be sufficient.
@ -30,7 +25,6 @@ to the FSF.
and expand.el (any other?) and then advertise/use/improve it.
** Improve VC: yes, there's a lot of work to be done there :-(
And most of it could/should make it into Emacs-23.3.
** package manager.
** Random things that cross my mind right now that I'd like to see (some of
them from my local hacks), but it's not obvious at all whether they'll

View file

@ -496,6 +496,16 @@ symbol: perl--Test
# Failed test 1 in foo.t at line 6
* Perl Test.pm module error messages comparing two values
symbol: perl--Test2
# Test 3 got: "99" (d-compilation-perl.t at line 29)
# Expected: "88" (my test name)
# d-compilation-perl.t line 29 is: ok(99,88,'my test name');
# Test 6 got: "xx" (foo.t at line 33 fail #2)
# Expected: "yy"
* Perl Test::Harness output

View file

@ -0,0 +1,700 @@
;;; manoj-dark.el --- A dark theme from Manoj
;; Copyright (C) 2011 Free Software Foundation, Inc.
;; Author: Manoj Srivastava <srivasta@ieee.org>
;; Keywords: lisp, faces
;; 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/>.
;;; Commentary:
;; I spend a lot of time workin in front of a screen (many hours in a
;; dimly lit room) and eye fatigue is an issue. This is a dark color
;; theme for emacs, which is easier on the eyes than light themes.
;; It does not help that I am blue-green color blind, so subtle
;; variations are often lost on me. I do want to use color contrast to
;; increase productivity, but I also want to avoid the jarring angry
;; fruit salad look, and so I am in the process of crafting a logical
;; color scheme that is high contrast enough for me, without being too
;; unpleasing.
;; In circumstances where there a lot of related faces that can be
;; viewed, for example, the Gnus group buffer, consistent and logical
;; color choices are the only sane option. Gnus groups can be newa
;; (blueish) or mail (greenish), have states (large number of under
;; messages, normal, and empty). The large number unread groups have
;; highest luminance (appear brighter), and the empty one have lower
;; luminance (appear greyer), but have the same chroma and saturation.
;; Sub states and group priorities are rendered using a color series
;; which has constant luminance and saturation, and vary in hue by a
;; constant separation -- so all the related groups have the same
;; brightness ({mail,news}/{unread,normal,empty}), and a graded
;; selection of foreground colors. It sounds more complicated that it
;; looks. The eye is drawn naturally to the unread groups, and first
;; to the mail, then USENET groups (which is my preference).
;; Similar color variations occur for individual messages in a group;
;; high scoring messages bubble to the top, and have a higher
;; luminance. This color schema has made me slightly faster at
;; reading mail/USENET.
;; In the message itself, quoted mail messages from different people
;; are color coordinated, with high contrast beteen citations that are
;; close to each other in the heirarchy, so it is less likely that one
;; misunderstands who said what in a long conversation.
;; The following scheme covers programming languages, Gnus, Erc, mail,
;; org-mode, CUA-mode, apt-utils, bbdb, compilation buffers, changelog
;; mode, diff and ediff, eshell, and more. You need emacs-goodies
;; package on Debian to use this. See the wiki page at
;; http://www.emacswiki.org/cgi-bin/wiki?ColorTheme for details. The
;; project home page is at https://gna.org/projects/color-theme.
;;; Code:
(deftheme manoj-dark
"Very high contrast faces with a black background.
This theme avoids subtle color variations, while avoiding the
jarring angry fruit salad look to reduce eye fatigue.")
(custom-theme-set-faces
'manoj-dark
'(default ((t (:background "black" :foreground "WhiteSmoke"))))
;; Font lock faces
'(font-lock-builtin-face ((t (:foreground "LightSteelBlue"))))
'(font-lock-constant-face ((t (:foreground "LightSlateBlue" :bold t))))
'(font-lock-preprocessor-face ((t (:foreground "CornFlowerBlue" :italic t))))
'(font-lock-keyword-face ((t (:foreground "cyan1"))))
'(font-lock-type-face ((t (:foreground "SteelBlue1"))))
'(font-lock-regexp-grouping-backslash ((t (:bold t :weight bold))))
'(font-lock-regexp-grouping-construct ((t (:bold t :weight bold))))
'(font-lock-variable-name-face ((t (:foreground "Aquamarine"))))
'(font-lock-function-name-face ((t (:foreground "mediumspringgreen"
:weight bold :height 1.1))))
'(font-lock-string-face ((t (:foreground "RosyBrown1"))))
'(font-lock-comment-face ((t (:italic t :slant oblique :foreground "chocolate1"))))
'(font-lock-comment-delimiter-face ((t (:foreground "Salmon"))))
'(font-lock-doc-face ((t (:italic t :slant oblique :foreground "LightCoral"))))
'(font-lock-doc-string-face ((t (:foreground "Plum"))))
'(font-lock-warning-face ((t (:bold t :foreground "Pink" :weight bold))))
'(cperl-array-face ((t (:foreground "LawnGreen" :background "B;ack" :bold t))))
'(cperl-hash-face ((t (:foreground "SpringGreen" :background "B;ack" :bold t :italic t))))
'(cperl-nonoverridable-face ((t (:foreground "chartreuse3"))))
'(gnus-button ((t (:bold t :weight bold :background "#191932" :box (:line-width 2 :style released-button)))))
'(gnus-cite-attribution-face ((t (:italic t))))
'(gnus-cite-face-1 ((t (:foreground "CornflowerBlue"))))
'(gnus-cite-face-2 ((t (:foreground "PaleGreen"))))
'(gnus-cite-face-3 ((t (:foreground "LightGoldenrod"))))
'(gnus-cite-face-4 ((t (:foreground "LightPink"))))
'(gnus-cite-face-5 ((t (:foreground "turquoise"))))
'(gnus-cite-face-6 ((t (:foreground "khaki"))))
'(gnus-cite-face-7 ((t (:foreground "plum"))))
'(gnus-cite-face-8 ((t (:foreground "DeepSkyBlue1"))))
'(gnus-cite-face-9 ((t (:foreground "chartreuse1"))))
'(gnus-cite-face-10 ((t (:foreground "thistle1"))))
'(gnus-cite-face-11 ((t (:foreground "LightYellow1"))))
'(gnus-emphasis-bold ((t (:bold t :weight bold))))
'(gnus-emphasis-bold-italic ((t (:italic t :bold t :slant italic :weight bold))))
'(gnus-emphasis-highlight-words ((t (:background "black" :foreground "yellow"))))
'(gnus-emphasis-italic ((t (:italic t :slant italic))))
'(gnus-emphasis-strikethru ((t (:strike-through t))))
'(gnus-emphasis-underline ((t (:underline t))))
'(gnus-emphasis-underline-bold ((t (:bold t :underline t :weight bold))))
'(gnus-emphasis-underline-bold-italic ((t (:italic t :bold t :underline t :slant italic :weight bold))))
'(gnus-emphasis-underline-italic ((t (:italic t :underline t :slant italic))))
'(gnus-header-content ((t (:italic t :foreground "DarkKhaki" :slant italic))))
'(gnus-header-content-face ((t (:italic t :foreground "DarkKhaki" :slant italic))))
'(gnus-header-from ((t (:foreground "PaleGreen1"))))
'(gnus-header-from-face ((t (:foreground "PaleGreen1"))))
'(gnus-header-name ((t (:bold t :foreground "BlanchedAlmond" :weight bold))))
'(gnus-header-name-face ((t (:bold t :foreground "BlanchedAlmond" :weight bold))))
'(gnus-header-newsgroups ((t (:italic t :foreground "yellow" :slant italic))))
'(gnus-header-newsgroups-face ((t (:italic t :foreground "yellow" :slant italic))))
'(gnus-header-subject ((t (:foreground "coral1"))))
'(gnus-header-subject-face ((t (:foreground "coral1"))))
'(gnus-signature ((t (:italic t :slant italic))))
'(gnus-signature-face ((t (:italic t :slant italic))))
'(gnus-splash ((t (:foreground "#cccccc"))))
'(gnus-summary-cancelled ((t (:background "black" :foreground "yellow"))))
'(gnus-summary-cancelled-face ((t (:background "black" :foreground "yellow"))))
'(gnus-summary-high-ancient ((t (:bold t :foreground "CornflowerBlue" :weight bold))))
'(gnus-summary-high-ancient-face ((t (:bold t :foreground "CornflowerBlue" :weight bold))))
'(gnus-summary-normal-ancient ((t (:foreground "SkyBlue"))))
'(gnus-summary-normal-ancient-face ((t (:foreground "SkyBlue"))))
'(gnus-summary-low-ancient ((t (:italic t :foreground "LightSteelBlue" :slant italic))))
'(gnus-summary-low-ancien-facet ((t (:italic t :foreground "LightSteelBlue" :slant italic))))
'(gnus-summary-high-read ((t (:bold t :foreground "grey60" :weight bold))))
'(gnus-summary-high-read-face ((t (:bold t :foreground "grey60" :weight bold))))
'(gnus-summary-normal-read ((t (:foreground "grey50"))))
'(gnus-summary-normal-read-face ((t (:foreground "grey50"))))
'(gnus-summary-low-read ((t (:italic t :foreground "LightSlateGray" :slant italic))))
'(gnus-summary-low-read-face ((t (:italic t :foreground "LightSlateGray" :slant italic))))
'(gnus-summary-high-ticked ((t (:bold t :foreground "RosyBrown" :weight bold))))
'(gnus-summary-high-ticked-face ((t (:bold t :foreground "RosyBrown" :weight bold))))
'(gnus-summary-normal-ticked ((t (:foreground "LightSalmon"))))
'(gnus-summary-normal-ticked-face ((t (:foreground "LightSalmon"))))
'(gnus-summary-low-ticked ((t (:italic t :foreground "pink" :slant italic))))
'(gnus-summary-low-ticked-face ((t (:italic t :foreground "pink" :slant italic))))
'(gnus-summary-high-undownloaded ((t (:bold t :foreground "ivory3" :weight bold))))
'(gnus-summary-normal-undownloaded ((t (:foreground "LightGray" :weight normal))))
'(gnus-summary-low-undownloaded ((t (:italic t :foreground "grey75" :slant italic :weight normal))))
'(gnus-summary-high-unread ((t (:bold t :foreground "PaleGreen" :weight bold))))
'(gnus-summary-high-unread-face ((t (:bold t :foreground "PaleGreen" :weight bold))))
'(gnus-summary-normal-unread ((t (:foreground "YellowGreen"))))
'(gnus-summary-normal-unread-face ((t (:foreground "YellowGreen"))))
'(gnus-summary-low-unread ((t (:italic t :foreground "MediumSeaGreen" :slant italic))))
'(gnus-summary-low-unread-face ((t (:italic t :foreground "MediumSeaGreen" :slant italic))))
'(gnus-summary-root-face ((t (:bold t :foreground "Red" :weight bold))))
'(gnus-summary-selected ((t (:underline t :foreground "LemonChiffon"))))
'(gnus-summary-selected-face ((t (:underline t :foreground "LemonChiffon"))))
'(gnus-user-agent-bad-face ((t (:bold t :background "black" :foreground "red" :weight bold))))
'(gnus-user-agent-good-face ((t (:background "black" :foreground "green"))))
'(gnus-user-agent-unknown-face ((t (:bold t :background "black" :foreground "orange" :weight bold))))
'(gnus-x-face ((t (:background "white" :foreground "black"))))
'(gnus-group-mail-1 ((t (:bold t :foreground "#3BFF00" :weight normal))))
'(gnus-group-mail-1-face ((t (:bold t :foreground "#3BFF00" :weight normal))))
'(gnus-group-mail-2 ((t (:bold t :foreground "#5EFF00" :weight normal))))
'(gnus-group-mail-2-face ((t (:bold t :foreground "#5EFF00" :weight normal))))
'(gnus-group-mail-3 ((t (:bold t :foreground "#80FF00" :weight normal))))
'(gnus-group-mail-3-face ((t (:bold t :foreground "#A1FF00" :weight normal))))
'(gnus-group-mail-1-empty ((t (:foreground "#249900"))))
'(gnus-group-mail-1-empty-face ((t (:foreground "#249900"))))
'(gnus-group-mail-2-empty ((t (:foreground "#389900"))))
'(gnus-group-mail-2-empty-face ((t (:foreground "#389900"))))
'(gnus-group-mail-3-empty ((t (:foreground "#4D9900"))))
'(gnus-group-mail-3-empty-face ((t (:foreground "#4D9900"))))
'(gnus-group-mail-low ((t (:bold t :foreground "aquamarine2" :weight bold))))
'(gnus-group-mail-low-face ((t (:bold t :foreground "aquamarine2" :weight bold))))
'(gnus-group-mail-low-empty ((t (:foreground "aquamarine2"))))
'(gnus-group-mail-low-empty-face ((t (:foreground "aquamarine2"))))
'(gnus-group-news-1 ((t (:bold t :foreground "#8480FF" :weight bold))))
'(gnus-group-news-1-face ((t (:bold t :foreground "#8480FF" :weight bold))))
'(gnus-group-news-2 ((t (:bold t :foreground "#8088FF" :weight bold))))
'(gnus-group-news-2-face ((t (:bold t :foreground "#8088FF" :weight bold))))
'(gnus-group-news-3 ((t (:bold t :foreground "#8095FF" :weight bold))))
'(gnus-group-news-3-face ((t (:bold t :foreground "#8095FF" :weight bold))))
'(gnus-group-news-4 ((t (:bold t :foreground "#80A1FF" :weight bold))))
'(gnus-group-news-4-face ((t (:bold t :foreground "#80A1FF" :weight bold))))
'(gnus-group-news-5 ((t (:bold t :foreground "#80AEFF" :weight bold))))
'(gnus-group-news-5-face ((t (:bold t :foreground "#80AEFF" :weight bold))))
'(gnus-group-news-6 ((t (:bold t :foreground "#80BBFF" :weight bold))))
'(gnus-group-news-6-face ((t (:bold t :foreground "#80BBFF" :weight bold))))
'(gnus-group-news-1-empty ((t (:foreground "#524DFF"))))
'(gnus-group-news-1-empty-face ((t (:foreground "#524DFF"))))
'(gnus-group-news-2-empty ((t (:foreground "#4D58FF"))))
'(gnus-group-news-2-empty-face ((t (:foreground "#4D58FF"))))
'(gnus-group-news-3-empty ((t (:foreground "#4D6AFF"))))
'(gnus-group-news-3-empty-face ((t (:foreground "#4D6AFF"))))
'(gnus-group-news-4-empty ((t (:foreground "#4D7CFF"))))
'(gnus-group-news-4-empty-face ((t (:foreground "#4D7CFF"))))
'(gnus-group-news-5-empty ((t (:foreground "#4D8EFF"))))
'(gnus-group-news-5-empty-face ((t (:foreground "#4D8EFF"))))
'(gnus-group-news-6-empty ((t (:foreground "#4DA0FF"))))
'(gnus-group-news-6-empty-face ((t (:foreground "#4DA0FF"))))
'(gnus-group-news-low ((t (:bold t :foreground "DarkTurquoise" :weight bold))))
'(gnus-group-news-low-face ((t (:bold t :foreground "DarkTurquoise" :weight bold))))
'(gnus-group-news-low-empty ((t (:foreground "DarkTurquoise"))))
'(gnus-group-news-low-empty-face ((t (:foreground "DarkTurquoise"))))
;;message faces
'(message-cited-text ((t (:foreground "red3"))))
'(message-header-cc ((t (:bold t :foreground "chartreuse1" :weight bold))))
'(message-header-cc-face ((t (:bold t :foreground "chartreuse1" :weight bold))))
'(message-header-name ((t (:foreground "green"))))
'(message-header-name-face ((t (:foreground "green"))))
'(message-header-newsgroups ((t (:italic t :bold t :foreground "papaya whip" :slant italic :weight bold))))
'(message-header-newsgroups-face ((t (:italic t :bold t :foreground "papaya whip" :slant italic :weight bold))))
'(message-header-other ((t (:foreground "ivory"))))
'(message-header-other-face ((t (:foreground "ivory"))))
'(message-header-subject ((t (:foreground "OliveDrab1"))))
'(message-header-subject-face ((t (:foreground "OliveDrab1"))))
'(message-header-to ((t (:bold t :foreground "floral white" :weight bold))))
'(message-header-to-face ((t (:bold t :foreground "floral white" :weight bold))))
'(message-header-xheader ((t (:foreground "DeepSkyBlue1"))))
'(message-header-xheader-face ((t (:foreground "DeepSkyBlue1"))))
'(message-mml ((t (:foreground "MediumSpringGreen"))))
'(message-mml-face ((t (:foreground "MediumSpringGreen"))))
'(message-separator ((t (:foreground "LightSkyBlue1"))))
'(message-separator-face ((t (:foreground "LightSkyBlue1"))))
'(message-url ((t (:bold t :foreground "blue" :weight bold))))
'(bg:erc-color-face0 ((t (:background "saddle brown"))))
'(bg:erc-color-face1 ((t (:background "black"))))
'(bg:erc-color-face10 ((t (:background "DodgerBlue4"))))
'(bg:erc-color-face11 ((t (:background "cyan4"))))
'(bg:erc-color-face12 ((t (:background "blue"))))
'(bg:erc-color-face13 ((t (:background "deeppink"))))
'(bg:erc-color-face14 ((t (:background "gray50"))))
'(bg:erc-color-face15 ((t (:background "grey15"))))
'(bg:erc-color-face2 ((t (:background "blue4"))))
'(bg:erc-color-face3 ((t (:background "green4"))))
'(bg:erc-color-face4 ((t (:background "red"))))
'(bg:erc-color-face5 ((t (:background "brown"))))
'(bg:erc-color-face6 ((t (:background "purple"))))
'(bg:erc-color-face7 ((t (:background "orange"))))
'(bg:erc-color-face8 ((t (:background "yellow4"))))
'(bg:erc-color-face9 ((t (:background "green"))))
'(erc-action-face ((t (:bold t :weight bold :foreground "turquoise1"))))
'(erc-bold-face ((t (:bold t :weight bold))))
'(erc-button ((t (:bold t :weight bold :foreground "RoyalBlue1" :box (:line-width 2 :style released-button)))))
'(erc-button-face ((t (:bold t :weight bold :foreground "RoyalBlue1" :box (:line-width 2 :style released-button)))))
'(erc-command-indicator-face ((t (:bold t :weight bold))))
'(erc-current-nick-face ((t (:bold t :foreground "DarkTurquoise" :weight bold))))
'(erc-dangerous-host-face ((t (:foreground "red"))))
'(erc-direct-msg-face ((t (:foreground "sandybrown"))))
'(erc-error-face ((t (:foreground "red"))))
'(erc-fool-face ((t (:foreground "dim gray"))))
'(erc-header-line ((t (:background "grey95" :foreground "ConFlowerBlue"))))
'(erc-input-face ((t (:foreground "brown"))))
'(erc-inverse-face ((t (:background "Black" :foreground "White"))))
'(erc-keyword-face ((t (:bold t :foreground "pale green" :weight bold))))
'(erc-my-nick-face ((t (:bold t :foreground "brown" :weight bold))))
'(erc-nick-default-face ((t (:bold t :weight bold :foreground "DodgerBlue1"))))
'(erc-button-nickname-face ((t (:bold t :weight bold :background "lightgrey" :foreground "black" :box (:line-width 2 :style released-button) ))))
'(erc-nick-msg-face ((t (:bold t :foreground "IndianRed" :weight bold))))
'(erc-notice-face ((t (:bold t :foreground "SlateBlue" :weight bold))))
'(erc-pal-face ((t (:bold t :foreground "Magenta" :weight bold))))
'(erc-prompt-face ((t (:bold t :background "Navy" :foreground "lightBlue2" :weight bold))))
'(erc-timestamp-face ((t (:bold t :foreground "SeaGreen1" :weight bold))))
'(erc-underline-face ((t (:underline t))))
'(fg:erc-color-face0 ((t (:foreground "BlanchedAlmond"))))
'(fg:erc-color-face1 ((t (:foreground "beige"))))
'(fg:erc-color-face10 ((t (:foreground "pale goldenrod"))))
'(fg:erc-color-face11 ((t (:foreground "cyan"))))
'(fg:erc-color-face12 ((t (:foreground "lightblue1"))))
'(fg:erc-color-face13 ((t (:foreground "deeppink"))))
'(fg:erc-color-face14 ((t (:foreground "gray50"))))
'(fg:erc-color-face15 ((t (:foreground "gray90"))))
'(fg:erc-color-face2 ((t (:foreground "blue4"))))
'(fg:erc-color-face3 ((t (:foreground "green4"))))
'(fg:erc-color-face4 ((t (:foreground "red"))))
'(fg:erc-color-face5 ((t (:foreground "brown"))))
'(fg:erc-color-face6 ((t (:foreground "purple"))))
'(fg:erc-color-face7 ((t (:foreground "orange"))))
'(fg:erc-color-face8 ((t (:foreground "yellow"))))
'(fg:erc-color-face9 ((t (:foreground "green"))))
'(org-agenda-date ((t (:foreground "LightSkyBlue"))))
'(org-agenda-date-weekend ((t (:bold t :foreground "LightSkyBlue" :weight bold))))
'(org-agenda-restriction-lock ((t (:background "skyblue4"))))
'(org-agenda-structure ((t (:foreground "LightSkyBlue"))))
'(org-archived ((t (:foreground "grey70"))))
'(org-code ((t (:foreground "grey70"))))
'(org-column ((t (:background "grey30" :slant normal :weight normal :height 81 :family "unknown-DejaVu Sans Mono"))))
'(org-column-title ((t (:bold t :background "grey30" :underline t :weight bold))))
'(org-date ((t (:foreground "Cyan" :underline t))))
'(org-done ((t (:bold t :foreground "PaleGreen" :weight bold))))
'(org-drawer ((t (:foreground "LightSkyBlue"))))
'(org-ellipsis ((t (:foreground "LightGoldenrod" :underline t))))
'(org-formula ((t (:foreground "chocolate1"))))
'(org-headline-done ((t (:foreground "LightSalmon"))))
'(org-hide ((t (:foreground "black"))))
'(org-latex-and-export-specials ((t (:foreground "burlywood"))))
'(org-level-1 ((t (:foreground "LightSkyBlue"))))
'(org-level-2 ((t (:foreground "LightGoldenrod"))))
'(org-level-3 ((t (:foreground "Cyan1"))))
'(org-level-4 ((t (:foreground "chocolate1"))))
'(org-level-5 ((t (:foreground "PaleGreen"))))
'(org-level-6 ((t (:foreground "Aquamarine"))))
'(org-level-7 ((t (:foreground "LightSteelBlue"))))
'(org-level-8 ((t (:foreground "LightSalmon"))))
'(org-link ((t (:foreground "Cyan" :underline t))))
'(org-mode-line-clock ((t (:foreground "DarkGreen" :underline t))))
'(org-scheduled-previously ((t (:foreground "chocolate1"))))
'(org-scheduled-today ((t (:foreground "PaleGreen"))))
'(org-sexp-date ((t (:foreground "Cyan"))))
'(org-special-keyword ((t (:foreground "LightSalmon"))))
'(org-table ((t (:foreground "LightSkyBlue"))))
'(org-tag ((t (:bold t :weight bold))))
'(org-target ((t (:underline t))))
'(org-time-grid ((t (:foreground "LightGoldenrod"))))
'(org-todo ((t (:bold t :foreground "Pink" :weight bold))))
'(org-upcoming-deadline ((t (:foreground "chocolate1"))))
'(org-verbatim ((t (:foreground "grey70" :underline t))))
'(org-warning ((t (:bold t :weight bold :foreground "Pink"))))
'(outline-1 ((t (:foreground "LightSkyBlue"))))
'(outline-2 ((t (:foreground "LightGoldenrod"))))
'(outline-3 ((t (:foreground "Cyan1"))))
'(outline-4 ((t (:foreground "chocolate1"))))
'(outline-5 ((t (:foreground "PaleGreen"))))
'(outline-6 ((t (:foreground "Aquamarine"))))
'(outline-7 ((t (:foreground "LightSteelBlue"))))
'(outline-8 ((t (:foreground "LightSalmon"))))
'(CUA-global-mark-face ((t (:background "cyan" :foreground "black"))))
'(CUA-rectangle-face ((t (:background "maroon" :foreground "white"))))
'(CUA-rectangle-noselect-face ((t (:background "dimgray" :foreground "white"))))
'(Info-title-1-face ((t (:bold t :weight bold :family "helv" :height 1.728))))
'(Info-title-2-face ((t (:bold t :family "helv" :weight bold :height 1.44))))
'(Info-title-3-face ((t (:bold t :weight bold :family "helv" :height 1.2))))
'(Info-title-4-face ((t (:bold t :family "helv" :weight bold))))
'(align-highlight-nochange-face ((t (:background "SkyBlue4"))))
'(antlr-font-lock-keyword-face ((t (:foreground "SteelBlue")))) ;%
'(antlr-font-lock-literal-face ((t (:foreground "PaleVioletRed"))))
'(antlr-font-lock-ruledef-face ((t (:foreground "DarkGreen"))))
'(antlr-font-lock-ruleref-face ((t (:foreground "SteelBlue"))))
'(antlr-font-lock-tokendef-face ((t (:foreground "khaki"))))
'(antlr-font-lock-tokenref-face ((t (:foreground "LightSteelBlue4"))))
'(bbdb-company ((t (:italic t :slant italic :foreground "indian red"))))
'(bbdb-field-name ((t (:bold t :weight bold :foreground "steel blue"))))
'(bbdb-field-value ((t (:foreground "AntiqueWhite2"))))
'(bbdb-name ((t (:underline t :foreground "cadet blue"))))
'(bold ((t (:bold t :weight bold))))
'(bold-italic ((t (:bold t :italic t :slant italic :weight bold))))
'(border ((t (:background "gold" :foreground "black" ))))
'(buffer-menu-buffer ((t (:bold t :weight bold))))
'(button ((t (:underline t :box (:line-width 2 :color "grey"
:style released-button)
:foreground "black" :background "grey"
:weight bold ))))
'(calendar-today-face ((t (:underline t :bold t :foreground "cornsilk"))))
'(change-log-acknowledgement-face ((t (:italic t :slant oblique :foreground "AntiqueWhite3"))))
'(change-log-conditionals-face ((t (:foreground "Aquamarine"))))
'(change-log-date-face ((t (:italic t :slant oblique :foreground "BurlyWood"))))
'(change-log-email-face ((t (:foreground "Aquamarine"))))
'(change-log-file-face ((t (:bold t :family "Verdana" :weight bold :foreground "LightSkyBlue" :height 0.9))))
'(change-log-function-face ((t (:foreground "Aquamarine"))))
'(change-log-list-face ((t (:foreground "LightSkyBlue"))))
'(change-log-name-face ((t (:bold t :weight bold :foreground "Gold"))))
'(comint-highlight-input ((t (:bold t :weight bold))))
'(comint-highlight-prompt ((t (:foreground "cyan1"))))
'(compilation-column-number ((t (:foreground "PaleGreen"))))
'(compilation-error ((t (:bold t :weight bold :foreground "Brown1"))))
'(compilation-info ((t (:bold t :foreground "LightPink1" :weight bold))))
'(compilation-line-number ((t (:foreground "LightGoldenrod"))))
'(compilation-message-face ((t (:underline t))))
'(compilation-warning ((t (:bold t :foreground "Orange" :weight bold))))
'(compilation-warning-face ((t (:bold t :foreground "Orange" :weight bold))))
'(completions-common-part ((t (:family "unknown-DejaVu Sans Mono"
:width normal :weight normal
:slant normal :foreground "WhiteSmoke"
:background "black" :height 81))))
'(completions-first-difference ((t (:bold t :weight bold))))
'(css-selector ((t (:foreground "LightSteelBlue"))))
'(css-property ((t (:foreground "light sea green"))))
'(cursor ((t (:background "orchid"))))
'(custom-button-face ((t (:background "lightgrey" :foreground "black"
:box '(:line-width 2 :style released-button)))))
'(custom-button-pressed-face ((t (:background "lightgrey"
:foreground "black"
:box '(:line-width 2 :style pressed-button)))))
'(custom-changed-face ((t (:foreground "wheat" :background "blue"))))
'(custom-comment-face ((t (:background "dim gray"))))
'(custom-comment-tag-face ((t (:foreground "gray80"))))
'(custom-face-tag-face ((t (:bold t :family "helv" :weight bold :height 1.1))))
'(custom-group-tag-face ((t (:bold t :family "helv" :foreground "light blue" :weight bold :height 1.1))))
'(custom-group-tag-face-1 ((t (:bold t :family "helv" :foreground "pink" :weight bold :height 1.1))))
'(custom-invalid-face ((t (:background "red" :foreground "yellow"))))
'(custom-modified-face ((t (:background "blue" :foreground "white"))))
'(custom-rogue-face ((t (:background "black" :foreground "pink"))))
'(custom-saved-face ((t (:underline t))))
'(custom-set-face ((t (:background "white" :foreground "blue"))))
'(custom-state-face ((t (:foreground "lime green"))))
'(custom-variable-button-face ((t (:bold t :underline t :weight bold
:background "lightgrey"
:foreground "black"
:box '(:line-width 2 :style released-button)))))
'(custom-variable-tag-face ((t (:bold t :family "helv"
:foreground "light blue"
:weight bold :height 1.2))))
'(diary ((t (:foreground "IndianRed"))))
'(diary-anniversary ((t (:foreground "Cyan1"))))
'(diary-button ((t (:background "lightgrey" :foreground "black" :box (:line-width 2 :style released-button)))))
'(diary-face ((t (:foreground "IndianRed"))))
'(diary-time ((t (:foreground "LightGoldenrod"))))
'(diff-added ((t (:foreground "Green"))))
'(diff-added-face ((t (:foreground "Green"))))
'(diff-changed-face ((t (:foreground "Khaki"))))
'(diff-context-face ((t (:foreground "grey70"))))
'(diff-file-header ((t (:bold t :background "grey20" :foreground "ivory1" :weight bold))))
'(diff-file-header-face ((t (:bold t :background "grey20" :foreground "ivory1" :weight bold))))
'(diff-function-face ((t (:foreground "SpringGreen1"))))
'(diff-header-face ((t (:background "SlateBlue4"))))
'(diff-hunk-header ((t (:slant italic :background "DodgerBlue4"))))
'(diff-hunk-header-face ((t (:slant italic :background "DodgerBlue4"))))
'(diff-index-face ((t (:bold t :weight bold :background "SteelBlue4" :foreground "linen" ))))
'(diff-nonexistent ((t (:bold t :weight bold :background "Black" :foreground "Wheat1"))))
'(diff-nonexistent-face ((t (:bold t :weight bold :background "Black" :foreground "Wheat1"))))
'(diff-removed ((t (:foreground "salmon1"))))
'(diff-removed-face ((t (:foreground "salmon1"))))
'(diff-refine-change-face ((t (:background "MidnightBlue"))))
'(diff-refine-change ((t (:background "MidnightBlue"))))
'(ediff-current-diff-face-A ((t (:foreground "firebrick" :background "pale green"))))
'(ediff-current-diff-face-Ancestor ((t (:foreground "Black" :background "VioletRed"))))
'(ediff-current-diff-face-B ((t (:foreground "DarkOrchid" :background "Yellow"))))
'(ediff-current-diff-face-C ((t (:foreground "Navy" :background "Pink"))))
'(ediff-even-diff-face-A ((t (:foreground "Black" :background "light grey"))))
'(ediff-even-diff-face-Ancestor ((t (:foreground "White" :background "Grey"))))
'(ediff-even-diff-face-B ((t (:foreground "White" :background "Grey"))))
'(ediff-even-diff-face-C ((t (:foreground "Black" :background "light grey"))))
'(ediff-fine-diff-face-A ((t (:foreground "Navy" :background "sky blue"))))
'(ediff-fine-diff-face-Ancestor ((t (:foreground "Black" :background "Green"))))
'(ediff-fine-diff-face-B ((t (:foreground "Black" :background "cyan"))))
'(ediff-fine-diff-face-C ((t (:foreground "Black" :background "Turquoise"))))
'(ediff-odd-diff-face-A ((t (:foreground "White" :background "Grey"))))
'(ediff-odd-diff-face-Ancestor ((t (:foreground "Black" :background "light grey"))))
'(ediff-odd-diff-face-B ((t (:foreground "Black" :background "light grey"))))
'(ediff-odd-diff-face-C ((t (:foreground "White" :background "Grey"))))
'(eieio-custom-slot-tag-face ((t (:foreground "light blue"))))
'(eldoc-highlight-function-argument ((t (:bold t :weight bold))))
'(epa-field-body ((t (:italic t :foreground "turquoise" :slant italic))))
'(epa-field-name ((t (:bold t :foreground "PaleTurquoise" :weight bold))))
'(epa-mark ((t (:bold t :foreground "orange" :weight bold))))
'(epa-string ((t (:foreground "lightyellow"))))
'(epa-validity-disabled ((t (:italic t :slant italic))))
'(epa-validity-high ((t (:bold t :foreground "PaleTurquoise" :weight bold))))
'(epa-validity-low ((t (:italic t :slant italic))))
'(epa-validity-medium ((t (:italic t :foreground "PaleTurquoise" :slant italic))))
'(escape-glyph ((t (:foreground "cyan"))))
'(eshell-ls-archive-face ((t (:bold t :foreground "IndianRed"))))
'(eshell-ls-backup-face ((t (:foreground "Grey"))))
'(eshell-ls-clutter-face ((t (:foreground "DimGray"))))
'(eshell-ls-directory-face ((t (:bold t :foreground "MediumSlateBlue"))))
'(eshell-ls-executable-face ((t (:foreground "Coral"))))
'(eshell-ls-missing-face ((t (:foreground "black"))))
'(eshell-ls-picture-face ((t (:foreground "Violet"))))
'(eshell-ls-product-face ((t (:foreground "sandybrown"))))
'(eshell-ls-readonly-face ((t (:foreground "Aquamarine"))))
'(eshell-ls-special-face ((t (:foreground "Gold"))))
'(eshell-ls-symlink-face ((t (:foreground "DarkCyan" :bold t))))
'(eshell-ls-symlink-face ((t (:foreground "White"))))
'(eshell-ls-unreadable-face ((t (:foreground "DimGray"))))
'(eshell-prompt-face ((t (:foreground "MediumAquamarine"))))
'(eshell-test-failed-face ((t (:foreground "OrangeRed" :bold t))))
'(eshell-test-ok-face ((t (:foreground "Green" :bold t))))
'(excerpt ((t (:italic t))))
'(file-name-shadow ((t (:foreground "grey70"))))
'(fixed ((t (:bold t))))
'(fixed-pitch ((t (:family "courier"))))
'(flyspell-duplicate-face ((t (:foreground "IndianRed" :bold t :underline t))))
'(flyspell-incorrect-face ((t (:foreground "Pink" :bold t :underline t))))
'(fringe ((t (:background "grey30" :foreground "Wheat"))))
'(header-line ((t (:box (:line-width -1 :color "grey20" :style released-button) :background "grey20" :foreground "grey90" :height 0.9))))
'(help-argument-name ((t (:italic t :slant italic))))
'(highlight ((t (:background "gray10" :foreground "Old Lace"))))
'(hl-line ((t (:background "grey10" :foreground "Old Lace"))))
'(gnus-mouse-face ((t (:background "darkseagreen2" :foreground "blue"))))
'(erc-button-mouse-face ((t (:background "darkseagreen2" :foreground "blue"))))
'(align-highlight-change-face ((t (:background "darkseagreen2" :foreground "blue"))))
'(goto-address-url-mouse-face ((t (:background "darkseagreen2" :foreground "blue"))))
'(goto-address-url-mouse-face ((t (:background "darkseagreen2" :foreground "blue"))))
'(ispell-highlight-face ((t (:background "darkseagreen2" :foreground "blue"))))
'(ispell-highlight-face ((t (:background "darkseagreen2" :foreground "blue"))))
'(widget-mouse-face ((t (:background "darkseagreen2" :foreground "blue"))))
'(highlight-beyond-fill-column-face ((t (:underline t))))
'(highlight-changes ((t (:foreground nil :background "#382f2f"))))
'(highlight-changes-delete ((t (:foreground nil :background "#916868"))))
'(holiday ((t (:background "chocolate4"))))
'(holiday-face ((t (:background "chocolate4"))))
'(ibuffer-dired-buffer-face ((t (:foreground "mediumspringgreen" :weight bold :height 1.1))))
'(ibuffer-help-buffer-face ((t (:italic t :slant oblique :foreground "chocolate1"))))
'(ibuffer-hidden-buffer-face ((t (:bold t :foreground "Pink" :weight bold))))
'(ibuffer-occur-match-face ((t (:bold t :foreground "Pink" :weight bold))))
'(ibuffer-read-only-buffer-face ((t (:foreground "SteelBlue1"))))
'(ibuffer-special-buffer-face ((t (:foreground "SteelBlue1"))))
'(ido-first-match ((t (:bold t :weight bold))))
'(ido-incomplete-regexp ((t (:bold t :weight bold :foreground "Pink"))))
'(ido-indicator ((t (:background "red1" :foreground "yellow1" :width condensed))))
'(ido-only-match ((t (:foreground "ForestGreen"))))
'(ido-subdir ((t (:foreground "red1"))))
'(info-menu-5 ((t (:underline t))))
'(info-menu-header ((t (:bold t :family "helv" :weight bold))))
'(info-node ((t (:bold t :italic t :foreground "yellow"))))
'(info-node ((t (:italic t :bold t :foreground "white" :slant italic :weight bold))))
'(info-xref ((t (:bold t :foreground "DodgerBlue1"))))
'(info-xref ((t (:bold t :foreground "cyan" :weight bold))))
'(isearch ((t (:background "palevioletred2" :foreground "brown4"))))
'(isearch-fail ((t (:background "red4"))))
'(isearch-lazy-highlight-face ((t (:background "paleturquoise4"))))
'(isearch-secondary ((t (:foreground "red3"))))
'(italic ((t (:italic t))))
'(js2-builtin-face ((t (:foreground "sandy brown"))))
'(js2-comment-face ((t (:foreground "dark orchid"))))
'(js2-constant-face ((t (:foreground "pale violet red"))))
'(js2-error-face ((t (:background "indian red" :foreground "green" :bold t))))
'(js2-function-name-face ((t (:foreground "cadet blue"))))
'(js2-function-param-face ((t (:foreground "IndianRed1"))))
'(js2-instance-member-face ((t (:foreground "IndianRed1"))))
'(js2-jsdoc-tag-face ((t (:foreground "medium orchid"))))
'(js2-jsdoc-type-face ((t (:foreground "medium orchid"))))
'(js2-jsdoc-value-face ((t (:foreground "medium orchid"))))
'(js2-keyword-face ((t (:foreground "steel blue"))))
'(js2-private-function-call-face ((t (:foreground "cadet blue"))))
'(js2-private-member-face ((t (:foreground "IndianRed1"))))
'(js2-regexp-face ((t (:foreground "khaki"))))
'(js2-string-face ((t (:foreground "lemon chiffon"))))
'(js2-type-face ((t (:foreground "medium sea green"))))
'(js2-variable-name-face ((t (:foreground "IndianRed1"))))
'(js2-warning-face ((t (:background "indian red" :foreground "green"))))
'(lazy-highlight ((t (:background "paleturquoise4"))))
'(link ((t (:foreground "cyan1" :underline t))))
'(link-visited ((t (:underline t :foreground "violet"))))
'(makefile-space ((t (:background "hotpink"))))
'(man-bold ((t (:bold t))))
'(man-heading ((t (:bold t))))
'(man-italic ((t (:foreground "yellow"))))
'(man-xref ((t (:underline t))))
'(match ((t (:background "RoyalBlue3"))))
'(minibuffer-prompt ((t (:foreground "cyan"))))
'(mode-line ((t (:background "grey75" :foreground "Blue"
:box '(:line-width -1 :style released-button)
:height 0.9))))
'(mode-line-buffer-id ((t (:background "grey65" :foreground "red"
:bold t :weight bold :height 0.9))))
'(mode-line-emphasis ((t (:bold t :weight bold))))
'(mode-line-highlight ((t (:box (:line-width 2 :color "grey40"
:style released-button :height 0.9)))))
'(mode-line-inactive ((t (:background "grey30" :foreground "grey80"
:box '(:line-width -1 :color "grey40")
:weight light :height 0.9))))
'(mouse ((t (:background "OrangeRed"))))
'(next-error ((t (:background "blue3"))))
'(nobreak-space ((t (:foreground "cyan" :underline t))))
'(paren-blink-off ((t (:foreground "black"))))
'(paren-mismatch-face ((t (:bold t :background "white" :foreground "red"))))
'(paren-no-match-face ((t (:bold t :background "white" :foreground "red"))))
'(query-replace ((t (:foreground "brown4" :background "palevioletred2"))))
'(region ((t (:background "blue3"))))
'(scroll-bar ((t (:background "grey75" :foreground "WhiteSmoke"))))
'(secondary-selection ((t (:background "SkyBlue4"))))
'(semantic-dirty-token-face ((t (:background "lightyellow"))))
'(semantic-highlight-edits-face ((t (:background "gray20"))))
'(semantic-unmatched-syntax-face ((t (:underline "red"))))
'(senator-intangible-face ((t (:foreground "gray75"))))
'(senator-momentary-highlight-face ((t (:background "gray30"))))
'(senator-read-only-face ((t (:background "#664444"))))
'(sgml-doctype-face ((t (:foreground "orange"))))
'(sgml-end-tag-face ((t (:foreground "greenyellow"))))
'(sgml-entity-face ((t (:foreground "gold"))))
'(sgml-ignored-face ((t (:foreground "gray20" :background "gray60"))))
'(sgml-sgml-face ((t (:foreground "yellow"))))
'(sgml-start-tag-face ((t (:foreground "mediumspringgreen"))))
'(shadow ((t (:foreground "grey70"))))
'(show-paren-match ((t (:background "steelblue3"))))
'(show-paren-match-face ((t (:background "steelblue3"))))
'(show-paren-mismatch ((t (:background "purple" :foreground "white"))))
'(smerge-base ((t (:foreground "orange"))))
'(smerge-markers ((t (:background "grey30"))))
'(smerge-mine ((t (:foreground "cyan"))))
'(smerge-other ((t (:foreground "lightgreen"))))
'(smerge-refined-change ((t (:background "blue4"))))
'(speedbar-button-face ((t (:foreground "green3"))))
'(speedbar-directory-face ((t (:foreground "light blue"))))
'(speedbar-file-face ((t (:foreground "cyan"))))
'(speedbar-highlight-face ((t (:background "sea green"))))
'(speedbar-selected-face ((t (:foreground "red" :underline t))))
'(speedbar-separator-face ((t (:background "blue" :foreground "white" :overline "gray"))))
'(speedbar-tag-face ((t (:foreground "yellow"))))
'(table-cell ((t (:background "blue1" :foreground "gray90"))))
'(tool-bar ((t (:background "grey75" :foreground "black" :box (:line-width 1 :style released-button)))))
'(tooltip ((t (:family "helv" :background "lightyellow" :foreground "black"))))
'(trailing-whitespace ((t (:background "red1"))))
'(underline ((t (:underline t))))
'(variable-pitch ((t (:family "helv"))))
'(vcursor ((t (:foreground "blue" :background "cyan" :underline t))))
'(vertical-border ((t (:background "dim gray"))))
'(vhdl-font-lock-attribute-face ((t (:foreground "Orchid"))))
'(vhdl-font-lock-directive-face ((t (:foreground "CadetBlue"))))
'(vhdl-font-lock-enumvalue-face ((t (:foreground "Gold4"))))
'(vhdl-font-lock-function-face ((t (:foreground "Orchid4"))))
'(vhdl-font-lock-prompt-face ((t (:foreground "Red" :bold t))))
'(vhdl-font-lock-reserved-words-face ((t (:foreground "Orange" :bold t))))
'(vhdl-font-lock-translate-off-face ((t (:background "LightGray"))))
'(vhdl-speedbar-architecture-face ((t (:foreground "Blue"))))
'(vhdl-speedbar-architecture-selected-face ((t (:foreground "Blue" :underline t))))
'(vhdl-speedbar-configuration-face ((t (:foreground "DarkGoldenrod"))))
'(vhdl-speedbar-configuration-selected-face ((t (:foreground "DarkGoldenrod" :underline t))))
'(vhdl-speedbar-entity-face ((t (:foreground "ForestGreen"))))
'(vhdl-speedbar-entity-selected-face ((t (:foreground "ForestGreen" :underline t))))
'(vhdl-speedbar-instantiation-face ((t (:foreground "Brown"))))
'(vhdl-speedbar-instantiation-selected-face ((t (:foreground "Brown" :underline t))))
'(vhdl-speedbar-package-face ((t (:foreground "Grey50"))))
'(vhdl-speedbar-package-selected-face ((t (:foreground "Grey50" :underline t))))
'(viper-minibuffer-emacs-face ((t (:foreground "Black" :background "darkseagreen2"))))
'(viper-minibuffer-insert-face ((t (:foreground "Black" :background "pink"))))
'(viper-minibuffer-vi-face ((t (:foreground "DarkGreen" :background "grey"))))
'(viper-replace-overlay-face ((t (:foreground "Black" :background "darkseagreen2"))))
'(viper-search-face ((t (:foreground "Black" :background "khaki"))))
'(vm-highlight-url-face ((t (:bold t :italic t :slant italic :weight bold))))
'(vm-highlighted-header-face ((t (:bold t :weight bold))))
'(vm-mime-button-face ((t (:background "grey75" :foreground "black" :box (:line-width 2 :style released-button)))))
'(vm-summary-highlight-face ((t (:bold t :weight bold))))
'(vm-xface ((t (:background "white" :foreground "black"))))
'(which-func ((t (:foreground "Blue1"))))
'(widget ((t (:height 1.2 :background "Gray80" :foreground "black"))))
'(widget-button ((t (:bold t :weight bold :box (:line-width 2 :style released-button)))))
'(widget-button-face ((t (:bold t :weight bold :box (:line-width 2 :style released-button)))))
'(widget-button-pressed ((t (:foreground "red1" :background "lightgrey" :box (:line-width 2 :style pressed-button)))))
'(widget-button-pressed-face ((t (:foreground "red1" :background "lightgrey" :box (:line-width 2 :style pressed-button)))))
'(widget-documentation ((t (:foreground "lime green"))))
'(widget-documentation-face ((t (:foreground "lime green"))))
'(widget-field ((t (:background "dim gray"))))
'(widget-field-face ((t (:background "dim gray"))))
'(widget-inactive ((t (:foreground "grey70"))))
'(widget-inactive-face ((t (:foreground "grey70"))))
'(widget-single-line-field ((t (:background "dim gray"))))
'(widget-single-line-field-face ((t (:background "dim gray"))))
'(woman-bold-face ((t (:bold t))))
'(woman-italic-face ((t (:foreground "beige"))))
'(woman-unknown-face ((t (:foreground "LightSalmon")))))
(provide-theme 'manoj-dark)
;; Local Variables:
;; no-byte-compile: t
;; End:
;;; manoj-dark.el ends here

View file

@ -1,4 +1,4 @@
Emacs §Ö³t«ü«n¡].
Emacs §Ö³t«ü«n.
Emacs 指令通常包含有 CONTROL 鍵(有時候以 CTRL 或 CTL 來標示)或是
META 鍵(有時候以 EDIT 或 ALT 來標示)。為了避免每一次都要寫出其全名,

View file

@ -1,3 +1,17 @@
2011-07-02 Jason Rumney <jasonr@gnu.org>
* emacsclient.c (decode_options) [WINDOWSNT]: Avoid tty mode on
Windows (Bug#5486).
2011-06-25 Glenn Morris <rgm@gnu.org>
* emacsclient.c (decode_options) <opt>: Add `F:'.
(print_help_and_exit): Mention --frame-parameters.
2011-06-25 Andreas Rottmann <a.rottmann@gmx.at>
* emacsclient.c (longopts, decode_options, main): Add frame-parameters.
2011-06-10 Paul Eggert <eggert@cs.ucla.edu>
* movemail.c: Fix race condition and related bugs (Bug#8836).

View file

@ -160,6 +160,10 @@ const char *server_file = NULL;
/* PID of the Emacs server process. */
int emacs_pid = 0;
/* If non-NULL, a string that should form a frame parameter alist to
be used for the new frame */
const char *frame_parameters = NULL;
static void print_help_and_exit (void) NO_RETURN;
static void fail (void) NO_RETURN;
@ -175,6 +179,7 @@ struct option longopts[] =
{ "nw", no_argument, NULL, 't' },
{ "create-frame", no_argument, NULL, 'c' },
{ "alternate-editor", required_argument, NULL, 'a' },
{ "frame-parameters", required_argument, NULL, 'F' },
#ifndef NO_SOCKETS_IN_FILE_SYSTEM
{ "socket-name", required_argument, NULL, 's' },
#endif
@ -526,9 +531,9 @@ decode_options (int argc, char **argv)
{
int opt = getopt_long_only (argc, argv,
#ifndef NO_SOCKETS_IN_FILE_SYSTEM
"VHneqa:s:f:d:tc",
"VHneqa:s:f:d:F:tc",
#else
"VHneqa:f:d:tc",
"VHneqa:f:d:F:tc",
#endif
longopts, 0);
@ -599,6 +604,10 @@ decode_options (int argc, char **argv)
print_help_and_exit ();
break;
case 'F':
frame_parameters = optarg;
break;
default:
message (TRUE, "Try `%s --help' for more information\n", progname);
exit (EXIT_FAILURE);
@ -643,6 +652,14 @@ decode_options (int argc, char **argv)
an empty string");
exit (EXIT_FAILURE);
}
/* TTY frames not supported on Windows. Continue using GUI rather than
forcing the user to change their command-line. This is required since
tty is set above if certain options are given and $DISPLAY is not set,
which is not obvious to users. */
if (tty)
tty = 0;
#endif /* WINDOWSNT */
}
@ -665,6 +682,8 @@ The following OPTIONS are accepted:\n\
-nw, -t, --tty Open a new Emacs frame on the current terminal\n\
-c, --create-frame Create a new frame instead of trying to\n\
use the current Emacs frame\n\
-F ALIST, --frame-parameters=ALIST\n\
Set the parameters of a new 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\
@ -1630,6 +1649,13 @@ main (int argc, char **argv)
send_to_emacs (emacs_socket, " ");
}
if (frame_parameters && !current_frame)
{
send_to_emacs (emacs_socket, "-frame-parameters ");
quote_argument (emacs_socket, frame_parameters);
send_to_emacs (emacs_socket, " ");
}
/* If using the current frame, send tty information to Emacs anyway.
In daemon mode, Emacs may need to occupy this tty if no other
frame is available. */

132
lib/dup2.c Normal file
View file

@ -0,0 +1,132 @@
/* Duplicate an open file descriptor to a specified file descriptor.
Copyright (C) 1999, 2004-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/>. */
/* written by Paul Eggert */
#include <config.h>
/* Specification. */
#include <unistd.h>
#include <errno.h>
#include <fcntl.h>
#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
/* Get declarations of the Win32 API functions. */
# define WIN32_LEAN_AND_MEAN
# include <windows.h>
#endif
#if HAVE_DUP2
# undef dup2
int
rpl_dup2 (int fd, int desired_fd)
{
int result;
# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
/* If fd is closed, mingw hangs on dup2 (fd, fd). If fd is open,
dup2 (fd, fd) returns 0, but all further attempts to use fd in
future dup2 calls will hang. */
if (fd == desired_fd)
{
if ((HANDLE) _get_osfhandle (fd) == INVALID_HANDLE_VALUE)
{
errno = EBADF;
return -1;
}
return fd;
}
/* Wine 1.0.1 return 0 when desired_fd is negative but not -1:
http://bugs.winehq.org/show_bug.cgi?id=21289 */
if (desired_fd < 0)
{
errno = EBADF;
return -1;
}
# elif !defined __linux__
/* On Haiku, dup2 (fd, fd) mistakenly clears FD_CLOEXEC. */
if (fd == desired_fd)
return fcntl (fd, F_GETFL) == -1 ? -1 : fd;
# endif
result = dup2 (fd, desired_fd);
# ifdef __linux__
/* Correct a Linux return value.
<http://git.kernel.org/?p=linux/kernel/git/stable/linux-2.6.30.y.git;a=commitdiff;h=2b79bc4f7ebbd5af3c8b867968f9f15602d5f802>
*/
if (fd == desired_fd && result == (unsigned int) -EBADF)
{
errno = EBADF;
result = -1;
}
# endif
if (result == 0)
result = desired_fd;
/* Correct a cygwin 1.5.x errno value. */
else if (result == -1 && errno == EMFILE)
errno = EBADF;
# if REPLACE_FCHDIR
if (fd != desired_fd && result != -1)
result = _gl_register_dup (fd, result);
# endif
return result;
}
#else /* !HAVE_DUP2 */
/* On older platforms, dup2 did not exist. */
# ifndef F_DUPFD
static int
dupfd (int fd, int desired_fd)
{
int duplicated_fd = dup (fd);
if (duplicated_fd < 0 || duplicated_fd == desired_fd)
return duplicated_fd;
else
{
int r = dupfd (fd, desired_fd);
int e = errno;
close (duplicated_fd);
errno = e;
return r;
}
}
# endif
int
dup2 (int fd, int desired_fd)
{
int result = fcntl (fd, F_GETFL) < 0 ? -1 : fd;
if (result == -1 || fd == desired_fd)
return result;
close (desired_fd);
# ifdef F_DUPFD
result = fcntl (fd, F_DUPFD, desired_fd);
# if REPLACE_FCHDIR
if (0 <= result)
result = _gl_register_dup (fd, result);
# endif
# else
result = dupfd (fd, desired_fd);
# endif
if (result == -1 && (errno == EMFILE || errno == EINVAL))
errno = EBADF;
return result;
}
#endif /* !HAVE_DUP2 */

View file

@ -829,7 +829,7 @@ _getopt_internal_r (int argc, char **argv, const char *optstring,
return '?';
}
/* Convenience. Treat POSIX -W foo same as long option --foo */
if (temp[0] == 'W' && temp[1] == ';')
if (temp[0] == 'W' && temp[1] == ';' && longopts)
{
char *nameend;
const struct option *p;

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 --conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files alloca-opt careadlinkat crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512 dtoastr filemode getloadavg getopt-gnu ignore-value intprops lstat mktime readlink socklen stdarg stdio strftime strtoumax symlink sys_stat
# 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 --conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files alloca-opt careadlinkat crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512 dtoastr dup2 filemode getloadavg getopt-gnu ignore-value intprops lstat mktime readlink socklen stdarg stdio strftime strtoumax symlink sys_stat
MOSTLYCLEANFILES += core *.stackdump
@ -159,6 +159,15 @@ EXTRA_libgnu_a_SOURCES += ftoastr.c
## end gnulib module dtoastr
## begin gnulib module dup2
EXTRA_DIST += dup2.c
EXTRA_libgnu_a_SOURCES += dup2.c
## end gnulib module dup2
## begin gnulib module filemode
libgnu_a_SOURCES += filemode.c

View file

@ -38,6 +38,7 @@ orig_stat (const char *filename, struct stat *buf)
#include <stdbool.h>
#include <string.h>
#include "dosname.h"
#include "verify.h"
/* Store information about NAME into ST. Work around bugs with
trailing slashes. Mingw has other bugs (such as st_ino always
@ -63,6 +64,12 @@ rpl_stat (char const *name, struct stat *st)
}
#endif /* REPLACE_FUNC_STAT_FILE */
#if REPLACE_FUNC_STAT_DIR
/* The only known systems where REPLACE_FUNC_STAT_DIR is needed also
have a constant PATH_MAX. */
# ifndef PATH_MAX
# error "Please port this replacement to your platform"
# endif
if (result == -1 && errno == ENOENT)
{
/* Due to mingw's oddities, there are some directories (like
@ -77,6 +84,7 @@ rpl_stat (char const *name, struct stat *st)
char fixed_name[PATH_MAX + 1] = {0};
size_t len = strlen (name);
bool check_dir = false;
verify (PATH_MAX <= 4096);
if (PATH_MAX <= len)
errno = ENAMETOOLONG;
else if (len)

File diff suppressed because it is too large Load diff

View file

@ -4421,7 +4421,7 @@
2008-12-06 Chong Yidong <cyd@stupidchicken.com>
* term/xterm.el (terminal-init-xterm): Discard pending input
before reading a reply to the terminal attributes query.
before reading a reply to the terminal attributes query. (Bug#1495)
2008-12-05 Andreas Schwab <schwab@suse.de>

View file

@ -8424,7 +8424,7 @@
* dabbrev.el (dabbrev-completion): Fix typo in docstring.
2010-08-08 MON KEY <monkey@sandpframing.com> (tiny change)
2010-08-08 MON KEY <monkey@sandpframing.com>
* emacs-lisp/syntax.el (syntax-ppss-toplevel-pos):
Fix typo in docstring (bug#6747).

View file

@ -159,7 +159,7 @@ where NAME and EXPANSION are strings with quotes,
USECOUNT is an integer, and HOOK is any valid function
or may be omitted (it is usually omitted)."
(interactive)
(switch-to-buffer (prepare-abbrev-list-buffer)))
(pop-to-buffer-same-window (prepare-abbrev-list-buffer)))
(defun edit-abbrevs-redefine ()
"Redefine abbrevs according to current buffer contents."

View file

@ -258,7 +258,9 @@ widgets are locally inhibited.
The number varies according to the evanescence of objects on a
hash table with weak keys, so tracking of widget erasures is often delayed."
(when (and allout-widgets-maintain-tally (not allout-widgets-mode-inhibit))
(when (and allout-widgets-maintain-tally
(not allout-widgets-mode-inhibit)
allout-widgets-tally)
(format ":%s" (hash-table-count allout-widgets-tally))))
;;;_ = allout-widgets-track-decoration nil
(defcustom allout-widgets-track-decoration nil
@ -559,6 +561,8 @@ outline hot-spot navigation \(see `allout-mode')."
'allout-widgets-shifts-recorder nil 'local)
(add-hook 'allout-after-copy-or-kill-hook
'allout-widgets-after-copy-or-kill-function nil 'local)
(add-hook 'allout-post-undo-hook
'allout-widgets-after-undo-function nil 'local)
(add-hook 'before-change-functions 'allout-widgets-before-change-handler
nil 'local)
@ -748,20 +752,23 @@ Optional RECURSING is for internal use, to limit recursion."
(message replaced-message)
(message "")))))
;; Detect undecorated items, eg during isearch into previously
;; unexposed topics, and decorate "economically". Some
;; undecorated stuff is often exposed, to reduce lag, but the
;; item containing the cursor is decorated. We constrain
;; recursion to avoid being trapped by unexpectedly undecoratable
;; items.
(when (and (not recursing)
(not (allout-current-decorated-p))
(or (not (equal (allout-depth) 0))
(not allout-container-item-widget)))
(let ((buffer-undo-list t))
(allout-widgets-exposure-change-recorder
allout-recent-prefix-beginning allout-recent-prefix-end nil)
(allout-widgets-post-command-business 'recursing)))
;; alas, decorated intermediate matches are not easily undecorated
;; when they're automatically rehidden by isearch, so we're
;; dropping this nicety.
;; ;; Detect undecorated items, eg during isearch into previously
;; ;; unexposed topics, and decorate "economically". Some
;; ;; undecorated stuff is often exposed, to reduce lag, but the
;; ;; item containing the cursor is decorated. We constrain
;; ;; recursion to avoid being trapped by unexpectedly undecoratable
;; ;; items.
;; (when (and (not recursing)
;; (not (allout-current-decorated-p))
;; (or (not (equal (allout-depth) 0))
;; (not allout-container-item-widget)))
;; (let ((buffer-undo-list t))
;; (allout-widgets-exposure-change-recorder
;; allout-recent-prefix-beginning allout-recent-prefix-end nil)
;; (allout-widgets-post-command-business 'recursing)))
;; Detect and rectify fouled outline structure - decorated item
;; not at beginning of line.
@ -1125,6 +1132,14 @@ Dispatched by `allout-widgets-post-command-business' in response to
Intended for use on allout-after-copy-or-kill-hook."
(if (car kill-ring)
(setcar kill-ring (allout-widgets-undecorate-text (car kill-ring)))))
;;;_ > allout-widgets-after-undo-function ()
(defun allout-widgets-after-undo-function ()
"Do allout-widgets processing of text after an undo.
Intended for use on allout-post-undo-hook."
(save-excursion
(if (allout-goto-prefix)
(allout-redecorate-item (allout-get-or-create-item-widget)))))
;;;_ > allout-widgets-exposure-undo-recorder (widget from-state)
(defun allout-widgets-exposure-undo-recorder (widget)
@ -2319,9 +2334,7 @@ We use a caching strategy, so the caller doesn't need to do so."
(defun allout-elapsed-time-seconds (end start)
"Return seconds between `current-time' style time START/END triples."
(let ((elapsed (time-subtract end start)))
(+ (* (car elapsed) (expt 2.0 16))
(cadr elapsed)
(/ (caddr elapsed) (expt 10.0 6)))))
(float-time elapsed)))
;;;_ > allout-frame-property (frame property)
(defalias 'allout-frame-property
(cond ((fboundp 'frame-parameter)

View file

@ -823,37 +823,32 @@ formatted copy."
:group 'allout-encryption)
;;;_ = allout-encrypt-unencrypted-on-saves
(defcustom allout-encrypt-unencrypted-on-saves t
"When saving, should topics pending encryption be encrypted?
"If non-nil, topics pending encryption are encrypted during buffer saves.
The idea is to prevent file-system exposure of any un-encrypted stuff, and
mostly covers both deliberate file writes and auto-saves.
This provents file-system exposure of un-encrypted contents of
items marked for encryption.
- Yes: encrypt all topics pending encryption, even if it's the one
currently being edited. (In that case, the currently edited topic
will be automatically decrypted before any user interaction, so they
can continue editing but the copy on the file system will be
encrypted.)
Auto-saves will use the \"All except current topic\" mode if this
one is selected, to avoid practical difficulties -- see below.
- All except current topic: skip the topic currently being edited, even if
it's pending encryption. This may expose the current topic on the
file sytem, but avoids the nuisance of prompts for the encryption
passphrase in the middle of editing for, eg, autosaves.
This mode is used for auto-saves for both this option and \"Yes\".
- No: leave it to the user to encrypt any unencrypted topics.
When non-nil, if the topic currently being edited is decrypted,
it will be encrypted for saving but automatically decrypted
before any subsequent user interaction, so it is once again clear
text for editing though the file system copy is encrypted.
For practical reasons, auto-saves always use the 'except-current policy
when auto-encryption is enabled. (Otherwise, spurious passphrase prompts
and unavoidable timing collisions are too disruptive.) If security for a
file requires that even the current topic is never auto-saved in the clear,
disable auto-saves for that file."
\(Auto-saves are handled differently. Buffers with plain-text
exposed encrypted topics are exempted from auto saves until all
such topics are encrypted.)"
:type '(choice (const :tag "Yes" t)
(const :tag "All except current topic" except-current)
(const :tag "No" nil))
:version "22.1"
:type 'boolean
:version "23.1"
:group 'allout-encryption)
(make-variable-buffer-local 'allout-encrypt-unencrypted-on-saves)
(defvar allout-auto-save-temporarily-disabled nil
"True while topic encryption is pending and auto-saving was active.
The value of buffer-saved-size at the time of decryption is used,
for restoring when all encryptions are established.")
(defvar allout-just-did-undo nil
"True just after undo commands, until allout-post-command-business.")
(make-variable-buffer-local 'allout-just-did-undo)
;;;_ + Developer
;;;_ = allout-developer group
@ -1466,7 +1461,15 @@ This hook might be invoked multiple times by a single command.")
(defvar allout-after-copy-or-kill-hook nil
"*Hook that's run after copying outline text.
Functions on the hook should not take any arguments.")
Functions on the hook should not require any arguments.")
;;;_ = allout-post-undo-hook
(defvar allout-post-undo-hook nil
"*Hook that's run after undo activity.
The item that's current when the hook is run *may* be the one
that was affected by the undo.
Functions on the hook should not require any arguments.")
;;;_ = allout-outside-normal-auto-fill-function
(defvar allout-outside-normal-auto-fill-function nil
"Value of normal-auto-fill-function outside of allout mode.
@ -1564,39 +1567,43 @@ See `allout-encryption-ciphertext-rejection-regexps' for rejection reasons.")
(defmacro allout-mode-p ()
"Return t if `allout-mode' is active in current buffer."
'allout-mode)
;;;_ > allout-write-file-hook-handler ()
(defun allout-write-file-hook-handler ()
"Implement `allout-encrypt-unencrypted-on-saves' policy for file writes."
;;;_ > allout-write-contents-hook-handler ()
(defun allout-write-contents-hook-handler ()
"Implement `allout-encrypt-unencrypted-on-saves' for file writes
Return nil if all goes smoothly, or else return an informative
message if an error is encountered. The message will serve as a
non-nil return on `write-contents-functions' to prevent saving of
the buffer while it has decrypted content.
This behavior depends on emacs versions that implement the
`write-contents-functions' hook."
(if (or (not (allout-mode-p))
(not (boundp 'allout-encrypt-unencrypted-on-saves))
(not allout-encrypt-unencrypted-on-saves))
nil
(let ((except-mark (and (equal allout-encrypt-unencrypted-on-saves
'except-current)
(point-marker))))
(if (save-excursion (goto-char (point-min))
(allout-next-topic-pending-encryption except-mark))
(progn
(message "auto-encrypting pending topics")
(sit-for 0)
(condition-case failure
(if (save-excursion (goto-char (point-min))
(allout-next-topic-pending-encryption))
(progn
(message "auto-encrypting pending topics")
(sit-for 0)
(condition-case failure
(progn
(setq allout-after-save-decrypt
(allout-encrypt-decrypted except-mark))
(error (message
"allout-write-file-hook-handler suppressing error %s"
failure)
(sit-for 2)))))
))
nil)
;;;_ > allout-auto-save-hook-handler ()
(defun allout-auto-save-hook-handler ()
"Implement `allout-encrypt-unencrypted-on-saves' policy for auto save."
(if (and (allout-mode-p) allout-encrypt-unencrypted-on-saves)
;; Always implement 'except-current policy when enabled.
(let ((allout-encrypt-unencrypted-on-saves 'except-current))
(allout-write-file-hook-handler))))
(allout-encrypt-decrypted))
;; aok - return nil:
nil)
(error
;; whoops - probably some still-decrypted items, return non-nil:
(let ((text (format (concat "%s contents write inhibited due to"
" encrypted topic encryption error:"
" %s")
(buffer-name (current-buffer))
failure)))
(message text)(sit-for 2)
text)))))
))
;;;_ > allout-after-saves-handler ()
(defun allout-after-saves-handler ()
"Decrypt topic encrypted for save, if it's currently being edited.
@ -1875,6 +1882,7 @@ without changes to the allout core. Here are key ones:
`allout-structure-deleted-hook'
`allout-structure-shifted-hook'
`allout-after-copy-or-kill-hook'
`allout-post-undo-hook'
Terminology
@ -1960,12 +1968,7 @@ OPEN: A TOPIC that is not CLOSED, though its OFFSPRING or BODY may be."
:lighter " Allout"
:keymap 'allout-mode-map
(let ((write-file-hook-var-name (cond ((boundp 'write-file-functions)
'write-file-functions)
((boundp 'write-file-hooks)
'write-file-hooks)
(t 'local-write-file-hooks)))
(use-layout (if (listp allout-layout)
(let ((use-layout (if (listp allout-layout)
allout-layout
allout-default-layout)))
@ -1984,9 +1987,8 @@ OPEN: A TOPIC that is not CLOSED, though its OFFSPRING or BODY may be."
(remove-hook 'post-command-hook 'allout-post-command-business t)
(remove-hook 'before-change-functions 'allout-before-change-handler t)
(remove-hook 'isearch-mode-end-hook 'allout-isearch-end-handler t)
(remove-hook write-file-hook-var-name
'allout-write-file-hook-handler t)
(remove-hook 'auto-save-hook 'allout-auto-save-hook-handler t)
(remove-hook 'write-contents-functions
'allout-write-contents-hook-handler t)
(remove-overlays (point-min) (point-max)
'category 'allout-exposure-category))
@ -2019,9 +2021,8 @@ OPEN: A TOPIC that is not CLOSED, though its OFFSPRING or BODY may be."
(add-hook 'post-command-hook 'allout-post-command-business nil t)
(add-hook 'before-change-functions 'allout-before-change-handler nil t)
(add-hook 'isearch-mode-end-hook 'allout-isearch-end-handler nil t)
(add-hook write-file-hook-var-name 'allout-write-file-hook-handler
(add-hook 'write-contents-functions 'allout-write-contents-hook-handler
nil t)
(add-hook 'auto-save-hook 'allout-auto-save-hook-handler nil t)
;; Stash auto-fill settings and adjust so custom allout auto-fill
;; func will be used if auto-fill is active or activated. (The
@ -2085,7 +2086,7 @@ OPEN: A TOPIC that is not CLOSED, though its OFFSPRING or BODY may be."
(save-current-buffer
(dolist (buffer (buffer-list))
(set-buffer buffer)
(when (allout-mode-p) (allout-mode))))
(when (allout-mode-p) (allout-mode -1))))
;; continue standard unloading
nil)
@ -2154,8 +2155,10 @@ internal functions use this feature cohesively bunch changes."
See `allout-overlay-interior-modification-handler' for details."
(when (and (allout-mode-p) undo-in-progress (allout-hidden-p))
(allout-show-children))
(when (and (allout-mode-p) undo-in-progress)
(setq allout-just-did-undo t)
(if (allout-hidden-p)
(allout-show-children)))
;; allout-overlay-interior-modification-handler on an overlay handles
;; this in other emacs, via `allout-exposure-category's 'modification-hooks.
@ -3308,12 +3311,30 @@ coordinating with allout activity.")
- Implement (and clear) `allout-post-goto-bullet', for hot-spot
outline commands.
- If the command we're following was an undo, check for change in
the status of encrypted items and adjust auto-save inhibitions
accordingly.
- Decrypt topic currently being edited if it was encrypted for a save."
; Apply any external change func:
(if (not (allout-mode-p)) ; In allout-mode.
nil
(when allout-just-did-undo
(setq allout-just-did-undo nil)
(run-hooks 'allout-post-undo-hook)
(cond ((and (= buffer-saved-size -1)
allout-auto-save-temporarily-disabled)
;; user possibly undid a decryption, deinhibit auto-save:
(allout-maybe-resume-auto-save-info-after-encryption))
((save-excursion
(save-restriction
(widen)
(goto-char (point-min))
(not (allout-next-topic-pending-encryption))))
;; plain-text encrypted items are present, inhibit auto-save:
(allout-inhibit-auto-save-info-for-decryption (buffer-size)))))
(if (and (boundp 'allout-after-save-decrypt)
allout-after-save-decrypt)
(allout-after-saves-handler))
@ -4036,6 +4057,8 @@ this function."
(not (allout-encrypted-topic-p)))
(allout-reindent-body current-depth new-depth))
(run-hook-with-args 'allout-exposure-change-hook mb me nil)
;; Recursively rectify successive siblings of orig topic if
;; caller elected for it:
(if do-successors
@ -4605,8 +4628,9 @@ however, are left exactly like normal, non-allout-specific yanks."
; and delete residual subj
; prefix digits and space:
(while (looking-at "[0-9]") (delete-char 1))
(if (looking-at " ")
(delete-char 1))))
(delete-char -1)
(if (not (eolp))
(forward-char))))
;; Assert new topic's bullet - minimal effort if unchanged:
(allout-rebullet-heading (string-to-char prefix-bullet)))
(exchange-point-and-mark))))
@ -4736,6 +4760,7 @@ arguments as this function, after the exposure changes are made."
(when flag
(let ((o (make-overlay from to nil 'front-advance)))
(overlay-put o 'category 'allout-exposure-category)
(overlay-put o 'evaporate t)
(when (featurep 'xemacs)
(let ((props (symbol-plist 'allout-exposure-category)))
(while props
@ -5895,6 +5920,8 @@ See `allout-toggle-current-subtree-encryption' for more details."
" shift it in to make it encryptable")))
(let* ((allout-buffer (current-buffer))
;; for use with allout-auto-save-temporarily-disabled, if necessary:
(was-buffer-saved-size buffer-saved-size)
;; Assess location:
(bullet-pos allout-recent-prefix-beginning)
(after-bullet-pos (point))
@ -5974,6 +6001,12 @@ See `allout-toggle-current-subtree-encryption' for more details."
;; Add the is-encrypted bullet qualifier:
(goto-char after-bullet-pos)
(insert "*"))))
;; adjust buffer's auto-save eligibility:
(if was-encrypted
(allout-inhibit-auto-save-info-for-decryption was-buffer-saved-size)
(allout-maybe-resume-auto-save-info-after-encryption))
(run-hook-with-args 'allout-structure-added-hook
bullet-pos subtree-end))))
;;;_ > allout-encrypt-string (text decrypt allout-buffer keymode-cue
@ -6025,6 +6058,7 @@ signal."
(epg-context-set-passphrase-callback
context #'epa-passphrase-callback-function)
context))
(encoding (with-current-buffer allout-buffer
buffer-file-coding-system))
(multibyte (with-current-buffer allout-buffer
@ -6146,8 +6180,29 @@ signal."
result-text))
(error (concat "Encryption produced non-armored text, which"
"conflicts with allout mode -- reconfigure!")))
(t result-text))))
;;;_ > allout-inhibit-auto-save-info-for-decryption
(defun allout-inhibit-auto-save-info-for-decryption (was-buffer-saved-size)
"Temporarily prevent auto-saves in this buffer when an item is decrypted.
WAS-BUFFER-SAVED-SIZE is the value of buffer-saved-size *before*
the decryption."
(when (not (or (= buffer-saved-size -1) (= was-buffer-saved-size -1)))
(setq allout-auto-save-temporarily-disabled was-buffer-saved-size
buffer-saved-size -1)))
;;;_ > allout-maybe-resume-auto-save-info-after-encryption ()
(defun allout-maybe-resume-auto-save-info-after-encryption ()
"Restore auto-save info, *if* there are no topics pending encryption."
(when (and allout-auto-save-temporarily-disabled
(= buffer-saved-size -1)
(save-excursion
(save-restriction
(widen)
(goto-char (point-min))
(not (allout-next-topic-pending-encryption)))))
(setq buffer-saved-size allout-auto-save-temporarily-disabled
allout-auto-save-temporarily-disabled nil)))
;;;_ > allout-encrypted-topic-p ()
(defun allout-encrypted-topic-p ()
"True if the current topic is encryptable and encrypted."
@ -6158,14 +6213,10 @@ signal."
(save-match-data (looking-at "\\*")))
)
)
;;;_ > allout-next-topic-pending-encryption (&optional except-mark)
(defun allout-next-topic-pending-encryption (&optional except-mark)
;;;_ > allout-next-topic-pending-encryption ()
(defun allout-next-topic-pending-encryption ()
"Return the point of the next topic pending encryption, or nil if none.
EXCEPT-MARK identifies a point whose containing topics should be excluded
from encryption. This supports 'except-current mode of
`allout-encrypt-unencrypted-on-saves'.
Such a topic has the `allout-topic-encryption-bullet' without an
immediately following '*' that would mark the topic as being encrypted. It
must also have content."
@ -6200,10 +6251,7 @@ must also have content."
(setq content-beg (point))
(backward-char 1)
(allout-end-of-subtree)
(if (or (<= (point) content-beg)
(and except-mark
(<= content-beg except-mark)
(>= (point) except-mark)))
(if (<= (point) content-beg)
;; Continue looking
(setq got nil)
;; Got it!
@ -6215,14 +6263,10 @@ must also have content."
)
)
)
;;;_ > allout-encrypt-decrypted (&optional except-mark)
(defun allout-encrypt-decrypted (&optional except-mark)
;;;_ > allout-encrypt-decrypted ()
(defun allout-encrypt-decrypted ()
"Encrypt topics pending encryption except those containing exemption point.
EXCEPT-MARK identifies a point whose containing topics should be excluded
from encryption. This supports the `except-current' mode of
`allout-encrypt-unencrypted-on-saves'.
If a topic that is currently being edited was encrypted, we return a list
containing the location of the topic and the location of the cursor just
before the topic was encrypted. This can be used, eg, to decrypt the topic
@ -6238,7 +6282,7 @@ save. See `allout-encrypt-unencrypted-on-saves' for more info."
bo-subtree
editing-topic editing-point)
(goto-char (point-min))
(while (allout-next-topic-pending-encryption except-mark)
(while (allout-next-topic-pending-encryption)
(setq was-modified (buffer-modified-p))
(when (save-excursion
(and (boundp 'allout-encrypt-unencrypted-on-saves)

View file

@ -55,9 +55,9 @@
;; --------------------------------------------
;; View listing Intern Intern Intern Intern Y Y
;; Extract member Y Y Y Y Y Y
;; Save changed member Y Y Y Y N N
;; Save changed member Y Y Y Y N Y
;; Add new member N N N N N N
;; Delete member Y Y Y Y N N
;; Delete member Y Y Y Y N Y
;; Rename member Y Y N N N N
;; Chmod - Y Y - N N
;; Chown - Y - - N N
@ -323,9 +323,30 @@ Archive and member name will be added."
Extraction should happen to standard output. Archive and member name will
be added."
:type '(list (string :tag "Program")
(repeat :tag "Options"
:inline t
(string :format "%v")))
(repeat :tag "Options"
:inline t
(string :format "%v")))
:group 'archive-7z)
(defcustom archive-7z-expunge
'("7z" "d")
"Program and its options to run in order to delete 7z file members.
Archive and member names will be added."
:type '(list (string :tag "Program")
(repeat :tag "Options"
:inline t
(string :format "%v")))
:group 'archive-7z)
(defcustom archive-7z-update
'("7z" "u")
"Program and its options to run in order to update a 7z file member.
Options should ensure that specified directory will be put into the 7z
file. Archive and member name will be added."
:type '(list (string :tag "Program")
(repeat :tag "Options"
:inline t
(string :format "%v")))
:group 'archive-7z)
;; -------------------------------------------------------------------------
@ -1062,7 +1083,7 @@ using `make-temp-file', and the generated name is returned."
(view-buffer buffer (and just-created 'kill-buffer-if-not-modified)))
((eq other-window-p 'display) (display-buffer buffer))
(other-window-p (switch-to-buffer-other-window buffer))
(t (switch-to-buffer buffer))))))
(t (pop-to-buffer-same-window buffer))))))
(defun archive-*-extract (archive name command)
(let* ((default-directory (file-name-as-directory archive-tmpdir))
@ -2037,7 +2058,9 @@ This doesn't recover lost files, it just undoes changes in the buffer itself."
(with-temp-buffer
(call-process "7z" nil t nil "l" "-slt" file)
(goto-char (point-min))
(re-search-forward "^-+\n")
;; Four dashes start the meta info section that should be skipped.
;; Archive members start with more than four dashes.
(re-search-forward "^-----+\n")
(while (re-search-forward "^Path = \\(.*\\)\n" nil t)
(goto-char (match-end 0))
(let ((name (match-string 1))
@ -2084,6 +2107,12 @@ This doesn't recover lost files, it just undoes changes in the buffer itself."
(message "%s" (buffer-string)))
(delete-file tmpfile)))))
(defun archive-7z-write-file-member (archive descr)
(archive-*-write-file-member
archive
descr
archive-7z-update))
;; -------------------------------------------------------------------------
;;; Section `ar' archives.

View file

@ -360,7 +360,7 @@ Matches the visited file name against the elements of `auto-insert-alist'."
(save-window-excursion
;; make buffer visible before skeleton or function
;; which might ask the user for something
(switch-to-buffer (current-buffer))
(pop-to-buffer-same-window (current-buffer))
(if (and (consp action)
(not (eq (car action) 'lambda)))
(skeleton-insert action)

View file

@ -102,6 +102,11 @@ string are substituted as defined by the current value of the variable
"String to display in the mode line.")
;;;###autoload (put 'battery-mode-line-string 'risky-local-variable t)
(defcustom battery-mode-line-limit 100
"Percentage of full battery load below which display battery status"
:type 'integer
:group 'battery)
(defcustom battery-mode-line-format
(cond ((eq battery-status-function 'battery-linux-proc-acpi)
"[%b%p%%,%d°C]")
@ -182,16 +187,21 @@ seconds."
(defun battery-update ()
"Update battery status information in the mode line."
(setq battery-mode-line-string
(propertize (if (and battery-mode-line-format
battery-status-function)
(battery-format
battery-mode-line-format
(funcall battery-status-function))
"")
'help-echo "Battery status information"))
(let ((data (and battery-status-function (funcall battery-status-function))))
(setq battery-mode-line-string
(propertize (if (and battery-mode-line-format
(<= (car (read-from-string (cdr (assq ?p data))))
battery-mode-line-limit))
(battery-format
battery-mode-line-format
data)
"")
'face
(and (<= (car (read-from-string (cdr (assq ?p data))))
battery-load-critical)
'font-lock-warning-face)
'help-echo "Battery status information")))
(force-mode-line-update))
;;; `/proc/apm' interface for Linux.

View file

@ -471,7 +471,8 @@ Like `bury-buffer', but temporarily select EVENT's window."
(defun mode-line-other-buffer () "\
Switch to the most recently selected buffer other than the current one."
(interactive)
(switch-to-buffer (other-buffer)))
(with-no-warnings ; We really do want to call `switch-to-buffer' here.
(switch-to-buffer (other-buffer))))
(defun mode-line-next-buffer (event)
"Like `next-buffer', but temporarily select EVENT's window."
@ -806,6 +807,8 @@ if `inhibit-field-text-motion' is non-nil."
(define-key map [up] 'previous-history-element)
(define-key map "\es" 'next-matching-history-element)
(define-key map "\er" 'previous-matching-history-element)
(define-key map [remap next-buffer] 'ignore)
(define-key map [remap previous-buffer] 'ignore)
;; Override the global binding (which calls indent-relative via
;; indent-for-tab-command). The alignment that indent-relative tries to
;; do doesn't make much sense here since the prompt messes it up.

View file

@ -1539,9 +1539,7 @@ deletion, or > if it is flagged for displaying."
(bookmark-maybe-load-default-file)
(let ((buf (get-buffer-create "*Bookmark List*")))
(if (called-interactively-p 'interactive)
(if (or (window-dedicated-p) (window-minibuffer-p))
(pop-to-buffer buf)
(switch-to-buffer buf))
(pop-to-buffer-same-window buf)
(set-buffer buf)))
(let ((inhibit-read-only t))
(erase-buffer)
@ -1843,7 +1841,8 @@ With a prefix arg, prompts for a file to save them in."
(menu (current-buffer))
(pop-up-windows t))
(delete-other-windows)
(switch-to-buffer (other-buffer))
(with-no-warnings ; We really do want to call `switch-to-buffer' here.
(switch-to-buffer (other-buffer)))
(bookmark--jump-via bmrk 'pop-to-buffer)
(bury-buffer menu)))

View file

@ -1212,11 +1212,11 @@ by buffer configuration `bs-cycle-configuration-name'."
bs--cycle-list)))
(next (car tupel))
(cycle-list (cdr tupel)))
(unless (window-dedicated-p (selected-window))
;; We don't want the frame iconified if the only window in the frame
;; happens to be dedicated; let's get the error from switch-to-buffer
(bury-buffer))
(switch-to-buffer next)
;; We don't want the frame iconified if the only window in the frame
;; happens to be dedicated.
(bury-buffer (current-buffer))
(with-no-warnings ; We really do want to call `switch-to-buffer' here.
(switch-to-buffer next))
(setq bs--cycle-list (append (cdr cycle-list)
(list (car cycle-list))))
(bs-message-without-log "Next buffers: %s"
@ -1245,7 +1245,8 @@ by buffer configuration `bs-cycle-configuration-name'."
bs--cycle-list)))
(prev-buffer (car tupel))
(cycle-list (cdr tupel)))
(switch-to-buffer prev-buffer)
(with-no-warnings ; We really do want to call `switch-to-buffer' here.
(switch-to-buffer prev-buffer))
(setq bs--cycle-list (append (last cycle-list)
(reverse (cdr (reverse cycle-list)))))
(bs-message-without-log "Previous buffers: %s"

View file

@ -54,10 +54,7 @@
;; Use color for the MS-DOS port because it doesn't support underline.
;; FIXME if MS-DOS correctly answers the (supports) question, it need
;; no longer be a special case.
(defface button '((((type pc) (class color))
(:foreground "lightblue"))
(((supports :underline t)) :underline t)
(t (:foreground "lightblue")))
(defface button '((t :inherit link))
"Default face used for buttons."
:group 'basic-faces)

View file

@ -776,7 +776,8 @@ of the appropriate type."
(goto-char (point-min)))
(defvar diary-included-files nil
"List of any diary files included in the last call to `diary-list-entries'.")
"List of any diary files included in the last call to `diary-list-entries'.
Or to `diary-mark-entries'.")
(defun diary-list-entries (date number &optional list-only)
"Create and display a buffer containing the relevant lines in `diary-file'.
@ -832,7 +833,7 @@ LIST-ONLY is non-nil, in which case it just returns the list."
(let* ((original-date date) ; save for possible use in the hooks
(date-string (calendar-date-string date))
(diary-buffer (find-buffer-visiting diary-file))
;; Dynamically bound in diary-include-other-diary-files.
;; Dynamically bound in diary-include-files.
(d-incp (and (boundp 'diary-including) diary-including))
diary-entries-list file-glob-attrs temp-buff)
(unless d-incp
@ -921,19 +922,20 @@ LIST-ONLY is non-nil, in which case it just returns the list."
(defvar original-date) ; bound in diary-list-entries
;(defvar number) ; already declared above
(defun diary-include-other-diary-files ()
"Add diary entries from included diary files to `diary-entries-list'.
(defun diary-include-files (&optional mark)
"Process diary entries from included diary files.
By default, lists included entries, but if optional argument MARK is non-nil
marks entries instead.
For example, this enables you to share common diary files.
To use, add this function to `diary-list-entries-hook'.
Specify include files using lines matching `diary-include-string', e.g.
#include \"filename\"
This is recursive; that is, included files may include other files.
See also `diary-mark-included-diary-files'."
This is recursive; that is, included files may include other files."
(goto-char (point-min))
(while (re-search-forward
(format "^%s \"\\([^\"]*\\)\"" (regexp-quote diary-include-string))
nil t)
(let ((diary-file (match-string-no-properties 1))
(diary-mark-entries-hook 'diary-mark-included-diary-files)
(diary-list-entries-hook 'diary-include-other-diary-files)
(diary-including t)
diary-hook diary-list-include-blanks efile)
@ -943,10 +945,12 @@ See also `diary-mark-included-diary-files'."
diary-included-files)
(error "Recursive diary include for %s" diary-file)
(setq diary-included-files
(append diary-included-files (list efile))
diary-entries-list
(append diary-entries-list
(diary-list-entries original-date number t))))
(append diary-included-files (list efile)))
(if mark
(diary-mark-entries)
(setq diary-entries-list
(append diary-entries-list
(diary-list-entries original-date number t)))))
(beep)
(message "Can't read included diary file %s" diary-file)
(sleep-for 2))
@ -955,6 +959,13 @@ See also `diary-mark-included-diary-files'."
(sleep-for 2))))
(goto-char (point-min)))
(defun diary-include-other-diary-files ()
"Add diary entries from included diary files to `diary-entries-list'.
To use, add this function to `diary-list-entries-hook'.
For details, see `diary-include-files'.
See also `diary-mark-included-diary-files'."
(diary-include-files))
(define-obsolete-function-alias 'include-other-diary-files
'diary-include-other-diary-files "23.1")
@ -1405,22 +1416,37 @@ marks. This is intended to deal with deleted diary entries."
(setq calendar-mark-diary-entries-flag nil)
(calendar-redraw))
(let ((diary-marking-entries-flag t)
file-glob-attrs)
(with-current-buffer (find-file-noselect (diary-check-diary-file) t)
(save-excursion
(when (eq major-mode (default-value 'major-mode)) (diary-mode))
(setq calendar-mark-diary-entries-flag t)
(message "Marking diary entries...")
(setq file-glob-attrs (nth 1 (diary-pull-attrs nil '())))
(with-syntax-table diary-syntax-table
(diary-mark-entries-1 'calendar-mark-date-pattern)
(diary-mark-sexp-entries)
;; Although it looks like mark-entries-hook runs every time,
;; diary-mark-included-diary-files binds it to nil
;; (essentially) when it runs in included files.
(run-hooks 'diary-nongregorian-marking-hook
'diary-mark-entries-hook))
(message "Marking diary entries...done")))))
(diary-buffer (find-buffer-visiting diary-file))
;; Dynamically bound in diary-include-files.
(d-incp (and (boundp 'diary-including) diary-including))
file-glob-attrs temp-buff)
(unless d-incp
(setq diary-included-files nil)
(message "Marking diary entries..."))
(unwind-protect
(with-current-buffer (or diary-buffer
(if d-incp
(setq temp-buff (generate-new-buffer
" *diary-temp*"))
(find-file-noselect
(diary-check-diary-file) t)))
(if temp-buff
;; If including, caller has already verified it is readable.
(insert-file-contents diary-file)
(if (eq major-mode (default-value 'major-mode)) (diary-mode)))
(setq calendar-mark-diary-entries-flag t)
(setq file-glob-attrs (nth 1 (diary-pull-attrs nil '())))
(with-syntax-table diary-syntax-table
(save-excursion
(diary-mark-entries-1 'calendar-mark-date-pattern)
(diary-mark-sexp-entries)
;; Although it looks like mark-entries-hook runs every time,
;; diary-mark-included-diary-files binds it to nil
;; (essentially) when it runs in included files.
(run-hooks 'diary-nongregorian-marking-hook
'diary-mark-entries-hook))))
(and temp-buff (buffer-name temp-buff) (kill-buffer temp-buff)))
(or d-incp (message "Marking diary entries...done"))))
;;;###cal-autoload
(define-obsolete-function-alias 'mark-diary-entries 'diary-mark-entries "23.1")
@ -1504,32 +1530,10 @@ is marked. See the documentation for the function `diary-list-sexp-entries'."
(defun diary-mark-included-diary-files ()
"Mark diary entries from included diary files.
For example, this enables you to share common diary files.
To use, add this function to `diary-mark-entries-hook'.
Specify include files using lines matching `diary-include-string', e.g.
#include \"filename\"
This is recursive; that is, included files may include other files.
For details, see `diary-include-files'.
See also `diary-include-other-diary-files'."
(goto-char (point-min))
(while (re-search-forward
(format "^%s \"\\([^\"]*\\)\"" (regexp-quote diary-include-string))
nil t)
(let* ((diary-file (match-string-no-properties 1))
(diary-mark-entries-hook 'diary-mark-included-diary-files)
(dbuff (find-buffer-visiting diary-file)))
(if (file-exists-p diary-file)
(if (file-readable-p diary-file)
(progn
(diary-mark-entries)
(unless dbuff
(kill-buffer (find-buffer-visiting diary-file))))
(beep)
(message "Can't read included diary file %s" diary-file)
(sleep-for 2))
(beep)
(message "Can't find included diary file %s" diary-file)
(sleep-for 2))))
(goto-char (point-min)))
(diary-include-files t))
(define-obsolete-function-alias 'mark-included-diary-files
'diary-mark-included-diary-files "23.1")

View file

@ -545,11 +545,7 @@ non-nil, the amount returned will be relative to past time worked."
(defalias 'timeclock-time-to-seconds (if (fboundp 'float-time) 'float-time
'time-to-seconds))
(defsubst timeclock-seconds-to-time (seconds)
"Convert SECONDS (a floating point number) to an Emacs time structure."
(list (floor seconds 65536)
(floor (mod seconds 65536))
(floor (* (- seconds (ffloor seconds)) 1000000))))
(defalias 'timeclock-seconds-to-time 'seconds-to-time)
;; Should today-only be removed in favour of timeclock-relative? - gm
(defsubst timeclock-when-to-leave (&optional today-only)

View file

@ -1,3 +1,13 @@
2011-07-04 Darren Hoo <darren.hoo@gmail.com> (tiny change)
* semantic/db.el (semanticdb-file-table-object): Don't bug out on
unconfigured projects if `global-ede-mode' is on (bug#8092).
2011-07-01 Paul Eggert <eggert@cs.ucla.edu>
* semantic.el (semantic-elapsed-time): Rewrite using
time-subtract and float-time.
2011-05-11 Glenn Morris <rgm@gnu.org>
* semantic/wisent/javascript.el (semantic-get-local-variables):

View file

@ -379,9 +379,7 @@ Do not set this yourself. Call `semantic-debug'.")
(defun semantic-elapsed-time (start end)
"Copied from elp.el. Was `elp-elapsed-time'.
Argument START and END bound the time being calculated."
(+ (* (- (car end) (car start)) 65536.0)
(- (car (cdr end)) (car (cdr start)))
(/ (- (car (cdr (cdr end))) (car (cdr (cdr start)))) 1000000.0)))
(float-time (time-subtract end start)))
(defun bovinate (&optional clear)
"Parse the current buffer. Show output in a temp buffer.

View file

@ -880,7 +880,7 @@ If file does not have tags available, and DONTLOAD is nil,
then load the tags for FILE, and create a new table object for it.
DONTLOAD does not affect the creation of new database objects."
;; (message "Object Translate: %s" file)
(when (file-exists-p file)
(when (and file (file-exists-p file))
(let* ((default-directory (file-name-directory file))
(tab (semanticdb-file-table-object-from-hash file))
(fullfile nil))

View file

@ -347,7 +347,7 @@ This variable is buffer-local."
" +\\)"
(regexp-opt
'("password" "Password" "passphrase" "Passphrase"
"pass phrase" "Pass phrase"))
"pass phrase" "Pass phrase" "Response"))
"\\(?:\\(?:, try\\)? *again\\| (empty for no passphrase)\\| (again)\\)?\
\\(?: for [^:]+\\)?:\\s *\\'")
"Regexp matching prompts for passwords in the inferior process.

View file

@ -1036,6 +1036,29 @@ If given a prefix (or a COMMENT argument), also prompt for a comment."
(custom-save-all)
value)
;; Some parts of Emacs might prompt the user to save customizations,
;; during startup before customizations are loaded. This function
;; handles this corner case by avoiding calling `custom-save-variable'
;; too early, which could wipe out existing customizations.
;;;###autoload
(defun customize-push-and-save (list-var elts)
"Add ELTS to LIST-VAR and save for future sessions, safely.
ELTS should be a list. This function adds each entry to the
value of LIST-VAR using `add-to-list'.
If Emacs is initialized, call `customize-save-variable' to save
the resulting list value now. Otherwise, add an entry to
`after-init-hook' to save it after initialization."
(dolist (entry elts)
(add-to-list list-var entry))
(if after-init-time
(let ((coding-system-for-read nil))
(customize-save-variable list-var (eval list-var)))
(add-hook 'after-init-hook
`(lambda ()
(customize-push-and-save ',list-var ',elts)))))
;;;###autoload
(defun customize ()
"Select a customization buffer which you can use to set user options.

View file

@ -157,7 +157,7 @@ remove them from your saved Custom file.\n\n"))
;; Load the theme settings.
(when theme
(unless (eq theme 'user)
(load-theme theme t))
(load-theme theme nil t))
(dolist (setting (get theme 'theme-settings))
(if (eq (car setting) 'theme-value)
(progn (push (nth 1 setting) vars)
@ -326,7 +326,7 @@ SPEC, if non-nil, should be a face spec to which to set the widget."
(unless (eq theme 'user)
(unless (custom-theme-name-valid-p theme)
(error "Invalid theme name `%s'" theme))
(load-theme theme t))
(load-theme theme nil t))
(let ((settings (reverse (get theme 'theme-settings))))
(dolist (setting settings)
(funcall (if (eq (car setting) 'theme-value)

View file

@ -215,7 +215,8 @@ The following keywords are meaningful:
variable. It takes two arguments, the symbol and value
given in the `defcustom' call. The default is
`custom-initialize-reset'.
:set VALUE should be a function to set the value of the symbol.
:set VALUE should be a function to set the value of the symbol
when using the Customize user interface.
It takes two arguments, the symbol to set and the value to
give it. The default choice of function is `set-default'.
:get VALUE should be a function to extract the value of symbol.
@ -854,25 +855,18 @@ See `custom-known-themes' for a list of known themes."
;; Add a new setting:
(t
(unless old
;; If the user changed the value outside of Customize, we
;; first save the current value to a fake theme, `changed'.
;; This ensures that the user-set value comes back if the
;; theme is later disabled.
(cond ((and (eq prop 'theme-value)
(boundp symbol))
(let ((sv (get symbol 'standard-value))
(val (symbol-value symbol)))
(unless (and sv (equal (eval (car sv)) val))
(setq old `((changed ,(custom-quote val)))))))
((and (facep symbol)
(not (face-attr-match-p
symbol
(custom-fix-face-spec
(face-spec-choose
(get symbol 'face-defface-spec))))))
(setq old `((changed
(,(append '(t) (custom-face-attributes-get
symbol nil)))))))))
;; If the user changed a variable outside of Customize, save
;; the value to a fake theme, `changed'. If the theme is
;; later disabled, we use this to bring back the old value.
;;
;; For faces, we just use `face-new-frame-defaults' to
;; recompute when the theme is disabled.
(when (and (eq prop 'theme-value)
(boundp symbol))
(let ((sv (get symbol 'standard-value))
(val (symbol-value symbol)))
(unless (and sv (equal (eval (car sv)) val))
(setq old `((changed ,(custom-quote val))))))))
(put symbol prop (cons (list theme value) old))
(put theme 'theme-settings
(cons (list prop symbol theme value) theme-settings))))))
@ -1119,20 +1113,29 @@ Emacs theme directory (a directory named \"themes\" in
:risky t
:version "24.1")
(defun load-theme (theme &optional no-enable)
(defun load-theme (theme &optional no-confirm no-enable)
"Load Custom theme named THEME from its file.
Normally, this also enables THEME. If optional arg NO-ENABLE is
non-nil, load THEME but don't enable it.
The theme file is named THEME-theme.el, in one of the directories
specified by `custom-theme-load-path'.
If THEME is not in `custom-safe-themes', prompt the user for
confirmation, unless optional arg NO-CONFIRM is non-nil.
Normally, this function also enables THEME; if optional arg
NO-ENABLE is non-nil, load the theme but don't enable it.
This function is normally called through Customize when setting
`custom-enabled-themes'. If used directly in your init file, it
should be called with a non-nil NO-CONFIRM argument, or after
`custom-safe-themes' has been loaded.
Return t if THEME was successfully loaded, nil otherwise."
(interactive
(list
(intern (completing-read "Load custom theme: "
(mapcar 'symbol-name
(custom-available-themes))))))
(custom-available-themes))))
nil nil))
(unless (custom-theme-name-valid-p theme)
(error "Invalid theme name `%s'" theme))
;; If reloading, clear out the old theme settings.
@ -1152,7 +1155,8 @@ Return t if THEME was successfully loaded, nil otherwise."
(setq hash (sha1 (current-buffer)))
;; Check file safety with `custom-safe-themes', prompting the
;; user if necessary.
(when (or (and (memq 'default custom-safe-themes)
(when (or no-confirm
(and (memq 'default custom-safe-themes)
(equal (file-name-directory fn)
(expand-file-name "themes/" data-directory)))
(member hash custom-safe-themes)
@ -1211,10 +1215,7 @@ query also about adding HASH to `custom-safe-themes'."
;; Offer to save to `custom-safe-themes'.
(and (or custom-file user-init-file)
(y-or-n-p "Treat this theme as safe in future sessions? ")
(let ((coding-system-for-read nil))
(push hash custom-safe-themes)
(customize-save-variable 'custom-safe-themes
custom-safe-themes)))
(customize-push-and-save 'custom-safe-themes (list hash)))
t)))))
(defun custom-theme-name-valid-p (name)
@ -1291,7 +1292,10 @@ This list does not include the `user' theme, which is set by
Customize and always takes precedence over other Custom Themes.
This variable cannot be defined inside a Custom theme; there, it
is simply ignored."
is simply ignored.
Setting this variable through Customize calls `enable-theme' or
`load-theme' for each theme in the list."
:group 'customize
:type '(repeat symbol)
:set-after '(custom-theme-directory custom-theme-load-path
@ -1345,11 +1349,33 @@ See `custom-enabled-themes' for a list of enabled themes."
;; If the face spec specified by this theme is in the
;; saved-face property, reset that property.
(when (equal (nth 3 s) (get symbol 'saved-face))
(put symbol 'saved-face (and val (cadr (car val)))))
(custom-theme-recalc-face symbol)))))
(put symbol 'saved-face (and val (cadr (car val)))))))))
;; Recompute faces on all frames.
(dolist (frame (frame-list))
;; We must reset the fg and bg color frame parameters, or
;; `face-set-after-frame-default' will use the existing
;; parameters, which could be from the disabled theme.
(set-frame-parameter frame 'background-color
(custom--frame-color-default
frame :background "background" "Background"
"unspecified-bg" "white"))
(set-frame-parameter frame 'foreground-color
(custom--frame-color-default
frame :foreground "foreground" "Foreground"
"unspecified-fg" "black"))
(face-set-after-frame-default frame))
(setq custom-enabled-themes
(delq theme custom-enabled-themes)))))
(defun custom--frame-color-default (frame attribute resource-attr resource-class
tty-default x-default)
(let ((col (face-attribute 'default attribute t)))
(cond
((and col (not (eq col 'unspecified))) col)
((null (window-system frame)) tty-default)
((setq col (x-get-resource resource-attr resource-class)) col)
(t x-default))))
(defun custom-variable-theme-value (variable)
"Return (list VALUE) indicating the custom theme value of VARIABLE.
That is to say, it specifies what the value should be according to
@ -1381,7 +1407,7 @@ This function returns nil if no custom theme specifies a value for VARIABLE."
(face-spec-recalc face frame)))
;;; XEmacs compability functions
;;; XEmacs compatibility functions
;; In XEmacs, when you reset a Custom Theme, you have to specify the
;; theme to reset it to. We just apply the next available theme, so

View file

@ -206,7 +206,8 @@ starting with or containing `no-'. If you set this variable to
expanding `yes-or-no-' signals an error because `-' is not part of a word;
but expanding `yes-or-no' looks for a word starting with `no'.
The recommended value is \"\\\\sw\\\\|\\\\s_\"."
The recommended value is nil, which will make dabbrev default to
using \"\\\\sw\\\\|\\\\s_\"."
:type '(choice (const nil)
regexp)
:group 'dabbrev)

View file

@ -56,9 +56,9 @@ into this list; they also should call `dired-log' to log the errors.")
"Compare file at point with file FILE using `diff'.
FILE defaults to the file at the mark. (That's the mark set by
\\[set-mark-command], not by Dired's \\[dired-mark] command.)
The prompted-for file is the first file given to `diff'.
The prompted-for FILE is the first file given to `diff'.
With prefix arg, prompt for second argument SWITCHES,
which is options for `diff'."
which is the string of command switches for `diff'."
(interactive
(let* ((current (dired-get-filename t))
;; Get the file at the mark.
@ -699,6 +699,9 @@ can be produced by `dired-get-marked-files', for example."
;; Commands that delete or redisplay part of the dired buffer.
(defun dired-kill-line (&optional arg)
"Kill the current line (not the files).
With a prefix argument, kill that many lines starting with the current line.
\(A negative argument kills backward.)"
(interactive "P")
(setq arg (prefix-numeric-value arg))
(let (buffer-read-only file)
@ -1008,7 +1011,7 @@ See Info node `(emacs)Subdir switches' for more details."
(dired-uncache
(if (consp dired-directory) (car dired-directory) dired-directory))
(dired-map-over-marks (let ((fname (dired-get-filename))
;; Postphone readin hook till we map
;; Postpone readin hook till we map
;; over all marked files (Bug#6810).
(dired-after-readin-hook nil))
(message "Redisplaying... %s" fname)
@ -2493,8 +2496,9 @@ with the command \\[tags-loop-continue]."
;;;###autoload
(defun dired-show-file-type (file &optional deref-symlinks)
"Print the type of FILE, according to the `file' command.
If FILE is a symbolic link and the optional argument DEREF-SYMLINKS is
true then the type of the file linked to by FILE is printed instead."
If you give a prefix to this command, and FILE is a symbolic
link, then the type of the file linked to by FILE is printed
instead."
(interactive (list (dired-get-filename t) current-prefix-arg))
(let (process-file-side-effects)
(with-temp-buffer

View file

@ -1406,7 +1406,7 @@ Considers buffers closer to the car of `buffer-list' to be more recent."
(defun dired-mark-sexp (predicate &optional unflag-p)
"Mark files for which PREDICATE returns non-nil.
With a prefix arg, unflag those files instead.
With a prefix arg, unmark or unflag those files instead.
PREDICATE is a lisp expression that can refer to the following symbols:

View file

@ -238,8 +238,6 @@ This is what the do-commands look for, and what the mark-commands store.")
;; (> baud-rate search-slow-speed)
"Non-nil means Dired shrinks the display buffer to fit the marked files.")
(defvar dired-flagging-regexp nil);; Last regexp used to flag files.
(defvar dired-file-version-alist)
;;;###autoload
@ -485,7 +483,16 @@ Return value is the number of files marked, or nil if none were marked."
`(let ((inhibit-read-only t) count)
(save-excursion
(setq count 0)
(if ,msg (message "Marking %ss..." ,msg))
(when ,msg
(message "%s %ss%s..."
(cond ((eq dired-marker-char ?\040) "Unmarking")
((eq dired-del-marker dired-marker-char)
"Flagging")
(t "Marking"))
,msg
(if (eq dired-del-marker dired-marker-char)
" for deletion"
"")))
(goto-char (point-min))
(while (not (eobp))
(if ,predicate
@ -506,24 +513,31 @@ Return value is the number of files marked, or nil if none were marked."
(defmacro dired-map-over-marks (body arg &optional show-progress
distinguish-one-marked)
"Eval BODY with point on each marked line. Return a list of BODY's results.
If no marked file could be found, execute BODY on the current line.
ARG, if non-nil, specifies the files to use instead of the marked files.
If ARG is an integer, use the next ARG (or previous -ARG, if
ARG<0) files. In that case, point is dragged along. This is
so that commands on the next ARG (instead of the marked) files
can be chained easily.
For any other non-nil value of ARG, use the current file.
If no marked file could be found, execute BODY on the current
line. ARG, if non-nil, specifies the files to use instead of the
marked files.
If ARG is an integer, use the next ARG (or previous -ARG, if
ARG<0) files. In that case, point is dragged along. This is so
that commands on the next ARG (instead of the marked) files can
be chained easily.
For any other non-nil value of ARG, use the current file.
If optional third arg SHOW-PROGRESS evaluates to non-nil,
redisplay the dired buffer after each file is processed.
No guarantee is made about the position on the marked line.
BODY must ensure this itself if it depends on this.
Search starts at the beginning of the buffer, thus the car of the list
corresponds to the line nearest to the buffer's bottom. This
is also true for (positive and negative) integer values of ARG.
redisplay the dired buffer after each file is processed.
No guarantee is made about the position on the marked line. BODY
must ensure this itself if it depends on this.
Search starts at the beginning of the buffer, thus the car of the
list corresponds to the line nearest to the buffer's bottom.
This is also true for (positive and negative) integer values of
ARG.
BODY should not be too long as it is expanded four times.
If DISTINGUISH-ONE-MARKED is non-nil, then if we find just one marked file,
return (t FILENAME) instead of (FILENAME)."
If DISTINGUISH-ONE-MARKED is non-nil, then if we find just one
marked file, return (t FILENAME) instead of (FILENAME)."
;;
;;Warning: BODY must not add new lines before point - this may cause an
;;endless loop.
@ -696,7 +710,6 @@ shell wildcards appended to select certain files). If DIRNAME is a cons,
its first element is taken as the directory name and the rest as an explicit
list of files to make directory entries for.
\\<dired-mode-map>\
You can move around in it with the usual commands.
You can flag files for deletion with \\[dired-flag-file-deletion] and then
delete them by typing \\[dired-do-flagged-delete].
Type \\[describe-mode] after entering Dired for more info.
@ -1789,8 +1802,8 @@ In Dired, you are \"editing\" a list of the files in a directory and
files for later commands or \"flag\" them for deletion, either file
by file or all files matching certain criteria.
You can move using the usual cursor motion commands.\\<dired-mode-map>
Letters no longer insert themselves. Digits are prefix arguments.
Instead, type \\[dired-flag-file-deletion] to flag a file for Deletion.
The buffer is read-only. Digits are prefix arguments.
Type \\[dired-flag-file-deletion] to flag a file `D' for deletion.
Type \\[dired-mark] to Mark a file or subdirectory for later commands.
Most commands operate on the marked files and use the current file
if no files are marked. Use a numeric prefix argument to operate on
@ -1798,9 +1811,9 @@ Type \\[dired-mark] to Mark a file or subdirectory for later commands.
to operate on the current file only. Prefix arguments override marks.
Mark-using commands display a list of failures afterwards. Type \\[dired-summary]
to see why something went wrong.
Type \\[dired-unmark] to Unmark a file or all files of a subdirectory.
Type \\[dired-unmark-backward] to back up one line and unflag.
Type \\[dired-do-flagged-delete] to eXecute the deletions requested.
Type \\[dired-unmark] to Unmark a file or all files of an inserted subdirectory.
Type \\[dired-unmark-backward] to back up one line and unmark or unflag.
Type \\[dired-do-flagged-delete] to delete (eXecute) the files flagged `D'.
Type \\[dired-find-file] to Find the current line's file
(or dired it in another buffer, if it is a directory).
Type \\[dired-find-file-other-window] to find file or dired directory in Other window.
@ -1810,12 +1823,12 @@ Type \\[dired-do-copy] to Copy files.
Type \\[dired-sort-toggle-or-edit] to toggle Sorting by name/date or change the `ls' switches.
Type \\[revert-buffer] to read all currently expanded directories aGain.
This retains all marks and hides subdirs again that were hidden before.
SPC and DEL can be used to move down and up by lines.
Use `SPC' and `DEL' to move down and up by lines.
If Dired ever gets confused, you can either type \\[revert-buffer] \
to read the
directories again, type \\[dired-do-redisplay] \
to relist a single or the marked files or a
to relist the file at point or the marked files or a
subdirectory, or type \\[dired-build-subdir-alist] to parse the buffer
again for the directory tree.
@ -3015,8 +3028,9 @@ If on a subdir headerline, mark all its files except `.' and `..'."
(dired-mark arg)))
(defun dired-unmark-backward (arg)
"In Dired, move up lines and remove deletion flag there.
Optional prefix ARG says how many lines to unflag; default is one line."
"In Dired, move up lines and remove marks or deletion flags there.
Optional prefix ARG says how many lines to unmark/unflag; default
is one line."
(interactive "p")
(dired-unmark (- arg)))
@ -3110,14 +3124,14 @@ The match is against the non-directory part of the filename. Use `^'
(defun dired-mark-symlinks (unflag-p)
"Mark all symbolic links.
With prefix argument, unflag all those files."
With prefix argument, unmark or unflag all those files."
(interactive "P")
(let ((dired-marker-char (if unflag-p ?\040 dired-marker-char)))
(dired-mark-if (looking-at dired-re-sym) "symbolic link")))
(defun dired-mark-directories (unflag-p)
"Mark all directory file lines except `.' and `..'.
With prefix argument, unflag all those files."
With prefix argument, unmark or unflag all those files."
(interactive "P")
(let ((dired-marker-char (if unflag-p ?\040 dired-marker-char)))
(dired-mark-if (and (looking-at dired-re-dir)
@ -3126,7 +3140,7 @@ With prefix argument, unflag all those files."
(defun dired-mark-executables (unflag-p)
"Mark all executable files.
With prefix argument, unflag all those files."
With prefix argument, unmark or unflag all those files."
(interactive "P")
(let ((dired-marker-char (if unflag-p ?\040 dired-marker-char)))
(dired-mark-if (looking-at dired-re-exe) "executable file")))
@ -3136,7 +3150,7 @@ With prefix argument, unflag all those files."
(defun dired-flag-auto-save-files (&optional unflag-p)
"Flag for deletion files whose names suggest they are auto save files.
A prefix argument says to unflag those files instead."
A prefix argument says to unmark or unflag those files instead."
(interactive "P")
(let ((dired-marker-char (if unflag-p ?\040 dired-del-marker)))
(dired-mark-if
@ -3176,7 +3190,7 @@ A prefix argument says to unflag those files instead."
(defun dired-flag-backup-files (&optional unflag-p)
"Flag all backup files (names ending with `~') for deletion.
With prefix argument, unflag these files."
With prefix argument, unmark or unflag these files."
(interactive "P")
(let ((dired-marker-char (if unflag-p ?\s dired-del-marker)))
(dired-mark-if
@ -3629,16 +3643,16 @@ 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" "7efcfe4f9e0913ae4a87be014010c27f")
;;;;;; dired-diff) "dired-aux" "dired-aux.el" "d7b197829c8d456cc5bc6c5fdab7c4b0")
;;; Generated autoloads from dired-aux.el
(autoload 'dired-diff "dired-aux" "\
Compare file at point with file FILE using `diff'.
FILE defaults to the file at the mark. (That's the mark set by
\\[set-mark-command], not by Dired's \\[dired-mark] command.)
The prompted-for file is the first file given to `diff'.
The prompted-for FILE is the first file given to `diff'.
With prefix arg, prompt for second argument SWITCHES,
which is options for `diff'.
which is the string of command switches for `diff'.
\(fn FILE &optional SWITCHES)" t nil)
@ -4081,8 +4095,9 @@ with the command \\[tags-loop-continue].
(autoload 'dired-show-file-type "dired-aux" "\
Print the type of FILE, according to the `file' command.
If FILE is a symbolic link and the optional argument DEREF-SYMLINKS is
true then the type of the file linked to by FILE is printed instead.
If you give a prefix to this command, and FILE is a symbolic
link, then the type of the file linked to by FILE is printed
instead.
\(fn FILE &optional DEREF-SYMLINKS)" t nil)

View file

@ -94,9 +94,27 @@ Valid symbols are `truncation', `wrap', `escape', `control',
(while (< i 256)
(aset vector i (aref dt i))
(setq i (1+ i)))
(describe-vector vector))
(describe-vector
vector 'display-table-print-array))
(help-mode))))
(defun display-table-print-array (desc)
(insert "[")
(let ((column (current-column))
(width (window-width))
string)
(dotimes (i (length desc))
(setq string (format "%s" (aref desc i)))
(cond
((>= (+ (current-column) (length string) 1)
width)
(insert "\n")
(insert (make-string column ? )))
((> i 0)
(insert " ")))
(insert string)))
(insert "]\n"))
;;;###autoload
(defun describe-current-display-table ()
"Describe the display table in use in the selected window and buffer."

View file

@ -86,7 +86,9 @@ current form for the frame (i.e. hinting or somesuch changed)."
Changes can be
The monospace font. If `font-use-system-font' is nil, the font
is not changed.
The normal font.
Xft parameters, like DPI and hinting.
The Gtk+ theme name.
The tool bar style."
(interactive "e")
(let ((type (nth 1 event))

View file

@ -39,9 +39,8 @@
(setq ,t1 (current-time))
,@forms
(setq ,t2 (current-time))
(+ (* (- (car ,t2) (car ,t1)) 65536.0)
(- (nth 1 ,t2) (nth 1 ,t1))
(* (- (nth 2 ,t2) (nth 2 ,t1)) 1.0e-6)))))
(float-time (time-subtract ,t2 ,t1)))))
(put 'benchmark-elapse 'edebug-form-spec t)
(put 'benchmark-elapse 'lisp-indent-function 0)

View file

@ -355,7 +355,7 @@ else the global value will be modified."
(defvar byte-compile-interactive-only-functions
'(beginning-of-buffer end-of-buffer replace-string replace-regexp
insert-file insert-buffer insert-file-literally previous-line next-line
goto-line comint-run delete-backward-char)
goto-line comint-run delete-backward-char switch-to-buffer)
"List of commands that are not meant to be called from Lisp.")
(defvar byte-compile-not-obsolete-vars nil

View file

@ -253,8 +253,14 @@ No problems result if this variable is not bound.
`(let ((parent (char-table-parent ,syntax)))
(unless (and parent
(not (eq parent (standard-syntax-table))))
(set-char-table-parent ,syntax (syntax-table)))))))
(set-char-table-parent ,syntax (syntax-table)))))
,(when declare-abbrev
`(unless (or (abbrev-table-get ,abbrev :parents)
;; This can happen if the major mode defines
;; the abbrev-table to be its parent's.
(eq ,abbrev local-abbrev-table))
(abbrev-table-put ,abbrev :parents
(list local-abbrev-table))))))
(use-local-map ,map)
,(when syntax `(set-syntax-table ,syntax))
,(when abbrev `(setq local-abbrev-table ,abbrev))

View file

@ -282,7 +282,7 @@ FUNSYM must be a symbol of a defined function."
;; the function so that non-local exists are still recorded. TBD:
;; I haven't tested non-local exits at all, so no guarantees.
;;
;; The 1st element is the total amount of time in usecs that have
;; The 1st element is the total amount of time in seconds that has
;; been spent inside this function. This number is added to on
;; function exit.
;;
@ -424,9 +424,7 @@ Use optional LIST if provided instead."
(defsubst elp-elapsed-time (start end)
(+ (* (- (car end) (car start)) 65536.0)
(- (car (cdr end)) (car (cdr start)))
(/ (- (car (cdr (cdr end))) (car (cdr (cdr start)))) 1000000.0)))
(float-time (time-subtract end start)))
(defun elp-wrapper (funsym interactive-p args)
"This function has been instrumented for profiling by the ELP.

View file

@ -141,6 +141,15 @@ See the functions `find-function' and `find-variable'."
(dolist (suffix (get-load-suffixes) (nreverse suffixes))
(unless (string-match "elc" suffix) (push suffix suffixes)))))
(defun find-library--load-name (library)
(let ((name library))
(dolist (dir load-path)
(let ((rel (file-relative-name library dir)))
(if (and (not (string-match "\\`\\.\\./" rel))
(< (length rel) (length name)))
(setq name rel))))
(unless (equal name library) name)))
(defun find-library-name (library)
"Return the absolute file name of the Emacs Lisp source of LIBRARY.
LIBRARY should be a string (the name of the library)."
@ -148,13 +157,23 @@ LIBRARY should be a string (the name of the library)."
;; the same name.
(if (string-match "\\.el\\(c\\(\\..*\\)?\\)\\'" library)
(setq library (replace-match "" t t library)))
(or
(or
(locate-file library
(or find-function-source-path load-path)
(find-library-suffixes))
(locate-file library
(or find-function-source-path load-path)
load-file-rep-suffixes)
(when (file-name-absolute-p library)
(let ((rel (find-library--load-name library)))
(when rel
(or
(locate-file rel
(or find-function-source-path load-path)
(find-library-suffixes))
(locate-file rel
(or find-function-source-path load-path)
load-file-rep-suffixes)))))
(error "Can't find library %s" library)))
(defvar find-function-C-source-directory

View file

@ -38,46 +38,46 @@
(define-abbrev-table 'lisp-mode-abbrev-table ())
(defvar emacs-lisp-mode-syntax-table
(let ((table (make-syntax-table)))
(let ((i 0))
(while (< i ?0)
(modify-syntax-entry i "_ " table)
(setq i (1+ i)))
(setq i (1+ ?9))
(while (< i ?A)
(modify-syntax-entry i "_ " table)
(setq i (1+ i)))
(setq i (1+ ?Z))
(while (< i ?a)
(modify-syntax-entry i "_ " table)
(setq i (1+ i)))
(setq i (1+ ?z))
(while (< i 128)
(modify-syntax-entry i "_ " table)
(setq i (1+ i)))
(modify-syntax-entry ?\s " " table)
;; Non-break space acts as whitespace.
(modify-syntax-entry ?\x8a0 " " table)
(modify-syntax-entry ?\t " " table)
(modify-syntax-entry ?\f " " table)
(modify-syntax-entry ?\n "> " table)
;; This is probably obsolete since nowadays such features use overlays.
;; ;; Give CR the same syntax as newline, for selective-display.
;; (modify-syntax-entry ?\^m "> " table)
(modify-syntax-entry ?\; "< " table)
(modify-syntax-entry ?` "' " table)
(modify-syntax-entry ?' "' " table)
(modify-syntax-entry ?, "' " table)
(modify-syntax-entry ?@ "' " table)
;; Used to be singlequote; changed for flonums.
(modify-syntax-entry ?. "_ " table)
(modify-syntax-entry ?# "' " table)
(modify-syntax-entry ?\" "\" " table)
(modify-syntax-entry ?\\ "\\ " table)
(modify-syntax-entry ?\( "() " table)
(modify-syntax-entry ?\) ")( " table)
(modify-syntax-entry ?\[ "(] " table)
(modify-syntax-entry ?\] ")[ " table))
(let ((table (make-syntax-table))
(i 0))
(while (< i ?0)
(modify-syntax-entry i "_ " table)
(setq i (1+ i)))
(setq i (1+ ?9))
(while (< i ?A)
(modify-syntax-entry i "_ " table)
(setq i (1+ i)))
(setq i (1+ ?Z))
(while (< i ?a)
(modify-syntax-entry i "_ " table)
(setq i (1+ i)))
(setq i (1+ ?z))
(while (< i 128)
(modify-syntax-entry i "_ " table)
(setq i (1+ i)))
(modify-syntax-entry ?\s " " table)
;; Non-break space acts as whitespace.
(modify-syntax-entry ?\x8a0 " " table)
(modify-syntax-entry ?\t " " table)
(modify-syntax-entry ?\f " " table)
(modify-syntax-entry ?\n "> " table)
;; This is probably obsolete since nowadays such features use overlays.
;; ;; Give CR the same syntax as newline, for selective-display.
;; (modify-syntax-entry ?\^m "> " table)
(modify-syntax-entry ?\; "< " table)
(modify-syntax-entry ?` "' " table)
(modify-syntax-entry ?' "' " table)
(modify-syntax-entry ?, "' " table)
(modify-syntax-entry ?@ "' " table)
;; Used to be singlequote; changed for flonums.
(modify-syntax-entry ?. "_ " table)
(modify-syntax-entry ?# "' " table)
(modify-syntax-entry ?\" "\" " table)
(modify-syntax-entry ?\\ "\\ " table)
(modify-syntax-entry ?\( "() " table)
(modify-syntax-entry ?\) ")( " table)
(modify-syntax-entry ?\[ "(] " table)
(modify-syntax-entry ?\] ")[ " table)
table)
"Syntax table used in `emacs-lisp-mode'.")
@ -525,7 +525,6 @@ if that value is non-nil."
"Keymap for Lisp Interaction mode.
All commands in `lisp-mode-shared-map' are inherited by this map.")
(defvar lisp-interaction-mode-abbrev-table lisp-mode-abbrev-table)
(define-derived-mode lisp-interaction-mode emacs-lisp-mode "Lisp Interaction"
"Major mode for typing and evaluating Lisp forms.
Like Lisp mode except that \\[eval-print-last-sexp] evals the Lisp expression
@ -790,25 +789,25 @@ Reinitialize the face according to the `defface' specification."
;; `defface' is macroexpanded to `custom-declare-face'.
((eq (car form) 'custom-declare-face)
;; Reset the face.
(setq face-new-frame-defaults
(assq-delete-all (eval (nth 1 form) lexical-binding)
face-new-frame-defaults))
(put (eval (nth 1 form) lexical-binding) 'face-defface-spec nil)
;; Setting `customized-face' to the new spec after calling
;; the form, but preserving the old saved spec in `saved-face',
;; imitates the situation when the new face spec is set
;; temporarily for the current session in the customize
;; buffer, thus allowing `face-user-default-spec' to use the
;; new customized spec instead of the saved spec.
;; Resetting `saved-face' temporarily to nil is needed to let
;; `defface' change the spec, regardless of a saved spec.
(prog1 `(prog1 ,form
(put ,(nth 1 form) 'saved-face
',(get (eval (nth 1 form) lexical-binding)
'saved-face))
(put ,(nth 1 form) 'customized-face
,(nth 2 form)))
(put (eval (nth 1 form) lexical-binding) 'saved-face nil)))
(let ((face-symbol (eval (nth 1 form) lexical-binding)))
(setq face-new-frame-defaults
(assq-delete-all face-symbol face-new-frame-defaults))
(put face-symbol 'face-defface-spec nil)
(put face-symbol 'face-documentation (nth 3 form))
;; Setting `customized-face' to the new spec after calling
;; the form, but preserving the old saved spec in `saved-face',
;; imitates the situation when the new face spec is set
;; temporarily for the current session in the customize
;; buffer, thus allowing `face-user-default-spec' to use the
;; new customized spec instead of the saved spec.
;; Resetting `saved-face' temporarily to nil is needed to let
;; `defface' change the spec, regardless of a saved spec.
(prog1 `(prog1 ,form
(put ,(nth 1 form) 'saved-face
',(get face-symbol 'saved-face))
(put ,(nth 1 form) 'customized-face
,(nth 2 form)))
(put face-symbol 'saved-face nil))))
((eq (car form) 'progn)
(cons 'progn (mapcar 'eval-defun-1 (cdr form))))
(t form)))

View file

@ -714,8 +714,7 @@ If SUBEXP is non-nil mark only the corresponding sub-expressions."
(remove-hook 'after-change-functions 'reb-auto-update t)
(remove-hook 'kill-buffer-hook 'reb-kill-buffer t)
(when (reb-mode-buffer-p)
(reb-delete-overlays)
(funcall (or (default-value 'major-mode) 'fundamental-mode)))))
(reb-delete-overlays))))
;; continue standard unloading
nil)

View file

@ -229,14 +229,18 @@ one of those elements share the same precedence level and associativity."
;; the trouble, and it lets the writer of the BNF
;; be a bit more sloppy by skipping uninteresting base
;; cases which are terminals but not OPs.
(assert (not (member (cadr rhs) nts)))
(when (member (cadr rhs) nts)
(error "Adjacent non-terminals: %s %s"
(car rhs) (cadr rhs)))
(pushnew (cadr rhs) first-ops)))
(let ((shr (reverse rhs)))
(if (not (member (car shr) nts))
(pushnew (car shr) last-ops)
(pushnew (car shr) last-nts)
(when (consp (cdr shr))
(assert (not (member (cadr shr) nts)))
(when (member (cadr shr) nts)
(error "Adjacent non-terminals: %s %s"
(cadr shr) (car shr)))
(pushnew (cadr shr) last-ops)))))
(push (cons nt first-ops) first-ops-table)
(push (cons nt last-ops) last-ops-table)

View file

@ -110,38 +110,16 @@ of SECS seconds since the epoch. SECS may be a fraction."
(defun timer-relative-time (time secs &optional usecs)
"Advance TIME by SECS seconds and optionally USECS microseconds.
SECS may be either an integer or a floating point number."
;; FIXME: we should just use (time-add time (list 0 secs usecs))
(let ((high (car time))
(low (if (consp (cdr time)) (nth 1 time) (cdr time)))
(micro (if (numberp (car-safe (cdr-safe (cdr time))))
(nth 2 time)
0)))
;; Add
(if usecs (setq micro (+ micro usecs)))
(if (floatp secs)
(setq micro (+ micro (floor (* 1000000 (- secs (floor secs)))))))
(setq low (+ low (floor secs)))
;; Normalize
;; `/' rounds towards zero while `mod' returns a positive number,
;; so we can't rely on (= a (+ (* 100 (/ a 100)) (mod a 100))).
(setq low (+ low (/ micro 1000000) (if (< micro 0) -1 0)))
(setq micro (mod micro 1000000))
(setq high (+ high (/ low 65536) (if (< low 0) -1 0)))
(setq low (logand low 65535))
(list high low (and (/= micro 0) micro))))
(let ((delta (if (floatp secs)
(seconds-to-time secs)
(list (floor secs 65536) (mod secs 65536)))))
(if usecs
(setq delta (time-add delta (list 0 0 usecs))))
(time-add time delta)))
(defun timer--time-less-p (t1 t2)
"Say whether time value T1 is less than time value T2."
;; FIXME just use time-less-p.
(destructuring-bind (high1 low1 micro1) (timer--time t1)
(destructuring-bind (high2 low2 micro2) (timer--time t2)
(or (< high1 high2)
(and (= high1 high2)
(or (< low1 low2)
(and (= low1 low2)
(< micro1 micro2))))))))
(time-less-p (timer--time t1) (timer--time t2)))
(defun timer-inc-time (timer secs &optional usecs)
"Increment the time set in TIMER by SECS seconds and USECS microseconds.
@ -273,10 +251,7 @@ how many will really happen.")
"Calculate number of seconds from when TIMER will run, until TIME.
TIMER is a timer, and stands for the time when its next repeat is scheduled.
TIME is a time-list."
;; FIXME: (float-time (time-subtract (timer--time timer) time))
(let ((high (- (car time) (timer--high-seconds timer)))
(low (- (nth 1 time) (timer--low-seconds timer))))
(+ low (* high 65536))))
(float-time (time-subtract time (timer--time timer))))
(defun timer-event-handler (timer)
"Call the handler for the timer TIMER.

View file

@ -1,9 +1,10 @@
;;; emacs-lock.el --- prevents you from exiting Emacs if a buffer is locked
;;; emacs-lock.el --- protect buffers against killing or exiting -*- lexical-binding: t -*-
;; Copyright (C) 1994, 1997, 2001-2011 Free Software Foundation, Inc
;; Copyright (C) 2011 Free Software Foundation, Inc
;; Author: Tom Wurgler <twurgler@goodyear.com>
;; Created: 12/8/94
;; Author: Juanma Barranquero <lekktu@gmail.com>
;; Inspired by emacs-lock.el by Tom Wurgler <twurgler@goodyear.com>
;; Maintainer: FSF
;; Keywords: extensions, processes
;; This file is part of GNU Emacs.
@ -23,78 +24,220 @@
;;; Commentary:
;; This code sets a buffer-local variable to t if toggle-emacs-lock is run,
;; then if the user attempts to exit Emacs, the locked buffer name will be
;; displayed and the exit aborted. This is just a way of protecting
;; yourself from yourself. For example, if you have a shell running a big
;; program and exiting Emacs would abort that program, you may want to lock
;; that buffer, then if you forget about it after a while, you won't
;; accidentally exit Emacs. To unlock the buffer, just goto the buffer and
;; run toggle-emacs-lock again.
;; This package defines a minor mode Emacs Lock to mark a buffer as
;; protected against accidental killing, or exiting Emacs, or both.
;; Buffers associated with inferior modes, like shell or telnet, can
;; be treated specially, by auto-unlocking them if their interior
;; processes are dead.
;;; Code:
(defvar emacs-lock-from-exiting nil
"Whether Emacs is locked to prevent exiting. See `check-emacs-lock'.")
(make-variable-buffer-local 'emacs-lock-from-exiting)
(defgroup emacs-lock nil
"Emacs-Lock mode."
:version "24.1"
:group 'convenience)
(defvar emacs-lock-buffer-locked nil
"Whether a shell or telnet buffer was locked when its process was killed.")
(make-variable-buffer-local 'emacs-lock-buffer-locked)
(put 'emacs-lock-buffer-locked 'permanent-local t)
(defcustom emacs-lock-default-locking-mode 'all
"Default locking mode of Emacs-Locked buffers.
(defun check-emacs-lock ()
"Check if variable `emacs-lock-from-exiting' is t for any buffer.
If any locked buffer is found, signal error and display the buffer's name."
(save-excursion
(dolist (buffer (buffer-list))
(set-buffer buffer)
(when emacs-lock-from-exiting
(error "Emacs is locked from exit due to buffer: %s" (buffer-name))))))
Its value is used as the default for `emacs-lock-mode' (which
see) the first time that Emacs Lock mode is turned on in a buffer
without passing an explicit locking mode.
(defun toggle-emacs-lock ()
"Toggle `emacs-lock-from-exiting' for the current buffer.
See `check-emacs-lock'."
(interactive)
(setq emacs-lock-from-exiting (not emacs-lock-from-exiting))
(if emacs-lock-from-exiting
(message "Buffer is now locked")
(message "Buffer is now unlocked")))
Possible values are:
exit -- Emacs cannot exit while the buffer is locked
kill -- the buffer cannot be killed, but Emacs can exit as usual
all -- the buffer is locked against both actions
nil -- the buffer is not locked"
:type '(choice
(const :tag "Do not allow Emacs to exit" exit)
(const :tag "Do not allow killing the buffer" kill)
(const :tag "Do not allow killing the buffer or exiting Emacs" all)
(const :tag "Do not lock the buffer" nil))
:group 'emacs-lock
:version "24.1")
(defun emacs-lock-check-buffer-lock ()
"Check if variable `emacs-lock-from-exiting' is t for a buffer.
If the buffer is locked, signal error and display its name."
(when emacs-lock-from-exiting
(error "Buffer `%s' is locked, can't delete it" (buffer-name))))
;; Note: as auto-unlocking can lead to data loss, it would be better
;; to default to nil; but the value below is for compatibility with
;; the old emacs-lock.el.
(defcustom emacs-lock-unlockable-modes '((shell-mode . all)
(telnet-mode . all))
"Alist of auto-unlockable modes.
Each element is a pair (MAJOR-MODE . ACTION), where ACTION is
one of `kill', `exit' or `all'. Buffers with matching major
modes are auto-unlocked for the specific action if their
inferior processes are not alive. If this variable is t, all
buffers associated to inferior processes are auto-unlockable
for both actions (NOT RECOMMENDED)."
:type '(choice
(const :tag "All buffers with inferior processes" t)
(repeat :tag "Selected modes"
(cons :tag "Set auto-unlock for"
(symbol :tag "Major mode")
(radio
(const :tag "Allow exiting" exit)
(const :tag "Allow killing" kill)
(const :tag "Allow both" all)))))
:group 'emacs-lock
:version "24.1")
; These next defuns make it so if you exit a shell that is locked, the lock
; is shut off for that shell so you can exit Emacs. Same for telnet.
; Also, if a shell or a telnet buffer was locked and the process killed,
; turn the lock back on again if the process is restarted.
(defvar emacs-lock-mode nil
"If non-nil, the current buffer is locked.
It can be one of the following values:
exit -- Emacs cannot exit while the buffer is locked
kill -- the buffer cannot be killed, but Emacs can exit as usual
all -- the buffer is locked against both actions
nil -- the buffer is not locked")
(make-variable-buffer-local 'emacs-lock-mode)
(put 'emacs-lock-mode 'permanent-local t)
(defun emacs-lock-shell-sentinel ()
(set-process-sentinel
(get-buffer-process (buffer-name)) (function emacs-lock-clear-sentinel)))
(defvar emacs-lock--old-mode nil
"Most recent locking mode set on the buffer.
Internal use only.")
(make-variable-buffer-local 'emacs-lock--old-mode)
(put 'emacs-lock--old-mode 'permanent-local t)
(defun emacs-lock-clear-sentinel (_proc _str)
(if emacs-lock-from-exiting
(defvar emacs-lock--try-unlocking nil
"Non-nil if current buffer should be checked for auto-unlocking.
Internal use only.")
(make-variable-buffer-local 'emacs-lock--try-unlocking)
(put 'emacs-lock--try-unlocking 'permanent-local t)
(defun emacs-lock-live-process-p (buffer-or-name)
"Return t if BUFFER-OR-NAME is associated with a live process."
(let ((proc (get-buffer-process buffer-or-name)))
(and proc (process-live-p proc))))
(defun emacs-lock--can-auto-unlock (action)
"Return t if the current buffer can auto-unlock for ACTION.
ACTION must be one of `kill' or `exit'.
See `emacs-lock-unlockable-modes'."
(and emacs-lock--try-unlocking
(not (emacs-lock-live-process-p (current-buffer)))
(or (eq emacs-lock-unlockable-modes t)
(let ((unlock (cdr (assq major-mode emacs-lock-unlockable-modes))))
(or (eq unlock 'all) (eq unlock action))))))
(defun emacs-lock--exit-locked-buffer ()
"Return the name of the first exit-locked buffer found."
(save-current-buffer
(catch :found
(dolist (buffer (buffer-list))
(set-buffer buffer)
(unless (or (emacs-lock--can-auto-unlock 'exit)
(memq emacs-lock-mode '(nil kill)))
(throw :found (buffer-name))))
nil)))
(defun emacs-lock--kill-emacs-hook ()
"Signal an error if any buffer is exit-locked.
Used from `kill-emacs-hook' (which see)."
(let ((buffer-name (emacs-lock--exit-locked-buffer)))
(when buffer-name
(error "Emacs cannot exit because buffer %S is locked" buffer-name))))
(defun emacs-lock--kill-emacs-query-functions ()
"Display a message if any buffer is exit-locked.
Return a value appropriate for `kill-emacs-query-functions' (which see)."
(let ((locked (emacs-lock--exit-locked-buffer)))
(or (not locked)
(progn
(message "Emacs cannot exit because buffer %S is locked" locked)
nil))))
(defun emacs-lock--kill-buffer-query-functions ()
"Display a message if the current buffer is kill-locked.
Return a value appropriate for `kill-buffer-query-functions' (which see)."
(or (emacs-lock--can-auto-unlock 'kill)
(memq emacs-lock-mode '(nil exit))
(progn
(setq emacs-lock-from-exiting nil)
(setq emacs-lock-buffer-locked t)
(message "Buffer is now unlocked"))
(setq emacs-lock-buffer-locked nil)))
(message "Buffer %S is locked and cannot be killed" (buffer-name))
nil)))
(defun emacs-lock-was-buffer-locked ()
(if emacs-lock-buffer-locked
(setq emacs-lock-from-exiting t)))
(defun emacs-lock--set-mode (mode arg)
"Setter function for `emacs-lock-mode'."
(setq emacs-lock-mode
(cond ((memq arg '(all exit kill))
;; explicit locking mode arg, use it
arg)
((and (eq arg current-prefix-arg) (consp current-prefix-arg))
;; called with C-u M-x emacs-lock-mode, so ask the user
(intern (completing-read "Locking mode: "
'("all" "exit" "kill")
nil t nil nil
(symbol-name
emacs-lock-default-locking-mode))))
((eq mode t)
;; turn on, so use previous setting, or customized default
(or emacs-lock--old-mode emacs-lock-default-locking-mode))
(t
;; anything else (turn off)
mode))))
;;;###autoload
(define-minor-mode emacs-lock-mode
"Toggle Emacs Lock mode in the current buffer.
With \\[universal-argument], ask for the locking mode to be used.
With other prefix ARG, turn mode on if ARG is positive, off otherwise.
Initially, if the user does not pass an explicit locking mode, it defaults
to `emacs-lock-default-locking-mode' (which see); afterwards, the locking
mode most recently set on the buffer is used instead.
When called from Elisp code, ARG can be any locking mode:
exit -- Emacs cannot exit while the buffer is locked
kill -- the buffer cannot be killed, but Emacs can exit as usual
all -- the buffer is locked against both actions
Other values are interpreted as usual."
:init-value nil
:lighter (""
(emacs-lock--try-unlocking " locked:" " Locked:")
(:eval (symbol-name emacs-lock-mode)))
:group 'emacs-lock
:variable (emacs-lock-mode .
(lambda (mode)
(emacs-lock--set-mode mode arg)))
(when emacs-lock-mode
(setq emacs-lock--old-mode emacs-lock-mode)
(setq emacs-lock--try-unlocking
(and (if (eq emacs-lock-unlockable-modes t)
(emacs-lock-live-process-p (current-buffer))
(assq major-mode emacs-lock-unlockable-modes))
t))))
(unless noninteractive
(add-hook 'kill-emacs-hook 'check-emacs-lock))
(add-hook 'kill-buffer-hook 'emacs-lock-check-buffer-lock)
(add-hook 'shell-mode-hook 'emacs-lock-was-buffer-locked)
(add-hook 'shell-mode-hook 'emacs-lock-shell-sentinel)
(add-hook 'telnet-mode-hook 'emacs-lock-was-buffer-locked)
(add-hook 'telnet-mode-hook 'emacs-lock-shell-sentinel)
(add-hook 'kill-buffer-query-functions 'emacs-lock--kill-buffer-query-functions)
;; We set a hook in both kill-emacs-hook and kill-emacs-query-functions because
;; we really want to use k-e-q-f to stop as soon as possible, but don't want to
;; be caught by surprise if someone calls `kill-emacs' instead.
(add-hook 'kill-emacs-hook 'emacs-lock--kill-emacs-hook)
(add-hook 'kill-emacs-query-functions 'emacs-lock--kill-emacs-query-functions))
(defun emacs-lock-unload-function ()
"Unload the Emacs Lock library."
(catch :continue
(dolist (buffer (buffer-list))
(set-buffer buffer)
(when emacs-lock-mode
(if (y-or-n-p (format "Buffer %S is locked, unlock it? " (buffer-name)))
(emacs-lock-mode -1)
(message "Unloading of feature `emacs-lock' aborted.")
(throw :continue t))))
;; continue standard unloading
nil))
;;; Compatibility
(define-obsolete-variable-alias 'emacs-lock-from-exiting 'emacs-lock-mode "24.1")
(defun toggle-emacs-lock ()
"Toggle `emacs-lock-from-exiting' for the current buffer."
(interactive)
(call-interactively 'emacs-lock-mode))
(make-obsolete 'toggle-emacs-lock 'emacs-lock-mode "24.1")
(provide 'emacs-lock)

View file

@ -1,3 +1,8 @@
2011-07-04 Vivek Dasmohapatra <vivek@etla.org>
* erc.el (erc-generate-new-buffer-name): Reuse old buffer names
when reconnecting (bug#5563).
2011-06-23 Lars Magne Ingebrigtsen <larsi@gnus.org>
* erc.el (erc-ssl): Made into a synonym for erc-tls, which

View file

@ -1555,26 +1555,33 @@ symbol, it may have these values:
(defun erc-generate-new-buffer-name (server port target &optional proc)
"Create a new buffer name based on the arguments."
(when (numberp port) (setq port (number-to-string port)))
(let* ((buf-name (or target
(or (let ((name (concat server ":" port)))
(when (> (length name) 1)
name))
; This fallback should in fact never happen
"*erc-server-buffer*"))))
(let ((buf-name (or target
(or (let ((name (concat server ":" port)))
(when (> (length name) 1)
name))
;; This fallback should in fact never happen
"*erc-server-buffer*")))
buffer-name)
;; Reuse existing buffers, but not if the buffer is a connected server
;; buffer and not if its associated with a different server than the
;; current ERC buffer.
(if (and erc-reuse-buffers
(get-buffer buf-name)
(or target
(with-current-buffer (get-buffer buf-name)
(and (erc-server-buffer-p)
(not (erc-server-process-alive)))))
(with-current-buffer (get-buffer buf-name)
(and (string= erc-session-server server)
(erc-port-equal erc-session-port port))))
buf-name
(generate-new-buffer-name buf-name))))
;; if buf-name is taken by a different connection (or by something !erc)
;; then see if "buf-name/server" meets the same criteria
(dolist (candidate (list buf-name (concat buf-name "/" server)))
(if (and (not buffer-name)
erc-reuse-buffers
(get-buffer candidate)
(or target
(with-current-buffer (get-buffer candidate)
(and (erc-server-buffer-p)
(not (erc-server-process-alive)))))
(with-current-buffer (get-buffer candidate)
(and (string= erc-session-server server)
(erc-port-equal erc-session-port port))))
(setq buffer-name candidate)))
;; if buffer-name is unset, neither candidate worked out for us,
;; fallback to the old <N> uniquification method:
(or buffer-name (generate-new-buffer-name buf-name)) ))
(defun erc-get-buffer-create (server port target &optional proc)
"Create a new buffer based on the arguments."
@ -2362,7 +2369,7 @@ If STRING is nil, the function does nothing."
(cond ((integerp elt) ; POSITION
(incf (car list) shift))
((or (atom elt) ; nil, EXTENT
;; (eq t (car elt)) ; (t HIGH . LOW)
;; (eq t (car elt)) ; (t . TIME)
(markerp (car elt))) ; (MARKER . DISTANCE)
nil)
((integerp (car elt)) ; (BEGIN . END)
@ -6493,4 +6500,3 @@ Otherwise, connect to HOST:PORT as USER and /join CHANNEL."
;; indent-tabs-mode: t
;; tab-width: 8
;; End:

View file

@ -57,6 +57,13 @@ properties to colorize its output based on the setting of
:type 'hook
:group 'eshell-ls)
(defcustom eshell-ls-date-format "%Y-%m-%d"
"How to display time information in `eshell-ls-file'.
This is passed to `format-time-string' as a format string.
To display the date using the current locale, use \"%b \%e\"."
:type 'string
:group 'eshell-ls)
(defcustom eshell-ls-initial-args nil
"If non-nil, this list of args is included before any call to `ls'.
This is useful for enabling human-readable format (-h), for example."
@ -508,7 +515,7 @@ whose cdr is the list of file attributes."
str))
" " (format-time-string
(concat
"%b %e "
eshell-ls-date-format " "
(if (= (nth 5 (decode-time (current-time)))
(nth 5 (decode-time
(nth (cond

View file

@ -120,6 +120,7 @@ only if that output can be presented in its entirely in the Eshell window."
(defcustom eshell-smart-display-navigate-list
'(insert-parentheses
mouse-yank-at-click
mouse-yank-primary
mouse-yank-secondary
yank-pop
yank-rectangle

View file

@ -1255,7 +1255,7 @@ arg, prompt for a regular expression."
(insert
(substitute-command-keys
(concat
"Use "
"\\<help-mode-map>>Use "
(if (display-mouse-p) "\\[help-follow-mouse] or ")
"\\[help-follow] on a face name to customize it\n"
"or on its sample text for a description of the face.\n\n")))
@ -1821,109 +1821,6 @@ Return nil if it has no specified face."
(cond ((memq 'background-color face) (cdr (memq 'background-color face)))
((memq ':background face) (cadr (memq ':background face)))))
(t nil)))) ; Invalid face value.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Background mode.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defcustom frame-background-mode nil
"The brightness of the background.
Set this to the symbol `dark' if your background color is dark,
`light' if your background is light, or nil (automatic by default)
if you want Emacs to examine the brightness for you. Don't set this
variable with `setq'; this won't have the expected effect."
:group 'faces
:set #'(lambda (var value)
(set-default var value)
(mapc 'frame-set-background-mode (frame-list)))
:initialize 'custom-initialize-changed
:type '(choice (const dark)
(const light)
(const :tag "automatic" nil)))
(declare-function x-get-resource "frame.c"
(attribute class &optional component subclass))
(defvar inhibit-frame-set-background-mode nil)
(defun frame-set-background-mode (frame &optional keep-face-specs)
"Set up display-dependent faces on FRAME.
Display-dependent faces are those which have different definitions
according to the `background-mode' and `display-type' frame parameters.
If optional arg KEEP-FACE-SPECS is non-nil, don't recalculate
face specs for the new background mode."
(unless inhibit-frame-set-background-mode
(let* ((bg-resource
(and (window-system frame)
(x-get-resource "backgroundMode" "BackgroundMode")))
(bg-color (frame-parameter frame 'background-color))
(terminal-bg-mode (terminal-parameter frame 'background-mode))
(tty-type (tty-type frame))
(default-bg-mode
(if (or (window-system frame)
(and tty-type
(string-match "^\\(xterm\\|\\rxvt\\|dtterm\\|eterm\\)"
tty-type)))
'light
'dark))
(non-default-bg-mode (if (eq default-bg-mode 'light) 'dark 'light))
(bg-mode
(cond (frame-background-mode)
(bg-resource (intern (downcase bg-resource)))
(terminal-bg-mode)
((equal bg-color "unspecified-fg") ; inverted colors
non-default-bg-mode)
((not (color-values bg-color frame))
default-bg-mode)
((>= (apply '+ (color-values bg-color frame))
;; Just looking at the screen, colors whose
;; values add up to .6 of the white total
;; still look dark to me.
(* (apply '+ (color-values "white" frame)) .6))
'light)
(t 'dark)))
(display-type
(cond ((null (window-system frame))
(if (tty-display-color-p frame) 'color 'mono))
((display-color-p frame)
'color)
((x-display-grayscale-p frame)
'grayscale)
(t 'mono)))
(old-bg-mode
(frame-parameter frame 'background-mode))
(old-display-type
(frame-parameter frame 'display-type)))
(unless (and (eq bg-mode old-bg-mode) (eq display-type old-display-type))
(let ((locally-modified-faces nil)
;; Prevent face-spec-recalc from calling this function
;; again, resulting in a loop (bug#911).
(inhibit-frame-set-background-mode t)
(params (list (cons 'background-mode bg-mode)
(cons 'display-type display-type))))
(if keep-face-specs
(modify-frame-parameters frame params)
;; If we are recomputing face specs, first collect a list
;; of faces that don't match their face-specs. These are
;; the faces modified on FRAME, and we avoid changing them
;; below. Use a negative list to avoid consing (we assume
;; most faces are unmodified).
(dolist (face (face-list))
(and (not (get face 'face-override-spec))
(not (face-spec-match-p face
(face-user-default-spec face)
(selected-frame)))
(push face locally-modified-faces)))
;; Now change to the new frame parameters
(modify-frame-parameters frame params)
;; For all unmodified named faces, choose face specs
;; matching the new frame parameters.
(dolist (face (face-list))
(unless (memq face locally-modified-faces)
(face-spec-recalc face frame)))))))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@ -2020,7 +1917,8 @@ settings, X resources, and `face-new-frame-defaults'.
Finally, apply any relevant face attributes found amongst the
frame parameters in PARAMETERS."
(let ((window-system-p (memq (window-system frame) '(x w32))))
(dolist (face (nreverse (face-list))) ;Why reverse? --Stef
;; The `reverse' is so that `default' goes first.
(dolist (face (nreverse (face-list)))
(condition-case ()
(progn
;; Initialize faces from face spec and custom theme.

View file

@ -1341,8 +1341,8 @@ automatically choosing a major mode, use \\[find-file-literally]."
(confirm-nonexistent-file-or-buffer)))
(let ((value (find-file-noselect filename nil nil wildcards)))
(if (listp value)
(mapcar 'switch-to-buffer (nreverse value))
(switch-to-buffer value))))
(mapcar #'pop-to-buffer-same-window (nreverse value))
(pop-to-buffer-same-window value))))
(defun find-file-other-window (filename &optional wildcards)
"Edit file FILENAME, in another window.
@ -2268,7 +2268,12 @@ since only a single case-insensitive search through the alist is made."
("\\.icn\\'" . icon-mode)
("\\.sim\\'" . simula-mode)
("\\.mss\\'" . scribe-mode)
;; The Fortran standard does not say anything about file extensions.
;; .f90 was widely used for F90, now we seem to be trapped into
;; using a different extension for each language revision.
;; Anyway, the following extensions are supported by gfortran.
("\\.f9[05]\\'" . f90-mode)
("\\.f0[38]\\'" . f90-mode)
("\\.indent\\.pro\\'" . fundamental-mode) ; to avoid idlwave-mode
("\\.\\(pro\\|PRO\\)\\'" . idlwave-mode)
("\\.srt\\'" . srecode-template-mode)
@ -2938,16 +2943,7 @@ n -- to ignore the local variables list.")
(setq char nil)))
(kill-buffer buf)
(when (and offer-save (= char ?!) unsafe-vars)
(dolist (elt unsafe-vars)
(add-to-list 'safe-local-variable-values elt))
;; When this is called from desktop-restore-file-buffer,
;; coding-system-for-read may be non-nil. Reset it before
;; writing to .emacs.
(if (or custom-file user-init-file)
(let ((coding-system-for-read nil))
(customize-save-variable
'safe-local-variable-values
safe-local-variable-values))))
(customize-push-and-save 'safe-local-variable-values unsafe-vars))
(memq char '(?! ?\s ?y))))))
(defun hack-local-variables-prop-line (&optional mode-only)
@ -5564,7 +5560,8 @@ default directory. However, if FULL is non-nil, they are absolute."
contents)
(while dirs
(when (or (null (car dirs)) ; Possible if DIRPART is not wild.
(file-directory-p (directory-file-name (car dirs))))
(and (file-directory-p (directory-file-name (car dirs)))
(file-readable-p (car dirs))))
(let ((this-dir-contents
;; Filter out "." and ".."
(delq nil

View file

@ -86,8 +86,7 @@ them for `find-ls-option'."
(defcustom find-grep-options
(if (or (eq system-type 'berkeley-unix)
(string-match "solaris2" system-configuration)
(string-match "irix" system-configuration))
(string-match "solaris2\\|irix" system-configuration))
"-s" "-q")
"Option to grep to be as silent as possible.
On Berkeley systems, this is `-s'; on Posix, and with GNU grep, `-q' does it.

View file

@ -1904,7 +1904,7 @@ Sets various variables using `font-lock-defaults' and
(defface font-lock-builtin-face
'((((class grayscale) (background light)) (:foreground "LightGray" :weight bold))
(((class grayscale) (background dark)) (:foreground "DimGray" :weight bold))
(((class color) (min-colors 88) (background light)) (:foreground "MediumOrchid4"))
(((class color) (min-colors 88) (background light)) (:foreground "dark slate blue"))
(((class color) (min-colors 88) (background dark)) (:foreground "LightSteelBlue"))
(((class color) (min-colors 16) (background light)) (:foreground "Orchid"))
(((class color) (min-colors 16) (background dark)) (:foreground "LightSteelBlue"))

View file

@ -847,6 +847,116 @@ If there is no frame by that name, signal an error."
(if frame
(select-frame-set-input-focus frame)
(error "There is no frame named `%s'" name))))
;;;; Background mode.
(defcustom frame-background-mode nil
"The brightness of the background.
Set this to the symbol `dark' if your background color is dark,
`light' if your background is light, or nil (automatic by default)
if you want Emacs to examine the brightness for you. Don't set this
variable with `setq'; this won't have the expected effect."
:group 'faces
:set #'(lambda (var value)
(set-default var value)
(mapc 'frame-set-background-mode (frame-list)))
:initialize 'custom-initialize-changed
:type '(choice (const dark)
(const light)
(const :tag "automatic" nil)))
(declare-function x-get-resource "frame.c"
(attribute class &optional component subclass))
(defvar inhibit-frame-set-background-mode nil)
(defun frame-set-background-mode (frame &optional keep-face-specs)
"Set up display-dependent faces on FRAME.
Display-dependent faces are those which have different definitions
according to the `background-mode' and `display-type' frame parameters.
If optional arg KEEP-FACE-SPECS is non-nil, don't recalculate
face specs for the new background mode."
(unless inhibit-frame-set-background-mode
(let* ((frame-default-bg-mode (frame-terminal-default-bg-mode frame))
(bg-color (frame-parameter frame 'background-color))
(tty-type (tty-type frame))
(default-bg-mode
(if (or (window-system frame)
(and tty-type
(string-match "^\\(xterm\\|\\rxvt\\|dtterm\\|eterm\\)"
tty-type)))
'light
'dark))
(non-default-bg-mode (if (eq default-bg-mode 'light) 'dark 'light))
(bg-mode
(cond (frame-default-bg-mode)
((equal bg-color "unspecified-fg") ; inverted colors
non-default-bg-mode)
((not (color-values bg-color frame))
default-bg-mode)
((>= (apply '+ (color-values bg-color frame))
;; Just looking at the screen, colors whose
;; values add up to .6 of the white total
;; still look dark to me.
(* (apply '+ (color-values "white" frame)) .6))
'light)
(t 'dark)))
(display-type
(cond ((null (window-system frame))
(if (tty-display-color-p frame) 'color 'mono))
((display-color-p frame)
'color)
((x-display-grayscale-p frame)
'grayscale)
(t 'mono)))
(old-bg-mode
(frame-parameter frame 'background-mode))
(old-display-type
(frame-parameter frame 'display-type)))
(unless (and (eq bg-mode old-bg-mode) (eq display-type old-display-type))
(let ((locally-modified-faces nil)
;; Prevent face-spec-recalc from calling this function
;; again, resulting in a loop (bug#911).
(inhibit-frame-set-background-mode t)
(params (list (cons 'background-mode bg-mode)
(cons 'display-type display-type))))
(if keep-face-specs
(modify-frame-parameters frame params)
;; If we are recomputing face specs, first collect a list
;; of faces that don't match their face-specs. These are
;; the faces modified on FRAME, and we avoid changing them
;; below. Use a negative list to avoid consing (we assume
;; most faces are unmodified).
(dolist (face (face-list))
(and (not (get face 'face-override-spec))
(not (face-spec-match-p face
(face-user-default-spec face)
(selected-frame)))
(push face locally-modified-faces)))
;; Now change to the new frame parameters
(modify-frame-parameters frame params)
;; For all unmodified named faces, choose face specs
;; matching the new frame parameters.
(dolist (face (face-list))
(unless (memq face locally-modified-faces)
(face-spec-recalc face frame)))))))))
(defun frame-terminal-default-bg-mode (frame)
"Return the default background mode of FRAME.
This checks the `frame-background-mode' variable, the X resource
named \"backgroundMode\" (if FRAME is an X frame), and finally
the `background-mode' terminal parameter."
(or frame-background-mode
(let ((bg-resource
(and (window-system frame)
(x-get-resource "backgroundMode" "BackgroundMode"))))
(if bg-resource
(intern (downcase bg-resource))))
(terminal-parameter frame 'background-mode)))
;;;; Frame configurations

View file

@ -192,7 +192,7 @@ frame parameter is used."
(concat
"Select fringe mode for "
(if all-frames "all frames" "selected frame")
" (type ? for list): ")
": ")
fringe-styles nil t))
(style (assoc (downcase mode) fringe-styles)))
(if style (cdr style)

View file

@ -1,3 +1,307 @@
2011-07-06 Glenn Morris <rgm@gnu.org>
* gnus-group.el (gnus-read-ephemeral-emacs-bug-group): Silence compiler.
2011-07-05 Lars Magne Ingebrigtsen <larsi@gnus.org>
* gnus.el (gnus-refer-article-method): Remove mention of nnspool, which
no longer is much used.
(gnus-summary-line-format): Link to "Marking Articles" instead of "Read
Articles".
2011-04-03 Kan-Ru Chen <kanru@kanru.info>
* nnir.el (nnir-notmuch-program, nnir-notmuch-additional-switches)
(nnir-notmuch-remove-prefix, nnir-engines, nnir-run-notmuch): New nnir
`notmuch' backend.
2011-07-05 Lars Magne Ingebrigtsen <larsi@gnus.org>
* mm-decode.el (mm-text-html-renderer): Doc fix.
* gnus-msg.el (gnus-bug): Fix the MML tag.
* pop3.el (pop3-open-server): -ERR is a valid response to CAPA.
2011-07-05 Daiki Ueno <ueno@unixuser.org>
* gnus-start.el (gnus-get-unread-articles): Don't connect to the
secondary methods if started with `gnus-no-server'.
2011-07-05 Juanma Barranquero <lekktu@gmail.com>
* message.el (message-return-action): Fix typo in docstring.
2011-07-04 Lars Magne Ingebrigtsen <larsi@gnus.org>
* gnus-group.el (gnus-read-ephemeral-bug-group): Allow fetching several
bug reports at once.
* nnimap.el (nnimap-request-scan): Say that splitting has finished.
2011-07-04 Katsumi Yamaoka <yamaoka@jpl.org>
* nndraft.el: Require gnus-group.
(nndraft-request-list): Declare.
* nndraft.el (nndraft-update-unread-articles): Don't show group having
no unread article unless it matches gnus-permanently-visible-groups.
* nndraft.el (nndraft-update-unread-articles): New function.
(nndraft-request-associate-buffer): Use it to update the number of
unread articles for the nndraft groups in the group buffer when saving
or killing a draft message.
2011-07-03 Lars Magne Ingebrigtsen <larsi@gnus.org>
* gnus-group.el (gnus-read-ephemeral-bug-group): Bind the coding
systems to binary before writing and reading the mbox files.
* gnus.el (gnus-summary-line-format): Link to the info node for %U
instead of trying to list them all (bug#8978).
2011-07-03 Wolfgang Jenkner <wjenkner@inode.at> (tiny change)
* pop3.el (pop3-open-server): Use :end-of-capability.
2011-07-03 Lars Magne Ingebrigtsen <larsi@gnus.org>
* gnus-group.el (gnus-read-ephemeral-emacs-bug-group): Make sure that
the id is always a number.
* gnus-group.el (gnus-read-ephemeral-emacs-bug-group): Hook into
debbugs mode, if possible.
2011-07-02 Daiki Ueno <ueno@unixuser.org>
* auth-source.el (auth-source-token-passphrase-callback-function):
Reindent.
(epg-context-operation): Remove unnecessary autoload.
2011-07-02 Lars Magne Ingebrigtsen <larsi@gnus.org>
* gnus.el (gnus-list-debbugs): New command.
* gnus-group.el (gnus-bug-group-download-format-alist): Get the
mboxstat instead of the maintbox, since the stat seems to be fuller.
* gnus-msg.el (gnus-configure-posting-styles): Don't try to select dead
summary buffers.
* message.el (message-get-reply-headers): Delete all duplicates,
instead of the first.
(message-get-reply-headers): Ensure that we have progress while
deleting duplicates.
* gnus-msg.el (gnus-configure-posting-styles): Get the local
gnus-posting-style value from the summary buffer to make it easier to
make that a per-buffer conf.
2011-07-02 Andrew Cohen <cohen@andy.bu.edu>
* nnir.el (nnir-run-imap): Allow halting a search when an article is
found by setting `shortcut' in 'query.
(nnir-request-article): Use `shortcut' setting when requesting article
by Message-ID.
2011-07-02 Teodor Zlatanov <tzz@lifelogs.com>
* gnus-msg.el (gnus-bug): Give the Version and Package headers to
debbugs with the X-Debbugs-Package and X-Debbugs-Version headers.
Bring the pseudo-headers back too.
2011-07-01 Daiki Ueno <ueno@unixuser.org>
* auth-source.el (auth-source-token-passphrase-callback-function):
Simplify and remove EPA dependency.
2011-07-01 Andrew Cohen <cohen@andy.bu.edu>
* nnir.el (nnir-request-article): Fix error message text.
2011-07-01 Daiki Ueno <ueno@unixuser.org>
* auth-source.el (plstore-delete): Autoload.
(auth-source-plstore-search): Support delete operation.
* plstore.el (plstore-delete): New function.
2011-07-01 Katsumi Yamaoka <yamaoka@jpl.org>
* gnus-draft.el (gnus-draft-clear-marks): Revert last change;
mark actually existing articles as unread rather than the ones that
active asserts.
2011-07-01 Paul Eggert <eggert@cs.ucla.edu>
* nntp.el (nntp-record-command):
* gnus-util.el (gnus-message-with-timestamp-1):
Use format-time-string rather than decoding time stamps by hand.
This is simpler and insulates the code from potential changes to
current-time format.
2011-07-01 Katsumi Yamaoka <yamaoka@jpl.org>
* gnus-draft.el (gnus-draft-clear-marks): Mark deleted articles as read.
2011-07-01 Daiki Ueno <ueno@unixuser.org>
* plstore.el (plstore-select-keys, plstore-encrypt-to): New variable.
(plstore-save): Support public key encryption.
(plstore--init-from-buffer): New function.
(plstore-open): Use it; fix error when opening a non-existent file.
(plstore-revert): Use plstore--init-from-buffer.
2011-07-01 Daiki Ueno <ueno@unixuser.org>
* auth-source.el (auth-source-backend): Fix :initarg for data slot.
2011-06-30 Katsumi Yamaoka <yamaoka@jpl.org>
* mml2015.el (mml2015-use): Replace string-match-p with string-match
for old Emacsen.
2011-06-30 Daiki Ueno <ueno@unixuser.org>
* mml2015.el (mml2015-use): Don't try to load PGG on Emacs 24, when EPG
is not fully working.
2011-06-30 Lars Magne Ingebrigtsen <larsi@gnus.org>
* dgnushack.el: Autoload sha1 on XEmacs.
* gnus-group.el (gnus-read-ephemeral-emacs-bug-group): Take an optional
quit window configuration.
* auth-source.el (epg-context-set-passphrase-callback): Remove
duplicate autoload.
2011-06-30 Andrew Cohen <cohen@andy.bu.edu>
* nnir.el (nnir-request-article): Allow requesting articles by
Message-ID with nnimap.
* gnus-sum.el (gnus-refer-article-methods): Allow (nnir) entry to use
current server.
2011-06-30 Teodor Zlatanov <tzz@lifelogs.com>
* auth-source.el: Autoload EPA/EPG functions.
(auth-source-netrc-use-gpg-tokens): Clarify that it should not be
changed when EPA/EPG is not available.
(auth-source-backend): Rename "arg" member to "data".
(auth-source-backend-parse, auth-source-plstore-search)
(auth-source-plstore-create): Use it.
2011-06-30 Andrew Cohen <cohen@andy.bu.edu>
* gnus-art.el (gnus-request-article-this-buffer): Use existing function
`gnus-refer-article-methods'.
2011-06-30 Teodor Zlatanov <tzz@lifelogs.com>
* auth-source.el: Require EPA and EPG.
(auth-source-passphrase-alist): New variable.
(auth-source-passphrase-callback-function)
(auth-source-token-passphrase-callback-function): Callbacks for the
netrc field encryption (GPG tokens).
(auth-source-epa-extract-gpg-token, auth-source-epa-make-gpg-token):
Symmetric encryption and decryption of the netrc GPG tokens.
(auth-source-netrc-normalize): Use them, simplifying the closure.
2011-06-30 Lars Magne Ingebrigtsen <larsi@gnus.org>
* nnimap.el (nnimap-split-incoming-mail): If `nnimap-split-fancy' is
non-nil, and `nnimap-split-methods' is nil, use the former.
2011-06-30 Daiki Ueno <ueno@unixuser.org>
* plstore.el (plstore-revert): New function.
(plstore-open): Use it; hide the buffer from user.
2011-06-30 Daiki Ueno <ueno@unixuser.org>
* auth-source.el (auth-source-backend): New member "arg".
(auth-source-backend-parse): Handle new backend 'plstore.
* plstore.el: New file.
2011-06-30 Glenn Morris <rgm@gnu.org>
* gnus-fun.el (gnus-convert-image-to-x-face-command): Doc fix.
* mm-util.el (mm-charset-synonym-alist): Move definition before use.
2011-06-30 Lars Magne Ingebrigtsen <larsi@gnus.org>
* nnimap.el (nnimap-process-expiry-targets): Say what target we're
expiring articles to.
* mm-util.el (mm-charset-to-coding-system): Recognise all ANSI.x3.4
variations as ASCII (bug#5458).
2011-06-30 Katsumi Yamaoka <yamaoka@jpl.org>
* nnmh.el (nnmh-request-list-1): Work on MS Windows.
2011-06-30 Lars Magne Ingebrigtsen <larsi@gnus.org>
* message.el (message-point-in-header-p): Tweak the function to default
to saying that we're not in the headers if there is no separator at
all. This makes it possible to use the Message version of `M-q' in
buffers with no headers (bug#7987).
(message-point-in-header-p): Fix last checkin to work with an empty
mail-header-separator, too.
* auth-source.el (auth-source-netrc-saver): If the user says "don't ask
again, save the choice via customize.
2011-06-29 Lars Magne Ingebrigtsen <larsi@gnus.org>
* message.el (message-send-mail-function): Add `sendmail-query-once'.
* nnimap.el (nnimap-finish-retrieve-group-infos): If the server has
ended the connection, bail out before waiting infinitely on a new
connection.
2011-06-28 Teodor Zlatanov <tzz@lifelogs.com>
* gnus-msg.el (gnus-bug): Add Package and Version pseudo-headers to bug
reports.
* gnus.el (gnus-bug-package): Use "gnus."
(gnus-maintainer): Direct bug reports to submit@debbugs.gnu.org.
2011-06-26 Lars Magne Ingebrigtsen <larsi@gnus.org>
* gnus-art.el (gnus-article-stop-animations): New function to stop any
animations going on at article exit time.
* gnus-registry.el (gnus-registry-user-format-function-M): Reinstate,
since removing it breaks people upgrading.
* shr.el (shr-put-image): Use the new interface for animating images.
(shr-put-image): Animate for 60 seconds.
* auth-source.el (with-auth-source-epa-overrides): Fix compilation
error with `find-file-hooks' on Emacs 22.
(with-auth-source-epa-overrides): Ugly hack to Wrap the
`find-file-hook' things in `symbol-value' to avoid compilation warnings
on all architectures.
* spam.el (spam-stat): Require in a normal fashion without binding
`spam-stat-install-hooks' to avoid compilation warnings.
* spam-stat.el (spam-stat-install-hooks): Removed.
(spam-stat-install-hooks): Don't run automatically.
2011-06-26 Timo Juhani Lindfors <timo.lindfors@iki.fi> (tiny change)
* gnus-msg.el (gnus-summary-reply-to-list-with-original): New command
and keystroke.
2011-06-23 Katsumi Yamaoka <yamaoka@jpl.org>
* auth-source.el (auth-source-netrc-cache): Move forward.
2011-06-22 Lars Magne Ingebrigtsen <larsi@gnus.org>
* auth-source.el (auth-source-netrc-create): Don't query the bits that
@ -528,12 +832,6 @@
* Makefile.in (fail-on-warning): New rule to compile with warnings as
errors.
* dgnushack.el (dgnushack-compile-error-on-warn): New function to call
dgnushack-compile with error-on-warn enabled, and to signal an error if
clean compilation failed.
(dgnushack-compile): New argument 'error-on-warn'. If non-nil, compile
with `byte-compile-error-on-warn'. Return nil if errors occured.
2011-04-06 Teodor Zlatanov <tzz@lifelogs.com>
* gnus-registry.el: Don't use ERT if it's not available. Load it

View file

@ -43,6 +43,7 @@
(require 'mm-util)
(require 'gnus-util)
(require 'assoc)
(eval-when-compile (require 'cl))
(require 'eieio)
@ -56,6 +57,19 @@
(autoload 'rfc2104-hash "rfc2104")
(autoload 'plstore-open "plstore")
(autoload 'plstore-find "plstore")
(autoload 'plstore-put "plstore")
(autoload 'plstore-delete "plstore")
(autoload 'plstore-save "plstore")
(autoload 'plstore-get-file "plstore")
(autoload 'epg-make-context "epg")
(autoload 'epg-context-set-passphrase-callback "epg")
(autoload 'epg-decrypt-string "epg")
(autoload 'epg-context-set-armor "epg")
(autoload 'epg-encrypt-string "epg")
(defvar secrets-enabled)
(defgroup auth-source nil
@ -75,6 +89,9 @@ let-binding."
(const :tag "30 Minutes" 1800)
(integer :tag "Seconds")))
;;; The slots below correspond with the `auth-source-search' spec,
;;; so a backend with :host set, for instance, would match only
;;; searches for that host. Normally they are nil.
(defclass auth-source-backend ()
((type :initarg :type
:initform 'netrc
@ -100,6 +117,9 @@ let-binding."
:type t
:custom string
:documentation "The backend protocol.")
(data :initarg :data
:initform nil
:documentation "Internal backend data.")
(create-function :initarg :create-function
:initform ignore
:type function
@ -159,7 +179,8 @@ let-binding."
(defcustom auth-source-netrc-use-gpg-tokens 'never
"Set this to tell auth-source when to create GPG password
tokens in netrc files. It's either an alist or `never'."
tokens in netrc files. It's either an alist or `never'.
Note that if EPA/EPG is not available, this should NOT be used."
:group 'auth-source
:version "23.2" ;; No Gnus
:type `(choice
@ -264,9 +285,9 @@ can get pretty complex."
(const :format "" :value :user)
(choice
:tag "Personality/Username"
(const :tag "Any" t)
(string
:tag "Name")))))))))
(const :tag "Any" t)
(string
:tag "Name")))))))))
(defcustom auth-source-gpg-encrypt-to t
"List of recipient keys that `authinfo.gpg' encrypted to.
@ -307,8 +328,8 @@ If the value is not a list, symmetric encryption will be used."
(defun auth-source-do-warn (&rest msg)
(apply
;; set logger to either the function in auth-source-debug or 'message
;; note that it will be 'message if auth-source-debug is nil
;; set logger to either the function in auth-source-debug or 'message
;; note that it will be 'message if auth-source-debug is nil
(if (functionp auth-source-debug)
auth-source-debug
'message)
@ -375,12 +396,20 @@ with \"[a/b/c] \" if CHOICES is '\(?a ?b ?c\)."
;; a file name with parameters
((stringp (plist-get entry :source))
(auth-source-backend
(plist-get entry :source)
:source (plist-get entry :source)
:type 'netrc
:search-function 'auth-source-netrc-search
:create-function 'auth-source-netrc-create))
(if (equal (file-name-extension (plist-get entry :source)) "plist")
(auth-source-backend
(plist-get entry :source)
:source (plist-get entry :source)
:type 'plstore
:search-function 'auth-source-plstore-search
:create-function 'auth-source-plstore-create
:data (plstore-open (plist-get entry :source)))
(auth-source-backend
(plist-get entry :source)
:source (plist-get entry :source)
:type 'netrc
:search-function 'auth-source-netrc-search
:create-function 'auth-source-netrc-create)))
;; the Secrets API. We require the package, in order to have a
;; defined value for `secrets-enabled'.
@ -654,7 +683,7 @@ must call it to obtain the actual value."
(when auth-source-do-cache
(auth-source-remember spec found)))
found))
found))
(defun auth-source-search-backends (backends spec max create delete require)
(let (matches)
@ -705,6 +734,8 @@ Returns the deleted entries."
(equal collection value)
(member value collection)))
(defvar auth-source-netrc-cache nil)
(defun auth-source-forget-all-cached ()
"Forget all cached auth-source data."
(interactive)
@ -774,7 +805,7 @@ while \(:host t) would find all host entries."
(defun auth-source-specmatchp (spec stored)
(let ((keys (loop for i below (length spec) by 2
collect (nth i spec))))
collect (nth i spec))))
(not (eq
(dolist (key keys)
(unless (auth-source-search-collection (plist-get stored key)
@ -809,15 +840,13 @@ while \(:host t) would find all host entries."
(unless (listp values)
(setq values (list values)))
(mapcar (lambda (value)
(if (numberp value)
(format "%s" value)
value))
values))
(if (numberp value)
(format "%s" value)
value))
values))
;;; Backend specific parsing: netrc/authinfo backend
(defvar auth-source-netrc-cache nil)
;;; (auth-source-netrc-parse "~/.authinfo.gpg")
(defun* auth-source-netrc-parse (&rest
spec
@ -859,7 +888,7 @@ Note that the MAX parameter is used so we can exit the parse early."
(base64-encode-string
(buffer-string)))))
(lambda () (base64-decode-string
(rot13-string v)))))))
(rot13-string v)))))))
(goto-char (point-min))
;; Go through the file, line by line.
(while (and (not (eobp))
@ -926,7 +955,7 @@ Note that the MAX parameter is used so we can exit the parse early."
(null require)
;; every element of require is in the normalized list
(let ((normalized (nth 0 (auth-source-netrc-normalize
(list alist) file))))
(list alist) file))))
(loop for req in require
always (plist-get normalized req)))))
(decf max)
@ -962,54 +991,59 @@ Note that the MAX parameter is used so we can exit the parse early."
(nreverse result))))))
(defmacro with-auth-source-epa-overrides (&rest body)
`(let ((file-name-handler-alist
',(if (boundp 'epa-file-handler)
(remove (symbol-value 'epa-file-handler)
file-name-handler-alist)
file-name-handler-alist))
(,(if (boundp 'find-file-hook) 'find-file-hook 'find-file-hooks)
',(remove
'epa-file-find-file-hook
(if (boundp 'find-file-hook) 'find-file-hook 'find-file-hooks)))
(auto-mode-alist
',(if (boundp 'epa-file-auto-mode-alist-entry)
(remove (symbol-value 'epa-file-auto-mode-alist-entry)
auto-mode-alist)
auto-mode-alist)))
,@body))
(defvar auth-source-passphrase-alist nil)
(defun auth-source-token-passphrase-callback-function (context key-id file)
(let* ((file (file-truename file))
(entry (assoc file auth-source-passphrase-alist))
passphrase)
;; return the saved passphrase, calling a function if needed
(or (copy-sequence (if (functionp (cdr entry))
(funcall (cdr entry))
(cdr entry)))
(progn
(unless entry
(setq entry (list file))
(push entry auth-source-passphrase-alist))
(setq passphrase
(read-passwd
(format "Passphrase for %s tokens: " file)
t))
(setcdr entry (lexical-let ((p (copy-sequence passphrase)))
(lambda () p)))
passphrase))))
;; (auth-source-epa-extract-gpg-token "gpg:LS0tLS1CRUdJTiBQR1AgTUVTU0FHRS0tLS0tClZlcnNpb246IEdudVBHIHYxLjQuMTEgKEdOVS9MaW51eCkKCmpBMEVBd01DT25qMjB1ak9rZnRneVI3K21iNm9aZWhuLzRad3cySkdlbnVaKzRpeEswWDY5di9icDI1U1dsQT0KPS9yc2wKLS0tLS1FTkQgUEdQIE1FU1NBR0UtLS0tLQo=" "~/.netrc")
(defun auth-source-epa-extract-gpg-token (secret file)
"Pass either the decoded SECRET or the gpg:BASE64DATA version.
FILE is the file from which we obtained this token."
(when (string-match "^gpg:\\(.+\\)" secret)
(setq secret (base64-decode-string (match-string 1 secret))))
(let ((context (epg-make-context 'OpenPGP))
plain)
(epg-context-set-passphrase-callback
context
(cons #'auth-source-token-passphrase-callback-function
file))
(epg-decrypt-string context secret)))
;; (insert (auth-source-epa-make-gpg-token "mysecret" "~/.netrc"))
(defun auth-source-epa-make-gpg-token (secret file)
(require 'epa nil t)
(unless (featurep 'epa)
(error "EPA could not be loaded."))
(let* ((base (file-name-sans-extension file))
(passkey (format "gpg:-%s" base))
(stash (concat base ".gpg"))
;; temporarily disable EPA
(stashfile
(with-auth-source-epa-overrides
(make-temp-file "gpg-token" nil
stash)))
(epa-file-passphrase-alist
`((,stashfile
. ,(password-read
(format
"token pass for %s? "
file)
passkey)))))
(write-region secret nil stashfile)
;; temporarily disable EPA
(unwind-protect
(with-auth-source-epa-overrides
(with-temp-buffer
(insert-file-contents stashfile)
(base64-encode-region (point-min) (point-max) t)
(concat "gpg:"
(buffer-substring-no-properties
(point-min)
(point-max)))))
(delete-file stashfile))))
(let ((context (epg-make-context 'OpenPGP))
(pp-escape-newlines nil)
cipher)
(epg-context-set-armor context t)
(epg-context-set-passphrase-callback
context
(cons #'auth-source-token-passphrase-callback-function
file))
(setq cipher (epg-encrypt-string context secret nil))
(with-temp-buffer
(insert cipher)
(base64-encode-region (point-min) (point-max) t)
(concat "gpg:" (buffer-substring-no-properties
(point-min)
(point-max))))))
(defun auth-source-netrc-normalize (alist filename)
(mapcar (lambda (entry)
@ -1027,65 +1061,27 @@ Note that the MAX parameter is used so we can exit the parse early."
;; send back the secret in a function (lexical binding)
(when (equal k "secret")
(setq v (lexical-let ((v v)
(filename filename)
(base (file-name-nondirectory
filename))
(token-decoder nil)
(gpgdata nil)
(stash nil))
(setq stash (concat base ".gpg"))
(when (string-match "gpg:\\(.+\\)" v)
(require 'epa nil t)
(unless (featurep 'epa)
(error "EPA could not be loaded."))
(setq gpgdata (base64-decode-string
(match-string 1 v)))
;; it's a GPG token
(setq
token-decoder
(lambda (gpgdata)
;;; FIXME: this relies on .gpg files being handled by EPA/EPG
(let* ((passkey (format "gpg:-%s" base))
;; temporarily disable EPA
(stashfile
(with-auth-source-epa-overrides
(make-temp-file "gpg-token" nil
stash)))
(epa-file-passphrase-alist
`((,stashfile
. ,(password-read
(format
"token pass for %s? "
filename)
passkey)))))
(unwind-protect
(progn
;; temporarily disable EPA
(with-auth-source-epa-overrides
(write-region gpgdata
nil
stashfile))
(setq
v
(with-temp-buffer
(insert-file-contents stashfile)
(buffer-substring-no-properties
(point-min)
(point-max)))))
(delete-file stashfile)))
;; clear out the decoder at end
(setq token-decoder nil
gpgdata nil))))
(lambda ()
(when token-decoder
(funcall token-decoder gpgdata))
v))))
(setq ret (plist-put ret
(intern (concat ":" k))
v))))
ret))
alist))
(setq v (lexical-let ((lexv v)
(token-decoder nil))
(when (string-match "^gpg:" lexv)
;; it's a GPG token: create a token decoder
;; which unsets itself once
(setq token-decoder
(lambda (val)
(prog1
(auth-source-epa-extract-gpg-token
val
filename)
(setq token-decoder nil)))))
(lambda ()
(when token-decoder
(setq lexv (funcall token-decoder lexv)))
lexv))))
(setq ret (plist-put ret
(intern (concat ":" k))
v))))
ret))
alist))
;;; (setq secret (plist-get (nth 0 (auth-source-search :host t :type 'netrc :K 1 :max 1)) :secret))
;;; (funcall secret)
@ -1095,7 +1091,7 @@ Note that the MAX parameter is used so we can exit the parse early."
&key backend require create delete
type max host user port
&allow-other-keys)
"Given a property list SPEC, return search matches from the :backend.
"Given a property list SPEC, return search matches from the :backend.
See `auth-source-search' for details on SPEC."
;; just in case, check that the type is correct (null or same as the backend)
(assert (or (null type) (eq type (oref backend type)))
@ -1145,9 +1141,9 @@ See `auth-source-search' for details on SPEC."
;; we know (because of an assertion in auth-source-search) that the
;; :create parameter is either t or a list (which includes nil)
(create-extra (if (eq t create) nil create))
(current-data (car (auth-source-search :max 1
:host host
:port port)))
(current-data (car (auth-source-search :max 1
:host host
:port port)))
(required (append base-required create-extra))
(file (oref backend source))
(add "")
@ -1183,8 +1179,8 @@ See `auth-source-search' for details on SPEC."
(let* ((data (aget valist r))
;; take the first element if the data is a list
(data (or (auth-source-netrc-element-or-first data)
(plist-get current-data
(intern (format ":%s" r) obarray))))
(plist-get current-data
(intern (format ":%s" r) obarray))))
;; this is the default to be offered
(given-default (aget auth-source-creation-defaults r))
;; the default supplementals are simple:
@ -1231,8 +1227,8 @@ See `auth-source-search' for details on SPEC."
(cond
((and (null data) (eq r 'secret))
;; Special case prompt for passwords.
;; TODO: make the default (setq auth-source-netrc-use-gpg-tokens `((,(if (boundp 'epa-file-auto-mode-alist-entry) (car (symbol-value 'epa-file-auto-mode-alist-entry)) "\\.gpg\\'") nil) (t gpg)))
;; TODO: or maybe leave as (setq auth-source-netrc-use-gpg-tokens 'never)
;; TODO: make the default (setq auth-source-netrc-use-gpg-tokens `((,(if (boundp 'epa-file-auto-mode-alist-entry) (car (symbol-value 'epa-file-auto-mode-alist-entry)) "\\.gpg\\'") nil) (t gpg)))
;; TODO: or maybe leave as (setq auth-source-netrc-use-gpg-tokens 'never)
(let* ((ep (format "Use GPG password tokens in %s?" file))
(gpg-encrypt
(cond
@ -1249,7 +1245,7 @@ See `auth-source-search' for details on SPEC."
(setq ret (cdr item))
(setq check nil)))))
(t 'never)))
(plain (read-passwd prompt)))
(plain (read-passwd prompt)))
;; ask if we don't know what to do (in which case
;; auth-source-netrc-use-gpg-tokens must be a list)
(unless gpg-encrypt
@ -1297,9 +1293,9 @@ See `auth-source-search' for details on SPEC."
(secret "password")
(port "port") ; redundant but clearer
(t (symbol-name r)))
(if (string-match "[\" ]" data)
(format "%S" data)
data)))))
(if (string-match "[\" ]" data)
(format "%S" data)
data)))))
(setq add (concat add (funcall printer)))))))
(plist-put
@ -1361,9 +1357,10 @@ Respects `auth-source-save-behavior'. Uses
(help-mode))))
(?n (setq add ""
done t))
(?N (setq add ""
done t
auth-source-save-behavior nil))
(?N
(setq add ""
done t)
(customize-save-variable 'auth-source-save-behavior nil))
(?e (setq add (read-string "Line to add: " add)))
(t nil)))
@ -1454,11 +1451,11 @@ authentication tokens:
(eq t (plist-get spec k)))
nil
(list k (plist-get spec k))))
search-keys)))
search-keys)))
;; needed keys (always including host, login, port, and secret)
(returned-keys (mm-delete-duplicates (append
'(:host :login :port :secret)
search-keys)))
'(:host :login :port :secret)
search-keys)))
(items (loop for item in (apply 'secrets-search-items coll search-spec)
unless (and (stringp label)
(not (string-match label item)))
@ -1500,6 +1497,210 @@ authentication tokens:
;; (apply 'secrets-create-item (auth-get-source entry) name passwd spec)
(debug spec))
;;; Backend specific parsing: PLSTORE backend
(defun* auth-source-plstore-search (&rest
spec
&key backend create delete label
type max host user port
&allow-other-keys)
"Search the PLSTORE; spec is like `auth-source'."
(let* ((store (oref backend data))
(max (or max 5000)) ; sanity check: default to stop at 5K
(ignored-keys '(:create :delete :max :backend :require))
(search-keys (loop for i below (length spec) by 2
unless (memq (nth i spec) ignored-keys)
collect (nth i spec)))
;; build a search spec without the ignored keys
;; if a search key is nil or t (match anything), we skip it
(search-spec (apply 'append (mapcar
(lambda (k)
(let ((v (plist-get spec k)))
(if (or (null v)
(eq t v))
nil
(if (stringp v)
(setq v (list v)))
(list k v))))
search-keys)))
;; needed keys (always including host, login, port, and secret)
(returned-keys (mm-delete-duplicates (append
'(:host :login :port :secret)
search-keys)))
(items (plstore-find store search-spec))
(item-names (mapcar #'car items))
(items (butlast items (- (length items) max)))
;; convert the item to a full plist
(items (mapcar (lambda (item)
(let* ((plist (copy-tree (cdr item)))
(secret (plist-member plist :secret)))
(if secret
(setcar
(cdr secret)
(lexical-let ((v (car (cdr secret))))
(lambda () v))))
plist))
items))
;; ensure each item has each key in `returned-keys'
(items (mapcar (lambda (plist)
(append
(apply 'append
(mapcar (lambda (req)
(if (plist-get plist req)
nil
(list req nil)))
returned-keys))
plist))
items)))
(cond
;; if we need to create an entry AND none were found to match
((and create
(not items))
;; create based on the spec and record the value
(setq items (or
;; if the user did not want to create the entry
;; in the file, it will be returned
(apply (slot-value backend 'create-function) spec)
;; if not, we do the search again without :create
;; to get the updated data.
;; the result will be returned, even if the search fails
(apply 'auth-source-plstore-search
(plist-put spec :create nil)))))
((and delete
item-names)
(dolist (item-name item-names)
(plstore-delete store item-name))
(plstore-save store)))
items))
(defun* auth-source-plstore-create (&rest spec
&key backend
secret host user port create
&allow-other-keys)
(let* ((base-required '(host user port secret))
(base-secret '(secret))
;; we know (because of an assertion in auth-source-search) that the
;; :create parameter is either t or a list (which includes nil)
(create-extra (if (eq t create) nil create))
(current-data (car (auth-source-search :max 1
:host host
:port port)))
(required (append base-required create-extra))
(file (oref backend source))
(add "")
;; `valist' is an alist
valist
;; `artificial' will be returned if no creation is needed
artificial
secret-artificial)
;; only for base required elements (defined as function parameters):
;; fill in the valist with whatever data we may have from the search
;; we complete the first value if it's a list and use the value otherwise
(dolist (br base-required)
(when (symbol-value br)
(let ((br-choice (cond
;; all-accepting choice (predicate is t)
((eq t (symbol-value br)) nil)
;; just the value otherwise
(t (symbol-value br)))))
(when br-choice
(aput 'valist br br-choice)))))
;; for extra required elements, see if the spec includes a value for them
(dolist (er create-extra)
(let ((name (concat ":" (symbol-name er)))
(keys (loop for i below (length spec) by 2
collect (nth i spec))))
(dolist (k keys)
(when (equal (symbol-name k) name)
(aput 'valist er (plist-get spec k))))))
;; for each required element
(dolist (r required)
(let* ((data (aget valist r))
;; take the first element if the data is a list
(data (or (auth-source-netrc-element-or-first data)
(plist-get current-data
(intern (format ":%s" r) obarray))))
;; this is the default to be offered
(given-default (aget auth-source-creation-defaults r))
;; the default supplementals are simple:
;; for the user, try `given-default' and then (user-login-name);
;; otherwise take `given-default'
(default (cond
((and (not given-default) (eq r 'user))
(user-login-name))
(t given-default)))
(printable-defaults (list
(cons 'user
(or
(auth-source-netrc-element-or-first
(aget valist 'user))
(plist-get artificial :user)
"[any user]"))
(cons 'host
(or
(auth-source-netrc-element-or-first
(aget valist 'host))
(plist-get artificial :host)
"[any host]"))
(cons 'port
(or
(auth-source-netrc-element-or-first
(aget valist 'port))
(plist-get artificial :port)
"[any port]"))))
(prompt (or (aget auth-source-creation-prompts r)
(case r
(secret "%p password for %u@%h: ")
(user "%p user name for %h: ")
(host "%p host name for user %u: ")
(port "%p port for %u@%h: "))
(format "Enter %s (%%u@%%h:%%p): " r)))
(prompt (auth-source-format-prompt
prompt
`((?u ,(aget printable-defaults 'user))
(?h ,(aget printable-defaults 'host))
(?p ,(aget printable-defaults 'port))))))
;; Store the data, prompting for the password if needed.
(setq data
(cond
((and (null data) (eq r 'secret))
;; Special case prompt for passwords.
(read-passwd prompt))
((null data)
(when default
(setq prompt
(if (string-match ": *\\'" prompt)
(concat (substring prompt 0 (match-beginning 0))
" (default " default "): ")
(concat prompt "(default " default ") "))))
(read-string prompt nil nil default))
(t (or data default))))
(when data
(if (member r base-secret)
(setq secret-artificial
(plist-put secret-artificial
(intern (concat ":" (symbol-name r)))
data))
(setq artificial (plist-put artificial
(intern (concat ":" (symbol-name r)))
data))))))
(plstore-put (oref backend data)
(sha1 (format "%s@%s:%s"
(plist-get artificial :user)
(plist-get artificial :host)
(plist-get artificial :port)))
artificial secret-artificial)
(if (y-or-n-p (format "Save auth info to file %s? "
(plstore-get-file (oref backend data))))
(plstore-save (oref backend data)))))
;;; older API
;;; (auth-source-user-or-password '("login" "password") "imap.myhost.com" t "tzz")
@ -1574,14 +1775,14 @@ MODE can be \"login\" or \"password\"."
(cond
((equal "password" m)
(push (if (plist-get choice :secret)
(funcall (plist-get choice :secret))
nil) found))
(funcall (plist-get choice :secret))
nil) found))
((equal "login" m)
(push (plist-get choice :user) found)))))
(setq found (nreverse found))
(setq found (if listy found (car-safe found)))))
found))
found))
(provide 'auth-source)

View file

@ -4509,6 +4509,7 @@ commands:
t)))
(with-current-buffer name
(set (make-local-variable 'gnus-article-edit-mode) nil)
(gnus-article-stop-animations)
(when gnus-article-mime-handles
(mm-destroy-parts gnus-article-mime-handles)
(setq gnus-article-mime-handles nil))
@ -4533,6 +4534,12 @@ commands:
(gnus-start-date-timer gnus-article-update-date-headers))
(current-buffer)))))
(defun gnus-article-stop-animations ()
(dolist (timer (and (boundp 'timer-list)
timer-list))
(when (eq (aref timer 5) 'image-animate-timeout)
(cancel-timer timer))))
;; Set article window start at LINE, where LINE is the number of lines
;; from the head of the article.
(defun gnus-article-set-window-start (&optional line)
@ -6825,23 +6832,16 @@ If given a prefix, show the hidden text instead."
(numberp article))
(let ((gnus-override-method gnus-override-method)
(methods (and (stringp article)
gnus-refer-article-method))
(with-current-buffer gnus-summary-buffer
(gnus-refer-article-methods))))
(backend (car (gnus-find-method-for-group
gnus-newsgroup-name)))
result
(inhibit-read-only t))
(if (or (not (listp methods))
(and (symbolp (car methods))
(assq (car methods) nnoo-definition-alist)))
(setq methods (list methods)))
(when (and (null gnus-override-method)
methods)
(setq gnus-override-method (pop methods)))
(while (not result)
(when (eq gnus-override-method 'current)
(setq gnus-override-method
(with-current-buffer gnus-summary-buffer
gnus-current-select-method)))
(erase-buffer)
(gnus-kill-all-overlays)
(let ((gnus-newsgroup-name group))

View file

@ -327,8 +327,7 @@ If DONT-POP is nil, display the buffer after setting it up."
(defun gnus-draft-clear-marks ()
(setq gnus-newsgroup-reads nil
gnus-newsgroup-marked nil
gnus-newsgroup-unreads
(gnus-uncompress-range (gnus-active gnus-newsgroup-name))))
gnus-newsgroup-unreads (nndraft-articles)))
(provide 'gnus-draft)

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