merge from trunk

This commit is contained in:
Tom Tromey 2012-09-04 10:10:06 -06:00
commit bf69f522a9
213 changed files with 6752 additions and 3625 deletions

View file

@ -1,3 +1,78 @@
2012-09-04 Paul Eggert <eggert@cs.ucla.edu>
* configure.ac (_setjmp, _longjmp): Check by compiling
instead of by guessing. The guesses were wrong for
recent versions of Solaris, such as Solaris 11.
2012-09-03 Paul Eggert <eggert@cs.ucla.edu>
* configure.ac (WARN_CFLAGS): Omit -Wjump-misses-init.
It generates false alarms in doc.c, regex.c, xdisp.c. See
<http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00040.html>.
Merge from gnulib, incorporating:
2012-08-29 stdbool: be more compatible with mixed C/C++ compiles
2011-11-30 manywarnings: update the list of "all" warnings
2012-09-02 Jan Djärv <jan.h.d@swipnet.se>
* configure.ac (HAVE_GOBJECT): Check for gobject-2.0 (Bug#12332).
2012-09-01 Paul Eggert <eggert@cs.ucla.edu>
* configure.ac (_FORTIFY_SOURCE): Define only when optimizing.
This ports to glibc 2.15 or later, when configured with
--enable-gcc-warnings. See Eric Blake in
<http://lists.gnu.org/archive/html/bug-grep/2012-09/msg00000.html>.
2012-09-01 Daniel Colascione <dan.colascione@gmail.com>
* configure.ac: Introduce term_header variable, which holds the
value which will become TERM_HEADER in code. We effect our choice
of window system by setting term_header and WINDOW_SYSTEM_OBJ
instead of using ad-hoc variables and flags for each window
system.
2012-08-26 Paul Eggert <eggert@cs.ucla.edu>
* configure.ac (CFLAGS): Prefer -g3 to -g if -g3 works
and if the user has not specified CFLAGS. -g3 simplifies
debugging, since it makes macros visible to the debugger.
2012-08-25 Juanma Barranquero <lekktu@gmail.com>
* lib/makefile.w32-in ($(BLD)/execinfo.$(O)): Update dependencies.
2012-08-25 Eli Zaretskii <eliz@gnu.org>
* lib/makefile.w32-in ($(BLD)/execinfo.$(O), execinfo.h): New targets.
(GNULIBOBJS): Add $(BLD)/execinfo.$(O).
2012-08-24 Paul Eggert <eggert@cs.ucla.edu>
On assertion failure, print backtrace if available.
Merge from gnulib, incorporating:
2012-08-24 execinfo: port to FreeBSD
2012-08-22 execinfo: new module
* lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate.
* lib/execinfo.c, lib/execinfo.in.h, m4/execinfo.m4: New files.
2012-08-22 Glenn Morris <rgm@gnu.org>
* Makefile.in (install-arch-dep): If NO_BIN_LINK is non-null,
do not create the bin/emacs link. (Bug#12011)
2012-08-21 Paul Eggert <eggert@cs.ucla.edu>
Merge from gnulib, incorporating:
2012-08-20 extern-inline: support old GCC 'inline'
2012-08-20 Glenn Morris <rgm@gnu.org>
* configure.ac (AC_PROG_LN_S): Test for ln.
* Makefile.in (LN_S): New, set by configure.
(install-arch-dep): Use $LN_S.
2012-08-19 Paul Eggert <eggert@cs.ucla.edu>
Merge from gnulib, incorporating:

View file

@ -246,6 +246,7 @@ INSTALL_INFO = @INSTALL_INFO@
# By default, we uphold the dignity of our programs.
INSTALL_STRIP =
MKDIR_P = @MKDIR_P@
LN_S = @LN_S@
# We use gzip to compress installed .el files.
GZIP_PROG = @GZIP_PROG@
@ -436,8 +437,10 @@ install-arch-dep: install-arch-indep install-doc
if test "${ns_self_contained}" = "no"; then \
${INSTALL_PROGRAM} $(INSTALL_STRIP) src/emacs${EXEEXT} $(DESTDIR)${bindir}/$(EMACSFULL) || exit 1 ; \
chmod 1755 $(DESTDIR)${bindir}/$(EMACSFULL) ; \
rm -f $(DESTDIR)${bindir}/$(EMACS) ; \
ln $(DESTDIR)${bindir}/$(EMACSFULL) $(DESTDIR)${bindir}/$(EMACS) || true ; \
if test "x${NO_BIN_LINK}" = x; then \
rm -f $(DESTDIR)${bindir}/$(EMACS) ; \
cd $(DESTDIR)${bindir} && $(LN_S) $(EMACSFULL) $(EMACS); \
fi; \
else \
subdir=${ns_appresdir}/site-lisp; \
${write_subdir} || exit 1; \

View file

@ -1,3 +1,16 @@
2012-08-28 Glenn Morris <rgm@gnu.org>
* bzrmerge.el (bzrmerge-merges): Allow unversioned files in the tree.
2012-08-28 Andreas Schwab <schwab@linux-m68k.org>
* charsets/mule-charsets.el (header): Fix typo.
2012-08-24 Paul Eggert <eggert@cs.ucla.edu>
On assertion failure, print backtrace if available.
* merge-gnulib (GNULIB_MODULES): Add execinfo.
2012-08-16 Paul Eggert <eggert@cs.ucla.edu>
Use ASCII tests for character types.

View file

@ -45,16 +45,23 @@ The list returned is sorted by oldest-first."
(erase-buffer)
;; We generally want to make sure we start with a clean tree, but we also
;; want to allow restarts (i.e. with some part of FROM already merged but
;; not yet committed).
;; not yet committed). Unversioned (unknown) files in the tree
;; are also ok.
(call-process "bzr" nil t nil "status" "-v")
(goto-char (point-min))
(when (re-search-forward "^conflicts:\n" nil t)
(error "You still have unresolved conflicts"))
(let ((merges ()))
(let ((merges ())
found)
(if (not (re-search-forward "^pending merges:\n" nil t))
(when (save-excursion
(goto-char (point-min))
(re-search-forward "^[a-z ]*:\n" nil t))
(while (and
(re-search-forward "^\\([a-z ]*\\):\n" nil t)
(not
(setq found
(not (equal "unknown" (match-string 1)))))))
found)
(error "You still have uncommitted changes"))
;; This is really stupid, but it seems there's no easy way to figure
;; out which revisions have been merged already. The only info I can

View file

@ -45,7 +45,7 @@
(defconst header
(format
"# Generated by running amdin/charsets/mule-charsets.el in Emacs %d.%d.\n"
"# Generated by running admin/charsets/mule-charsets.el in Emacs %d.%d.\n"
emacs-major-version emacs-minor-version))
(dolist (elt charset-alist)

View file

@ -28,7 +28,7 @@ GNULIB_URL=git://git.savannah.gnu.org/gnulib.git
GNULIB_MODULES='
alloca-opt c-ctype c-strcase
careadlinkat crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512
dtoastr dtotimespec dup2 environ
dtoastr dtotimespec dup2 environ execinfo
filemode getloadavg getopt-gnu gettime gettimeofday
ignore-value intprops largefile lstat
manywarnings mktime pselect pthread_sigmask readlink

View file

@ -36,7 +36,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=build-aux --avoid=errno --avoid=fcntl --avoid=fcntl-h --avoid=fstat --avoid=msvc-inval --avoid=msvc-nothrow --avoid=raise --avoid=select --avoid=sigprocmask --avoid=sys_types --avoid=threadlib --makefile-name=gnulib.mk --conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files alloca-opt c-ctype c-strcase careadlinkat crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512 dtoastr dtotimespec dup2 environ filemode getloadavg getopt-gnu gettime gettimeofday ignore-value intprops largefile lstat manywarnings mktime pselect pthread_sigmask readlink socklen stat-time stdalign stdarg stdbool stdio strftime strtoimax strtoumax symlink sys_stat sys_time time timespec-add timespec-sub utimens warnings
# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --avoid=errno --avoid=fcntl --avoid=fcntl-h --avoid=fstat --avoid=msvc-inval --avoid=msvc-nothrow --avoid=raise --avoid=select --avoid=sigprocmask --avoid=sys_types --avoid=threadlib --makefile-name=gnulib.mk --conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files alloca-opt c-ctype c-strcase careadlinkat crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512 dtoastr dtotimespec dup2 environ execinfo filemode getloadavg getopt-gnu gettime gettimeofday ignore-value intprops largefile lstat manywarnings mktime pselect pthread_sigmask readlink socklen stat-time stdalign stdarg stdbool stdio strftime strtoimax strtoumax symlink sys_stat sys_time time timespec-add timespec-sub utimens warnings
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
@ -65,7 +65,8 @@ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \
$(top_srcdir)/m4/alloca.m4 $(top_srcdir)/m4/c-strtod.m4 \
$(top_srcdir)/m4/clock_time.m4 $(top_srcdir)/m4/dup2.m4 \
$(top_srcdir)/m4/environ.m4 $(top_srcdir)/m4/extensions.m4 \
$(top_srcdir)/m4/environ.m4 $(top_srcdir)/m4/execinfo.m4 \
$(top_srcdir)/m4/extensions.m4 \
$(top_srcdir)/m4/extern-inline.m4 $(top_srcdir)/m4/filemode.m4 \
$(top_srcdir)/m4/getloadavg.m4 $(top_srcdir)/m4/getopt.m4 \
$(top_srcdir)/m4/gettime.m4 $(top_srcdir)/m4/gettimeofday.m4 \
@ -180,6 +181,7 @@ ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXECINFO_H = @EXECINFO_H@
EXEEXT = @EXEEXT@
FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@
FONTCONFIG_LIBS = @FONTCONFIG_LIBS@
@ -357,6 +359,8 @@ GNULIB_WRITE = @GNULIB_WRITE@
GNULIB__EXIT = @GNULIB__EXIT@
GNUSTEP_CFLAGS = @GNUSTEP_CFLAGS@
GNU_OBJC_CFLAGS = @GNU_OBJC_CFLAGS@
GOBJECT_CFLAGS = @GOBJECT_CFLAGS@
GOBJECT_LIBS = @GOBJECT_LIBS@
GREP = @GREP@
GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
GSETTINGS_LIBS = @GSETTINGS_LIBS@
@ -556,11 +560,13 @@ LIBXTR6 = @LIBXTR6@
LIBXT_OTHER = @LIBXT_OTHER@
LIBX_OTHER = @LIBX_OTHER@
LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@
LIB_EXECINFO = @LIB_EXECINFO@
LIB_GCC = @LIB_GCC@
LIB_MATH = @LIB_MATH@
LIB_PTHREAD = @LIB_PTHREAD@
LIB_PTHREAD_SIGMASK = @LIB_PTHREAD_SIGMASK@
LIB_STANDARD = @LIB_STANDARD@
LN_S = @LN_S@
LTLIBINTL = @LTLIBINTL@
LTLIBOBJS = @LTLIBOBJS@
M17N_FLT_CFLAGS = @M17N_FLT_CFLAGS@
@ -751,6 +757,7 @@ WERROR_CFLAGS = @WERROR_CFLAGS@
WIDGET_OBJ = @WIDGET_OBJ@
WINDOWS_64_BIT_OFF_T = @WINDOWS_64_BIT_OFF_T@
WINDOWS_64_BIT_ST_SIZE = @WINDOWS_64_BIT_ST_SIZE@
WINDOW_SYSTEM_OBJ = @WINDOW_SYSTEM_OBJ@
WINT_T_SUFFIX = @WINT_T_SUFFIX@
XFT_CFLAGS = @XFT_CFLAGS@
XFT_LIBS = @XFT_LIBS@
@ -844,16 +851,17 @@ 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 = $(ALLOCA_H) $(GETOPT_H) inttypes.h signal.h \
arg-nonnull.h c++defs.h warn-on-use.h $(STDALIGN_H) \
BUILT_SOURCES = $(ALLOCA_H) $(EXECINFO_H) $(GETOPT_H) inttypes.h \
signal.h arg-nonnull.h c++defs.h warn-on-use.h $(STDALIGN_H) \
$(STDARG_H) $(STDBOOL_H) $(STDDEF_H) $(STDINT_H) stdio.h \
stdlib.h sys/select.h sys/stat.h sys/time.h time.h unistd.h
EXTRA_DIST = alloca.in.h allocator.h careadlinkat.h md5.h sha1.h \
sha256.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 gettimeofday.c ignore-value.h intprops.h \
inttypes.in.h lstat.c mktime-internal.h mktime.c pathmax.h \
pselect.c pthread_sigmask.c readlink.c signal.in.h \
execinfo.c execinfo.in.h filemode.h getloadavg.c getopt.c \
getopt.in.h getopt1.c getopt_int.h gettimeofday.c \
ignore-value.h intprops.h inttypes.in.h lstat.c \
mktime-internal.h mktime.c pathmax.h pselect.c \
pthread_sigmask.c readlink.c signal.in.h \
$(top_srcdir)/build-aux/snippet/_Noreturn.h \
$(top_srcdir)/build-aux/snippet/arg-nonnull.h \
$(top_srcdir)/build-aux/snippet/c++defs.h \
@ -865,14 +873,15 @@ EXTRA_DIST = alloca.in.h allocator.h careadlinkat.h md5.h sha1.h \
sys_time.in.h time.in.h time_r.c timespec.h u64.h unistd.in.h \
utimens.h verify.h
MOSTLYCLEANDIRS = sys sys
MOSTLYCLEANFILES = core *.stackdump alloca.h alloca.h-t getopt.h \
getopt.h-t inttypes.h inttypes.h-t signal.h signal.h-t \
arg-nonnull.h arg-nonnull.h-t c++defs.h c++defs.h-t \
warn-on-use.h warn-on-use.h-t stdalign.h stdalign.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/select.h \
sys/select.h-t sys/stat.h sys/stat.h-t sys/time.h sys/time.h-t \
time.h time.h-t unistd.h unistd.h-t
MOSTLYCLEANFILES = core *.stackdump alloca.h alloca.h-t execinfo.h \
execinfo.h-t getopt.h getopt.h-t inttypes.h inttypes.h-t \
signal.h signal.h-t arg-nonnull.h arg-nonnull.h-t c++defs.h \
c++defs.h-t warn-on-use.h warn-on-use.h-t stdalign.h \
stdalign.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/select.h sys/select.h-t sys/stat.h \
sys/stat.h-t sys/time.h sys/time.h-t time.h time.h-t unistd.h \
unistd.h-t
noinst_LIBRARIES = libgnu.a
AM_CFLAGS = $(GNULIB_WARN_CFLAGS) $(WERROR_CFLAGS)
DEFAULT_INCLUDES = -I. -I$(top_srcdir)/lib -I../src -I$(top_srcdir)/src
@ -883,8 +892,8 @@ libgnu_a_SOURCES = allocator.c c-ctype.h c-ctype.c c-strcase.h \
timespec-add.c timespec-sub.c u64.c utimens.c
libgnu_a_LIBADD = $(gl_LIBOBJS)
libgnu_a_DEPENDENCIES = $(gl_LIBOBJS)
EXTRA_libgnu_a_SOURCES = ftoastr.c dup2.c getloadavg.c getopt.c \
getopt1.c gettimeofday.c lstat.c mktime.c pselect.c \
EXTRA_libgnu_a_SOURCES = ftoastr.c dup2.c execinfo.c getloadavg.c \
getopt.c getopt1.c gettimeofday.c lstat.c mktime.c pselect.c \
pthread_sigmask.c readlink.c stat.c strtoimax.c strtol.c \
strtoll.c strtol.c strtoul.c strtoull.c strtoimax.c \
strtoumax.c symlink.c time_r.c
@ -953,6 +962,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dtoastr.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dtotimespec.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dup2.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/execinfo.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@
@ -1212,6 +1222,17 @@ uninstall-am:
@GL_GENERATE_ALLOCA_H_FALSE@alloca.h: $(top_builddir)/config.status
@GL_GENERATE_ALLOCA_H_FALSE@ rm -f $@
# We need the following in order to create <execinfo.h> when the system
# doesn't have one that works.
@GL_GENERATE_EXECINFO_H_TRUE@execinfo.h: execinfo.in.h $(top_builddir)/config.status
@GL_GENERATE_EXECINFO_H_TRUE@ $(AM_V_GEN)rm -f $@-t $@ && \
@GL_GENERATE_EXECINFO_H_TRUE@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
@GL_GENERATE_EXECINFO_H_TRUE@ cat $(srcdir)/execinfo.in.h; \
@GL_GENERATE_EXECINFO_H_TRUE@ } > $@-t && \
@GL_GENERATE_EXECINFO_H_TRUE@ mv $@-t $@
@GL_GENERATE_EXECINFO_H_FALSE@execinfo.h: $(top_builddir)/config.status
@GL_GENERATE_EXECINFO_H_FALSE@ rm -f $@
# We need the following in order to create <getopt.h> when the system
# doesn't have one that works with the given compiler.
getopt.h: getopt.in.h $(top_builddir)/config.status $(ARG_NONNULL_H)

1
autogen/aclocal.m4 vendored
View file

@ -990,6 +990,7 @@ m4_include([m4/c-strtod.m4])
m4_include([m4/clock_time.m4])
m4_include([m4/dup2.m4])
m4_include([m4/environ.m4])
m4_include([m4/execinfo.m4])
m4_include([m4/extensions.m4])
m4_include([m4/extern-inline.m4])
m4_include([m4/filemode.m4])

View file

@ -161,6 +161,13 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
or signaling SIGFPE/SIGILL. */
#undef FLOAT_CHECK_DOMAIN
/* Enable compile-time and run-time bounds-checking, and some warnings,
without upsetting glibc 2.15+. */
#if defined __OPTIMIZE__ && __OPTIMIZE__
# define _FORTIFY_SOURCE 2
#endif
/* Define to 1 if futimesat mishandles a NULL file name. */
#undef FUTIMESAT_NULL_BUG
@ -358,6 +365,9 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
/* Define to 1 if you have the `euidaccess' function. */
#undef HAVE_EUIDACCESS
/* Define to 1 if you have the <execinfo.h> header file. */
#undef HAVE_EXECINFO_H
/* Define to 1 if you have the <fcntl.h> header file. */
#undef HAVE_FCNTL_H
@ -1342,6 +1352,9 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
/* Define to 1 if you use terminfo instead of termcap. */
#undef TERMINFO
/* Define to the header for the built-in window system. */
#undef TERM_HEADER
/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
#undef TIME_WITH_SYS_TIME
@ -1452,9 +1465,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
/* Number of bits in a file offset, on hosts where this is settable. */
#undef _FILE_OFFSET_BITS
/* enable compile-time and run-time bounds-checking, and some warnings */
#undef _FORTIFY_SOURCE
/* Define to 1 if Gnulib overrides 'struct stat' on Windows so that struct
stat.st_size becomes 64-bit. */
#undef _GL_WINDOWS_64_BIT_ST_SIZE
@ -1532,10 +1542,12 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
declarations. Define as empty for no equivalent. */
#undef __restrict_arr
/* Some platforms redefine this. */
/* Define to longjmp if _setjmp and _longjmp do not work. Because longjmp may
alter signal masks, callers of _longjmp should not assume that it leaves
signal masks alone. */
#undef _longjmp
/* Some platforms redefine this. */
/* Define to setjmp if _setjmp and _longjmp do not work. See _longjmp. */
#undef _setjmp
/* Some platforms that do not use configure define this to include extra
@ -1554,20 +1566,34 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#if __GNUC__ ? __GNUC_STDC_INLINE__ : 199901L <= __STDC_VERSION__
# define _GL_INLINE inline
# define _GL_EXTERN_INLINE extern inline
# if (__GNUC__ == 4 && 6 <= __GNUC_MINOR__) || 4 < __GNUC__
# define _GL_INLINE_HEADER_BEGIN \
_Pragma ("GCC diagnostic push") \
_Pragma ("GCC diagnostic ignored \"-Wmissing-prototypes\"") \
_Pragma ("GCC diagnostic ignored \"-Wmissing-declarations\"")
# define _GL_INLINE_HEADER_END \
_Pragma ("GCC diagnostic pop")
#elif 2 < __GNUC__ + (7 <= __GNUC_MINOR__)
# if __GNUC_GNU_INLINE__
/* __gnu_inline__ suppresses a GCC 4.2 diagnostic. */
# define _GL_INLINE extern inline __attribute__ ((__gnu_inline__))
# else
# define _GL_INLINE extern inline
# endif
# define _GL_EXTERN_INLINE extern
#else
# define _GL_INLINE static inline
# define _GL_EXTERN_INLINE static inline
#endif
#ifndef _GL_INLINE_HEADER_BEGIN
#if 4 < __GNUC__ + (6 <= __GNUC_MINOR__)
# if __GNUC_STDC_INLINE__
# define _GL_INLINE_HEADER_CONST_PRAGMA
# else
# define _GL_INLINE_HEADER_CONST_PRAGMA \
_Pragma ("GCC diagnostic ignored \"-Wsuggest-attribute=const\"")
# endif
# define _GL_INLINE_HEADER_BEGIN \
_Pragma ("GCC diagnostic push") \
_Pragma ("GCC diagnostic ignored \"-Wmissing-prototypes\"") \
_Pragma ("GCC diagnostic ignored \"-Wmissing-declarations\"") \
_GL_INLINE_HEADER_CONST_PRAGMA
# define _GL_INLINE_HEADER_END \
_Pragma ("GCC diagnostic pop")
#else
# define _GL_INLINE_HEADER_BEGIN
# define _GL_INLINE_HEADER_END
#endif

475
autogen/configure vendored
View file

@ -604,6 +604,7 @@ am__EXEEXT_TRUE
LTLIBOBJS
LIBOBJS
SUBDIR_MAKEFILES_IN
WINDOW_SYSTEM_OBJ
LIB_GCC
LD_FIRSTFLAG
LD_SWITCH_SYSTEM_TEMACS
@ -971,6 +972,10 @@ GNULIB_CANONICALIZE_FILE_NAME
GNULIB_CALLOC_POSIX
GNULIB_ATOLL
GNULIB__EXIT
GL_GENERATE_EXECINFO_H_FALSE
GL_GENERATE_EXECINFO_H_TRUE
LIB_EXECINFO
EXECINFO_H
UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS
UNISTD_H_HAVE_WINSOCK2_H
REPLACE_WRITE
@ -1176,6 +1181,8 @@ LIBGNUTLS_CFLAGS
LIBSELINUX_LIBS
SETTINGS_LIBS
SETTINGS_CFLAGS
GOBJECT_LIBS
GOBJECT_CFLAGS
GCONF_LIBS
GCONF_CFLAGS
GSETTINGS_LIBS
@ -1224,6 +1231,7 @@ HAVE_MAKEINFO
PAXCTL
GZIP_PROG
INSTALL_INFO
LN_S
GNULIB_WARN_CFLAGS
WARN_CFLAGS
WERROR_CFLAGS
@ -3193,6 +3201,7 @@ as_fn_append ac_header_list " maillock.h"
as_fn_append ac_header_list " sys/un.h"
as_fn_append ac_func_list " tzset"
as_fn_append ac_func_list " readlinkat"
as_fn_append ac_header_list " execinfo.h"
gl_getopt_required=GNU
as_fn_append ac_header_list " getopt.h"
as_fn_append ac_func_list " gettimeofday"
@ -6955,6 +6964,7 @@ esac
# Code from module dtotimespec:
# Code from module dup2:
# Code from module environ:
# Code from module execinfo:
# Code from module extensions:
# Code from module extern-inline:
@ -7020,6 +7030,55 @@ esac
# Code from module warnings:
# It's helpful to have C macros available to GDB, so prefer -g3 to -g
# if -g3 works and the user does not specify CFLAGS.
# This test must follow gl_EARLY; otherwise AC_LINK_IFELSE complains.
if test "$ac_test_CFLAGS" != set; then
case $CFLAGS in
'-g')
emacs_g3_CFLAGS='-g3';;
'-g -O2')
emacs_g3_CFLAGS='-g3 -O2';;
*)
emacs_g3_CFLAGS='';;
esac
if test -n "$emacs_g3_CFLAGS"; then
emacs_save_CFLAGS=$CFLAGS
CFLAGS=$emacs_g3_CFLAGS
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts $emacs_g3_CFLAGS" >&5
$as_echo_n "checking whether $CC accepts $emacs_g3_CFLAGS... " >&6; }
if test "${emacs_cv_prog_cc_g3+set}" = set; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
main ()
{
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
emacs_cv_prog_cc_g3=yes
else
emacs_cv_prog_cc_g3=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_prog_cc_g3" >&5
$as_echo "$emacs_cv_prog_cc_g3" >&6; }
if test $emacs_cv_prog_cc_g3 = yes; then
CFLAGS=$emacs_g3_CFLAGS
else
CFLAGS=$emacs_save_CFLAGS
fi
fi
fi
# Check whether --enable-gcc-warnings was given.
if test "${enable_gcc_warnings+set}" = set; then :
enableval=$enable_gcc_warnings; case $enableval in
@ -7159,6 +7218,7 @@ fi
nw="$nw -Wswitch-default" # Too many warnings for now
nw="$nw -Wfloat-equal" # warns about high-quality code
nw="$nw -Winline" # OK to ignore 'inline'
nw="$nw -Wjump-misses-init" # We sometimes safely jump over init.
nw="$nw -Wsync-nand" # irrelevant here, and provokes ObjC warning
nw="$nw -Wunsafe-loop-optimizations" # OK to suppress unsafe optimizations
@ -7248,95 +7308,118 @@ $as_echo "$gl_cv_cc_nomfi_needed" >&6; }
gl_manywarn_set=
for gl_manywarn_item in \
-Wall \
-W \
-Wformat-y2k \
-Wformat-nonliteral \
-Wformat-security \
-Winit-self \
-Wmissing-include-dirs \
-Wswitch-default \
-Wswitch-enum \
-Wunused \
-Wunknown-pragmas \
-Wstrict-aliasing \
-Wstrict-overflow \
-Wsystem-headers \
-Wfloat-equal \
-Wtraditional \
-Wtraditional-conversion \
-Wdeclaration-after-statement \
-Wundef \
-Wshadow \
-Wunsafe-loop-optimizations \
-Wpointer-arith \
-Wbad-function-cast \
-Wc++-compat \
-Wcast-qual \
-Wcast-align \
-Wwrite-strings \
-Wconversion \
-Wsign-conversion \
-Wlogical-op \
-Waggregate-return \
-Wstrict-prototypes \
-Wold-style-definition \
-Wmissing-prototypes \
-Wmissing-declarations \
-Wmissing-noreturn \
-Wmissing-format-attribute \
-Wpacked \
-Wpadded \
-Wredundant-decls \
-Wnested-externs \
-Wunreachable-code \
-Winline \
-Winvalid-pch \
-Wlong-long \
-Wvla \
-Wvolatile-register-var \
-Wdisabled-optimization \
-Wstack-protector \
-Woverlength-strings \
-Wbuiltin-macro-redefined \
-Wmudflap \
-Wpacked-bitfield-compat \
-Wsync-nand \
; do
gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item"
done
# The following are not documented in the manual but are included in
# output from gcc --help=warnings.
for gl_manywarn_item in \
-Wattributes \
-Wcoverage-mismatch \
-Wunused-macros \
; do
gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item"
done
# More warnings from gcc 4.6.2 --help=warnings.
for gl_manywarn_item in \
-Wabi \
-Waddress \
-Wall \
-Warray-bounds \
-Wattributes \
-Wbad-function-cast \
-Wbuiltin-macro-redefined \
-Wcast-align \
-Wchar-subscripts \
-Wclobbered \
-Wcomment \
-Wcomments \
-Wcoverage-mismatch \
-Wcpp \
-Wdeprecated \
-Wdeprecated-declarations \
-Wdisabled-optimization \
-Wdiv-by-zero \
-Wdouble-promotion \
-Wempty-body \
-Wendif-labels \
-Wenum-compare \
-Wextra \
-Wformat-contains-nul \
-Wformat-extra-args \
-Wformat-nonliteral \
-Wformat-security \
-Wformat-y2k \
-Wformat-zero-length \
-Wformat=2 \
-Wfree-nonheap-object \
-Wignored-qualifiers \
-Wimplicit \
-Wimplicit-function-declaration \
-Wimplicit-int \
-Winit-self \
-Winline \
-Wint-to-pointer-cast \
-Winvalid-memory-model \
-Winvalid-pch \
-Wjump-misses-init \
-Wlogical-op \
-Wmain \
-Wmaybe-uninitialized \
-Wmissing-braces \
-Wmissing-declarations \
-Wmissing-field-initializers \
-Wmissing-format-attribute \
-Wmissing-include-dirs \
-Wmissing-noreturn \
-Wmissing-parameter-type \
-Wmissing-prototypes \
-Wmudflap \
-Wmultichar \
-Wnarrowing \
-Wnested-externs \
-Wnonnull \
-Wnormalized=nfc \
-Wold-style-declaration \
-Wold-style-definition \
-Woverflow \
-Woverlength-strings \
-Woverride-init \
-Wpacked \
-Wpacked-bitfield-compat \
-Wparentheses \
-Wpointer-arith \
-Wpointer-sign \
-Wpointer-to-int-cast \
-Wpragmas \
-Wreturn-type \
-Wsequence-point \
-Wshadow \
-Wsizeof-pointer-memaccess \
-Wstack-protector \
-Wstrict-aliasing \
-Wstrict-overflow \
-Wstrict-prototypes \
-Wsuggest-attribute=const \
-Wsuggest-attribute=format \
-Wsuggest-attribute=noreturn \
-Wsuggest-attribute=pure \
-Wswitch \
-Wswitch-default \
-Wsync-nand \
-Wsystem-headers \
-Wtrampolines \
-Wtrigraphs \
-Wtype-limits \
-Wuninitialized \
-Wunknown-pragmas \
-Wunreachable-code \
-Wunsafe-loop-optimizations \
-Wunused \
-Wunused-but-set-parameter \
-Wunused-but-set-variable \
-Wunused-function \
-Wunused-label \
-Wunused-local-typedefs \
-Wunused-macros \
-Wunused-parameter \
-Wunused-result \
-Wunused-value \
-Wunused-variable \
-Wvarargs \
-Wvariadic-macros \
-Wvector-operation-performance \
-Wvla \
-Wvolatile-register-var \
-Wwrite-strings \
\
; do
gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item"
done
@ -7727,8 +7810,6 @@ fi
$as_echo "#define lint 1" >>confdefs.h
$as_echo "#define _FORTIFY_SOURCE 2" >>confdefs.h
$as_echo "#define GNULIB_PORTCHECK 1" >>confdefs.h
@ -7758,6 +7839,17 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
$as_echo_n "checking whether ln -s works... " >&6; }
LN_S=$as_ln_s
if test "$LN_S" = "ln -s"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
$as_echo "no, using $LN_S" >&6; }
fi
# Extract the first word of "install-info", so it can be a program name with args.
set dummy install-info; ac_word=$2
@ -9082,6 +9174,12 @@ fi
#### Choose a window system.
## We leave window_system equal to none if
## we end up building without one. Any new window system should
## set window_system to an appropriate value and add objects to
## window-system-specific substs.
window_system=none
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
$as_echo_n "checking for X... " >&6; }
@ -9275,9 +9373,7 @@ else
$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
fi
if test "$no_x" = yes; then
window_system=none
else
if test "$no_x" != yes; then
window_system=x11
fi
@ -9452,7 +9548,6 @@ if test "${HAVE_NS}" = yes; then
fi
window_system=nextstep
with_xft=no
# set up packaging dirs
if test "${EN_NS_SELF_CONTAINED}" = yes; then
ns_self_contained=yes
@ -9469,7 +9564,6 @@ if test "${HAVE_NS}" = yes; then
INSTALL_ARCH_INDEP_EXTRA=
fi
ns_frag=$srcdir/src/ns.mk
NS_OBJ="fontset.o fringe.o image.o"
NS_OBJC_OBJ="nsterm.o nsfns.o nsmenu.o nsselect.o nsimage.o nsfont.o"
fi
CFLAGS="$tmp_CFLAGS"
@ -9481,28 +9575,45 @@ CPPFLAGS="$tmp_CPPFLAGS"
## $window_system is now set to the window system we will
## ultimately use.
term_header=
HAVE_X_WINDOWS=no
HAVE_X11=no
USE_X_TOOLKIT=none
case "${window_system}" in
x11 )
HAVE_X_WINDOWS=yes
HAVE_X11=yes
term_header=xterm.h
case "${with_x_toolkit}" in
athena | lucid ) USE_X_TOOLKIT=LUCID ;;
motif ) USE_X_TOOLKIT=MOTIF ;;
gtk ) with_gtk=yes
term_header=gtkutil.h
USE_X_TOOLKIT=none ;;
gtk3 ) with_gtk3=yes
term_header=gtkutil.h
USE_X_TOOLKIT=none ;;
no ) USE_X_TOOLKIT=none ;;
* ) USE_X_TOOLKIT=maybe ;;
esac
;;
nextstep | none )
HAVE_X_WINDOWS=no
HAVE_X11=no
USE_X_TOOLKIT=none
nextstep )
term_header=nsterm.h
;;
esac
if test -n "${term_header}"; then
cat >>confdefs.h <<_ACEOF
#define TERM_HEADER "${term_header}"
_ACEOF
fi
if test "$window_system" = none && test "X$with_x" != "Xno"; then
# Extract the first word of "X", so it can be a program name with args.
set dummy X; ac_word=$2
@ -10494,6 +10605,7 @@ $as_echo "no" >&6; }
$as_echo "#define HAVE_GTK3 1" >>confdefs.h
GTK_OBJ=emacsgtkfixed.o
term_header=gtkutil.h
fi
if test "$pkg_check_gtk" != "yes"; then
@ -10656,6 +10768,8 @@ _ACEOF
fi
done
term_header=gtkutil.h
fi
HAVE_DBUS=no
@ -10862,6 +10976,60 @@ $as_echo "#define HAVE_GCONF 1" >>confdefs.h
fi
if test "$HAVE_GSETTINGS" = "yes" || test "$HAVE_GCONF" = "yes"; then
succeeded=no
if test "$PKG_CONFIG" = "no" ; then
HAVE_GOBJECT=no
else
PKG_CONFIG_MIN_VERSION=0.9.0
if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gobject-2.0 >= 2.0" >&5
$as_echo_n "checking for gobject-2.0 >= 2.0... " >&6; }
if $PKG_CONFIG --exists "gobject-2.0 >= 2.0" 2>&5 &&
GOBJECT_CFLAGS=`$PKG_CONFIG --cflags "gobject-2.0 >= 2.0" 2>&5` &&
GOBJECT_LIBS=`$PKG_CONFIG --libs "gobject-2.0 >= 2.0" 2>&5`; then
edit_cflags="
s,///*,/,g
s/^/ /
s/ -I/ $isystem/g
s/^ //
"
GOBJECT_CFLAGS=`$as_echo "$GOBJECT_CFLAGS" | sed -e "$edit_cflags"`
GOBJECT_LIBS=`$as_echo "$GOBJECT_LIBS" | sed -e 's,///*,/,g'`
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$GOBJECT_CFLAGS' LIBS='$GOBJECT_LIBS'" >&5
$as_echo "yes CFLAGS='$GOBJECT_CFLAGS' LIBS='$GOBJECT_LIBS'" >&6; }
succeeded=yes
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
GOBJECT_CFLAGS=""
GOBJECT_LIBS=""
## If we have a custom action on failure, don't print errors, but
## do set a variable so people can do so.
GOBJECT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gobject-2.0 >= 2.0"`
fi
else
echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
echo "*** See http://www.freedesktop.org/software/pkgconfig"
fi
fi
if test $succeeded = yes; then
HAVE_GOBJECT=yes
else
HAVE_GOBJECT=no
fi
if test "$HAVE_GOBJECT" = "yes"; then
SETTINGS_CFLAGS="$SETTINGS_CFLAGS $GOBJECT_CFLAGS"
SETTINGS_LIBS="$SETTINGS_LIBS $GOBJECT_LIBS"
fi
SAVE_CFLAGS="$CFLAGS"
SAVE_LIBS="$LIBS"
CFLAGS="$SETTINGS_CFLAGS $CFLAGS"
@ -15313,15 +15481,46 @@ else
;;
esac
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _setjmp" >&5
$as_echo_n "checking for _setjmp... " >&6; }
if test "${emacs_cv_func__setjmp+set}" = set; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <setjmp.h>
case $opsys in
sol2* | unixware )
int
main ()
{
jmp_buf j;
if (! _setjmp (j))
_longjmp (j, 1);
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
emacs_cv_func__setjmp=yes
else
emacs_cv_func__setjmp=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_func__setjmp" >&5
$as_echo "$emacs_cv_func__setjmp" >&6; }
if test $emacs_cv_func__setjmp = no; then
$as_echo "#define _setjmp setjmp" >>confdefs.h
$as_echo "#define _longjmp longjmp" >>confdefs.h
fi
case $opsys in
sol2* | unixware )
$as_echo "#define TIOCSIGSEND TIOCSIGNAL" >>confdefs.h
@ -15576,6 +15775,14 @@ version=$PACKAGE_VERSION
if test -n "${term_header}"; then
cat >>confdefs.h <<_ACEOF
#define TERM_HEADER "${term_header}"
_ACEOF
fi
cat >>confdefs.h <<_ACEOF
#define EMACS_CONFIGURATION "${canonical}"
@ -15596,7 +15803,7 @@ if test "${HAVE_X_WINDOWS}" = "yes" ; then
$as_echo "#define HAVE_X_WINDOWS 1" >>confdefs.h
XMENU_OBJ=xmenu.o
XOBJ="xterm.o xfns.o xselect.o xrdb.o fontset.o xsmfns.o fringe.o image.o xsettings.o xgselect.o"
XOBJ="xterm.o xfns.o xselect.o xrdb.o xsmfns.o xsettings.o xgselect.o"
FONT_OBJ=xfont.o
if test "$HAVE_XFT" = "yes"; then
FONT_OBJ="$FONT_OBJ ftfont.o xftfont.o ftxfont.o"
@ -16452,6 +16659,8 @@ $as_echo "#define HAVE_ENVIRON_DECL 1" >>confdefs.h
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for st_dm_mode in struct stat" >&5
$as_echo_n "checking for st_dm_mode in struct stat... " >&6; }
if test "${ac_cv_struct_st_dm_mode+set}" = set; then :
@ -20088,6 +20297,99 @@ $as_echo "$gl_cv_func_dup2_works" >&6; }
LIB_EXECINFO=''
EXECINFO_H='execinfo.h'
if test $ac_cv_header_execinfo_h = yes; then
gl_saved_libs=$LIBS
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing backtrace_symbols_fd" >&5
$as_echo_n "checking for library containing backtrace_symbols_fd... " >&6; }
if test "${ac_cv_search_backtrace_symbols_fd+set}" = set; then :
$as_echo_n "(cached) " >&6
else
ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
#ifdef __cplusplus
extern "C"
#endif
char backtrace_symbols_fd ();
int
main ()
{
return backtrace_symbols_fd ();
;
return 0;
}
_ACEOF
for ac_lib in '' execinfo; do
if test -z "$ac_lib"; then
ac_res="none required"
else
ac_res=-l$ac_lib
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
fi
if ac_fn_c_try_link "$LINENO"; then :
ac_cv_search_backtrace_symbols_fd=$ac_res
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext
if test "${ac_cv_search_backtrace_symbols_fd+set}" = set; then :
break
fi
done
if test "${ac_cv_search_backtrace_symbols_fd+set}" = set; then :
else
ac_cv_search_backtrace_symbols_fd=no
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_backtrace_symbols_fd" >&5
$as_echo "$ac_cv_search_backtrace_symbols_fd" >&6; }
ac_res=$ac_cv_search_backtrace_symbols_fd
if test "$ac_res" != no; then :
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
test "$ac_cv_search_backtrace_symbols_fd" = "none required" ||
LIB_EXECINFO=$ac_cv_search_backtrace_symbols_fd
fi
LIBS=$gl_saved_libs
test "$ac_cv_search_backtrace_symbols_fd" = no || EXECINFO_H=''
fi
if test -n "$EXECINFO_H"; then
gl_LIBOBJS="$gl_LIBOBJS execinfo.$ac_objext"
fi
if test -n "$EXECINFO_H"; then
GL_GENERATE_EXECINFO_H_TRUE=
GL_GENERATE_EXECINFO_H_FALSE='#'
else
GL_GENERATE_EXECINFO_H_TRUE='#'
GL_GENERATE_EXECINFO_H_FALSE=
fi
@ -23908,20 +24210,21 @@ if test "x$GCC" = "xyes" && test "x$ORDINARY_LINK" != "xyes"; then
esac
fi
## If we're using X11/GNUstep, define some consequences.
if test "$HAVE_X_WINDOWS" = "yes" || test "$HAVE_NS" = "yes"; then
## Common for all window systems
if test "$window_system" != "none"; then
$as_echo "#define HAVE_WINDOW_SYSTEM 1" >>confdefs.h
$as_echo "#define HAVE_MOUSE 1" >>confdefs.h
WINDOW_SYSTEM_OBJ="fontset.o fringe.o image.o"
fi
#### Report on what we decided to do.
#### Report GTK as a toolkit, even if it doesn't use Xt.
#### It makes printing result more understandable as using GTK sets
@ -24178,6 +24481,10 @@ if test -z "${GL_GENERATE_ALLOCA_H_TRUE}" && test -z "${GL_GENERATE_ALLOCA_H_FAL
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${GL_GENERATE_EXECINFO_H_TRUE}" && test -z "${GL_GENERATE_EXECINFO_H_FALSE}"; then
as_fn_error "conditional \"GL_GENERATE_EXECINFO_H\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${GL_GENERATE_STDINT_H_TRUE}" && test -z "${GL_GENERATE_STDINT_H_FALSE}"; then
as_fn_error "conditional \"GL_GENERATE_STDINT_H\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5

View file

@ -577,6 +577,34 @@ fi
# Initialize gnulib right after choosing the compiler.
gl_EARLY
# It's helpful to have C macros available to GDB, so prefer -g3 to -g
# if -g3 works and the user does not specify CFLAGS.
# This test must follow gl_EARLY; otherwise AC_LINK_IFELSE complains.
if test "$ac_test_CFLAGS" != set; then
case $CFLAGS in
'-g')
emacs_g3_CFLAGS='-g3';;
'-g -O2')
emacs_g3_CFLAGS='-g3 -O2';;
*)
emacs_g3_CFLAGS='';;
esac
if test -n "$emacs_g3_CFLAGS"; then
emacs_save_CFLAGS=$CFLAGS
CFLAGS=$emacs_g3_CFLAGS
AC_CACHE_CHECK([whether $CC accepts $emacs_g3_CFLAGS],
[emacs_cv_prog_cc_g3],
[AC_LINK_IFELSE([AC_LANG_PROGRAM()],
[emacs_cv_prog_cc_g3=yes],
[emacs_cv_prog_cc_g3=no])])
if test $emacs_cv_prog_cc_g3 = yes; then
CFLAGS=$emacs_g3_CFLAGS
else
CFLAGS=$emacs_save_CFLAGS
fi
fi
fi
AC_ARG_ENABLE([gcc-warnings],
[AS_HELP_STRING([--enable-gcc-warnings],
[turn on lots of GCC warnings. This is intended for
@ -677,6 +705,7 @@ else
nw="$nw -Wswitch-default" # Too many warnings for now
nw="$nw -Wfloat-equal" # warns about high-quality code
nw="$nw -Winline" # OK to ignore 'inline'
nw="$nw -Wjump-misses-init" # We sometimes safely jump over init.
nw="$nw -Wsync-nand" # irrelevant here, and provokes ObjC warning
nw="$nw -Wunsafe-loop-optimizations" # OK to suppress unsafe optimizations
@ -709,8 +738,13 @@ else
gl_WARN_ADD([-funit-at-a-time])
AC_DEFINE([lint], [1], [Define to 1 if the compiler is checking for lint.])
AC_DEFINE([_FORTIFY_SOURCE], [2],
[enable compile-time and run-time bounds-checking, and some warnings])
AH_VERBATIM([FORTIFY_SOURCE],
[/* Enable compile-time and run-time bounds-checking, and some warnings,
without upsetting glibc 2.15+. */
#if defined __OPTIMIZE__ && __OPTIMIZE__
# define _FORTIFY_SOURCE 2
#endif
])
AC_DEFINE([GNULIB_PORTCHECK], [1], [enable some gnulib portability checks])
# We use a slightly smaller set of warning options for lib/.
@ -731,6 +765,7 @@ dnl AC_PROG_MKDIR_P
dnl if test "x$RANLIB" = x; then
dnl AC_PROG_RANLIB
dnl fi
AC_PROG_LN_S
AC_PATH_PROG(INSTALL_INFO, install-info, :,
$PATH$PATH_SEPARATOR/usr/sbin$PATH_SEPARATOR/sbin)
@ -1357,10 +1392,14 @@ AC_SYS_LONG_FILE_NAMES
#### Choose a window system.
## We leave window_system equal to none if
## we end up building without one. Any new window system should
## set window_system to an appropriate value and add objects to
## window-system-specific substs.
window_system=none
AC_PATH_X
if test "$no_x" = yes; then
window_system=none
else
if test "$no_x" != yes; then
window_system=x11
fi
@ -1499,7 +1538,6 @@ if test "${HAVE_NS}" = yes; then
fi
window_system=nextstep
with_xft=no
# set up packaging dirs
if test "${EN_NS_SELF_CONTAINED}" = yes; then
ns_self_contained=yes
@ -1519,7 +1557,6 @@ if test "${HAVE_NS}" = yes; then
INSTALL_ARCH_INDEP_EXTRA=
fi
ns_frag=$srcdir/src/ns.mk
NS_OBJ="fontset.o fringe.o image.o"
NS_OBJC_OBJ="nsterm.o nsfns.o nsmenu.o nsselect.o nsimage.o nsfont.o"
fi
CFLAGS="$tmp_CFLAGS"
@ -1531,18 +1568,29 @@ AC_SUBST(NS_OBJC_OBJ)
AC_SUBST(LIB_STANDARD)
AC_SUBST_FILE(ns_frag)
## $window_system is now set to the window system we will
## ultimately use.
term_header=
HAVE_X_WINDOWS=no
HAVE_X11=no
USE_X_TOOLKIT=none
case "${window_system}" in
x11 )
HAVE_X_WINDOWS=yes
HAVE_X11=yes
term_header=xterm.h
case "${with_x_toolkit}" in
athena | lucid ) USE_X_TOOLKIT=LUCID ;;
motif ) USE_X_TOOLKIT=MOTIF ;;
gtk ) with_gtk=yes
term_header=gtkutil.h
dnl Don't set this for GTK. A lot of tests below assumes Xt when
dnl USE_X_TOOLKIT is set.
USE_X_TOOLKIT=none ;;
gtk3 ) with_gtk3=yes
term_header=gtkutil.h
USE_X_TOOLKIT=none ;;
no ) USE_X_TOOLKIT=none ;;
dnl If user did not say whether to use a toolkit, make this decision later:
@ -1550,13 +1598,16 @@ dnl use the toolkit if we have gtk, or X11R5 or newer.
* ) USE_X_TOOLKIT=maybe ;;
esac
;;
nextstep | none )
HAVE_X_WINDOWS=no
HAVE_X11=no
USE_X_TOOLKIT=none
nextstep )
term_header=nsterm.h
;;
esac
if test -n "${term_header}"; then
AC_DEFINE_UNQUOTED(TERM_HEADER, "${term_header}",
[Define to the header for the built-in window system.])
fi
if test "$window_system" = none && test "X$with_x" != "Xno"; then
AC_CHECK_PROG(HAVE_XSERVER, X, true, false)
if test "$HAVE_XSERVER" = true ||
@ -1872,6 +1923,7 @@ if test "${with_gtk3}" = "yes"; then
fi
AC_DEFINE(HAVE_GTK3, 1, [Define to 1 if using GTK 3 or later.])
GTK_OBJ=emacsgtkfixed.o
term_header=gtkutil.h
fi
if test "$pkg_check_gtk" != "yes"; then
@ -1950,6 +2002,8 @@ if test "${HAVE_GTK}" = "yes"; then
gtk_widget_get_mapped gtk_adjustment_get_page_size \
gtk_orientable_set_orientation \
gtk_window_set_has_resize_grip)
term_header=gtkutil.h
fi
dnl D-Bus has been tested under GNU/Linux only. Must be adapted for
@ -2000,6 +2054,11 @@ if test "${HAVE_X11}" = "yes" && test "${with_gconf}" = "yes"; then
fi
if test "$HAVE_GSETTINGS" = "yes" || test "$HAVE_GCONF" = "yes"; then
PKG_CHECK_MODULES(GOBJECT, gobject-2.0 >= 2.0, HAVE_GOBJECT=yes, HAVE_GOBJECT=no)
if test "$HAVE_GOBJECT" = "yes"; then
SETTINGS_CFLAGS="$SETTINGS_CFLAGS $GOBJECT_CFLAGS"
SETTINGS_LIBS="$SETTINGS_LIBS $GOBJECT_LIBS"
fi
SAVE_CFLAGS="$CFLAGS"
SAVE_LIBS="$LIBS"
CFLAGS="$SETTINGS_CFLAGS $CFLAGS"
@ -3732,13 +3791,27 @@ else
esac
fi dnl GCC?
AC_CACHE_CHECK([for _setjmp], [emacs_cv_func__setjmp],
[AC_LINK_IFELSE(
[AC_LANG_PROGRAM(
[[#include <setjmp.h>
]],
[[jmp_buf j;
if (! _setjmp (j))
_longjmp (j, 1);]])],
[emacs_cv_func__setjmp=yes],
[emacs_cv_func__setjmp=no])])
if test $emacs_cv_func__setjmp = no; then
AC_DEFINE([_setjmp], [setjmp],
[Define to setjmp if _setjmp and _longjmp do not work. See _longjmp.])
AC_DEFINE([_longjmp], [longjmp],
[Define to longjmp if _setjmp and _longjmp do not work.
Because longjmp may alter signal masks, callers of _longjmp
should not assume that it leaves signal masks alone.])
fi
case $opsys in
sol2* | unixware )
dnl setjmp and longjmp can safely replace _setjmp and _longjmp,
dnl but they will run more slowly.
AC_DEFINE(_setjmp, setjmp, [Some platforms redefine this.])
AC_DEFINE(_longjmp, longjmp, [Some platforms redefine this.])
dnl TIOCGPGRP is broken in SysVr4, so we can't send signals to PTY
dnl subprocesses the usual way. But TIOCSIGNAL does work for PTYs,
dnl and this is all we need.
@ -3944,6 +4017,11 @@ AC_SUBST(ns_appsrc)
AC_SUBST(GNU_OBJC_CFLAGS)
AC_SUBST(OTHER_FILES)
if test -n "${term_header}"; then
AC_DEFINE_UNQUOTED(TERM_HEADER, "${term_header}",
[Define to the header for the built-in window system.])
fi
AC_DEFINE_UNQUOTED(EMACS_CONFIGURATION, "${canonical}",
[Define to the canonical Emacs configuration name.])
AC_DEFINE_UNQUOTED(EMACS_CONFIG_OPTIONS, "${ac_configure_args}",
@ -3958,7 +4036,7 @@ if test "${HAVE_X_WINDOWS}" = "yes" ; then
AC_DEFINE(HAVE_X_WINDOWS, 1,
[Define to 1 if you want to use the X window system.])
XMENU_OBJ=xmenu.o
XOBJ="xterm.o xfns.o xselect.o xrdb.o fontset.o xsmfns.o fringe.o image.o xsettings.o xgselect.o"
XOBJ="xterm.o xfns.o xselect.o xrdb.o xsmfns.o xsettings.o xgselect.o"
FONT_OBJ=xfont.o
if test "$HAVE_XFT" = "yes"; then
FONT_OBJ="$FONT_OBJ ftfont.o xftfont.o ftxfont.o"
@ -4248,13 +4326,14 @@ if test "x$GCC" = "xyes" && test "x$ORDINARY_LINK" != "xyes"; then
fi dnl if $GCC
AC_SUBST(LIB_GCC)
## If we're using X11/GNUstep, define some consequences.
if test "$HAVE_X_WINDOWS" = "yes" || test "$HAVE_NS" = "yes"; then
## Common for all window systems
if test "$window_system" != "none"; then
AC_DEFINE(HAVE_WINDOW_SYSTEM, 1, [Define if you have a window system.])
AC_DEFINE(HAVE_MOUSE, 1, [Define if you have mouse support.])
WINDOW_SYSTEM_OBJ="fontset.o fringe.o image.o"
fi
AC_SUBST(WINDOW_SYSTEM_OBJ)
AH_TOP([/* GNU Emacs site configuration template file.

View file

@ -1,3 +1,9 @@
2012-08-24 Michael Albinus <michael.albinus@gmx.de>
* cmdargs.texi (General Variables): Setting
$DBUS_SESSION_BUS_ADDRESS to a dummy value suppresses connections
to the D-Bus session bus. (Bug#12112)
2012-08-14 Eli Zaretskii <eliz@gnu.org>
* building.texi (Debugger Operation): Correct and improve

View file

@ -434,6 +434,11 @@ variables to be set, but it uses their values if they are set.
@item CDPATH
Used by the @code{cd} command to search for the directory you specify,
when you specify a relative directory name.
@item DBUS_SESSION_BUS_ADDRESS
Used by D-Bus when Emacs is compiled with it. Usually, there is no
need to change it. Setting it to a dummy address, like
@samp{unix:path=/tmp/foo}, suppresses connections to the D-Bus session
bus.
@item EMACSDATA
Directory for the architecture-independent files that come with Emacs.
This is used to initialize the variable @code{data-directory}.

View file

@ -1,3 +1,23 @@
2012-09-02 Chong Yidong <cyd@gnu.org>
* windows.texi (Window Configurations): Recommend against using
save-window-excursion (Bug#12075).
* control.texi (Catch and Throw):
* positions.texi (Excursions): Don't mention it.
2012-09-01 Paul Eggert <eggert@cs.ucla.edu>
Better seed support for (random).
* numbers.texi (Random Numbers): Document new behavior of
the calls (random) and (random STRING).
2012-08-21 Martin Rudalics <rudalics@gmx.at>
* windows.texi (Window Point): Document recent changes in
window-point and set-window-point.
(Selecting Windows): Document recent change in select-window.
2012-08-06 Eli Zaretskii <eliz@gnu.org>
* functions.texi (Closures): Put the main index entry for

View file

@ -556,16 +556,14 @@ the @code{catch} in @code{foo-outer} specifies the same symbol, so that
@code{catch} in between).
Executing @code{throw} exits all Lisp constructs up to the matching
@code{catch}, including function calls. When binding constructs such as
@code{let} or function calls are exited in this way, the bindings are
unbound, just as they are when these constructs exit normally
@code{catch}, including function calls. When binding constructs such
as @code{let} or function calls are exited in this way, the bindings
are unbound, just as they are when these constructs exit normally
(@pxref{Local Variables}). Likewise, @code{throw} restores the buffer
and position saved by @code{save-excursion} (@pxref{Excursions}), and
the narrowing status saved by @code{save-restriction} and the window
selection saved by @code{save-window-excursion} (@pxref{Window
Configurations}). It also runs any cleanups established with the
@code{unwind-protect} special form when it exits that form
(@pxref{Cleanups}).
the narrowing status saved by @code{save-restriction}. It also runs
any cleanups established with the @code{unwind-protect} special form
when it exits that form (@pxref{Cleanups}).
The @code{throw} need not appear lexically within the @code{catch}
that it jumps to. It can equally well be called from another function

View file

@ -1199,30 +1199,32 @@ numbers are not truly random, but they have certain properties that
mimic a random series. For example, all possible values occur equally
often in a pseudo-random series.
In Emacs, pseudo-random numbers are generated from a ``seed'' number.
In Emacs, pseudo-random numbers are generated from a ``seed''.
Starting from any given seed, the @code{random} function always
generates the same sequence of numbers. Emacs always starts with the
same seed value, so the sequence of values of @code{random} is actually
the same in each Emacs run! For example, in one operating system, the
first call to @code{(random)} after you start Emacs always returns
@minus{}1457731, and the second one always returns @minus{}7692030. This
repeatability is helpful for debugging.
generates the same sequence of numbers. Emacs typically starts with a
different seed each time, so the sequence of values of @code{random}
typically differs in each Emacs run.
If you want random numbers that don't always come out the same, execute
@code{(random t)}. This chooses a new seed based on the current time of
day and on Emacs's process @acronym{ID} number.
Sometimes you want the random number sequence to be repeatable. For
example, when debugging a program whose behavior depends on the random
number sequence, it is helpful to get the same behavior in each
program run. To make the sequence repeat, execute @code{(random "")}.
This sets the seed to a constant value for your particular Emacs
executable (though it may differ for other Emacs builds). You can use
other strings to choose various seed values.
@defun random &optional limit
This function returns a pseudo-random integer. Repeated calls return a
series of pseudo-random integers.
If @var{limit} is a positive integer, the value is chosen to be
nonnegative and less than @var{limit}.
nonnegative and less than @var{limit}. Otherwise, the value
might be any integer representable in Lisp.
If @var{limit} is @code{t}, it means to choose a new seed based on the
current time of day and on Emacs's process @acronym{ID} number.
On some machines, any integer representable in Lisp may be the result
of @code{random}. On other machines, the result can never be larger
than a certain maximum or less than a certain (negative) minimum.
If @var{limit} is a string, it means to choose a new seed based on the
string's contents.
@end defun

View file

@ -850,9 +850,6 @@ after setting the desired current buffer, as in the following example:
@cindex window excursions
Likewise, @code{save-excursion} does not restore window-buffer
correspondences altered by functions such as @code{switch-to-buffer}.
One way to restore these correspondences, and the selected window, is to
use @code{save-window-excursion} inside @code{save-excursion}
(@pxref{Window Configurations}).
@strong{Warning:} Ordinary insertion of text adjacent to the saved
point value relocates the saved value, just as it relocates all

View file

@ -1129,16 +1129,15 @@ are the opposite of what they are in those other functions.
@defun select-window window &optional norecord
This function makes @var{window} the selected window, as well as the
window selected within its frame (@pxref{Basic Windows}).
@var{window} must be a live window. Unless @var{window} already is the
selected window, its buffer becomes the current buffer (@pxref{Buffers
and Windows}). The return value is @var{window}.
window selected within its frame (@pxref{Basic Windows}). @var{window}
must be a live window. This function makes also @var{window}'s buffer
current (@pxref{Buffers and Windows}). The return value is
@var{window}.
By default, this function also moves @var{window}'s selected buffer to
the front of the buffer list (@pxref{The Buffer List}), and makes
@var{window} the most recently selected window. However, if the
optional argument @var{norecord} is non-@code{nil}, these additional
actions are omitted.
By default, this function also moves @var{window}'s buffer to the front
of the buffer list (@pxref{The Buffer List}), and makes @var{window} the
most recently selected window. However, if the optional argument
@var{norecord} is non-@code{nil}, these additional actions are omitted.
@end defun
@cindex most recently selected windows
@ -2276,19 +2275,18 @@ For a nonselected window, this is the value point would have (in that
window's buffer) if that window were selected. The default for
@var{window} is the selected window.
When @var{window} is the selected window and its buffer is also the
current buffer, the value returned is the same as point in that buffer.
Strictly speaking, it would be more correct to return the ``top-level''
value of point, outside of any @code{save-excursion} forms. But that
value is hard to find.
When @var{window} is the selected window, the value returned is the
value of point in that window's buffer. Strictly speaking, it would be
more correct to return the ``top-level'' value of point, outside of any
@code{save-excursion} forms. But that value is hard to find.
@end defun
@defun set-window-point window position
This function positions point in @var{window} at position
@var{position} in @var{window}'s buffer. It returns @var{position}.
If @var{window} is selected, and its buffer is current,
this simply does @code{goto-char}.
If @var{window} is selected, this simply does @code{goto-char} in
@var{window}'s buffer.
@end defun
@defvar window-point-insertion-type
@ -3155,42 +3153,21 @@ as @code{save-window-excursion}:
@end defun
@defmac save-window-excursion forms@dots{}
This special form records the window configuration, executes @var{forms}
in sequence, then restores the earlier window configuration. The window
configuration includes, for each window, the value of point and the
portion of the buffer that is visible. It also includes the choice of
selected window. However, it does not include the value of point in
the current buffer; use @code{save-excursion} also, if you wish to
preserve that.
This macro records the window configuration of the selected frame,
executes @var{forms} in sequence, then restores the earlier window
configuration. The return value is the value of the final form in
@var{forms}.
Don't use this construct when @code{save-selected-window} is sufficient.
Most Lisp code should not use this macro; @code{save-selected-window}
is typically sufficient. In particular, this macro cannot reliably
prevent the code in @var{forms} from opening new windows, because new
windows might be opened in other frames (@pxref{Choosing Window}), and
@code{save-window-excursion} only saves and restores the window
configuration on the current frame.
Exit from @code{save-window-excursion} always triggers execution of
@code{window-size-change-functions}. (It doesn't know how to tell
whether the restored configuration actually differs from the one in
effect at the end of the @var{forms}.)
The return value is the value of the final form in @var{forms}.
For example:
@example
@group
(split-window)
@result{} #<window 25 on control.texi>
@end group
@group
(setq w (selected-window))
@result{} #<window 19 on control.texi>
@end group
@group
(save-window-excursion
(delete-other-windows w)
(switch-to-buffer "foo")
'do-something)
@result{} do-something
;; @r{The screen is now split again.}
@end group
@end example
Do not use this macro in @code{window-size-change-functions}; exiting
the macro triggers execution of @code{window-size-change-functions},
leading to an endless loop.
@end defmac
@defun window-configuration-p object
@ -3426,11 +3403,11 @@ Creating or deleting windows counts as a size change, and therefore
causes these functions to be called. Changing the frame size also
counts, because it changes the sizes of the existing windows.
It is not a good idea to use @code{save-window-excursion} (@pxref{Window
Configurations}) in these functions, because that always counts as a
size change, and it would cause these functions to be called over and
over. In most cases, @code{save-selected-window} (@pxref{Selecting
Windows}) is what you need here.
You may use @code{save-selected-window} in these functions
(@pxref{Selecting Windows}). However, do not use
@code{save-window-excursion} (@pxref{Window Configurations}); exiting
that macro counts as a size change, which would cause these functions
to be called over and over.
@end defvar
@defvar window-configuration-change-hook

View file

@ -1,3 +1,18 @@
2012-09-01 Paul Eggert <eggert@cs.ucla.edu>
Better seeds for (random).
* NEWS: Document new behavior of (random), (random "string").
2012-08-28 Andreas Schwab <schwab@linux-m68k.org>
* charsets/MULE-ethiopic.map: Fix typo in comment.
* charsets/MULE-ipa.map: Likewise.
* charsets/MULE-is13194.map: Likewise.
* charsets/MULE-lviscii.map: Likewise.
* charsets/MULE-sisheng.map: Likewise.
* charsets/MULE-tibetan.map: Likewise.
* charsets/MULE-uviscii.map: Likewise.
2012-08-09 Chong Yidong <cyd@gnu.org>
* images/splash.svg, images/splash.png: Tweak SVG paths to improve

View file

@ -23,7 +23,7 @@ so we will look at it and add it to the manual.
* Installation Changes in Emacs 24.3
** New configure option '--without-all' to disable additonal features.
** New configure option '--without-all' to disable additional features.
This disables most of the features that are normally enabled by default.
** New configure option '--enable-link-time-optimization' to utilize
@ -38,6 +38,11 @@ may be useful.
** The configure option '--disable-maintainer-mode' has been removed,
as it was confusingly-named and rarely useful.
---
** You can use `NO_BIN_LINK=t make install' to prevent the installation
overwriting "emacs" in the installation bin/ directory with a link
to emacs-VERSION.
---
** Emacs uses libtinfo in preference to libncurses, if available.
@ -160,6 +165,10 @@ The PCL-CVS commands are still available via the keyboard.
* Editing Changes in Emacs 24.3
** The `z' key no longer has a binding in most special modes.
It used to be bound to `kill-this-buffer', but `z' is too easy to
accidentally type.
** New option `yank-handled-properties' allows processing of text
properties on yanked text, in more ways that are more general than
just removing them, as done by `yank-excluded-properties'.
@ -174,6 +183,15 @@ end of the buffer. It defaults to t.
and `M-s _' in Isearch toggles symbol search mode.
`M-s c' in Isearch toggles search case-sensitivity.
*** `M-s SPC' in Isearch toggles whitespace matching mode
in both ordinary and regexp incremental search, so that each
sequence of spaces in the search string matches any combination
of one or more whitespace characters defined by the variable
`search-whitespace-regexp'. In ordinary incremental search,
`isearch-toggle-lax-whitespace' toggles the value of the variable
`isearch-lax-whitespace'. In regexp incremental search, it toggles
the value of the variable `isearch-regexp-lax-whitespace'.
** M-x move-to-column, if called interactively with no prefix arg, now
prompts for a column number.
@ -195,6 +213,8 @@ It copies the region-rectangle as the last rectangle kill.
* Changes in Specialized Modes and Packages in Emacs 24.3
** Compilation has a new `compilation-always-kill' configuration variable.
** Term changes
The variables `term-default-fg-color' and `term-default-bg-color' are
@ -510,6 +530,11 @@ inefficiency, and not namespace-clean.
* Incompatible Lisp Changes in Emacs 24.3
** (random) by default now returns a different random sequence in
every Emacs run. Use (random S), where S is a string, to set the
random seed to a value based on S, in order to get a repeatable
sequence in later calls.
** The function `x-select-font' can return a font spec, instead of a
font name as a string. Whether it returns a font spec or a font name
depends on the graphical library.
@ -576,6 +601,8 @@ are deprecated and will be removed eventually.
* Lisp changes in Emacs 24.3
** New minor mode `read-only-mode' to replace toggle-read-only (now obsolete).
** New functions `autoloadp' and `autoload-do-load'.
** New function `posnp' to test if an object is a `posn'.
@ -604,9 +631,26 @@ The interpretation of the DECLS is determined by `defun-declarations-alist'.
*** The functions get-lru-window, get-mru-window and get-largest-window
now accept a third argument to avoid choosing the selected window.
*** New macro with-temp-buffer-window.
*** New display action function display-buffer-below-selected.
*** New display action alist `inhibit-switch-frame', if non-nil, tells
display action functions to avoid changing which frame is selected.
*** New display action alist `pop-up-frame-parameters', if non-nil,
specifies frame parameters to give any newly-created frame.
*** The following variables are obsolete, as they can be replaced by
appropriate entries in the `display-buffer-alist' function introduced
in Emacs 24.1:
**** `display-buffer-reuse-frames'
**** `special-display-regexps'
**** `special-display-frame-alist'
**** `special-display-buffer-names'
**** `special-display-function'
** Completion
*** New function `completion-table-with-quoting' to handle completion

View file

@ -1,4 +1,4 @@
# Generated by running amdin/charsets/mule-charsets.el in Emacs 22.3.
# Generated by running admin/charsets/mule-charsets.el in Emacs 22.3.
0x2121 0x1200
0x2122 0x1201
0x2123 0x1202

View file

@ -1,4 +1,4 @@
# Generated by running amdin/charsets/mule-charsets.el in Emacs 22.3.
# Generated by running admin/charsets/mule-charsets.el in Emacs 22.3.
0x20 0x0069
0x21 0x026A
0x22 0x0065

View file

@ -1,4 +1,4 @@
# Generated by running amdin/charsets/mule-charsets.el in Emacs 22.3.
# Generated by running admin/charsets/mule-charsets.el in Emacs 22.3.
0x21 0x0901
0x22 0x0902
0x23 0x0903

View file

@ -1,4 +1,4 @@
# Generated by running amdin/charsets/mule-charsets.el in Emacs 22.3.
# Generated by running admin/charsets/mule-charsets.el in Emacs 22.3.
0x21 0x1EAF
0x22 0x1EB1
0x23 0x1EB7

View file

@ -1,4 +1,4 @@
# Generated by running amdin/charsets/mule-charsets.el in Emacs 22.3.
# Generated by running admin/charsets/mule-charsets.el in Emacs 22.3.
0x21 0x0101
0x22 0x00E1
0x23 0x01CE

View file

@ -1,4 +1,4 @@
# Generated by running amdin/charsets/mule-charsets.el in Emacs 22.3.
# Generated by running admin/charsets/mule-charsets.el in Emacs 22.3.
0x2130 0x0F00
0x2131 0x0F01
0x2132 0x0F02

View file

@ -1,4 +1,4 @@
# Generated by running amdin/charsets/mule-charsets.el in Emacs 22.3.
# Generated by running admin/charsets/mule-charsets.el in Emacs 22.3.
0x21 0x1EAE
0x22 0x1EB0
0x23 0x1EB6

View file

@ -1,3 +1,8 @@
2012-08-31 Andreas Schwab <schwab@linux-m68k.org>
* etags.c (consider_token): Always zero-terminate token buffer.
(Bug#12306)
2012-08-19 Paul Eggert <eggert@cs.ucla.edu>
Rely on <config.h> + <unistd.h> to declare 'environ'.

View file

@ -2878,6 +2878,7 @@ consider_token (register char *str, register int len, register int c, int *c_ext
objdef = omethodtag;
linebuffer_setlen (&token_name, oldlen + len);
memcpy (token_name.buffer + oldlen, str, len);
token_name.buffer[oldlen + len] = '\0';
return TRUE;
}
return FALSE;

3
lib/execinfo.c Normal file
View file

@ -0,0 +1,3 @@
#include <config.h>
#define _GL_EXECINFO_INLINE _GL_EXTERN_INLINE
#include "execinfo.h"

54
lib/execinfo.in.h Normal file
View file

@ -0,0 +1,54 @@
/* Information about executables.
Copyright (C) 2012 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. */
#ifndef _GL_EXECINFO_H
#define _GL_EXECINFO_H
_GL_INLINE_HEADER_BEGIN
#ifndef _GL_EXECINFO_INLINE
# define _GL_EXECINFO_INLINE _GL_INLINE
#endif
_GL_EXECINFO_INLINE int
backtrace (void **buffer, int size)
{
(void) buffer;
(void) size;
return 0;
}
_GL_EXECINFO_INLINE char **
backtrace_symbols (void *const *buffer, int size)
{
(void) buffer;
(void) size;
return 0;
}
_GL_EXECINFO_INLINE void
backtrace_symbols_fd (void *const *buffer, int size, int fd)
{
(void) buffer;
(void) size;
(void) fd;
}
_GL_INLINE_HEADER_END
#endif

View file

@ -21,7 +21,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=build-aux --avoid=errno --avoid=fcntl --avoid=fcntl-h --avoid=fstat --avoid=msvc-inval --avoid=msvc-nothrow --avoid=raise --avoid=select --avoid=sigprocmask --avoid=sys_types --avoid=threadlib --makefile-name=gnulib.mk --conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files alloca-opt c-ctype c-strcase careadlinkat crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512 dtoastr dtotimespec dup2 environ filemode getloadavg getopt-gnu gettime gettimeofday ignore-value intprops largefile lstat manywarnings mktime pselect pthread_sigmask readlink socklen stat-time stdalign stdarg stdbool stdio strftime strtoimax strtoumax symlink sys_stat sys_time time timespec-add timespec-sub utimens warnings
# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --avoid=errno --avoid=fcntl --avoid=fcntl-h --avoid=fstat --avoid=msvc-inval --avoid=msvc-nothrow --avoid=raise --avoid=select --avoid=sigprocmask --avoid=sys_types --avoid=threadlib --makefile-name=gnulib.mk --conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files alloca-opt c-ctype c-strcase careadlinkat crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512 dtoastr dtotimespec dup2 environ execinfo filemode getloadavg getopt-gnu gettime gettimeofday ignore-value intprops largefile lstat manywarnings mktime pselect pthread_sigmask readlink socklen stat-time stdalign stdarg stdbool stdio strftime strtoimax strtoumax symlink sys_stat sys_time time timespec-add timespec-sub utimens warnings
MOSTLYCLEANFILES += core *.stackdump
@ -150,6 +150,31 @@ EXTRA_libgnu_a_SOURCES += dup2.c
## end gnulib module dup2
## begin gnulib module execinfo
BUILT_SOURCES += $(EXECINFO_H)
# We need the following in order to create <execinfo.h> when the system
# doesn't have one that works.
if GL_GENERATE_EXECINFO_H
execinfo.h: execinfo.in.h $(top_builddir)/config.status
$(AM_V_GEN)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
cat $(srcdir)/execinfo.in.h; \
} > $@-t && \
mv $@-t $@
else
execinfo.h: $(top_builddir)/config.status
rm -f $@
endif
MOSTLYCLEANFILES += execinfo.h execinfo.h-t
EXTRA_DIST += execinfo.c execinfo.in.h
EXTRA_libgnu_a_SOURCES += execinfo.c
## end gnulib module execinfo
## begin gnulib module filemode
libgnu_a_SOURCES += filemode.c

View file

@ -28,6 +28,7 @@ GNULIBOBJS = $(BLD)/c-ctype.$(O) \
$(BLD)/c-strncasecmp.$(O) \
$(BLD)/dtoastr.$(O) \
$(BLD)/dtotimespec.$(O) \
$(BLD)/execinfo.$(O) \
$(BLD)/getopt.$(O) \
$(BLD)/getopt1.$(O) \
$(BLD)/gettime.$(O) \
@ -129,6 +130,11 @@ $(BLD)/dtotimespec.$(O) : \
$(GNU_LIB)/timespec.h \
$(CONFIG_H)
$(BLD)/execinfo.$(O) : \
$(GNU_LIB)/execinfo.c \
$(GNU_LIB)/execinfo.h \
$(CONFIG_H)
$(BLD)/getopt.$(O) : \
$(GNU_LIB)/getopt.c \
$(GNU_LIB)/getopt.h \
@ -299,3 +305,7 @@ getopt_h:
< getopt.in.h > getopt_.h-t
$(CP) getopt_.h-t getopt_.h
- $(DEL) getopt_.h-t
execinfo.h: execinfo.in.h
$(CP) execinfo.in.h $@

View file

@ -66,24 +66,19 @@
# undef true
#endif
/* For the sake of symbolic names in gdb, we define true and false as
enum constants, not only as macros.
It is tempting to write
typedef enum { false = 0, true = 1 } _Bool;
so that gdb prints values of type 'bool' symbolically. But if we do
this, values of type '_Bool' may promote to 'int' or 'unsigned int'
(see ISO C 99 6.7.2.2.(4)); however, '_Bool' must promote to 'int'
(see ISO C 99 6.3.1.1.(2)). So we add a negative value to the
enum; this ensures that '_Bool' promotes to 'int'. */
#if defined __cplusplus || (defined __BEOS__ && !defined __HAIKU__)
#ifdef __cplusplus
# define _Bool bool
# define bool bool
#else
# if defined __BEOS__ && !defined __HAIKU__
/* A compiler known to have 'bool'. */
/* If the compiler already has both 'bool' and '_Bool', we can assume they
are the same types. */
# if !@HAVE__BOOL@
# if !@HAVE__BOOL@
typedef bool _Bool;
# endif
#else
# if !defined __GNUC__
# endif
# else
# if !defined __GNUC__
/* If @HAVE__BOOL@:
Some HP-UX cc and AIX IBM C compiler versions have compiler bugs when
the built-in _Bool type is used. See
@ -103,19 +98,35 @@ typedef bool _Bool;
"Invalid enumerator. (badenum)" with HP-UX cc on Tru64.
The only benefit of the enum, debuggability, is not important
with these compilers. So use 'signed char' and no enum. */
# define _Bool signed char
# else
# define _Bool signed char
# else
/* With this compiler, trust the _Bool type if the compiler has it. */
# if !@HAVE__BOOL@
# if !@HAVE__BOOL@
/* For the sake of symbolic names in gdb, define true and false as
enum constants, not only as macros.
It is tempting to write
typedef enum { false = 0, true = 1 } _Bool;
so that gdb prints values of type 'bool' symbolically. But then
values of type '_Bool' might promote to 'int' or 'unsigned int'
(see ISO C 99 6.7.2.2.(4)); however, '_Bool' must promote to 'int'
(see ISO C 99 6.3.1.1.(2)). So add a negative value to the
enum; this ensures that '_Bool' promotes to 'int'. */
typedef enum { _Bool_must_promote_to_int = -1, false = 0, true = 1 } _Bool;
# endif
# endif
# endif
# define bool _Bool
#endif
#define bool _Bool
/* The other macros must be usable in preprocessor directives. */
#define false 0
#define true 1
#ifdef __cplusplus
# define false false
# define true true
#else
# define false 0
# define true 1
#endif
#define __bool_true_false_are_defined 1
#endif /* _GL_STDBOOL_H */

View file

@ -1,3 +1,454 @@
2012-09-04 Dmitry Gutov <dgutov@yandex.ru>
* progmodes/ruby-mode.el: Clean up keybindings.
(ruby-mode-map): Don't bind ruby-electric-brace,
ruby-beginning-of-defun, ruby-end-of-defun, ruby-mark-defun,
backward-kill-word, reindent-then-newline-and-indent.
(ruby-mark-defun): Remove.
(ruby-electric-brace): Remove. Obsoleted by electric-indent-chars.
(ruby-mode): Set local beginning-of-defun-function and
end-of-defun-function values.
2012-09-03 Martin Rudalics <rudalics@gmx.at>
* window.el (temp-buffer-window-setup-hook)
(temp-buffer-window-show-hook): New hooks.
(temp-buffer-window-setup, temp-buffer-window-show)
(with-temp-buffer-window): New functions.
(fit-window-to-buffer): Remove unused optional argument
OVERRIDE.
(special-display-popup-frame): Make sure the window used shows
BUFFER.
* help.el (temp-buffer-resize-mode): Fix doc-string.
(resize-temp-buffer-window): New optional argument WINDOW.
* files.el (recover-file, save-buffers-kill-emacs):
* dired.el (dired-mark-pop-up): Use with-temp-buffer-window.
2012-09-02 Michael Albinus <michael.albinus@gmx.de>
* eshell/em-unix.el (eshell/sudo): When we have an ad-hoc
remote definition of `default-directory', ensure we can connect.
2012-09-02 Juri Linkov <juri@jurta.org>
Toggle whitespace matching mode with M-s SPC.
http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00008.html
* isearch.el (search-whitespace-regexp): Doc fix.
Remove cons cell customization.
(isearch-mode-map): Bind "\M-s " to isearch-toggle-lax-whitespace.
(isearch-lax-whitespace, isearch-regexp-lax-whitespace):
New variables.
(isearch-forward, isearch-forward-regexp): Doc fix.
(isearch-toggle-lax-whitespace): New command.
(search-forward-lax-whitespace, search-backward-lax-whitespace)
(re-search-forward-lax-whitespace)
(re-search-backward-lax-whitespace): New functions.
(isearch-whitespace-regexp): Remove function.
(isearch-query-replace): Let-bind replace-search-function and
replace-re-search-function.
(isearch-occur): Let-bind search-spaces-regexp according to the
value of isearch-lax-whitespace and isearch-regexp-lax-whitespace.
(isearch-quote-char): Check isearch-regexp-lax-whitespace in the
condition for C-q SPC.
(isearch-search-fun-default): Use new functions mentioned above.
(isearch-search-forward, isearch-search-backward): Remove functions.
(isearch-search): Don't let-bind search-spaces-regexp.
(isearch-lazy-highlight-space-regexp): Remove variable.
(isearch-lazy-highlight-lax-whitespace)
(isearch-lazy-highlight-regexp-lax-whitespace): New variables.
(isearch-lazy-highlight-new-loop): Use them.
(isearch-lazy-highlight-search): Don't let-bind search-spaces-regexp.
2012-09-02 Chong Yidong <cyd@gnu.org>
* dired.el (dired-mode-map): Menu string fixes (Bug#11616).
2012-09-02 Glenn Morris <rgm@gnu.org>
* simple.el (undo): Tweak message in undo-only case. (Bug#12283)
2012-09-01 Glenn Morris <rgm@gnu.org>
* term.el: Tidy up menu definitions.
(term-mode-map): Use easymenu for In/Out, Complete menus.
(term-pager-break-map): Initialize in the defvar.
(term-terminal-menu, term-signals-menu): Define with easymenu.
(term-terminal-menu): Also show it in line-mode. (Bug#11957)
(term-pager-menu): New, extracted from term-process-pager.
(term-mode, term-char-mode, term-process-pager): Use easymenu-add.
(term-update-mode-line): Propertize line/char and page items.
(term-process-pager): Move keymap initialization elsewhere.
2012-09-01 Martin Rudalics <rudalics@gmx.at>
* window.el (switch-to-prev-buffer): Handle additional values of
BURY-OR-KILL argument. Don't switch in minibuffer window.
(switch-to-next-buffer): Don't switch in minibuffer window.
(quit-restore-window): New function based on quit-window.
Handle additional values of former KILL argument.
(quit-window): Call quit-restore-window with appropriate
interpretation of KILL argument.
(display-buffer-below-selected): New buffer display action
function.
2012-09-01 Stefan Monnier <monnier@iro.umontreal.ca>
* minibuffer.el (completion-at-point-functions): Complete docstring
(bug#12254).
2012-09-01 Paul Eggert <eggert@cs.ucla.edu>
Better seed support for (random).
* play/5x5.el, play/animate.el, play/cookie1.el, play/dissociate.el:
* play/doctor.el, play/dunnet.el, play/gomoku.el, play/landmark.el:
* play/mpuz.el, play/tetris.el, play/zone.el:
* calc/calc-comb.el (math-init-random-base):
* play/blackbox.el (bb-init-board):
* play/life.el (life):
* server.el (server-use-tcp):
* type-break.el (type-break):
Remove unnecessary call to (random t).
* net/sasl.el (sasl-unique-id-function):
Change (random t) to (random), now that the latter is more random.
* play/life.el (life-initialized): Remove no-longer-needed var.
2012-08-31 Alp Aker <alp.tekin.aker@gmail.com>
* window.el (switch-to-prev-buffer, switch-to-next-buffer):
Consider frame's buffer predicate when choosing the buffer.
(Bug#12081)
2012-08-30 Richard Stallman <rms@gnu.org>
* simple.el (special-mode-map): Delete binding for `z'.
2012-08-30 Andreas Schwab <schwab@linux-m68k.org>
* progmodes/compile.el (compilation-always-kill): Doc fix.
2012-08-30 Chong Yidong <cyd@gnu.org>
* window.el (display-buffer-reuse-frames): Make the obsolescence
message more informative.
2012-08-30 Glenn Morris <rgm@gnu.org>
* paren.el (show-paren-delay):
Add a :set function. Doc fix. (Bug#12297)
2012-08-29 Martin Blais <blais@furius.ca> (tiny change)
* progmodes/compile.el (compilation-always-kill): New var.
(compilation-start): Use it.
2012-08-29 Stefan Monnier <monnier@iro.umontreal.ca>
* simple.el (read-only-mode): Move from files.el for bootstrapping.
* files.el (read-only-mode): Move to simple.el.
* files.el (read-only-mode): New minor mode.
(toggle-read-only): Use it and mark obsolete.
(find-file--read-only):
* vc/vc.el (vc-next-action, vc-checkout):
* vc/vc-cvs.el (vc-cvs-checkout):
* obsolete/vc-mcvs.el (vc-mcvs-update):
* ffap.el (ffap--toggle-read-only): Update callers.
2012-08-29 Michael Albinus <michael.albinus@gmx.de>
* eshell/esh-ext.el (eshell-external-command): Do not examine
remote shell scripts. See
<https://bugs.launchpad.net/ubuntu/+source/emacs23/+bug/1035790>.
* net/tramp-sh.el (tramp-remote-path): Add "/sbin" and
"/usr/local/sbin".
2012-08-28 Stefan Monnier <monnier@iro.umontreal.ca>
* emacs-lisp/cl-lib.el (buffer-string): Fix setter macro (bug#12293).
2012-08-28 Leo Liu <sdl.web@gmail.com>
* progmodes/sh-script.el (sh-dynamic-complete-functions): Adapt to
completion-at-point. (Bug#12220)
* skeleton.el (skeleton-untabify): Change to nil (bug#12223).
* progmodes/sh-script.el (sh-indent-comment): Change to t (bug#12267).
2012-08-28 Stefan Monnier <monnier@iro.umontreal.ca>
* files.el (safe-local-eval-forms): Fix before-save-hook entry to
be buffer-local; add delete-trailing-whitespace (bug#12259).
2012-08-28 Jeremy Moore <jmoore@ieee.org> (tiny change)
* progmodes/hideif.el (hif-compress-define-list):
Fix typo. (Bug#11951)
2012-08-28 Dan Nicolaescu <dann@gnu.org>
* progmodes/hideshow.el (hs-block-end-regexp): Restore lost
buffer local setting.
* net/rcirc.el (rcirc-split-message): Fix for buffer-local
rcirc-encode-coding-system.
2012-08-28 Leo Liu <sdl.web@gmail.com>
* net/rcirc.el (rcirc-split-message): New function.
(rcirc-send-message): Use it. (Bug#12051)
2012-08-28 Juri Linkov <juri@jurta.org>
* info.el (Info-fontify-node): Hide empty lines at the end of
the node. (Bug#12272)
2012-08-27 Drew Adams <drew.adams@oracle.com>
* dired.el (dired-pop-to-buffer): Make window start at beginning
of buffer (Bug#12281).
2012-08-26 Chong Yidong <cyd@gnu.org>
* window.el (special-display-regexps, special-display-frame-alist)
(special-display-buffer-names, special-display-function)
(display-buffer-reuse-frames): Mark as obsolete.
* progmodes/compile.el: Don't use display-buffer-reuse-frames.
* help.el (help-print-return-message): Don't treat
display-buffer-reuse-frames specially.
2012-08-26 Chong Yidong <cyd@gnu.org>
* progmodes/gdb-mi.el (gdb-display-buffer-other-frame-action):
New variable, replacing gdb-frame-parameters.
(gdb-frame-io-buffer, gdb-frame-breakpoints-buffer)
(gdb-frame-threads-buffer, gdb-frame-memory-buffer)
(gdb-frame-disassembly-buffer, gdb-frame-stack-buffer)
(gdb-frame-locals-buffer, gdb-frame-registers-buffer): Use it.
(def-gdb-frame-for-buffer): Macro deleted. It is easier to define
the functions directly with gdb-display-buffer-other-frame-action.
(gdb-display-breakpoints-buffer, gdb-display-threads-buffer)
(gdb-display-memory-buffer, gdb-display-disassembly-buffer)
(gdb-display-stack-buffer, gdb-display-locals-buffer)
(gdb-display-registers-buffer): Define directly.
(def-gdb-display-buffer): Macro deleted.
(gdb-display-buffer): Remove second and third args, callers don't
use them. Defer to the default display-buffer behavior, apart
from making windows dedicated.
(gdb-setup-windows): Don't call display-buffer unnecessarily.
* progmodes/gud.el (gud-display-line): Just use display-buffer.
* window.el (display-buffer-pop-up-frame): Handle a
pop-up-frame-parameters alist entry.
(display-buffer): Document it.
2012-08-26 Chong Yidong <cyd@gnu.org>
* isearch.el (search-whitespace-regexp): Make string and nil
values apply to both ordinary and regexp search. Allow a cons
cell value to distinguish between the two.
(isearch-whitespace-regexp, isearch-search-forward)
(isearch-search-backward): New functions.
(isearch-occur, isearch-search-fun-default, isearch-search)
(isearch-lazy-highlight-new-loop): Use them.
(isearch-forward, isearch-forward-regexp): Doc fix.
2012-08-26 Chong Yidong <cyd@gnu.org>
* faces.el (help-argument-name): Always inherit from italic
(Bug#12213).
2012-08-25 Martin Rudalics <rudalics@gmx.at>
* window.el (window--even-window-heights): Even heights when
WINDOW and the selected window form a vertical combination.
(display-buffer-use-some-window): Provide that window used gets
sized back by quit-window. (Bug#11880) and (Bug#12091)
2012-08-24 Paul Eggert <eggert@cs.ucla.edu>
Fix file time stamp problem with bzr and CVS (Bug#12001).
* vc/vc-cvs.el (vc-cvs-parse-entry): Ignore subsecond information
in the file's time stamp, since the version control system loses
that information.
2012-08-22 Juri Linkov <juri@jurta.org>
* info.el (Info-fontify-node): Hide the suffix of the
Info file name in the header line. (Bug#12187)
2012-08-22 Glenn Morris <rgm@gnu.org>
* calendar/cal-tex.el (cal-tex-weekly-common):
Restore leading blank page.
2012-08-22 Le Wang <l26wang@gmail.com> (tiny change)
* misc.el (forward-to-word, backward-to-word): Activate or extend
the region under `shift-select-mode'. (Bug#12231)
2012-08-22 Bastien Guerry <bzg@gnu.org>
* progmodes/executable.el (executable-prefix): Set to "#!" instead
of "#! ". http://www.in-ulm.de/~mascheck/various/shebang/#details
gives details on why the space is never needed.
2012-08-22 Martin Rudalics <rudalics@gmx.at>
* window.el (walk-window-tree, window-with-parameter):
New optional argument MINIBUF to control whether these functions
should run on the minibuffer window.
(window-at-side-list): Don't operate on minibuffer window.
(window-in-direction): Simplify and rewrite doc-string.
(window--size-ignore): Rename to window--size-ignore-p.
Update callers.
(display-buffer-in-atom-window, window--major-non-side-window)
(window--major-side-window, display-buffer-in-major-side-window)
(delete-side-window, display-buffer-in-side-window):
New functions.
(window--side-check, window-deletable-p, delete-window)
(delete-other-windows, split-window): Handle side windows and
atomic windows appropriately.
(window--display-buffer): Call display-buffer-record-window also
when the window buffer did not change.
2012-08-22 Christopher Schmidt <christopher@ch.ristopher.com>
* help-fns.el (help-fns--key-bindings):
Abbreviate non-symbol remap targets. (Bug#12174)
2012-08-22 Martin Rudalics <rudalics@gmx.at>
* dired.el (dired-mark-remembered): Don't clobber point.
(Bug#11795)
2012-08-22 Glenn Morris <rgm@gnu.org>
* progmodes/bug-reference.el (bug-reference): New custom group.
(bug-reference-bug-regexp): Make it a defcustom.
2012-08-22 Daiki Ueno <ueno@unixuser.org>
* progmodes/js.el (js-indent-level, js-expr-indent-offset)
(js-paren-indent-offset, js-square-indent-offset)
(js-curly-indent-offset): Add :safe (Bug#12257).
2012-08-22 Edward O'Connor <hober0@gmail.com>
* json.el (json-key-format): Add error properties.
(json-encode-key): New function.
(json-encode-hash-table, json-encode-alist, json-encode-plist):
Use json-encode-key.
2012-08-22 Glenn Morris <rgm@gnu.org>
* calendar/cal-tex.el (cal-tex-longday): New function, replacing...
(cal-tex-leftday, cal-tex-rightday): Remove functions.
(cal-tex-weekly-common, cal-tex-cursor-filofax-2week):
Update for above change.
2012-08-21 Andreas Schwab <schwab@linux-m68k.org>
* cus-face.el (custom-face-attributes): Fix customize type for the
:underline attribute. (Bug#11805)
2012-08-21 Martin Rudalics <rudalics@gmx.at>
* window.el (window-point-1, set-window-point-1): Remove.
(window-in-direction, record-window-buffer)
(set-window-buffer-start-and-point, split-window-below)
(window--state-get-1, display-buffer-record-window):
Replace calls to window-point-1 and set-window-point-1 by calls to
window-point and set-window-point respectively.
2012-08-21 Glenn Morris <rgm@gnu.org>
* calendar/cal-tex.el (cal-tex-weekly-common): New function.
(cal-tex-cursor-week-at-a-glance, cal-tex-cursor-filofax-week):
Use it.
* calendar/cal-tex.el (cal-tex-rightday): Add optional funcname arg.
(cal-tex-shortday): New function.
(cal-tex-cursor-week-at-a-glance, cal-tex-cursor-filofax-week)
(cal-tex-cursor-filofax-daily): Use the above.
* calendar/cal-tex.el (cal-tex-leftday, cal-tex-rightday):
New functions.
(cal-tex-cursor-week-at-a-glance, cal-tex-cursor-filofax-2week)
(cal-tex-cursor-filofax-week): Use them.
* calendar/cal-tex.el (cal-tex-lefthead, cal-tex-righthead):
New constants.
(cal-tex-cursor-week-at-a-glance, cal-tex-cursor-filofax-2week)
(cal-tex-cursor-filofax-week, cal-tex-cursor-filofax-daily): Use them.
* calendar/cal-tex.el (cal-tex-preamble): Generate new buffers.
(cal-tex-end-document): Don't rely on buffer name.
* calendar/cal-tex.el (cal-tex-cursor-filofax-year):
Use cal-tex-vspace.
(cal-tex-vspace, cal-tex-hspace, cal-tex-em, cal-tex-bf)
(cal-tex-Huge-bf, cal-tex-large-bf): Use cal-tex-cmd.
(cal-tex-scriptsize, cal-tex-huge, cal-tex-Huge, cal-tex-large):
Use cal-tex-arg.
* calendar/cal-tex.el (cal-tex-cursor-filofax-year)
(cal-tex-cursor-week, cal-tex-cursor-week2)
(cal-tex-cursor-week-iso, cal-tex-cursor-week-at-a-glance)
(cal-tex-cursor-filofax-2week, cal-tex-cursor-filofax-week)
(cal-tex-cursor-filofax-daily, cal-tex-cursor-day)
(cal-tex-insert-preamble, cal-tex-b-document)
(cal-tex-e-document, cal-tex-b-center, cal-tex-e-center):
Improve cal-tex-cmd usage.
* calendar/cal-tex.el (cal-tex-filofax-paper): New function.
(cal-tex-cursor-filofax-year, cal-tex-cursor-filofax-2week)
(cal-tex-cursor-filofax-week, cal-tex-cursor-filofax-daily): Use it.
(cal-tex-weekly-paper): New function.
(cal-tex-cursor-week, cal-tex-cursor-week2)
(cal-tex-cursor-week-iso, cal-tex-cursor-week-monday)
(cal-tex-cursor-day): Use it.
* calendar/cal-tex.el (cal-tex-cursor-week-at-a-glance)
(cal-tex-cursor-filofax-week): Remove leading blank page.
* calendar/cal-tex.el (cal-tex-cursor-week-at-a-glance):
Add autoload cookie. For now at least, don't use color, since
no other cal-tex function does.
* calendar/cal-tex.el (cal-tex-cursor-week-iso)
(cal-tex-cursor-filofax-2week, cal-tex-cursor-filofax-week)
(cal-tex-cursor-filofax-daily): Correct start date for diary entries.
2012-08-21 Juri Linkov <juri@jurta.org>
* info.el (Info-file-attributes): New variable.
(info-insert-file-contents): Add file attributes to
`Info-file-attributes'. Clear the caches `Info-index-nodes' and
`Info-toc-nodes' when previous modtime of the Info file is less
than new modtime.
(Info-toc-nodes, Info-index-nodes): Move definitions up to the top
of info.el. (Bug#12230)
2012-08-20 Glenn Morris <rgm@gnu.org>
* calendar/diary-lib.el (diary-include-files, diary-sexp-entry):
* calendar/holidays.el (calendar-holiday-list):
Report errors with display-warning rather than beep'n'sleep.
2012-08-20 Michael Albinus <michael.albinus@gmx.de>
* net/tramp.el (tramp-accept-process-output): Accept only output
from PROC. Otherwise, process filters and sentinels might be
confused. (Bug#12145)
2012-08-20 Chong Yidong <cyd@gnu.org>
* descr-text.el (describe-text-properties-1): Use overlays-in to
@ -32,8 +483,8 @@
(yank-excluded-properties): Add font-lock-face and category.
(yank): Doc fix.
* subr.el (remove-yank-excluded-properties): Obey
yank-handled-properties. The special handling of font-lock-face
* subr.el (remove-yank-excluded-properties):
Obey yank-handled-properties. The special handling of font-lock-face
and category is now done this way, instead of being hard-coded.
(insert-for-yank-1): Remove font-lock-face handling.
(yank-handle-font-lock-face-property)
@ -47,8 +498,8 @@
2012-08-17 Michael Albinus <michael.albinus@gmx.de>
* net/tramp-sh.el (tramp-sh-handle-start-file-process): Eliminate
superfluous prompt. (Bug#12203)
* net/tramp-sh.el (tramp-sh-handle-start-file-process):
Eliminate superfluous prompt. (Bug#12203)
2012-08-17 Chong Yidong <cyd@gnu.org>
@ -75,8 +526,8 @@
(next-buffer, previous-buffer, split-window, balance-windows-2)
(set-window-text-height, window-buffer-height)
(fit-window-to-buffer, shrink-window-if-larger-than-buffer)
(truncated-partial-width-window-p): Minor code adjustments. In
doc-strings state whether the argument window has to denote a
(truncated-partial-width-window-p): Minor code adjustments.
In doc-strings state whether the argument window has to denote a
live, valid or any window.
2012-08-16 Phil Sainty <psainty@orcon.net.nz> (tiny change)
@ -251,7 +702,7 @@
2012-08-13 Bastien Guerry <bzg@gnu.org>
* window.el (special-display-popup-frame): Small docstring
* window.el (special-display-popup-frame): Minor docstring
enhancement. (Bug#12172)
2012-08-13 Andreas Schwab <schwab@linux-m68k.org>
@ -319,6 +770,7 @@
* files.el (hack-local-variables-filter): If an eval: form is not
known to be safe, and enable-local-variables is :safe, then ignore
the form totally, as is done for non-eval forms. (Bug#12155)
This is CVE-2012-3479.
2012-08-10 Stefan Monnier <monnier@iro.umontreal.ca>

View file

@ -1374,7 +1374,6 @@ FROM and TO must be in increasing order, as must be the pairs in RANGES."
;; (time-trial
;; '(let ((size 10000)
;; doing)
;; (random t)
;; (dotimes (count size)
;; (setq doing (random size))
;; (funcall try doing (+ doing (random 5)))

View file

@ -77,7 +77,7 @@
4877 4889 4903 4909 4919 4931 4933 4937 4943 4951 4957 4967 4969 4973
4987 4993 4999 5003])
;; The variable math-prime-factors-finished is set by calcFunc-prfac to
;; The variable math-prime-factors-finished is set by calcFunc-prfac to
;; indicate whether factoring is complete, and used by calcFunc-factors,
;; calcFunc-totient and calcFunc-moebius.
(defvar math-prime-factors-finished)
@ -510,8 +510,8 @@
(while (<= (length math-stirling-local-cache) n)
(let ((i (1- (length math-stirling-local-cache)))
row)
(setq math-stirling-local-cache
(vconcat math-stirling-local-cache
(setq math-stirling-local-cache
(vconcat math-stirling-local-cache
(make-vector (length math-stirling-local-cache) nil)))
(aset math-stirling-cache k math-stirling-local-cache)
(while (< (setq i (1+ i)) (length math-stirling-local-cache))
@ -572,7 +572,6 @@
(let ((i 200))
(while (> (setq i (1- i)) 0)
(math-random-base))))
(random t)
(setq var-RandSeed nil
math-random-cache nil
math-random-shift -4) ; assume RAND_MAX >= 16383
@ -629,7 +628,7 @@
(i (/ (+ n slop) 3))
(rnum 0))
(while (> i 0)
(setq rnum
(setq rnum
(math-add
(math-random-three-digit-number)
(math-mul rnum 1000)))
@ -823,11 +822,11 @@
(setq sum (%
(+
sum
(calcFunc-mod
(calcFunc-mod
q 1000000))
111111))
(setq q
(math-quotient
(setq q
(math-quotient
q 1000000)))
(cond ((= (% sum 3) 0) '(nil 3))
((= (% sum 7) 0) '(nil 7))

View file

@ -86,7 +86,7 @@
(setq sn (math-to-underscores sn)))
sn)))
;;; Give multiplication precendence when composing to avoid
;;; Give multiplication precedence when composing to avoid
;;; writing a*(b c) instead of a b c
(defun math-compose-expr (a prec &optional div)
(let ((calc-multiplication-has-precedence t)

View file

@ -237,6 +237,14 @@ The names are taken from `calendar-day-name-array'.")
"LaTeX code to insert one box with date info in calendar.
This definition is the heart of the calendar!")
(defconst cal-tex-lefthead
"\\def\\lefthead#1{\\noindent {\\normalsize \\bf #1}\\hfill\\\\[-6pt]}\n"
"LaTeX code for left header.")
(defconst cal-tex-righthead
"\\def\\righthead#1{\\hfill {\\normalsize \\bf #1}\\\\[-6pt]}\n"
"LaTeX code for right header.")
(autoload 'holiday-in-range "holidays")
(define-obsolete-function-alias 'cal-tex-list-holidays 'holiday-in-range "24.3")
@ -253,14 +261,14 @@ This definition is the heart of the calendar!")
"Insert the LaTeX calendar preamble into `cal-tex-buffer'.
Preamble includes initial definitions for various LaTeX commands.
Optional string ARGS are included as options for the article document class."
;; FIXME use generate-new-buffer, and adjust cal-tex-end-document.
(set-buffer (get-buffer-create cal-tex-buffer))
(set-buffer (generate-new-buffer cal-tex-buffer))
(insert (format "\\documentclass%s{article}\n"
(if (stringp args)
(format "[%s]" args)
"")))
(if (stringp cal-tex-preamble-extra)
(insert cal-tex-preamble-extra "\n"))
;; FIXME boxwidth and boxheight unused?
(insert "\\hbadness 20000
\\hfuzz=1000pt
\\vbadness 20000
@ -344,6 +352,54 @@ landscape mode with three rows of four months each."
(run-hooks 'cal-tex-year-hook))
(run-hooks 'cal-tex-hook))
(defun cal-tex-filofax-paper (&optional year)
"Insert some page size settings for filofax layouts."
(insert "\\textwidth 3.25in
\\textheight 6.5in
\\headheight -0.875in
\\topmargin 0pt
")
(insert
;; Why is this one subtly different? Who knows...
(if year "\\oddsidemargin 1.675in
\\evensidemargin 1.675in
"
"\\oddsidemargin 1.75in
\\evensidemargin 1.5in
\\headsep 0.125in
\\footskip 0.125in
")))
(defun cal-tex-longday (funcname height)
"Insert LaTeX code for a long day function."
(insert "\\long\\def\\" funcname "#1#2#3#4#5{%
\\rule{\\textwidth}{0.3pt}\\\\%
\\hbox to \\textwidth{%
\\vbox to " height "{%
\\vspace*{2pt}%
\\hbox to \\textwidth{"
(if (string-equal funcname "leftday")
"\\noindent {\\normalsize \\bf #2} \\small #1 \\hfill #5}%\n"
"\\small #5 \\hfill #1 {\\normalsize \\bf #2}}%\n")
" \\hbox to \\textwidth{\\vbox {\\"
(if (string-equal funcname "leftday") "noindent" "raggedleft")
" \\footnotesize \\em #4}}%
\\hbox to \\textwidth{\\vbox to 0pt {\\noindent \\footnotesize #3}}}}\\\\}\n"))
(defun cal-tex-shortday (funcname)
"Insert LaTeX code for a short day function."
(insert "\\long\\def\\" funcname "#1#2#3{%
\\rule{\\textwidth}{0.3pt}\\\\%
\\hbox to \\textwidth{%
\\vbox {%
\\vspace*{2pt}%
\\hbox to \\textwidth{\\hfill \\small #3 \\hfill}%
\\hbox to \\textwidth{\\vbox {\\"
(if (string-equal funcname "rightday") "raggedleft" "noindent")
" \\em #2}}%
\\hbox to \\textwidth{\\vbox {\\noindent \\footnotesize #1}}}}}\n"))
;;;###cal-autoload
(defun cal-tex-cursor-filofax-year (&optional n event)
"Make a Filofax one page yearly calendar of year indicated by cursor.
@ -354,16 +410,11 @@ Optional EVENT indicates a buffer position to use instead of point."
(or n (setq n 1))
(let ((year (calendar-extract-year (calendar-cursor-to-date t event))))
(cal-tex-preamble "twoside")
(cal-tex-cmd "\\textwidth 3.25in")
(cal-tex-cmd "\\textheight 6.5in")
(cal-tex-cmd "\\oddsidemargin 1.675in")
(cal-tex-cmd "\\evensidemargin 1.675in")
(cal-tex-cmd "\\topmargin 0pt")
(cal-tex-cmd "\\headheight -0.875in")
(cal-tex-filofax-paper 'year)
(cal-tex-cmd "\\fboxsep 0.5mm")
(cal-tex-cmd "\\pagestyle{empty}")
(cal-tex-cmd "\\pagestyle" "empty")
(cal-tex-b-document)
(cal-tex-cmd "\\vspace*{0.25in}")
(cal-tex-vspace "0.25in")
(dotimes (j n)
(insert (format "\\hfil \\textbf{\\Large %s} \\hfil\\\\\n" year))
(cal-tex-b-center)
@ -391,7 +442,7 @@ Optional EVENT indicates a buffer position to use instead of point."
(if (= j (1- n))
(cal-tex-end-document)
(cal-tex-newpage)
(cal-tex-cmd "\\vspace*{0.25in}"))
(cal-tex-vspace "0.25in"))
(run-hooks 'cal-tex-year-hook))
(run-hooks 'cal-tex-hook)))
@ -653,6 +704,15 @@ this is only an upper bound."
{\\makebox[2em]{\\rule{0cm}{#2ex}#1}\\rule{3in}{.15mm}}\n"
"One hour and a line on the right.")
(defun cal-tex-weekly-paper (&optional nomargins)
"Insert some page size settings for weekly layouts."
(insert "\\textwidth 6.5in
\\textheight 10.5in
")
(or nomargins (insert "\\oddsidemargin 0in
\\evensidemargin 0in
")))
;; TODO cal-tex-diary-support.
;; TODO respect cal-tex-daily-start,end (see cal-tex-week-hours).
;;;###cal-autoload
@ -677,13 +737,10 @@ entries are not shown). The calendar shows the hours 8-12am, 1-5pm."
(holidays (if cal-tex-holidays
(holiday-in-range d1 d2))))
(cal-tex-preamble "11pt")
(cal-tex-cmd "\\textwidth 6.5in")
(cal-tex-cmd "\\textheight 10.5in")
(cal-tex-cmd "\\oddsidemargin 0in")
(cal-tex-cmd "\\evensidemargin 0in")
(cal-tex-weekly-paper)
(insert cal-tex-LaTeX-hourbox)
(cal-tex-b-document)
(cal-tex-cmd "\\pagestyle{empty}")
(cal-tex-cmd "\\pagestyle" "empty")
(dotimes (i n)
(cal-tex-vspace "-1.5in")
(cal-tex-b-center)
@ -732,13 +789,10 @@ Optional EVENT indicates a buffer position to use instead of point."
(holidays (if cal-tex-holidays
(holiday-in-range d1 d2))))
(cal-tex-preamble "12pt")
(cal-tex-cmd "\\textwidth 6.5in")
(cal-tex-cmd "\\textheight 10.5in")
(cal-tex-cmd "\\oddsidemargin 0in")
(cal-tex-cmd "\\evensidemargin 0in")
(cal-tex-weekly-paper)
(insert cal-tex-LaTeX-hourbox)
(cal-tex-b-document)
(cal-tex-cmd "\\pagestyle{empty}")
(cal-tex-cmd "\\pagestyle" "empty")
(dotimes (i n)
(cal-tex-vspace "-1.5in")
(cal-tex-b-center)
@ -816,18 +870,12 @@ position to use instead of point."
(holidays (if cal-tex-holidays
(holiday-in-range d1 d2)))
(diary-list (if cal-tex-diary
(cal-tex-list-diary-entries
;; FIXME d1?
(calendar-absolute-from-gregorian (list month 1 year))
d2)))
(cal-tex-list-diary-entries d1 d2)))
s)
(cal-tex-preamble "11pt")
(cal-tex-cmd "\\textwidth 6.5in")
(cal-tex-cmd "\\textheight 10.5in")
(cal-tex-cmd "\\oddsidemargin 0in")
(cal-tex-cmd "\\evensidemargin 0in")
(cal-tex-weekly-paper)
(cal-tex-b-document)
(cal-tex-cmd "\\pagestyle{empty}")
(cal-tex-cmd "\\pagestyle" "empty")
(dotimes (i n)
(cal-tex-vspace "-1.5in")
(cal-tex-b-center)
@ -944,10 +992,7 @@ to use instead of point."
(calendar-absolute-from-gregorian
(calendar-cursor-to-date t event))))))
(cal-tex-preamble "11pt")
(cal-tex-cmd "\\textwidth 6.5in")
(cal-tex-cmd "\\textheight 10.5in")
(cal-tex-cmd "\\oddsidemargin 0in")
(cal-tex-cmd "\\evensidemargin 0in")
(cal-tex-weekly-paper)
(cal-tex-b-document)
(dotimes (i n)
(cal-tex-vspace "-1cm")
@ -1009,15 +1054,8 @@ shown are hard-coded to 8-12, 13-17."
(cal-tex-e-framebox)
(cal-tex-hspace "1cm")))
(defun cal-tex-cursor-week-at-a-glance (&optional n event)
"One-week-at-a-glance full page calendar for week indicated by cursor.
Optional prefix argument N specifies number of weeks (default 1),
starting on Mondays. The calendar shows holiday and diary entries
if `cal-tex-holidays' and `cal-tex-diary', respectively, are non-nil.
It does not show hours of the day. Optional EVENT indicates a buffer
position to use instead of point."
(interactive (list (prefix-numeric-value current-prefix-arg)
last-nonmenu-event))
(defun cal-tex-weekly-common (n event &optional filofax)
"Common code for weekly calendars."
(or n (setq n 1))
(let* ((date (calendar-gregorian-from-absolute
(calendar-dayname-on-or-before
@ -1033,45 +1071,37 @@ position to use instead of point."
(holiday-in-range d1 d2)))
(diary-list (if cal-tex-diary
(cal-tex-list-diary-entries d1 d2))))
(cal-tex-preamble "twoside,12pt")
(cal-tex-cmd "\\usepackage{color}")
(cal-tex-cmd "\\textwidth 7in")
(cal-tex-cmd "\\textheight 10.5in")
(cal-tex-cmd "\\oddsidemargin 0in")
(cal-tex-cmd "\\evensidemargin 0in")
(cal-tex-cmd "\\topmargin 0pt")
(cal-tex-cmd "\\headheight -0.875in")
(cal-tex-cmd "\\headsep 0.125in")
(cal-tex-cmd "\\footskip .125in")
(insert "\\def\\righthead#1{\\hfill {\\normalsize \\bf #1}\\\\[-6pt]}
\\long\\def\\rightday#1#2#3#4#5{%
\\rule{\\textwidth}{0.3pt}\\\\%
\\hbox to \\textwidth{%
\\vbox to 2.75in{%
\\vspace*{2pt}%
\\hbox to \\textwidth{\\small #5 \\hfill #1 {\\normalsize \\bf #2}}%
\\hbox to \\textwidth{\\vbox {\\raggedleft \\footnotesize \\em \\textcolor{red}{#4}}}%
\\hbox to \\textwidth{\\vbox to 0pt {\\noindent \\footnotesize \\textcolor{blue}{#3}}}}}\\\\}
\\long\\def\\weekend#1#2#3#4#5{%
\\rule{\\textwidth}{0.3pt}\\\\%
\\hbox to \\textwidth{%
\\vbox to 1.8in{%
\\vspace*{2pt}%
\\hbox to \\textwidth{\\small #5 \\hfill #1 {\\normalsize \\bf #2}}%
\\hbox to \\textwidth{\\vbox {\\raggedleft \\footnotesize \\em \\textcolor{red}{#4}}}%
\\hbox to \\textwidth{\\vbox to 0pt {\\noindent \\footnotesize \\textcolor{blue}{#3}}}}}\\\\}
\\def\\lefthead#1{\\noindent {\\normalsize \\bf #1}\\hfill\\\\[-6pt]}
\\long\\def\\leftday#1#2#3#4#5{%
\\rule{\\textwidth}{0.3pt}\\\\%
\\hbox to \\textwidth{%
\\vbox to 2.75in{%
\\vspace*{2pt}%
\\hbox to \\textwidth{\\noindent {\\normalsize \\bf #2} \\small #1 \\hfill #5}%
\\hbox to \\textwidth{\\vbox {\\noindent \\footnotesize \\em \\textcolor{red}{#4}}}%
\\hbox to \\textwidth{\\vbox to 0pt {\\noindent \\footnotesize \\textcolor{blue}{#3}}}}}\\\\}
(if filofax
(progn
(cal-tex-preamble "twoside")
(cal-tex-filofax-paper)
(insert cal-tex-righthead)
(cal-tex-longday "rightday" "1.85in")
(cal-tex-longday "weekend" "0.8in")
(insert cal-tex-lefthead)
(cal-tex-longday "leftday" "1.85in"))
(cal-tex-preamble "twoside,12pt")
(insert "\\textwidth 7in
\\textheight 10.5in
\\oddsidemargin 0in
\\evensidemargin 0in
\\topmargin 0pt
\\headheight -0.875in
\\headsep 0.125in
\\footskip .125in
")
(insert cal-tex-righthead)
(cal-tex-longday "rightday" "2.75in")
(cal-tex-longday "weekend" "1.8in")
(insert cal-tex-lefthead)
(cal-tex-longday "leftday" "2.75in"))
(cal-tex-b-document)
(cal-tex-cmd "\\pagestyle{empty}\\ ")
(cal-tex-cmd "\\pagestyle" "empty")
;; Let's assume this is something to with twopage documents.
;; It has the downside that we start with a blank page.
;; It doesn't make obvious sense when oddside and evenside margins
;; are the same (non-filofax), but consider the left and right
;; versions of various functions as applicable to even and odd pages.
(cal-tex-newpage)
(dotimes (i n)
(insert "\\lefthead")
@ -1104,34 +1134,35 @@ position to use instead of point."
(insert "%\n")
(setq date (cal-tex-incr-date date)))
(insert "\\noindent\\rule{\\textwidth}{0.3pt}\\\\%\n")
(cal-tex-nl)
(insert (cal-tex-mini-calendar
(calendar-extract-month (cal-tex-previous-month date))
(calendar-extract-year (cal-tex-previous-month date))
"lastmonth" "1.1in" "1in"))
(insert (cal-tex-mini-calendar
(calendar-extract-month date)
(calendar-extract-year date)
"thismonth" "1.1in" "1in"))
(insert (cal-tex-mini-calendar
(calendar-extract-month (cal-tex-next-month date))
(calendar-extract-year (cal-tex-next-month date))
"nextmonth" "1.1in" "1in"))
(insert "\\hbox to \\textwidth{")
(cal-tex-hfill)
(insert "\\lastmonth")
(cal-tex-hfill)
(insert "\\thismonth")
(cal-tex-hfill)
(insert "\\nextmonth")
(cal-tex-hfill)
(insert "}")
(unless filofax
(cal-tex-nl)
(insert (cal-tex-mini-calendar
(calendar-extract-month (cal-tex-previous-month date))
(calendar-extract-year (cal-tex-previous-month date))
"lastmonth" "1.1in" "1in"))
(insert (cal-tex-mini-calendar
(calendar-extract-month date)
(calendar-extract-year date)
"thismonth" "1.1in" "1in"))
(insert (cal-tex-mini-calendar
(calendar-extract-month (cal-tex-next-month date))
(calendar-extract-year (cal-tex-next-month date))
"nextmonth" "1.1in" "1in"))
(insert "\\hbox to \\textwidth{")
(cal-tex-hfill)
(insert "\\lastmonth")
(cal-tex-hfill)
(insert "\\thismonth")
(cal-tex-hfill)
(insert "\\nextmonth")
(cal-tex-hfill)
(insert "}"))
(cal-tex-newpage)
(insert "\\righthead")
(cal-tex-arg
(let ((d (cal-tex-incr-date date 3)))
(if (= (calendar-extract-month date)
(calendar-extract-month d))
(calendar-extract-month d))
(format "%s %s"
(cal-tex-month-name (calendar-extract-month date))
(calendar-extract-year date))
@ -1171,6 +1202,18 @@ position to use instead of point."
(cal-tex-end-document)
(run-hooks 'cal-tex-hook)))
;;;###cal-autoload
(defun cal-tex-cursor-week-at-a-glance (&optional n event)
"One-week-at-a-glance full page calendar for week indicated by cursor.
Optional prefix argument N specifies number of weeks (default 1),
starting on Mondays. The calendar shows holiday and diary entries
if `cal-tex-holidays' and `cal-tex-diary', respectively, are non-nil.
It does not show hours of the day. Optional EVENT indicates a buffer
position to use instead of point."
(interactive (list (prefix-numeric-value current-prefix-arg)
last-nonmenu-event))
(cal-tex-weekly-common n event))
;;;###cal-autoload
(defun cal-tex-cursor-filofax-2week (&optional n event)
"Two-weeks-at-a-glance Filofax style calendar for week cursor is in.
@ -1194,40 +1237,15 @@ Optional EVENT indicates a buffer position to use instead of point."
(holidays (if cal-tex-holidays
(holiday-in-range d1 d2)))
(diary-list (if cal-tex-diary
(cal-tex-list-diary-entries
;; FIXME d1?
(calendar-absolute-from-gregorian (list month 1 year))
d2))))
(cal-tex-list-diary-entries d1 d2))))
(cal-tex-preamble "twoside")
(cal-tex-cmd "\\textwidth 3.25in")
(cal-tex-cmd "\\textheight 6.5in")
(cal-tex-cmd "\\oddsidemargin 1.75in")
(cal-tex-cmd "\\evensidemargin 1.5in")
(cal-tex-cmd "\\topmargin 0pt")
(cal-tex-cmd "\\headheight -0.875in")
(cal-tex-cmd "\\headsep 0.125in")
(cal-tex-cmd "\\footskip .125in")
(insert "\\def\\righthead#1{\\hfill {\\normalsize \\bf #1}\\\\[-6pt]}
\\long\\def\\rightday#1#2#3#4#5{%
\\rule{\\textwidth}{0.3pt}\\\\%
\\hbox to \\textwidth{%
\\vbox to 0.7in{%
\\vspace*{2pt}%
\\hbox to \\textwidth{\\small #5 \\hfill #1 {\\normalsize \\bf #2}}%
\\hbox to \\textwidth{\\vbox {\\raggedleft \\footnotesize \\em #4}}%
\\hbox to \\textwidth{\\vbox to 0pt {\\noindent \\footnotesize #3}}}}\\\\}
\\def\\lefthead#1{\\noindent {\\normalsize \\bf #1}\\hfill\\\\[-6pt]}
\\long\\def\\leftday#1#2#3#4#5{%
\\rule{\\textwidth}{0.3pt}\\\\%
\\hbox to \\textwidth{%
\\vbox to 0.7in{%
\\vspace*{2pt}%
\\hbox to \\textwidth{\\noindent {\\normalsize \\bf #2} \\small #1 \\hfill #5}%
\\hbox to \\textwidth{\\vbox {\\noindent \\footnotesize \\em #4}}%
\\hbox to \\textwidth{\\vbox to 0pt {\\noindent \\footnotesize #3}}}}\\\\}
")
(cal-tex-filofax-paper)
(insert cal-tex-righthead)
(cal-tex-longday "rightday" "0.7in")
(insert cal-tex-lefthead)
(cal-tex-longday "leftday" "0.7in")
(cal-tex-b-document)
(cal-tex-cmd "\\pagestyle{empty}")
(cal-tex-cmd "\\pagestyle" "empty")
(dotimes (i n)
(if (zerop (mod i 2))
(insert "\\righthead")
@ -1277,138 +1295,7 @@ if `cal-tex-holidays' and `cal-tex-diary', respectively, are non-nil.
Optional EVENT indicates a buffer position to use instead of point."
(interactive (list (prefix-numeric-value current-prefix-arg)
last-nonmenu-event))
(or n (setq n 1))
(let* ((date (calendar-gregorian-from-absolute
(calendar-dayname-on-or-before
1
(calendar-absolute-from-gregorian
(calendar-cursor-to-date t event)))))
(month (calendar-extract-month date))
(year (calendar-extract-year date))
(day (calendar-extract-day date))
(d1 (calendar-absolute-from-gregorian date))
(d2 (+ (* 7 n) d1))
(holidays (if cal-tex-holidays
(holiday-in-range d1 d2)))
(diary-list (if cal-tex-diary
(cal-tex-list-diary-entries
;; FIXME d1?
(calendar-absolute-from-gregorian (list month 1 year))
d2))))
(cal-tex-preamble "twoside")
(cal-tex-cmd "\\textwidth 3.25in")
(cal-tex-cmd "\\textheight 6.5in")
(cal-tex-cmd "\\oddsidemargin 1.75in")
(cal-tex-cmd "\\evensidemargin 1.5in")
(cal-tex-cmd "\\topmargin 0pt")
(cal-tex-cmd "\\headheight -0.875in")
(cal-tex-cmd "\\headsep 0.125in")
(cal-tex-cmd "\\footskip .125in")
(insert "\\def\\righthead#1{\\hfill {\\normalsize \\bf #1}\\\\[-6pt]}
\\long\\def\\rightday#1#2#3#4#5{%
\\rule{\\textwidth}{0.3pt}\\\\%
\\hbox to \\textwidth{%
\\vbox to 1.85in{%
\\vspace*{2pt}%
\\hbox to \\textwidth{\\small #5 \\hfill #1 {\\normalsize \\bf #2}}%
\\hbox to \\textwidth{\\vbox {\\raggedleft \\footnotesize \\em #4}}%
\\hbox to \\textwidth{\\vbox to 0pt {\\noindent \\footnotesize #3}}}}\\\\}
\\long\\def\\weekend#1#2#3#4#5{%
\\rule{\\textwidth}{0.3pt}\\\\%
\\hbox to \\textwidth{%
\\vbox to .8in{%
\\vspace*{2pt}%
\\hbox to \\textwidth{\\small #5 \\hfill #1 {\\normalsize \\bf #2}}%
\\hbox to \\textwidth{\\vbox {\\raggedleft \\footnotesize \\em #4}}%
\\hbox to \\textwidth{\\vbox to 0pt {\\noindent \\footnotesize #3}}}}\\\\}
\\def\\lefthead#1{\\noindent {\\normalsize \\bf #1}\\hfill\\\\[-6pt]}
\\long\\def\\leftday#1#2#3#4#5{%
\\rule{\\textwidth}{0.3pt}\\\\%
\\hbox to \\textwidth{%
\\vbox to 1.85in{%
\\vspace*{2pt}%
\\hbox to \\textwidth{\\noindent {\\normalsize \\bf #2} \\small #1 \\hfill #5}%
\\hbox to \\textwidth{\\vbox {\\noindent \\footnotesize \\em #4}}%
\\hbox to \\textwidth{\\vbox to 0pt {\\noindent \\footnotesize #3}}}}\\\\}
")
(cal-tex-b-document)
(cal-tex-cmd "\\pagestyle{empty}\\ ")
(cal-tex-newpage)
(dotimes (i n)
(insert "\\lefthead")
(cal-tex-arg
(let ((d (cal-tex-incr-date date 2)))
(if (= (calendar-extract-month date)
(calendar-extract-month d))
(format "%s %s"
(cal-tex-month-name (calendar-extract-month date))
(calendar-extract-year date))
(if (= (calendar-extract-year date)
(calendar-extract-year d))
(format "%s---%s %s"
(cal-tex-month-name (calendar-extract-month date))
(cal-tex-month-name (calendar-extract-month d))
(calendar-extract-year date))
(format "%s %s---%s %s"
(cal-tex-month-name (calendar-extract-month date))
(calendar-extract-year date)
(cal-tex-month-name (calendar-extract-month d))
(calendar-extract-year d))))))
(insert "%\n")
(dotimes (_jdummy 3)
(insert "\\leftday")
(cal-tex-arg (cal-tex-LaTeXify-string (calendar-day-name date)))
(cal-tex-arg (number-to-string (calendar-extract-day date)))
(cal-tex-arg (cal-tex-latexify-list diary-list date))
(cal-tex-arg (cal-tex-latexify-list holidays date))
(cal-tex-arg (eval cal-tex-daily-string))
(insert "%\n")
(setq date (cal-tex-incr-date date)))
(insert "\\noindent\\rule{\\textwidth}{0.3pt}\\\\%\n")
(cal-tex-newpage)
(insert "\\righthead")
(cal-tex-arg
(let ((d (cal-tex-incr-date date 3)))
(if (= (calendar-extract-month date)
(calendar-extract-month d))
(format "%s %s"
(cal-tex-month-name (calendar-extract-month date))
(calendar-extract-year date))
(if (= (calendar-extract-year date)
(calendar-extract-year d))
(format "%s---%s %s"
(cal-tex-month-name (calendar-extract-month date))
(cal-tex-month-name (calendar-extract-month d))
(calendar-extract-year date))
(format "%s %s---%s %s"
(cal-tex-month-name (calendar-extract-month date))
(calendar-extract-year date)
(cal-tex-month-name (calendar-extract-month d))
(calendar-extract-year d))))))
(insert "%\n")
(dotimes (_jdummy 2)
(insert "\\rightday")
(cal-tex-arg (cal-tex-LaTeXify-string (calendar-day-name date)))
(cal-tex-arg (number-to-string (calendar-extract-day date)))
(cal-tex-arg (cal-tex-latexify-list diary-list date))
(cal-tex-arg (cal-tex-latexify-list holidays date))
(cal-tex-arg (eval cal-tex-daily-string))
(insert "%\n")
(setq date (cal-tex-incr-date date)))
(dotimes (_jdummy 2)
(insert "\\weekend")
(cal-tex-arg (cal-tex-LaTeXify-string (calendar-day-name date)))
(cal-tex-arg (number-to-string (calendar-extract-day date)))
(cal-tex-arg (cal-tex-latexify-list diary-list date))
(cal-tex-arg (cal-tex-latexify-list holidays date))
(cal-tex-arg (eval cal-tex-daily-string))
(insert "%\n")
(setq date (cal-tex-incr-date date)))
(unless (= i (1- n))
(run-hooks 'cal-tex-week-hook)
(cal-tex-newpage)))
(cal-tex-end-document)
(run-hooks 'cal-tex-hook)))
(cal-tex-weekly-common n event t))
;;;###cal-autoload
(defun cal-tex-cursor-filofax-daily (&optional n event)
@ -1434,52 +1321,21 @@ Optional EVENT indicates a buffer position to use instead of point."
(holidays (if cal-tex-holidays
(holiday-in-range d1 d2)))
(diary-list (if cal-tex-diary
(cal-tex-list-diary-entries
;; FIXME d1?
(calendar-absolute-from-gregorian (list month 1 year))
d2))))
(cal-tex-list-diary-entries d1 d2))))
(cal-tex-preamble "twoside")
(cal-tex-cmd "\\textwidth 3.25in")
(cal-tex-cmd "\\textheight 6.5in")
(cal-tex-cmd "\\oddsidemargin 1.75in")
(cal-tex-cmd "\\evensidemargin 1.5in")
(cal-tex-cmd "\\topmargin 0pt")
(cal-tex-cmd "\\headheight -0.875in")
(cal-tex-cmd "\\headsep 0.125in")
(cal-tex-cmd "\\footskip .125in")
(insert "\\def\\righthead#1{\\hfill {\\normalsize \\bf #1}\\\\[-6pt]}
\\long\\def\\rightday#1#2#3{%
\\rule{\\textwidth}{0.3pt}\\\\%
\\hbox to \\textwidth{%
\\vbox {%
\\vspace*{2pt}%
\\hbox to \\textwidth{\\hfill \\small #3 \\hfill}%
\\hbox to \\textwidth{\\vbox {\\raggedleft \\em #2}}%
\\hbox to \\textwidth{\\vbox {\\noindent \\footnotesize #1}}}}}
\\long\\def\\weekend#1#2#3{%
\\rule{\\textwidth}{0.3pt}\\\\%
\\hbox to \\textwidth{%
\\vbox {%
\\vspace*{2pt}%
\\hbox to \\textwidth{\\hfill \\small #3 \\hfill}%
\\hbox to \\textwidth{\\vbox {\\noindent \\em #2}}%
\\hbox to \\textwidth{\\vbox {\\noindent \\footnotesize #1}}}}}
\\def\\lefthead#1{\\noindent {\\normalsize \\bf #1}\\hfill\\\\[-6pt]}
\\long\\def\\leftday#1#2#3{%
\\rule{\\textwidth}{0.3pt}\\\\%
\\hbox to \\textwidth{%
\\vbox {%
\\vspace*{2pt}%
\\hbox to \\textwidth{\\hfill \\small #3 \\hfill}%
\\hbox to \\textwidth{\\vbox {\\noindent \\em #2}}%
\\hbox to \\textwidth{\\vbox {\\noindent \\footnotesize #1}}}}}
\\newbox\\LineBox
(cal-tex-filofax-paper)
(insert cal-tex-righthead)
(cal-tex-shortday "rightday")
(cal-tex-shortday "weekend")
(insert cal-tex-lefthead)
(cal-tex-shortday "leftday")
(insert "\\newbox\\LineBox
\\setbox\\LineBox=\\hbox to\\textwidth{%
\\vrule height.2in width0pt\\leaders\\hrule\\hfill}
\\def\\linesfill{\\par\\leaders\\copy\\LineBox\\vfill}
")
(cal-tex-b-document)
(cal-tex-cmd "\\pagestyle{empty}")
(cal-tex-cmd "\\pagestyle" "empty")
(dotimes (i n)
(dotimes (j 4)
(let ((even (zerop (% j 2))))
@ -1539,10 +1395,9 @@ a buffer position to use instead of point."
(let ((date (calendar-absolute-from-gregorian
(calendar-cursor-to-date t event))))
(cal-tex-preamble "12pt")
(cal-tex-cmd "\\textwidth 6.5in")
(cal-tex-cmd "\\textheight 10.5in")
(cal-tex-weekly-paper 'nomargins)
(cal-tex-b-document)
(cal-tex-cmd "\\pagestyle{empty}")
(cal-tex-cmd "\\pagestyle" "empty")
(dotimes (i n)
(cal-tex-vspace "-1.7in")
(cal-tex-daily-page (calendar-gregorian-from-absolute date))
@ -1736,7 +1591,7 @@ informative header, and run HOOK."
;; FIXME latin1 might not always be right.
(insert "\\usepackage[latin1]{inputenc}\n"))))
(latex-mode)
(pop-to-buffer cal-tex-buffer)
(pop-to-buffer (current-buffer))
(goto-char (point-min))
;; FIXME auctex equivalents?
(cal-tex-comment
@ -1761,16 +1616,16 @@ non-nil, means add to end of buffer without erasing current contents."
(if (not landscape)
(progn
(cal-tex-cmd "\\oddsidemargin -1.75cm")
(cal-tex-cmd "\\def\\holidaymult{.06}"))
(cal-tex-cmd "\\special{landscape}")
(cal-tex-cmd "\\def\\holidaymult" ".06"))
(cal-tex-cmd "\\special" "landscape")
(cal-tex-cmd "\\textwidth 9.5in")
(cal-tex-cmd "\\textheight 7in")
(cal-tex-comment)
(cal-tex-cmd "\\def\\holidaymult{.08}"))
(cal-tex-cmd "\\def\\holidaymult" ".08"))
(cal-tex-cmd cal-tex-caldate)
(cal-tex-cmd cal-tex-myday)
(cal-tex-b-document)
(cal-tex-cmd "\\pagestyle{empty}"))
(cal-tex-cmd "\\pagestyle" "empty"))
(cal-tex-cmd "\\setlength{\\cellwidth}" width)
(insert (format "\\setlength{\\cellwidth}{%f\\cellwidth}\n"
(/ 1.1 (length cal-tex-which-days))))
@ -1833,13 +1688,11 @@ non-nil, means add to end of buffer without erasing current contents."
(defun cal-tex-vspace (space)
"Insert vspace command to move SPACE vertically."
(insert "\\vspace*{" space "}")
(cal-tex-comment))
(cal-tex-cmd "\\vspace*" space))
(defun cal-tex-hspace (space)
"Insert hspace command to move SPACE horizontally."
(insert "\\hspace*{" space "}")
(cal-tex-comment))
(cal-tex-cmd "\\hspace*" space))
(defun cal-tex-comment (&optional comment)
"Insert `% ', followed by optional string COMMENT, followed by newline.
@ -1878,20 +1731,20 @@ Add trailing COMMENT if present."
(defun cal-tex-b-document ()
"Insert beginning of document."
(cal-tex-cmd "\\begin{document}"))
(cal-tex-cmd "\\begin" "document"))
(defun cal-tex-e-document ()
"Insert end of document."
(cal-tex-cmd "\\end{document}"))
(cal-tex-cmd "\\end" "document"))
(defun cal-tex-b-center ()
"Insert beginning of centered block."
(cal-tex-cmd "\\begin{center}"))
(cal-tex-cmd "\\begin" "center"))
(defun cal-tex-e-center ()
"Insert end of centered block."
(cal-tex-comment)
(cal-tex-cmd "\\end{center}"))
(cal-tex-cmd "\\end" "center"))
;;;
@ -1946,35 +1799,35 @@ Add trailing COMMENT if present."
(defun cal-tex-em (string)
"Insert STRING in italic font."
(insert "\\textit{" string "}"))
(cal-tex-cmd "\\textit" string))
(defun cal-tex-bf (string)
"Insert STRING in bf font."
(insert "\\textbf{ " string "}"))
(cal-tex-cmd "\\textbf" string))
(defun cal-tex-scriptsize (string)
"Insert STRING in scriptsize font."
(insert "{\\scriptsize " string "}"))
(cal-tex-arg (concat "\\scriptsize " string)))
(defun cal-tex-huge (string)
"Insert STRING in huge font."
(insert "{\\huge " string "}"))
(cal-tex-arg (concat "\\huge " string)))
(defun cal-tex-Huge (string)
"Insert STRING in Huge font."
(insert "{\\Huge " string "}"))
(cal-tex-arg (concat "\\Huge " string)))
(defun cal-tex-Huge-bf (string)
"Insert STRING in Huge bf font."
(insert "\\textbf{\\Huge " string "}"))
(cal-tex-cmd "\\textbf" (concat "\\Huge " string)))
(defun cal-tex-large (string)
"Insert STRING in large font."
(insert "{\\large " string "}"))
(cal-tex-arg (concat "\\large " string)))
(defun cal-tex-large-bf (string)
"Insert STRING in large bf font."
(insert "\\textbf{\\large " string "}"))
(cal-tex-cmd "\\textbf" (concat "\\large " string)))
(provide 'cal-tex)

View file

@ -951,12 +951,12 @@ This is recursive; that is, included files may include other files."
(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))
(beep)
(message "Can't find included diary file %s" diary-file)
(sleep-for 2))))
(display-warning
:error
(format "Can't read included diary file %s\n" diary-file)))
(display-warning
:error
(format "Can't find included diary file %s\n" diary-file)))))
(goto-char (point-min)))
(defun diary-include-other-diary-files ()
@ -1456,14 +1456,17 @@ marks. This is intended to deal with deleted diary entries."
(let ((result (if calendar-debug-sexp
(let ((debug-on-error t))
(eval (car (read-from-string sexp))))
(condition-case nil
(eval (car (read-from-string sexp)))
(error
(beep)
(message "Bad sexp at line %d in %s: %s"
(count-lines (point-min) (point))
diary-file sexp)
(sleep-for 2))))))
(let (err)
(condition-case err
(eval (car (read-from-string sexp)))
(error
(display-warning
:error
(format "Bad diary sexp at line %d in %s:\n%s\n\
Error: %s\n"
(count-lines (point-min) (point))
diary-file sexp err))
nil))))))
(cond ((stringp result) result)
((and (consp result)
(stringp (cdr result))) result)

View file

@ -458,17 +458,20 @@ with descriptive strings such as
(defun calendar-holiday-list ()
"Form the list of holidays that occur on dates in the calendar window.
The holidays are those in the list `calendar-holidays'."
(let (res h)
(let (res h err)
(sort
(dolist (p calendar-holidays res)
(if (setq h (if calendar-debug-sexp
(let ((debug-on-error t))
(eval p))
(condition-case nil
(condition-case err
(eval p)
(error (beep)
(message "Bad holiday list item: %s" p)
(sleep-for 2)))))
(error
(display-warning
:error
(format "Bad holiday list item: %s\nError: %s\n"
p err))
nil))))
(setq res (append h res))))
'calendar-date-compare)))

View file

@ -136,12 +136,36 @@
:help-echo "Control text underlining."
(const :tag "Off" nil)
(list :tag "On"
:value (:color foreground-color :style line)
(const :format "" :value :color)
(choice :tag "Color" (const :tag "Foreground Color" foreground-color) color)
(const :format "" :value :style)
(choice :tag "Style"
(const :tag "Line" line)
(const :tag "Wave" wave)))))
(choice :tag "Color"
(const :tag "Foreground Color" foreground-color)
color)
(const :format "" :value :style)
(choice :tag "Style"
(const :tag "Line" line)
(const :tag "Wave" wave))))
;; filter to make value suitable for customize
(lambda (real-value)
(and real-value
(let ((color
(or (and (consp real-value) (plist-get real-value :color))
(and (stringp real-value) real-value)
'foreground-color))
(style
(or (and (consp real-value) (plist-get real-value :style))
'line)))
(list :color color :style style))))
;; filter to make customized-value suitable for storing
(lambda (cus-value)
(and cus-value
(let ((color (plist-get cus-value :color))
(style (plist-get cus-value :style)))
(cond ((eq style 'line)
;; Use simple value for default style
(if (eq color 'foreground-color) t color))
(t
`(:color ,color :style ,style)))))))
(:overline
(choice :tag "Overline"

View file

@ -1331,16 +1331,16 @@ DIRED-FILENAME WINDOW-POINT)."
"Mark all files remembered in ALIST.
Each element of ALIST looks like (FILE . MARKERCHAR)."
(let (elt fil chr)
(while alist
(setq elt (car alist)
alist (cdr alist)
fil (car elt)
chr (cdr elt))
(if (dired-goto-file fil)
(save-excursion
(beginning-of-line)
(delete-char 1)
(insert chr))))))
(save-excursion
(while alist
(setq elt (car alist)
alist (cdr alist)
fil (car elt)
chr (cdr elt))
(when (dired-goto-file fil)
(beginning-of-line)
(delete-char 1)
(insert chr))))))
(defun dired-remember-hidden ()
"Return a list of names of subdirs currently hidden."
@ -1739,7 +1739,7 @@ Do so according to the former subdir alist OLD-SUBDIR-ALIST."
(define-key map
[menu-bar operate epa-dired-do-decrypt]
'(menu-item "Decrypt" epa-dired-do-decrypt
'(menu-item "Decrypt..." epa-dired-do-decrypt
:help "Decrypt file at cursor"))
(define-key map
@ -1749,12 +1749,12 @@ Do so according to the former subdir alist OLD-SUBDIR-ALIST."
(define-key map
[menu-bar operate epa-dired-do-sign]
'(menu-item "Sign" epa-dired-do-sign
'(menu-item "Sign..." epa-dired-do-sign
:help "Create digital signature of file at cursor"))
(define-key map
[menu-bar operate epa-dired-do-encrypt]
'(menu-item "Encrypt" epa-dired-do-encrypt
'(menu-item "Encrypt..." epa-dired-do-encrypt
:help "Encrypt file at cursor"))
(define-key map [menu-bar operate dashes-3]
@ -2950,6 +2950,8 @@ or \"* [3 files]\"."
(split-window-sensibly window))))
pop-up-frames)
(pop-to-buffer (get-buffer-create buf)))
;; See Bug#12281.
(set-window-start nil (point-min))
;; If dired-shrink-to-fit is t, make its window fit its contents.
(when dired-shrink-to-fit
;; Try to not delete window when we want to display less than
@ -2971,36 +2973,43 @@ If t, confirmation is never needed."
(const shell) (const symlink) (const touch)
(const uncompress))))
(defun dired-mark-pop-up (bufname op-symbol files function &rest args)
(defun dired-mark-pop-up (buffer-or-name op-symbol files function &rest args)
"Return FUNCTION's result on ARGS after showing which files are marked.
Displays the file names in a buffer named BUFNAME;
nil gives \" *Marked Files*\".
This uses function `dired-pop-to-buffer' to do that.
Displays the file names in a window showing a buffer named
BUFFER-OR-NAME; the default name being \" *Marked Files*\". The
window is not shown if there is just one file, `dired-no-confirm'
is t, or OP-SYMBOL is a member of the list in `dired-no-confirm'.
FUNCTION should not manipulate files, just read input
(an argument or confirmation).
The window is not shown if there is just one file or
OP-SYMBOL is a member of the list in `dired-no-confirm'.
FILES is the list of marked files. It can also be (t FILENAME)
in the case of one marked file, to distinguish that from using
just the current file."
(or bufname (setq bufname " *Marked Files*"))
just the current file.
FUNCTION should not manipulate files, just read input \(an
argument or confirmation)."
(if (or (eq dired-no-confirm t)
(memq op-symbol dired-no-confirm)
;; If FILES defaulted to the current line's file.
(= (length files) 1))
(apply function args)
(with-current-buffer (get-buffer-create bufname)
(erase-buffer)
;; Handle (t FILE) just like (FILE), here.
;; That value is used (only in some cases), to mean
;; just one file that was marked, rather than the current line file.
(dired-format-columns-of-files (if (eq (car files) t) (cdr files) files))
(remove-text-properties (point-min) (point-max)
'(mouse-face nil help-echo nil)))
(save-window-excursion
(dired-pop-to-buffer bufname)
(apply function args))))
(let ((buffer (get-buffer-create (or buffer-or-name " *Marked Files*"))))
(with-current-buffer buffer
(let ((split-height-threshold 0))
(with-temp-buffer-window
buffer
(cons 'display-buffer-below-selected nil)
#'(lambda (window _value)
(with-selected-window window
(unwind-protect
(apply function args)
(when (window-live-p window)
(quit-restore-window window 'kill)))))
;; Handle (t FILE) just like (FILE), here. That value is
;; used (only in some cases), to mean just one file that was
;; marked, rather than the current line file.
(dired-format-columns-of-files
(if (eq (car files) t) (cdr files) files))
(remove-text-properties (point-min) (point-max)
'(mouse-face nil help-echo nil))))))))
(defun dired-format-columns-of-files (files)
(let ((beg (point)))

View file

@ -635,7 +635,7 @@ If ALIST is non-nil, the new pairs are prepended to it."
(set-buffer-modified-p ,flag)))
(gv-define-simple-setter buffer-name rename-buffer t)
(gv-define-setter buffer-string (store)
`(progn (erase-buffer) (insert ,store)))
`(insert (prog1 ,store (erase-buffer))))
(gv-define-simple-setter buffer-substring cl--set-buffer-substring)
(gv-define-simple-setter current-buffer set-buffer)
(gv-define-simple-setter current-case-table set-case-table)

View file

@ -191,8 +191,9 @@ well for simple place forms.
Assignments of VAL to (NAME ARGS...) are expanded by binding the argument
forms (VAL ARGS...) according to ARGLIST, then executing BODY, which must
return a Lisp form that does the assignment.
Actually, ARGLIST may be bound to temporary variables which are introduced
automatically to preserve proper execution order of the arguments. Example:
The first arg in ARLIST (the one that receives VAL) receives an expression
which can do arbitrary things, whereas the other arguments are all guaranteed
to be pure and copyable. Example use:
(gv-define-setter aref (v a i) `(aset ,a ,i ,v))"
(declare (indent 2) (debug (&define name sexp body)))
`(gv-define-expander ,name

View file

@ -1,3 +1,29 @@
2012-08-21 Josh Feinstein <jlf@foxtail.org>
* erc-join.el (erc-autojoin-timing): Fix defcustom type.
2012-08-21 Julien Danjou <julien@danjou.info>
* erc-match.el (erc-match-message): Use
`erc-match-exclude-server-buffer' not
`erc-track-exclude-server-buffer'.
2012-08-20 Josh Feinstein <jlf@foxtail.org>
* erc.el (erc-display-message): Abstract message hiding decision
to new function erc-hide-current-message-p.
(erc-lurker): New customization group.
(erc-lurker-state, erc-lurker-trim-nicks, erc-lurker-ignore-chars)
(erc-lurker-hide-list, erc-lurker-cleanup-interval)
(erc-lurker-threshold-time): New variables.
(erc-lurker-maybe-trim, erc-lurker-initialize, erc-lurker-cleanup)
(erc-hide-current-message-p, erc-canonicalize-server-name)
(erc-lurker-update-status, erc-lurker-p): New functions. Together
they maintain state about which users have spoken in the last
erc-lurker-threshold-time, with all other users being considered
lurkers whose messages of types in erc-lurker-hide-list will not
be displayed by erc-display-message.
2012-08-06 Julien Danjou <julien@danjou.info>
* erc-match.el (erc-match-exclude-server-buffer)

View file

@ -84,8 +84,8 @@ identification, or after `erc-autojoin-delay' seconds.
Any other value means the same as `connect'."
:group 'erc-autojoin
:version "24.1"
:type '(choice (const :tag "On Connection" 'connect)
(const :tag "When Identified" 'ident)))
:type '(choice (const :tag "On Connection" connect)
(const :tag "When Identified" ident)))
(defcustom erc-autojoin-delay 30
"Number of seconds to wait before attempting to autojoin channels.

View file

@ -458,7 +458,7 @@ Use this defun with `erc-insert-modify-hook'."
(point-min))
(point-max))))
(when (and vector
(not (and erc-track-exclude-server-buffer
(not (and erc-match-exclude-server-buffer
(erc-server-buffer-p))))
(mapc
(lambda (match-type)

View file

@ -100,6 +100,10 @@
"Ignoring certain messages"
:group 'erc)
(defgroup erc-lurker nil
"Hide specified message types sent by lurkers"
:group 'erc-ignore)
(defgroup erc-query nil
"Using separate buffers for private discussions"
:group 'erc)
@ -2455,6 +2459,174 @@ See also `erc-make-notice'."
string)
string)))
(defvar erc-lurker-state nil
"Track the time of the last PRIVMSG for each (server,nick) pair.
This is implemented as a hash of hashes, where the outer key is
the canonicalized server name (as returned by
`erc-canonicalize-server-name') and the outer value is a hash
table mapping nicks (as returned by `erc-lurker-maybe-trim') to
the times of their most recently received PRIVMSG on any channel
on the given server.")
(defcustom erc-lurker-trim-nicks t
"If t, trim trailing `erc-lurker-ignore-chars' from nicks.
This causes e.g. nick and nick` to be considered as the same
individual for activity tracking and lurkiness detection
purposes."
:group 'erc-lurker
:type 'boolean)
(defun erc-lurker-maybe-trim (nick)
"Maybe trim trailing `erc-lurker-ignore-chars' from NICK.
Returns NICK unmodified unless `erc-lurker-trim-nicks' is
non-nil."
(if erc-lurker-trim-nicks
(replace-regexp-in-string
(format "[%s]"
(mapconcat (lambda (char)
(regexp-quote (char-to-string char)))
erc-lurker-ignore-chars ""))
"" nick)
nick))
(defcustom erc-lurker-ignore-chars "`_"
"Characters at the end of a nick to strip for activity tracking purposes.
See also `erc-lurker-trim-nicks'."
:group 'erc-lurker
:type 'string)
(defcustom erc-lurker-hide-list nil
"List of IRC type messages to hide when sent by lurkers.
A typical value would be '(\"JOIN\" \"PART\" \"QUIT\").
See also `erc-lurker-p' and `erc-hide-list'."
:group 'erc-lurker
:type 'erc-message-type)
(defcustom erc-lurker-threshold-time (* 60 60 24) ; 24h by default
"Nicks from which no PRIVMSGs have been received within this
interval (in units of seconds) are considered lurkers by
`erc-lurker-p' and as a result their messages of types in
`erc-lurker-hide-list' will be hidden."
:group 'erc-lurker
:type 'integer)
(defun erc-lurker-initialize ()
"Initialize ERC lurker tracking functionality.
This function adds `erc-lurker-update-status' to
`erc-insert-pre-hook' in order to record the time of each nick's
most recent PRIVMSG as well as initializing the state variable
storing this information."
(setq erc-lurker-state (make-hash-table :test 'equal))
(add-hook 'erc-insert-pre-hook 'erc-lurker-update-status))
(defun erc-lurker-cleanup ()
"Remove all last PRIVMSG state older than `erc-lurker-threshold-time'.
This should be called regularly to avoid excessive resource
consumption for long-lived IRC or Emacs sessions."
(maphash
(lambda (server hash)
(maphash
(lambda (nick last-PRIVMSG-time)
(when
(> (time-to-seconds (time-subtract
(current-time)
last-PRIVMSG-time))
erc-lurker-threshold-time)
(remhash nick hash)))
hash)
(if (zerop (hash-table-count hash))
(remhash server erc-lurker-state)))
erc-lurker-state))
(defvar erc-lurker-cleanup-count 0
"Internal counter variable for use with `erc-lurker-cleanup-interval'.")
(defvar erc-lurker-cleanup-interval 100
"Specifies frequency of cleaning up stale erc-lurker state.
`erc-lurker-update-status' calls `erc-lurker-cleanup' once for
every `erc-lurker-cleanup-interval' updates to
`erc-lurker-state'. This is designed to limit the memory
consumption of lurker state during long Emacs sessions and/or ERC
sessions with large numbers of incoming PRIVMSGs.")
(defun erc-lurker-update-status (message)
"Update `erc-lurker-state' if necessary.
This function is called from `erc-insert-pre-hook'. If the
current message is a PRIVMSG, update `erc-lurker-state' to
reflect the fact that its sender has issued a PRIVMSG at the
current time. Otherwise, take no action.
This function depends on the fact that `erc-display-message'
dynamically binds `parsed', which is used to check if the current
message is a PRIVMSG and to determine its sender. See also
`erc-lurker-trim-nicks' and `erc-lurker-ignore-chars'.
In order to limit memory consumption, this function also calls
`erc-lurker-cleanup' once every `erc-lurker-cleanup-interval'
updates of `erc-lurker-state'."
(when (and (boundp 'parsed) (erc-response-p parsed))
(let* ((command (erc-response.command parsed))
(sender
(erc-lurker-maybe-trim
(car (erc-parse-user (erc-response.sender parsed)))))
(server
(erc-canonicalize-server-name erc-server-announced-name)))
(when (equal command "PRIVMSG")
(when (>= (incf erc-lurker-cleanup-count) erc-lurker-cleanup-interval)
(setq erc-lurker-cleanup-count 0)
(erc-lurker-cleanup))
(unless (gethash server erc-lurker-state)
(puthash server (make-hash-table :test 'equal) erc-lurker-state))
(puthash sender (current-time)
(gethash server erc-lurker-state))))))
(defun erc-lurker-p (nick)
"Predicate indicating NICK's lurking status on the current server.
Lurking is the condition where NICK has issued no PRIVMSG on this
server within `erc-lurker-threshold-time'. See also
`erc-lurker-trim-nicks' and `erc-lurker-ignore-chars'."
(unless erc-lurker-state (erc-lurker-initialize))
(let* ((server
(erc-canonicalize-server-name erc-server-announced-name))
(last-PRIVMSG-time
(gethash (erc-lurker-maybe-trim nick)
(gethash server erc-lurker-state (make-hash-table)))))
(or (null last-PRIVMSG-time)
(> (time-to-seconds
(time-subtract (current-time) last-PRIVMSG-time))
erc-lurker-threshold-time))))
(defun erc-canonicalize-server-name (server)
"Returns the canonical network name for SERVER if any,
otherwise `erc-server-announced-name'. SERVER is matched against
`erc-common-server-suffixes'."
(when server
(or (cdar (erc-remove-if-not
(lambda (net) (string-match (car net) server))
erc-common-server-suffixes))
erc-server-announced-name)))
(defun erc-hide-current-message-p (parsed)
"Predicate indicating whether the parsed ERC response PARSED should be hidden.
Messages are always hidden if the message type of PARSED appears in
`erc-hide-list'. In addition, messages whose type is a member of
`erc-lurker-hide-list' are hidden if `erc-lurker-p' returns true."
(let* ((command (erc-response.command parsed))
(sender (car (erc-parse-user (erc-response.sender parsed)))))
(or (member command erc-hide-list)
(and (member command erc-lurker-hide-list) (erc-lurker-p sender)))))
(defun erc-display-message (parsed type buffer msg &rest args)
"Display MSG in BUFFER.
@ -2479,7 +2651,7 @@ See also `erc-format-message' and `erc-display-line'."
(if (not (erc-response-p parsed))
(erc-display-line string buffer)
(unless (member (erc-response.command parsed) erc-hide-list)
(unless (erc-hide-current-message-p parsed)
(erc-put-text-property 0 (length string) 'erc-parsed parsed string)
(erc-put-text-property 0 (length string) 'rear-sticky t string)
(erc-display-line string buffer)))))

View file

@ -1110,6 +1110,8 @@ Execute a COMMAND as the superuser or another USER.")
(format "%s|sudo:%s@%s:%s"
(substring prefix 0 -1) user host dir)
(format "/sudo:%s@%s:%s" user host dir))))
;; Ensure, that Tramp has connected to that construct already.
(file-exists-p default-directory)
(eshell-named-command (car orig-args) (cdr orig-args))))))))
(put 'eshell/sudo 'eshell-no-numeric-conversions t)

View file

@ -207,9 +207,14 @@ causing the user to wonder if anything's really going on..."
(defun eshell-external-command (command args)
"Insert output from an external COMMAND, using ARGS."
(setq args (eshell-stringify-list (eshell-flatten-list args)))
;; (if (file-remote-p default-directory)
;; (eshell-remote-command command args))
(let ((interp (eshell-find-interpreter command)))
(let ((interp (eshell-find-interpreter
command
;; `eshell-find-interpreter' does not work correctly
;; for Tramp file name syntax. But we don't need to
;; know the interpreter in that case, therefore the
;; check is suppressed.
(or (and (stringp command) (file-remote-p command))
(file-remote-p default-directory)))))
(cl-assert interp)
(if (functionp (car interp))
(apply (car interp) (append (cdr interp) args))

View file

@ -2444,7 +2444,7 @@ Note: Other faces cannot inherit from the cursor face."
:group 'menu
:group 'basic-faces)
(defface help-argument-name '((((supports :slant italic)) :inherit italic))
(defface help-argument-name '((t :inherit italic))
"Face to highlight argument names in *Help* buffers."
:group 'help)

View file

@ -1703,7 +1703,7 @@ Only intended for interactive use."
buffer-or-list
(list buffer-or-list)))
(with-current-buffer buffer
(toggle-read-only 1))))
(read-only-mode 1))))
(defun ffap-read-only ()
"Like `ffap', but mark buffer as read-only.

View file

@ -1456,7 +1456,7 @@ file names with wildcards."
(file-exists-p filename))
(error "%s does not exist" filename))
(let ((value (funcall fun filename wildcards)))
(mapc (lambda (b) (with-current-buffer b (toggle-read-only 1)))
(mapc (lambda (b) (with-current-buffer b (read-only-mode 1)))
(if (listp value) value (list value)))
value))
@ -2837,7 +2837,8 @@ symbol and VAL is a value that is considered safe."
;; This should be here at least as long as Emacs supports write-file-hooks.
'((add-hook 'write-file-hooks 'time-stamp)
(add-hook 'write-file-functions 'time-stamp)
(add-hook 'before-save-hook 'time-stamp))
(add-hook 'before-save-hook 'time-stamp nil t)
(add-hook 'before-save-hook 'delete-trailing-whitespace nil t))
"Expressions that are considered safe in an `eval:' local variable.
Add expressions to this list if you want Emacs to evaluate them, when
they appear in an `eval' local variable specification, without first
@ -4817,51 +4818,12 @@ prints a message in the minibuffer. Instead, use `set-buffer-modified-p'."
"Modification-flag cleared"))
(set-buffer-modified-p arg))
(defun toggle-read-only (&optional arg message)
"Toggle the read-only state of the current buffer.
With prefix argument ARG, make the buffer read-only if ARG is
positive; otherwise make it writable.
When making the buffer read-only, enable View mode if
`view-read-only' is non-nil. When making the buffer writable,
disable View mode if View mode is enabled.
If called interactively, or if called from Lisp with MESSAGE
non-nil, print a message reporting the buffer's new read-only
status.
Do not call this from a Lisp program unless you really intend to
do the same thing as the \\[toggle-read-only] command, including
possibly enabling or disabling View mode. Also, note that this
command works by setting the variable `buffer-read-only', which
does not affect read-only regions caused by text properties. To
ignore read-only status in a Lisp program (whether due to text
properties or buffer state), bind `inhibit-read-only' temporarily
to a non-nil value."
(interactive "P")
(cond
;; Do nothing if `buffer-read-only' already matches the state
;; specified by ARG.
((and arg
(if (> (prefix-numeric-value arg) 0)
buffer-read-only
(not buffer-read-only))))
;; If View mode is enabled, exit it.
((and buffer-read-only view-mode)
(View-exit-and-edit)
(set (make-local-variable 'view-read-only) t))
;; If `view-read-only' is non-nil, enable View mode.
((and view-read-only
(not buffer-read-only)
(not view-mode)
(not (eq (get major-mode 'mode-class) 'special)))
(view-mode-enter))
;; The usual action: flip `buffer-read-only'.
(t (setq buffer-read-only (not buffer-read-only))
(force-mode-line-update)))
(if (or message (called-interactively-p 'interactive))
(message "Read-only %s for this buffer"
(if buffer-read-only "enabled" "disabled"))))
(defun toggle-read-only (&optional arg interactive)
(declare (obsolete read-only-mode "24.3"))
(interactive (list current-prefix-arg t))
(if interactive
(call-interactively 'read-only-mode)
(read-only-mode (or arg 'toggle))))
(defun insert-file (filename)
"Insert contents of file FILENAME into buffer after point.
@ -5388,23 +5350,26 @@ non-nil, it is called instead of rereading visited file contents."
(not (file-exists-p file-name)))
(error "Auto-save file %s not current"
(abbreviate-file-name file-name)))
((save-window-excursion
(with-output-to-temp-buffer "*Directory*"
(buffer-disable-undo standard-output)
(save-excursion
(let ((switches dired-listing-switches))
(if (file-symlink-p file)
(setq switches (concat switches " -L")))
(set-buffer standard-output)
;; Use insert-directory-safely, not insert-directory,
;; because these files might not exist. In particular,
;; FILE might not exist if the auto-save file was for
;; a buffer that didn't visit a file, such as "*mail*".
;; The code in v20.x called `ls' directly, so we need
;; to emulate what `ls' did in that case.
(insert-directory-safely file switches)
(insert-directory-safely file-name switches))))
(yes-or-no-p (format "Recover auto save file %s? " file-name)))
((with-temp-buffer-window
"*Directory*" nil
#'(lambda (window _value)
(with-selected-window window
(unwind-protect
(yes-or-no-p (format "Recover auto save file %s? " file-name))
(when (window-live-p window)
(quit-restore-window window 'kill)))))
(with-current-buffer standard-output
(let ((switches dired-listing-switches))
(if (file-symlink-p file)
(setq switches (concat switches " -L")))
;; Use insert-directory-safely, not insert-directory,
;; because these files might not exist. In particular,
;; FILE might not exist if the auto-save file was for
;; a buffer that didn't visit a file, such as "*mail*".
;; The code in v20.x called `ls' directly, so we need
;; to emulate what `ls' did in that case.
(insert-directory-safely file switches)
(insert-directory-safely file-name switches))))
(switch-to-buffer (find-file-noselect file t))
(let ((inhibit-read-only t)
;; Keep the current buffer-file-coding-system.
@ -6365,8 +6330,15 @@ if any returns nil. If `confirm-kill-emacs' is non-nil, calls it."
(setq active t))
(setq processes (cdr processes)))
(or (not active)
(progn (list-processes t)
(yes-or-no-p "Active processes exist; kill them and exit anyway? ")))))
(with-temp-buffer-window
(get-buffer-create "*Process List*") nil
#'(lambda (window _value)
(with-selected-window window
(unwind-protect
(yes-or-no-p "Active processes exist; kill them and exit anyway? ")
(when (window-live-p window)
(quit-restore-window window 'kill)))))
(list-processes t)))))
;; Query the user for other things, perhaps.
(run-hook-with-args-until-failure 'kill-emacs-query-functions)
(or (null confirm-kill-emacs)

View file

@ -1,3 +1,82 @@
2012-09-03 Lars Ingebrigtsen <larsi@gnus.org>
* dgnushack.el: XEmacs 21.5 compilation fix.
* gnus-notifications.el (gnus-notifications-notify): Use it.
* gnus-fun.el (gnus-funcall-no-warning): New function to silence
warnings on XEmacs.
2012-09-01 Paul Eggert <eggert@cs.ucla.edu>
Better seeds for (random).
* gnus-sync.el (gnus-sync-lesync-setup):
* message.el (message-canlock-generate, message-unique-id):
Change (random t) to (random), now that the latter is more random.
2012-08-31 Dave Abrahams <dave@boostpro.com>
* auth-source.el (auth-sources): Fix macos keychain access.
* gnus-int.el (gnus-request-head): When gnus-override-method is set,
allow the backend `request-head' function to determine the group
name on its own.
(gnus-request-expire-articles): Filter out negative article numbers
during expiry (Bug#11980).
* gnus-range.el (gnus-set-difference): Change gnus-set-difference from
O(N^2) to O(N). This makes warping into huge groups tolerable.
* gnus-registry.el (gnus-try-warping-via-registry): Don't act as though
you've found the article when you haven't.
2012-08-31 Stefan Monnier <monnier@iro.umontreal.ca>
* gnus-notifications.el (gnus-notifications-action): Avoid CL-ism.
2012-08-30 Julien Danjou <julien@danjou.info>
* gnus-notifications.el (gnus-notifications-notify): Use timeout from
`gnus-notifications-timeout'.
(gnus-notifications-timeout): Add.
(gnus-notifications-action): New function.
(gnus-notifications-notify): Add :action using
`gnus-notifications-action'.
(gnus-notifications-id-to-msg): New variable.
(gnus-notifications): Use `gnus-notifications-id-to-msg' to map
notifications id to messages.
2012-08-30 Kenichi Handa <handa@gnu.org>
* qp.el (quoted-printable-decode-region): Decode multiple bytes at
once.
2012-08-29 Julien Danjou <julien@danjou.info>
* gnus-notifications.el: New file.
(gnus-notifications-notify): New function.
(gnus-notifications): Use `gnus-notifications-notify'.
2012-08-28 Katsumi Yamaoka <yamaoka@jpl.org>
* gnus-sum.el (gnus-summary-enter-digest-group): Decode content
transfer encoding first; bind gnus-newsgroup-charset to the charset
that the article specifies (Bug#12209).
2012-08-22 Katsumi Yamaoka <yamaoka@jpl.org>
* gnus-cus.el (gnus-group-customize): Decode values posting-style holds.
(gnus-group-customize-done): Encode values posting-style holds.
* gnus-msg.el (gnus-summary-resend-message)
(gnus-configure-posting-styles): Decode values posting-style group
parameter holds.
2012-08-21 Katsumi Yamaoka <yamaoka@jpl.org>
* gnus-msg.el (gnus-summary-resend-message): Honor posting-style for
`name' and `address' in Resent-From header.
2012-08-14 Chong Yidong <cyd@gnu.org>
* gnus-art.el (article-display-face): Handle failure in

View file

@ -256,10 +256,10 @@ can get pretty complex."
(const :tag "Temp Secrets API Collection" "secrets:session")
(const :tag "Default internet Mac OS Keychain"
'macos-keychain-internet)
macos-keychain-internet)
(const :tag "Default generic Mac OS Keychain"
'macos-keychain-generic)
macos-keychain-generic)
(list :tag "Source definition"
(const :format "" :value :source)

View file

@ -417,6 +417,11 @@ category."))
(delq elem tmp))
(setq tmp (cdr tmp))))
;; Decode values posting-style holds.
(dolist (style (cdr (assq 'posting-style values)))
(when (stringp (cadr style))
(setcdr style (list (mm-decode-coding-string (cadr style) 'utf-8)))))
(setq gnus-custom-params
(apply 'widget-create 'group
:value values
@ -487,14 +492,17 @@ form, but who cares?"
(defun gnus-group-customize-done (&rest ignore)
"Apply changes and bury the buffer."
(interactive)
(if gnus-custom-topic
(gnus-topic-set-parameters gnus-custom-topic
(widget-value gnus-custom-params))
(gnus-group-edit-group-done 'params gnus-custom-group
(widget-value gnus-custom-params))
(gnus-group-edit-group-done 'method gnus-custom-group
(widget-value gnus-custom-method)))
(bury-buffer))
(let ((params (widget-value gnus-custom-params)))
;; Encode values posting-style holds.
(dolist (style (cdr (assq 'posting-style params)))
(when (stringp (cadr style))
(setcdr style (list (mm-encode-coding-string (cadr style) 'utf-8)))))
(if gnus-custom-topic
(gnus-topic-set-parameters gnus-custom-topic params)
(gnus-group-edit-group-done 'params gnus-custom-group params)
(gnus-group-edit-group-done 'method gnus-custom-group
(widget-value gnus-custom-method)))
(bury-buffer)))
;;; Score Customization:

View file

@ -278,6 +278,10 @@ colors of the displayed X-Faces."
values))
(mapconcat 'identity values " ")))
(defun gnus-funcall-no-warning (function &rest args)
(when (fboundp function)
(apply function args)))
(provide 'gnus-fun)
;;; gnus-fun.el ends here

View file

@ -599,7 +599,8 @@ real group. Does nothing on a real group."
clean-up t))
;; Use `head' function.
((fboundp head)
(setq res (funcall head article (gnus-group-real-name group)
(setq res (funcall head article
(and (not gnus-override-method) (gnus-group-real-name group))
(nth 1 gnus-command-method))))
;; Use `article' function.
(t
@ -706,6 +707,10 @@ If GROUP is nil, all groups on GNUS-COMMAND-METHOD are scanned."
(defun gnus-request-expire-articles (articles group &optional force)
(let* ((gnus-command-method (gnus-find-method-for-group group))
;; Filter out any negative article numbers; they can't be
;; expired here.
(articles
(delq nil (mapcar (lambda (n) (and (>= n 0) n)) articles)))
(gnus-inhibit-demon t)
(not-deleted
(funcall

View file

@ -1369,7 +1369,24 @@ For the \"inline\" alternatives, also see the variable
(nnmail-fetch-field "to"))))
current-prefix-arg))
(let ((message-header-setup-hook (copy-sequence message-header-setup-hook))
(message-sent-hook (copy-sequence message-sent-hook)))
(message-sent-hook (copy-sequence message-sent-hook))
;; Honor posting-style for `name' and `address' in Resent-From header.
(styles (gnus-group-find-parameter gnus-newsgroup-name
'posting-style t))
(user-full-name user-full-name)
(user-mail-address user-mail-address)
tem)
(dolist (style styles)
(when (stringp (cadr style))
(setcdr style (list (mm-decode-coding-string (cadr style) 'utf-8)))))
(dolist (style (if styles
(append gnus-posting-styles (list (cons ".*" styles)))
gnus-posting-styles))
(when (string-match (pop style) gnus-newsgroup-name)
(when (setq tem (cadr (assq 'name style)))
(setq user-full-name tem))
(when (setq tem (cadr (assq 'address style)))
(setq user-mail-address tem))))
;; `gnus-summary-resend-message-insert-gcc' must run last.
(add-hook 'message-header-setup-hook
'gnus-summary-resend-message-insert-gcc t)
@ -1793,6 +1810,10 @@ this is a reply."
(when gnus-newsgroup-name
(let ((tmp-style (gnus-group-find-parameter group 'posting-style t)))
(when tmp-style
(dolist (style tmp-style)
(when (stringp (cadr style))
(setcdr style (list (mm-decode-coding-string (cadr style)
'utf-8)))))
(setq styles (append styles (list (cons ".*" tmp-style)))))))
;; Go through all styles and look for matches.
(dolist (style styles)

View file

@ -0,0 +1,187 @@
;; gnus-notifications.el -- Send notification on new message in Gnus
;; Copyright (C) 2012 Free Software Foundation, Inc.
;; Author: Julien Danjou <julien@danjou.info>
;; Keywords: news
;; This file is part of GNU Emacs.
;; GNU Emacs 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.
;; GNU Emacs 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 GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
;;; Commentary:
;; This implements notifications using `notifications-notify' on new
;; messages received.
;; Use (add-hook 'gnus-after-getting-new-news-hook 'gnus-notifications)
;; to get notifications just after getting the new news.
;;; Code:
(ignore-errors
(require 'notifications))
(require 'gnus-sum)
(require 'gnus-group)
(require 'gnus-int)
(require 'gnus-art)
(require 'gnus-util)
(ignore-errors
(require 'google-contacts)) ; Optional
(require 'gnus-fun)
(defgroup gnus-notifications nil
"Send notifications on new message in Gnus."
:group 'gnus)
(defcustom gnus-notifications-use-google-contacts t
"Use Google Contacts to retrieve photo."
:type 'boolean
:group 'gnus-notifications)
(defcustom gnus-notifications-use-gravatar t
"Use Gravatar to retrieve photo."
:type 'boolean
:group 'gnus-notifications)
(defcustom gnus-notifications-minimum-level 1
"Minimum group level the message should have to be notified.
Any message in a group that has a greater value than this will
not get notifications."
:type 'integer
:group 'gnus-notifications)
(defcustom gnus-notifications-timeout nil
"Timeout used for notifications sent via `notifications-notify'."
:type 'integer
:group 'gnus-notifications)
(defvar gnus-notifications-sent nil
"Notifications already sent.")
(defvar gnus-notifications-id-to-msg nil
"Map notifications ids to messages.")
(defun gnus-notifications-action (id key)
(when (string= key "read")
(let ((group-article (assoc id gnus-notifications-id-to-msg)))
(when group-article
(let ((group (cadr group-article))
(article (nth 2 group-article)))
(gnus-fetch-group group (list article)))))))
(defun gnus-notifications-notify (from subject photo-file)
"Send a notification about a new mail.
Return a notification id if any, or t on success."
(if (fboundp 'notifications-notify)
(gnus-funcall-no-warning
'notifications-notify
:title from
:body subject
:actions '("read" "Read")
:on-action 'gnus-notifications-action
:app-icon (gnus-funcall-no-warning
'image-search-load-path "gnus/gnus.png")
:app-name "Gnus"
:category "email.arrived"
:timeout gnus-notifications-timeout
:image-path photo-file)
(message "New message from %s: %s" from subject)
;; Don't return an id
t))
(defun gnus-notifications-get-photo (mail-address)
"Get photo for mail address."
(let ((google-photo (when (and gnus-notifications-use-google-contacts
(fboundp 'google-contacts-get-photo))
(ignore-errors
(gnus-funcall-no-warning
'google-contacts-get-photo mail-address)))))
(if google-photo
google-photo
(when gnus-notifications-use-gravatar
(let ((gravatar (ignore-errors
(gravatar-retrieve-synchronously mail-address))))
(if (eq gravatar 'error)
nil
(plist-get (cdr gravatar) :data)))))))
(defun gnus-notifications-get-photo-file (mail-address)
"Get a temporary file with an image for MAIL-ADDRESS.
You have to delete the temporary image yourself using
`delete-image'.
Returns nil if no image found."
(let ((photo (gnus-notifications-get-photo mail-address)))
(when photo
(let ((photo-file (make-temp-file "gnus-notifications-photo-"))
(coding-system-for-write 'binary))
(with-temp-file photo-file
(insert photo))
photo-file))))
;;;###autoload
(defun gnus-notifications ()
"Send a notification on new message.
This check for new messages that are in group with a level lower
or equal to `gnus-notifications-minimum-level' and send a
notification using `notifications-notify' for it.
This is typically a function to add in
`gnus-after-getting-new-news-hook'"
(dolist (entry gnus-newsrc-alist)
(let ((group (car entry)))
;; Check that the group level is less than
;; `gnus-notifications-minimum-level' and the the group has unread
;; messages.
(when (and (<= (gnus-group-level group) gnus-notifications-minimum-level)
(let ((unread (gnus-group-unread group)))
(and (numberp unread)
(> unread 0))))
;; Each group should have an entry in the `gnus-notifications-sent'
;; alist. If not, we add one at this time.
(let ((group-notifications (or (assoc group gnus-notifications-sent)
;; Nothing, add one and return it.
(assoc group
(add-to-list
'gnus-notifications-sent
(cons group nil))))))
(dolist (article (gnus-list-of-unread-articles group))
;; Check if the article already has been notified
(unless (memq article (cdr group-notifications))
(with-current-buffer nntp-server-buffer
(gnus-request-head article group)
(article-decode-encoded-words) ; to decode mail addresses, subjects, etc
(let* ((address-components (mail-extract-address-components
(or (mail-fetch-field "From") "")))
(address (cadr address-components)))
;; Ignore mails from ourselves
(unless (gnus-string-match-p gnus-ignored-from-addresses
address)
(let* ((photo-file (gnus-notifications-get-photo-file address))
(notification-id (gnus-notifications-notify
(or (car address-components) address)
(mail-fetch-field "Subject")
photo-file)))
(when notification-id
;; Register that we did notify this message
(setcdr group-notifications (cons article (cdr group-notifications)))
(unless (eq notification-id t)
;; Register the notification id for later actions
(add-to-list 'gnus-notifications-id-to-msg (list notification-id group article))))
(when photo-file
(delete-file photo-file)))))))))))))
(provide 'gnus-notifications)
;;; gnus-notifications.el ends here

View file

@ -52,11 +52,13 @@ If RANGE is a single range, return (RANGE). Otherwise, return RANGE."
(defun gnus-set-difference (list1 list2)
"Return a list of elements of LIST1 that do not appear in LIST2."
(let ((list1 (copy-sequence list1)))
(while list2
(setq list1 (delq (car list2) list1))
(setq list2 (cdr list2)))
list1))
(let ((hash2 (make-hash-table :test 'eq))
(result nil))
(dolist (elt list2) (puthash elt t hash2))
(dolist (elt list1)
(unless (gethash elt hash2)
(setq result (cons elt result))))
(nreverse result)))
(defun gnus-range-nconcat (&rest ranges)
"Return a range comprising all the RANGES, which are pre-sorted.

View file

@ -1169,9 +1169,10 @@ data stored in the registry."
;; Try to activate the group. If that fails, just move
;; along. We may have more groups to work with
(ignore-errors
(gnus-select-group-with-message-id group message-id))
(throw 'found t)))))))
(when
(ignore-errors
(gnus-select-group-with-message-id group message-id) t)
(throw 'found t))))))))
;; TODO: a few things

View file

@ -9137,7 +9137,7 @@ To control what happens when you exit the group, see the
(list (cons 'save-article-group ogroup))))
(case-fold-search t)
(buf (current-buffer))
dig to-address)
dig to-address charset)
(with-current-buffer gnus-original-article-buffer
;; Have the digest group inherit the main mail address of
;; the parent article.
@ -9150,16 +9150,32 @@ To control what happens when you exit the group, see the
to-address))))))
(setq dig (nnheader-set-temp-buffer " *gnus digest buffer*"))
(insert-buffer-substring gnus-original-article-buffer)
;; Remove lines that may lead nndoc to misinterpret the
;; document type.
(narrow-to-region
(goto-char (point-min))
(or (search-forward "\n\n" nil t) (point)))
;; Remove lines that may lead nndoc to misinterpret the
;; document type.
(goto-char (point-min))
(delete-matching-lines "^Path:\\|^From ")
;; Parse charset, and decode content transfer encoding.
(setq charset (mail-content-type-get
(mail-header-parse-content-type
(or (gnus-fetch-field "content-type") ""))
'charset))
(let ((encoding (gnus-fetch-field "content-transfer-encoding")))
(when encoding
(message-remove-header "content-transfer-encoding")
(goto-char (point-max))
(widen)
(narrow-to-region (point) (point-max))
(mm-decode-content-transfer-encoding
(intern (downcase (mail-header-strip encoding))))))
(widen))
(unwind-protect
(if (let ((gnus-newsgroup-ephemeral-charset gnus-newsgroup-charset)
(if (let ((gnus-newsgroup-ephemeral-charset
(if charset
(intern (downcase (gnus-strip-whitespace charset)))
gnus-newsgroup-charset))
(gnus-newsgroup-ephemeral-ignored-charsets
gnus-newsgroup-ignored-charsets))
(gnus-group-read-ephemeral-group

View file

@ -225,7 +225,7 @@ When SALT is nil, a random one will be generated using `random'."
(security-object (concat url "/_security"))
(user-record `((names . [,user]) (roles . [])))
(couch-user-name (format "org.couchdb.user:%s" user))
(salt (or salt (sha1 (format "%s" (random t)))))
(salt (or salt (sha1 (format "%s" (random)))))
(couch-user-record
`((_id . ,couch-user-name)
(type . user)

View file

@ -4820,9 +4820,7 @@ Do not use this for anything important, it is cryptographically weak."
(require 'sha1)
(let (sha1-maximum-internal-length)
(sha1 (concat (message-unique-id)
(format "%x%x%x" (random)
(progn (random t) (random))
(random))
(format "%x%x%x" (random) (random) (random))
(prin1-to-string (recent-keys))
(prin1-to-string (garbage-collect))))))
@ -5525,7 +5523,6 @@ In posting styles use `(\"Expires\" (make-expires-date 30))'."
;; You might for example insert a "." somewhere (not next to another dot
;; or string boundary), or modify the "fsf" string.
(defun message-unique-id ()
(random t)
;; Don't use microseconds from (current-time), they may be unsupported.
;; Instead we use this randomly inited counter.
(setq message-unique-id-char

View file

@ -53,7 +53,10 @@ them into characters should be done separately."
;; or both of which are lowercase letters in "abcdef", is
;; formally illegal. A robust implementation might choose to
;; recognize them as the corresponding uppercase letters.''
(let ((case-fold-search t))
(let ((case-fold-search t)
(decode-hex #'(lambda (n1 n2)
(+ (* (if (<= n1 ?9) (- n1 ?0) (+ (- n1 ?A) 10)) 16)
(if (<= n2 ?9) (- n2 ?0) (+ (- n2 ?A) 10))))))
(narrow-to-region from to)
;; Do this in case we're called from Gnus, say, in a buffer
;; which already contains non-ASCII characters which would
@ -65,12 +68,17 @@ them into characters should be done separately."
(not (eobp)))
(cond ((eq (char-after (1+ (point))) ?\n)
(delete-char 2))
((looking-at "=[0-9A-F][0-9A-F]")
(let ((byte (string-to-number (buffer-substring (1+ (point))
(+ 3 (point)))
16)))
(mm-insert-byte byte 1)
(delete-char 3)))
((looking-at "\\(=[0-9A-F][0-9A-F]\\)+")
;; Decode this sequence at once; i.e. by a single
;; deletion and insertion.
(let* ((n (/ (- (match-end 0) (point)) 3))
(str (make-string n 0)))
(dotimes (i n)
(aset str i (funcall decode-hex (char-after (1+ (point)))
(char-after (+ 2 (point)))))
(forward-char 3))
(delete-region (match-beginning 0) (match-end 0))
(insert str)))
(t
(message "Malformed quoted-printable text")
(forward-char)))))

View file

@ -397,9 +397,11 @@ suitable file is found, return nil."
(if (member (event-modifiers (aref key 0)) '(nil (shift)))
(push key non-modified-keys)))
(when remapped
(princ "Its keys are remapped to `")
(princ (symbol-name remapped))
(princ "'.\n"))
(princ "Its keys are remapped to ")
(princ (if (symbolp remapped)
(concat "`" (symbol-name remapped) "'")
"an anonymous command"))
(princ ".\n"))
(when keys
(princ (if remapped

View file

@ -39,9 +39,10 @@
;; `help-window-point-marker' is a marker you can move to a valid
;; position of the buffer shown in the help window in order to override
;; the standard positioning mechanism (`point-min') chosen by
;; `with-output-to-temp-buffer'. `with-help-window' has this point
;; nowhere before exiting. Currently used by `view-lossage' to assert
;; that the last keystrokes are always visible.
;; `with-output-to-temp-buffer' and `with-temp-buffer-window'.
;; `with-help-window' has this point nowhere before exiting. Currently
;; used by `view-lossage' to assert that the last keystrokes are always
;; visible.
(defvar help-window-point-marker (make-marker)
"Marker to override default `window-point' in help windows.")
@ -145,10 +146,6 @@ specifies what to do when the user exits the help buffer."
;; Secondly, the buffer has not been displayed yet,
;; so we don't know whether its frame will be selected.
nil)
(display-buffer-reuse-frames
(setq help-return-method (cons (selected-window)
'quit-window))
nil)
((not (one-window-p t))
(setq help-return-method
(cons (selected-window) 'quit-window))
@ -979,13 +976,13 @@ function is called, the window to be resized is selected."
:version "20.4")
(define-minor-mode temp-buffer-resize-mode
"Toggle auto-shrinking temp buffer windows (Temp Buffer Resize mode).
"Toggle auto-resizing temporary buffer windows (Temp Buffer Resize Mode).
With a prefix argument ARG, enable Temp Buffer Resize mode if ARG
is positive, and disable it otherwise. If called from Lisp,
enable the mode if ARG is omitted or nil.
When Temp Buffer Resize mode is enabled, the windows in which we
show a temporary buffer are automatically reduced in height to
show a temporary buffer are automatically resized in height to
fit the buffer's contents, but never more than
`temp-buffer-max-height' nor less than `window-min-height'.
@ -998,19 +995,22 @@ and some others."
(add-hook 'temp-buffer-show-hook 'resize-temp-buffer-window 'append)
(remove-hook 'temp-buffer-show-hook 'resize-temp-buffer-window)))
(defun resize-temp-buffer-window ()
"Resize the selected window to fit its contents.
Will not make it higher than `temp-buffer-max-height' nor smaller
than `window-min-height'. Do nothing if the selected window is
not vertically combined or some of its contents are scrolled out
of view."
(when (and (pos-visible-in-window-p (point-min))
(window-combined-p))
(fit-window-to-buffer
nil
(if (functionp temp-buffer-max-height)
(funcall temp-buffer-max-height (window-buffer))
temp-buffer-max-height))))
(defun resize-temp-buffer-window (&optional window)
"Resize WINDOW to fit its contents.
WINDOW can be any live window and defaults to the selected one.
Do not make WINDOW higher than `temp-buffer-max-height' nor
smaller than `window-min-height'. Do nothing if WINDOW is not
vertically combined or some of its contents are scrolled out of
view."
(setq window (window-normalize-window window t))
(let ((height (if (functionp temp-buffer-max-height)
(with-selected-window window
(funcall temp-buffer-max-height (window-buffer)))
temp-buffer-max-height)))
(when (and (pos-visible-in-window-p (point-min) window)
(window-combined-p window))
(fit-window-to-buffer window height))))
;;; Help windows.
(defcustom help-window-select 'other

View file

@ -2401,7 +2401,7 @@ Operations on marked buffers:
buffer's file as an argument.
'\\[ibuffer-do-eval]' - Evaluate a form in each of the marked buffers. This
is a very flexible command. For example, if you want to make all
of the marked buffers read only, try using (toggle-read-only 1) as
of the marked buffers read only, try using (read-only-mode 1) as
the input form.
'\\[ibuffer-do-view-and-eval]' - As above, but view each buffer while the form
is evaluated.

View file

@ -417,6 +417,21 @@ If number, the point is moved to the corresponding line.")
(defvar Info-standalone nil
"Non-nil if Emacs was started solely as an Info browser.")
(defvar Info-file-attributes nil
"Alist of file attributes of visited Info files.
Each element is a list (FILE-NAME FILE-ATTRIBUTES...).")
(defvar Info-toc-nodes nil
"Alist of cached parent-children node information in visited Info files.
Each element is (FILE (NODE-NAME PARENT SECTION CHILDREN) ...)
where PARENT is the parent node extracted from the Up pointer,
SECTION is the section name in the Top node where this node is placed,
CHILDREN is a list of child nodes extracted from the node menu.")
(defvar Info-index-nodes nil
"Alist of cached index node names of visited Info files.
Each element has the form (INFO-FILE INDEX-NODE-NAMES-LIST).")
(defvar Info-virtual-files nil
"List of definitions of virtual Info files.
Each element of the list has the format (FILENAME (OPERATION . HANDLER) ...)
@ -609,7 +624,26 @@ Do the right thing if the file has been compressed or zipped."
(apply 'call-process-region (point-min) (point-max)
(car decoder) t t nil (cdr decoder))))
(let ((inhibit-null-byte-detection t)) ; Index nodes include null bytes
(insert-file-contents fullname visit)))))
(insert-file-contents fullname visit)))
;; Clear the caches of modified Info files.
(let* ((attribs-old (cdr (assoc fullname Info-file-attributes)))
(modtime-old (and attribs-old (nth 5 attribs-old)))
(attribs-new (and (stringp fullname) (file-attributes fullname)))
(modtime-new (and attribs-new (nth 5 attribs-new))))
(when (and modtime-old modtime-new
(> (float-time modtime-new) (float-time modtime-old)))
(setq Info-index-nodes (remove (assoc (or Info-current-file filename)
Info-index-nodes)
Info-index-nodes))
(setq Info-toc-nodes (remove (assoc (or Info-current-file filename)
Info-toc-nodes)
Info-toc-nodes)))
;; Add new modtime to `Info-file-attributes'.
(setq Info-file-attributes
(cons (cons fullname attribs-new)
(remove (assoc fullname Info-file-attributes)
Info-file-attributes))))))
(defun Info-file-supports-index-cookies (&optional file)
"Return non-nil value if FILE supports Info index cookies.
@ -2394,13 +2428,6 @@ Table of contents is created from the tree structure of menus."
(message "")
(nreverse nodes))))
(defvar Info-toc-nodes nil
"Alist of cached parent-children node information in visited Info files.
Each element is (FILE (NODE-NAME PARENT SECTION CHILDREN) ...)
where PARENT is the parent node extracted from the Up pointer,
SECTION is the section name in the Top node where this node is placed,
CHILDREN is a list of child nodes extracted from the node menu.")
(defun Info-toc-nodes (filename)
"Return a node list of Info FILENAME with parent-children information.
This information is cached in the variable `Info-toc-nodes' with the help
@ -3032,10 +3059,6 @@ See `Info-scroll-down'."
(if (looking-at "^\\* ")
(forward-char 2)))))
(defvar Info-index-nodes nil
"Alist of cached index node names of visited Info files.
Each element has the form (INFO-FILE INDEX-NODE-NAMES-LIST).")
(defun Info-index-nodes (&optional file)
"Return a list of names of all index nodes in Info FILE.
If FILE is omitted, it defaults to the current Info file.
@ -4504,7 +4527,17 @@ first line or header line, and for breadcrumb links.")
((not (bobp))
;; Hide the punctuation at the end, too.
(skip-chars-backward " \t,")
(put-text-property (point) header-end 'invisible t))))))
(put-text-property (point) header-end 'invisible t)
;; Hide the suffix of the Info file name.
(beginning-of-line)
(if (re-search-forward
(format "File: %s\\([^,\n\t]+\\),"
(if (stringp Info-current-file)
(file-name-nondirectory Info-current-file)
Info-current-file))
header-end t)
(put-text-property (match-beginning 1) (match-end 1)
'invisible t)))))))
;; Fontify titles
(goto-char (point-min))
@ -4792,6 +4825,12 @@ first line or header line, and for breadcrumb links.")
mouse-face highlight
help-echo "mouse-2: go to this URL"))))
;; Hide empty lines at the end of the node.
(goto-char (point-max))
(skip-chars-backward "\n")
(when (< (1+ (point)) (point-max))
(put-text-property (1+ (point)) (point-max) 'invisible t))
(set-buffer-modified-p nil))))
;;; Speedbar support:

View file

@ -111,17 +111,24 @@ string, and RET terminates editing and does a nonincremental search."
(defcustom search-whitespace-regexp (purecopy "\\s-+")
"If non-nil, regular expression to match a sequence of whitespace chars.
This applies to regular expression incremental search.
When you put a space or spaces in the incremental regexp, it stands for
this, unless it is inside of a regexp construct such as [...] or *, + or ?.
When you enter a space or spaces in the incremental search, it
will match any sequence matched by this regexp. As an exception,
spaces are treated normally in regexp incremental search if they
occur in a regexp construct like [...] or *, + or ?.
If the value is a string, it applies to both ordinary and
regexp incremental search. If the value is nil, or
`isearch-lax-whitespace' is nil for ordinary incremental search, or
`isearch-regexp-lax-whitespace' is nil for regexp incremental search,
then each space you type matches literally, against one space.
You might want to use something like \"[ \\t\\r\\n]+\" instead.
In the Customization buffer, that is `[' followed by a space,
a tab, a carriage return (control-M), a newline, and `]+'.
When this is nil, each space you type matches literally, against one space."
:type '(choice (const :tag "Find Spaces Literally" nil)
a tab, a carriage return (control-M), a newline, and `]+'."
:type '(choice (const :tag "Match Spaces Literally" nil)
regexp)
:group 'isearch)
:group 'isearch
:version "24.3")
(defcustom search-invisible 'open
"If t incremental search can match hidden text.
@ -499,6 +506,7 @@ This is like `describe-bindings', but displays only Isearch keys."
(define-key map "\M-sr" 'isearch-toggle-regexp)
(define-key map "\M-sw" 'isearch-toggle-word)
(define-key map "\M-s_" 'isearch-toggle-symbol)
(define-key map "\M-s " 'isearch-toggle-lax-whitespace)
(define-key map [?\M-%] 'isearch-query-replace)
(define-key map [?\C-\M-%] 'isearch-query-replace-regexp)
@ -541,6 +549,22 @@ convert the search string to a regexp used by regexp search functions.
The property `isearch-message-prefix' put on this function specifies the
prefix string displayed in the search message.")
(defvar isearch-lax-whitespace t
"If non-nil, a space will match a sequence of whitespace chars.
When you enter a space or spaces in ordinary incremental search, it
will match any sequence matched by the regexp defined by the variable
`search-whitespace-regexp'. If the value is nil, each space you type
matches literally, against one space. You can toggle the value of this
variable by the command `isearch-toggle-lax-whitespace'.")
(defvar isearch-regexp-lax-whitespace nil
"If non-nil, a space will match a sequence of whitespace chars.
When you enter a space or spaces in regexp incremental search, it
will match any sequence matched by the regexp defined by the variable
`search-whitespace-regexp'. If the value is nil, each space you type
matches literally, against one space. You can toggle the value of this
variable by the command `isearch-toggle-lax-whitespace'.")
(defvar isearch-cmds nil
"Stack of search status sets.
Each set is a vector of the form:
@ -666,6 +690,12 @@ Type \\[isearch-toggle-case-fold] to toggle search case-sensitivity.
Type \\[isearch-toggle-regexp] to toggle regular-expression mode.
Type \\[isearch-toggle-word] to toggle word mode.
Type \\[isearch-toggle-symbol] to toggle symbol mode.
Type \\[isearch-toggle-lax-whitespace] to toggle whitespace matching.
In incremental searches, a space or spaces normally matches any whitespace
defined by the variable `search-whitespace-regexp'; see also the variables
`isearch-lax-whitespace' and `isearch-regexp-lax-whitespace'.
Type \\[isearch-edit-string] to edit the search string in the minibuffer.
Also supported is a search ring of the previous 16 search strings.
@ -710,22 +740,20 @@ the calling function until the search is done."
(isearch-mode t (not (null regexp-p)) nil (not no-recursive-edit)))
(defun isearch-forward-regexp (&optional not-regexp no-recursive-edit)
"\
Do incremental search forward for regular expression.
"Do incremental search forward for regular expression.
With a prefix argument, do a regular string search instead.
Like ordinary incremental search except that your input is treated
as a regexp. See the command `isearch-forward' for more information.
In regexp incremental searches, a space or spaces normally matches
any whitespace (the variable `search-whitespace-regexp' controls
precisely what that means). If you want to search for a literal space
and nothing else, enter C-q SPC."
In incremental searches, a space or spaces normally matches any
whitespace defined by the variable `search-whitespace-regexp'.
To search for a literal space and nothing else, enter C-q SPC.
To toggle whitespace matching, use `isearch-toggle-lax-whitespace'."
(interactive "P\np")
(isearch-mode t (null not-regexp) nil (not no-recursive-edit)))
(defun isearch-forward-word (&optional not-word no-recursive-edit)
"\
Do incremental search forward for a sequence of words.
"Do incremental search forward for a sequence of words.
With a prefix argument, do a regular string search instead.
Like ordinary incremental search except that your input is treated
as a sequence of words without regard to how the words are separated.
@ -734,8 +762,7 @@ See the command `isearch-forward' for more information."
(isearch-mode t nil nil (not no-recursive-edit) (null not-word)))
(defun isearch-forward-symbol (&optional not-symbol no-recursive-edit)
"\
Do incremental search forward for a symbol.
"Do incremental search forward for a symbol.
The prefix argument is currently unused.
Like ordinary incremental search except that your input is treated
as a symbol surrounded by symbol boundary constructs \\_< and \\_>.
@ -744,16 +771,14 @@ See the command `isearch-forward' for more information."
(isearch-mode t nil nil (not no-recursive-edit) 'isearch-symbol-regexp))
(defun isearch-backward (&optional regexp-p no-recursive-edit)
"\
Do incremental search backward.
"Do incremental search backward.
With a prefix argument, do a regular expression search instead.
See the command `isearch-forward' for more information."
(interactive "P\np")
(isearch-mode nil (not (null regexp-p)) nil (not no-recursive-edit)))
(defun isearch-backward-regexp (&optional not-regexp no-recursive-edit)
"\
Do incremental search backward for regular expression.
"Do incremental search backward for regular expression.
With a prefix argument, do a regular string search instead.
Like ordinary incremental search except that your input is treated
as a regexp. See the command `isearch-forward' for more information."
@ -895,8 +920,7 @@ The last thing it does is to run `isearch-update-post-hook'."
(if (< isearch-other-end (point)) ; isearch-forward?
(isearch-highlight isearch-other-end (point))
(isearch-highlight (point) isearch-other-end))
(isearch-dehighlight))
))
(isearch-dehighlight))))
(setq ;; quit-flag nil not for isearch-mode
isearch-adjusted nil
isearch-yank-flag nil)
@ -1384,6 +1408,28 @@ Use `isearch-exit' to quit without signaling."
(setq isearch-success t isearch-adjusted t)
(isearch-update))
(defun isearch-toggle-lax-whitespace ()
"Toggle whitespace matching in searching on or off.
In ordinary search, toggles the value of the variable
`isearch-lax-whitespace'. In regexp search, toggles the
value of the variable `isearch-regexp-lax-whitespace'."
(interactive)
(if isearch-regexp
(setq isearch-regexp-lax-whitespace (not isearch-regexp-lax-whitespace))
(setq isearch-lax-whitespace (not isearch-lax-whitespace)))
(let ((message-log-max nil))
(message "%s%s [%s]"
(isearch-message-prefix nil isearch-nonincremental)
isearch-message
(if (if isearch-regexp
isearch-regexp-lax-whitespace
isearch-lax-whitespace)
"match spaces loosely"
"match spaces literally")))
(setq isearch-success t isearch-adjusted t)
(sit-for 1)
(isearch-update))
(defun isearch-toggle-case-fold ()
"Toggle case folding in searching on or off."
(interactive)
@ -1495,6 +1541,28 @@ If LAX is non-nil, the end of the string need not match a symbol boundary."
(put 'isearch-symbol-regexp 'isearch-message-prefix "symbol ")
;; Search with lax whitespace
(defun search-forward-lax-whitespace (string &optional bound noerror count)
"Search forward for STRING, matching a sequence of whitespace chars."
(let ((search-spaces-regexp search-whitespace-regexp))
(re-search-forward (regexp-quote string) bound noerror count)))
(defun search-backward-lax-whitespace (string &optional bound noerror count)
"Search backward for STRING, matching a sequence of whitespace chars."
(let ((search-spaces-regexp search-whitespace-regexp))
(re-search-backward (regexp-quote string) bound noerror count)))
(defun re-search-forward-lax-whitespace (regexp &optional bound noerror count)
"Search forward for REGEXP, matching a sequence of whitespace chars."
(let ((search-spaces-regexp search-whitespace-regexp))
(re-search-forward regexp bound noerror count)))
(defun re-search-backward-lax-whitespace (regexp &optional bound noerror count)
"Search backward for REGEXP, matching a sequence of whitespace chars."
(let ((search-spaces-regexp search-whitespace-regexp))
(re-search-backward regexp bound noerror count)))
(defun isearch-query-replace (&optional delimited regexp-flag)
"Start `query-replace' with string to replace from last search string.
@ -1511,6 +1579,14 @@ way to run word replacements from Isearch is `M-s w ... M-%'."
;; set `search-upper-case' to nil to not call
;; `isearch-no-upper-case-p' in `perform-replace'
(search-upper-case nil)
(replace-search-function
(if (and isearch-lax-whitespace (not regexp-flag))
#'search-forward-lax-whitespace
replace-search-function))
(replace-re-search-function
(if (and isearch-regexp-lax-whitespace regexp-flag)
#'re-search-forward-lax-whitespace
replace-re-search-function))
;; Set `isearch-recursive-edit' to nil to prevent calling
;; `exit-recursive-edit' in `isearch-done' that terminates
;; the execution of this command when it is non-nil.
@ -1586,7 +1662,11 @@ characters in that string."
;; Set `search-upper-case' to nil to not call
;; `isearch-no-upper-case-p' in `occur-1'.
(search-upper-case nil)
(search-spaces-regexp (if isearch-regexp search-whitespace-regexp)))
(search-spaces-regexp
(if (if isearch-regexp
isearch-regexp-lax-whitespace
isearch-lax-whitespace)
search-whitespace-regexp)))
(occur regexp nlines)))
(declare-function hi-lock-read-face-name "hi-lock" ())
@ -2183,7 +2263,7 @@ Isearch mode."
;; Assume character codes 0200 - 0377 stand for characters in some
;; single-byte character set, and convert them to Emacs
;; characters.
(if (and isearch-regexp (= char ?\s))
(if (and isearch-regexp isearch-regexp-lax-whitespace (= char ?\s))
(if (subregexp-context-p isearch-string (length isearch-string))
(isearch-process-search-string "[ ]" " ")
(isearch-process-search-char char))
@ -2423,8 +2503,17 @@ Can be changed via `isearch-search-fun-function' for special needs."
(funcall isearch-word string lax)
(word-search-regexp string lax))
bound noerror count))))
((and isearch-regexp isearch-regexp-lax-whitespace
search-whitespace-regexp)
(if isearch-forward
're-search-forward-lax-whitespace
're-search-backward-lax-whitespace))
(isearch-regexp
(if isearch-forward 're-search-forward 're-search-backward))
((and isearch-lax-whitespace search-whitespace-regexp)
(if isearch-forward
'search-forward-lax-whitespace
'search-backward-lax-whitespace))
(t
(if isearch-forward 'search-forward 'search-backward))))
@ -2487,7 +2576,6 @@ update the match data, and return point."
search-invisible))
(inhibit-quit nil)
(case-fold-search isearch-case-fold-search)
(search-spaces-regexp search-whitespace-regexp)
(retry t))
(setq isearch-error nil)
(while retry
@ -2779,7 +2867,8 @@ since they have special meaning in a regexp."
(defvar isearch-lazy-highlight-window-end nil)
(defvar isearch-lazy-highlight-case-fold-search nil)
(defvar isearch-lazy-highlight-regexp nil)
(defvar isearch-lazy-highlight-space-regexp nil)
(defvar isearch-lazy-highlight-lax-whitespace nil)
(defvar isearch-lazy-highlight-regexp-lax-whitespace nil)
(defvar isearch-lazy-highlight-word nil)
(defvar isearch-lazy-highlight-forward nil)
(defvar isearch-lazy-highlight-error nil)
@ -2821,6 +2910,10 @@ by other Emacs features."
isearch-regexp))
(not (eq isearch-lazy-highlight-word
isearch-word))
(not (eq isearch-lazy-highlight-lax-whitespace
isearch-lax-whitespace))
(not (eq isearch-lazy-highlight-regexp-lax-whitespace
isearch-regexp-lax-whitespace))
(not (= (window-start)
isearch-lazy-highlight-window-start))
(not (= (window-end) ; Window may have been split/joined.
@ -2847,7 +2940,8 @@ by other Emacs features."
isearch-lazy-highlight-last-string isearch-string
isearch-lazy-highlight-case-fold-search isearch-case-fold-search
isearch-lazy-highlight-regexp isearch-regexp
isearch-lazy-highlight-space-regexp search-whitespace-regexp
isearch-lazy-highlight-lax-whitespace isearch-lax-whitespace
isearch-lazy-highlight-regexp-lax-whitespace isearch-regexp-lax-whitespace
isearch-lazy-highlight-word isearch-word
isearch-lazy-highlight-forward isearch-forward)
(unless (equal isearch-string "")
@ -2861,7 +2955,6 @@ Attempt to do the search exactly the way the pending Isearch would."
(condition-case nil
(let ((case-fold-search isearch-lazy-highlight-case-fold-search)
(isearch-regexp isearch-lazy-highlight-regexp)
(search-spaces-regexp isearch-lazy-highlight-space-regexp)
(isearch-word isearch-lazy-highlight-word)
(search-invisible nil) ; don't match invisible text
(retry t)

View file

@ -174,6 +174,10 @@ this around your call to `json-read' instead of `setq'ing it.")
(put 'json-string-format 'error-conditions
'(json-string-format json-error error))
(put 'json-key-format 'error-message "Bad JSON object key")
(put 'json-key-format 'error-conditions
'(json-key-format json-error error))
(put 'json-object-format 'error-message "Bad JSON object")
(put 'json-object-format 'error-conditions
'(json-object-format json-error error))
@ -321,6 +325,15 @@ representation will be parsed correctly."
"Return a JSON representation of STRING."
(format "\"%s\"" (mapconcat 'json-encode-char string "")))
(defun json-encode-key (object)
"Return a JSON representation of OBJECT.
If the resulting JSON object isn't a valid JSON object key,
this signals `json-key-format'."
(let ((encoded (json-encode object)))
(unless (stringp (json-read-from-string encoded))
(signal 'json-key-format (list object)))
encoded))
;;; JSON Objects
(defun json-new-object ()
@ -395,7 +408,7 @@ Please see the documentation of `json-object-type' and `json-key-type'."
(maphash
(lambda (k v)
(push (format "%s:%s"
(json-encode k)
(json-encode-key k)
(json-encode v))
r))
hash-table)
@ -409,7 +422,7 @@ Please see the documentation of `json-object-type' and `json-key-type'."
(format "{%s}"
(json-join (mapcar (lambda (cons)
(format "%s:%s"
(json-encode (car cons))
(json-encode-key (car cons))
(json-encode (cdr cons))))
alist)
", ")))
@ -418,7 +431,7 @@ Please see the documentation of `json-object-type' and `json-key-type'."
"Return a JSON representation of PLIST."
(let (result)
(while plist
(push (concat (json-encode (car plist))
(push (concat (json-encode-key (car plist))
":"
(json-encode (cadr plist)))
result)

File diff suppressed because it is too large Load diff

View file

@ -1821,7 +1821,9 @@ Currently supported properties are all the properties that can appear in
`:predicate' a predicate that completion candidates need to satisfy.
`:exclusive' If `no', means that if the completion table fails to
match the text at point, then instead of reporting a completion
failure, the completion should try the next completion function.")
failure, the completion should try the next completion function.
As is the case with most hooks, the functions are responsible to preserve
things like point and current buffer.")
(defvar completion--capf-misbehave-funs nil
"List of functions found on `completion-at-point-functions' that misbehave.

View file

@ -99,14 +99,14 @@ Ignores CHAR at point."
(defun forward-to-word (arg)
"Move forward until encountering the beginning of a word.
With argument, do this that many times."
(interactive "p")
(interactive "^p")
(or (re-search-forward (if (> arg 0) "\\W\\b" "\\b\\W") nil t arg)
(goto-char (if (> arg 0) (point-max) (point-min)))))
(defun backward-to-word (arg)
"Move backward until encountering the end of a word.
With argument, do this that many times."
(interactive "p")
(interactive "^p")
(forward-to-word (- arg)))
;;;###autoload

View file

@ -802,26 +802,36 @@ With no argument or nil as argument, use the current buffer."
(defvar rcirc-max-message-length 420
"Messages longer than this value will be split.")
(defun rcirc-split-message (message)
"Split MESSAGE into chunks within `rcirc-max-message-length'."
;; `rcirc-encode-coding-system' can have buffer-local value.
(let ((encoding rcirc-encode-coding-system))
(with-temp-buffer
(insert message)
(goto-char (point-min))
(let (result)
(while (not (eobp))
(goto-char (or (byte-to-position rcirc-max-message-length)
(point-max)))
;; max message length is 512 including CRLF
(while (and (not (bobp))
(> (length (encode-coding-region
(point-min) (point) encoding t))
rcirc-max-message-length))
(forward-char -1))
(push (delete-and-extract-region (point-min) (point)) result))
(nreverse result)))))
(defun rcirc-send-message (process target message &optional noticep silent)
"Send TARGET associated with PROCESS a privmsg with text MESSAGE.
If NOTICEP is non-nil, send a notice instead of privmsg.
If SILENT is non-nil, do not print the message in any irc buffer."
;; max message length is 512 including CRLF
(let* ((response (if noticep "NOTICE" "PRIVMSG"))
(oversize (> (length message) rcirc-max-message-length))
(text (if oversize
(substring message 0 rcirc-max-message-length)
message))
(text (if (string= text "")
" "
text))
(more (if oversize
(substring message rcirc-max-message-length))))
(let ((response (if noticep "NOTICE" "PRIVMSG")))
(rcirc-get-buffer-create process target)
(rcirc-send-string process (concat response " " target " :" text))
(unless silent
(rcirc-print process (rcirc-nick process) response target text))
(when more (rcirc-send-message process target more noticep))))
(dolist (msg (rcirc-split-message message))
(rcirc-send-string process (concat response " " target " :" msg))
(unless silent
(rcirc-print process (rcirc-nick process) response target msg)))))
(defvar rcirc-input-ring nil)
(defvar rcirc-input-ring-index 0)

View file

@ -183,7 +183,7 @@ It contain at least 64 bits of entropy."
;; Don't use microseconds from (current-time), they may be unsupported.
;; Instead we use this randomly inited counter.
(setq sasl-unique-id-char
(% (1+ (or sasl-unique-id-char (logand (random t) (1- (lsh 1 20)))))
(% (1+ (or sasl-unique-id-char (logand (random) (1- (lsh 1 20)))))
;; (current-time) returns 16-bit ints,
;; and 2^16*25 just fits into 4 digits i base 36.
(* 25 25)))

View file

@ -512,9 +512,9 @@ detected as prompt when being sent on echoing hosts, therefore.")
;; IRIX64: /usr/bin
;;;###tramp-autoload
(defcustom tramp-remote-path
'(tramp-default-remote-path "/bin" "/usr/bin" "/usr/sbin"
"/usr/local/bin" "/local/bin" "/local/freeware/bin" "/local/gnu/bin"
"/usr/freeware/bin" "/usr/pkg/bin" "/usr/contrib/bin"
'(tramp-default-remote-path "/bin" "/usr/bin" "/sbin" "/usr/sbin"
"/usr/local/bin" "/usr/local/sbin" "/local/bin" "/local/freeware/bin"
"/local/gnu/bin" "/usr/freeware/bin" "/usr/pkg/bin" "/usr/contrib/bin"
"/opt/bin" "/opt/sbin" "/opt/local/bin")
"List of directories to search for executables on remote host.
For every remote host, this variable will be set buffer local,

View file

@ -3293,7 +3293,7 @@ for process communication also."
;; Under Windows XP, accept-process-output doesn't return
;; sometimes. So we add an additional timeout.
(with-timeout ((or timeout 1))
(accept-process-output proc timeout timeout-msecs)))
(accept-process-output proc timeout timeout-msecs (and proc t))))
(tramp-message proc 10 "\n%s" (buffer-string))))
(defun tramp-check-for-regexp (proc regexp)

View file

@ -329,7 +329,7 @@ This is only possible if Meta-CVS is responsible for FILE's directory.")
(if vc-mcvs-use-edit
(vc-mcvs-command nil 0 file "edit")
(set-file-modes file (logior (file-modes file) 128))
(if (equal file buffer-file-name) (toggle-read-only -1))))
(if (equal file buffer-file-name) (read-only-mode -1))))
;; Check out a particular revision (or recreate the file).
(vc-file-setprop file 'vc-working-revision nil)
(apply 'vc-mcvs-command nil 0 file

View file

@ -1,3 +1,9 @@
2012-09-01 Paul Eggert <eggert@cs.ucla.edu>
Better seed support for (random).
* org-id.el (org-id-uuid):
Change (random t) to (random), now that the latter is more random.
2012-07-29 Paul Eggert <eggert@cs.ucla.edu>
Don't use the abbreviation "win" to refer to Windows (Bug#10421).

View file

@ -318,7 +318,7 @@ So a typical ID could look like \"Org:4nd91V40HI\"."
(defun org-id-uuid ()
"Return string with random (version 4) UUID."
(let ((rnd (md5 (format "%s%s%s%s%s%s%s"
(random t)
(random)
(current-time)
(user-uid)
(emacs-pid)

View file

@ -52,8 +52,17 @@ otherwise)."
:group 'paren-showing)
(defcustom show-paren-delay 0.125
"Time in seconds to delay before showing a matching paren."
"Time in seconds to delay before showing a matching paren.
If you change this without using customize while `show-paren-mode' is
active, you must toggle the mode off and on again for this to take effect."
:type '(number :tag "seconds")
:initialize 'custom-initialize-default
:set (lambda (sym val)
(if (not show-paren-mode)
(set sym val)
(show-paren-mode -1)
(set sym val)
(show-paren-mode 1)))
:group 'paren-showing)
(defcustom show-paren-priority 1000

View file

@ -953,8 +953,6 @@ lest."
(y-or-n-p prompt)
t))
(random t)
(provide '5x5)
;;; 5x5.el ends here

View file

@ -201,8 +201,6 @@ the buffer *Birthday-Present-for-Name*."
(animate-string "my sunshine" 18 34)
(animate-string "to stay!" 19 34))
(random t)
(provide 'animate)
;;; animate.el ends here

View file

@ -93,7 +93,7 @@
(define-key map (vector 'remap oldfun) newfun))
(defvar blackbox-mode-map
(defvar blackbox-mode-map
(let ((map (make-keymap)))
(suppress-keymap map t)
(blackbox-redefine-key map 'backward-char 'bb-left)
@ -257,7 +257,6 @@ a reflection."
(bb-goto (cons bb-x bb-y)))
(defun bb-init-board (num-balls)
(random t)
(let (board pos)
(while (>= (setq num-balls (1- num-balls)) 0)
(while

View file

@ -53,9 +53,6 @@
;;; Code:
; Randomize the seed in the random number generator.
(random t)
(defconst cookie-delimiter "\n%%\n\\|\n%\n\\|\0"
"Delimiter used to separate cookie file entries.")

View file

@ -94,8 +94,6 @@ Default is 2."
(funcall search-function overlap opoint t))))))
(sit-for 0))))
(random t)
(provide 'dissociate)
;;; dissociate.el ends here

View file

@ -1620,8 +1620,6 @@ Hack on previous word, setting global variable DOCTOR-OWNER to correct result."
(defun doctor-chat () (doctor-type (doc$ doctor--chatlst)))
(random t)
(provide 'doctor)
;;; doctor.el ends here

View file

@ -3010,7 +3010,6 @@ drwxr-xr-x 3 root staff 2048 Jan 1 1970 ..")
(dun-uexit nil)))
(random t)
(setq tloc (+ 60 (random 18)))
(dun-replace dun-room-objects tloc
(append (nth tloc dun-room-objects) (list 18)))

View file

@ -1197,8 +1197,6 @@ If the game is finished, this command requests for another game."
(move-to-column (+ gomoku-x-offset
(* gomoku-square-width (1- gomoku-board-width)))))
(random t)
(provide 'gomoku)
;;; gomoku.el ends here

View file

@ -1683,8 +1683,6 @@ Use \\[describe-mode] for more info."
;;;allout-layout: (0 : -1 -1 0)
;;;End:
(random t)
(provide 'landmark)
;;; landmark.el ends here

View file

@ -111,9 +111,6 @@
;; Sadly, mode-line-format won't display numbers.
(defvar life-generation-string nil)
(defvar life-initialized nil
"Non-nil if `life' has been run at least once.")
;;;###autoload
(defun life (&optional sleeptime)
"Run Conway's Life simulation.
@ -121,9 +118,6 @@ The starting pattern is randomly selected. Prefix arg (optional first
arg non-nil from a program) is the number of seconds to sleep between
generations (this defaults to 1)."
(interactive "p")
(or life-initialized
(random t))
(setq life-initialized t)
(or sleeptime (setq sleeptime 1))
(life-setup)
(catch 'life-exit

View file

@ -35,8 +35,6 @@
:prefix "mpuz-"
:group 'games)
(random t) ; randomize
(defcustom mpuz-silent 'error
"Set this to nil if you want dings on inputs.
The value t means never ding, and `error' means only ding on wrong input."

View file

@ -635,8 +635,6 @@ tetris-mode keybindings:
(tetris-mode)
(tetris-start-game))
(random t)
(provide 'tetris)
;;; tetris.el ends here

View file

@ -675,8 +675,6 @@ If nil, `zone-pgm-random-life' chooses a value from 0-3 (inclusive).")
(kill-buffer nil))))
(random t)
;;;;;;;;;;;;;;;
(provide 'zone)

View file

@ -32,6 +32,11 @@
;;; Code:
(defgroup bug-reference nil
"Hyperlinking references to bug reports"
;; Somewhat arbitrary, by analogy with eg goto-address.
:group 'comm)
(defvar bug-reference-map
(let ((map (make-sparse-keymap)))
(define-key map [mouse-2] 'bug-reference-push-button)
@ -63,9 +68,13 @@ so that it is considered safe, see `enable-local-variables'.")
(and (symbolp s)
(get s 'bug-reference-url-format)))))
(defconst bug-reference-bug-regexp
(defcustom bug-reference-bug-regexp
"\\([Bb]ug ?#\\|[Pp]atch ?#\\|RFE ?#\\|PR [a-z-+]+/\\)\\([0-9]+\\(?:#[0-9]+\\)?\\)"
"Regular expression which matches bug references.")
"Regular expression matching bug references.
The second subexpression should match the bug reference (usually a number)."
:type 'string
:safe 'stringp
:group 'bug-reference)
(defun bug-reference-set-overlay-properties ()
"Set properties of bug reference overlays."

View file

@ -1503,6 +1503,13 @@ Otherwise, construct a buffer name from NAME-OF-MODE."
(compilation-start command nil name-function highlight-regexp)))
(make-obsolete 'compile-internal 'compilation-start "22.1")
(defcustom compilation-always-kill nil
"If t, always kill a running compilation process before starting a new one.
If nil, ask to kill it."
:type 'boolean
:version "24.3"
:group 'compilation)
;;;###autoload
(defun compilation-start (command &optional mode name-function highlight-regexp)
"Run compilation command COMMAND (low level interface).
@ -1537,6 +1544,7 @@ Returns the compilation buffer created."
(let ((comp-proc (get-buffer-process (current-buffer))))
(if comp-proc
(if (or (not (eq (process-status comp-proc) 'run))
compilation-always-kill
(yes-or-no-p
(format "A %s process is running; kill it? "
name-of-mode)))
@ -2461,10 +2469,7 @@ and overlay is highlighted between MK and END-MK."
;; the error location if the two buffers are in two
;; different frames. So don't do it if it's not necessary.
pre-existing
(let ((display-buffer-reuse-frames t)
(pop-up-windows t))
;; Pop up a window.
(display-buffer (marker-buffer msg)))))
(display-buffer (marker-buffer msg))))
(highlight-regexp (with-current-buffer (marker-buffer msg)
;; also do this while we change buffer
(compilation-set-window w msg)

View file

@ -84,8 +84,9 @@ When this is `function', only ask when called non-interactively."
:group 'executable)
(defcustom executable-prefix "#! "
(defcustom executable-prefix "#!"
"Interpreter magic number prefix inserted when there was no magic number."
:version "24.3" ; "#! " -> "#!"
:type 'string
:group 'executable)

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