Now on revision 104732. ------------------------------------------------------------ revno: 104732 author: Gnus developers committer: Katsumi Yamaoka branch nick: trunk timestamp: Sun 2011-06-26 12:41:14 +0000 message: Merge changes made in Gnus trunk. gnus.texi (Summary Mail Commands): Document `gnus-summary-reply-to-list-with-original'. auth-source.el (with-auth-source-epa-overrides): Fix compilation error with `find-file-hooks' on Emacs 22. (with-auth-source-epa-overrides): Ugly hack to Wrap the `find-file-hook' things in `symbol-value' to avoid compilation warnings on all architectures. spam.el (spam-stat): Require in a normal fashion without binding `spam-stat-install-hooks' to avoid compilation warnings. spam-stat.el (spam-stat-install-hooks): Removed. (spam-stat-install-hooks): Don't run automatically. gnus-msg.el (gnus-summary-reply-to-list-with-original): New command and keystroke. diff: === modified file 'doc/misc/ChangeLog' --- doc/misc/ChangeLog 2011-06-20 16:14:01 +0000 +++ doc/misc/ChangeLog 2011-06-26 12:41:14 +0000 @@ -1,3 +1,8 @@ +2011-06-26 Lars Magne Ingebrigtsen + + * gnus.texi (Summary Mail Commands): Document + `gnus-summary-reply-to-list-with-original'. + 2011-06-20 Stefan Monnier * eshell.texi (Known problems): Fix typo. === modified file 'doc/misc/gnus.texi' --- doc/misc/gnus.texi 2011-05-31 22:08:51 +0000 +++ doc/misc/gnus.texi 2011-06-26 12:41:14 +0000 @@ -5568,6 +5568,13 @@ the process/prefix convention, but only uses the headers from the first article to determine the recipients. +@item S L +@kindex S L (Summary) +@findex gnus-summary-reply-to-list-with-original +When replying to a message from a mailing list, send a reply to that +message to the mailing list, and include the original message +(@code{gnus-summary-reply-to-list-with-original}). + @item S v @kindex S v (Summary) @findex gnus-summary-very-wide-reply === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2011-06-23 23:17:26 +0000 +++ lisp/gnus/ChangeLog 2011-06-26 12:41:14 +0000 @@ -1,3 +1,25 @@ +2011-06-26 Lars Magne Ingebrigtsen + + * dgnushack.el: Bind `gnutls-available-p' to `ignore' on XEmacs to + avoid compiler warnings. + + * auth-source.el (with-auth-source-epa-overrides): Fix compilation + error with `find-file-hooks' on Emacs 22. + (with-auth-source-epa-overrides): Ugly hack to Wrap the + `find-file-hook' things in `symbol-value' to avoid compilation warnings + on all architectures. + + * spam.el (spam-stat): Require in a normal fashion without binding + `spam-stat-install-hooks' to avoid compilation warnings. + + * spam-stat.el (spam-stat-install-hooks): Removed. + (spam-stat-install-hooks): Don't run automatically. + +2011-06-26 Timo Juhani Lindfors (tiny change) + + * gnus-msg.el (gnus-summary-reply-to-list-with-original): New command + and keystroke. + 2011-06-23 Katsumi Yamaoka * auth-source.el (auth-source-netrc-cache): Move forward. === modified file 'lisp/gnus/auth-source.el' --- lisp/gnus/auth-source.el 2011-06-23 23:17:26 +0000 +++ lisp/gnus/auth-source.el 2011-06-26 12:41:14 +0000 @@ -971,7 +971,9 @@ (,(if (boundp 'find-file-hook) 'find-file-hook 'find-file-hooks) ',(remove 'epa-file-find-file-hook - (if (boundp 'find-file-hook) 'find-file-hook 'find-file-hooks))) + (if (boundp 'find-file-hook) + (symbol-value 'find-file-hook) + (symbol-value 'find-file-hooks)))) (auto-mode-alist ',(if (boundp 'epa-file-auto-mode-alist-entry) (remove (symbol-value 'epa-file-auto-mode-alist-entry) === modified file 'lisp/gnus/gnus-msg.el' --- lisp/gnus/gnus-msg.el 2011-02-23 13:35:35 +0000 +++ lisp/gnus/gnus-msg.el 2011-06-26 12:41:14 +0000 @@ -351,6 +351,7 @@ "r" gnus-summary-reply "y" gnus-summary-yank-message "R" gnus-summary-reply-with-original + "L" gnus-summary-reply-to-list-with-original "w" gnus-summary-wide-reply "W" gnus-summary-wide-reply-with-original "v" gnus-summary-very-wide-reply @@ -1154,6 +1155,16 @@ (interactive "P") (gnus-summary-reply (gnus-summary-work-articles n) wide)) +(defun gnus-summary-reply-to-list-with-original (n &optional wide) + "Start composing a reply mail to the current message. +The reply goes only to the mailing list. +The original article will be yanked." + (interactive "P") + (let ((message-reply-to-function + (lambda nil + `((To . ,(gnus-mailing-list-followup-to)))))) + (gnus-summary-reply (gnus-summary-work-articles n) wide))) + (defun gnus-summary-reply-broken-reply-to (&optional yank wide very-wide) "Like `gnus-summary-reply' except removing reply-to field. If prefix argument YANK is non-nil, the original article is yanked === modified file 'lisp/gnus/spam-stat.el' --- lisp/gnus/spam-stat.el 2011-01-25 04:08:28 +0000 +++ lisp/gnus/spam-stat.el 2011-06-26 12:41:14 +0000 @@ -138,12 +138,6 @@ :type 'file :group 'spam-stat) -(defcustom spam-stat-install-hooks t - "Whether spam-stat should install its hooks in Gnus. -This is set to nil if you use spam-stat through spam.el." - :type 'boolean - :group 'spam-stat) - (defcustom spam-stat-unknown-word-score 0.2 "The score to use for unknown words. Also used for words that don't appear often enough." @@ -658,9 +652,6 @@ (add-hook 'gnus-select-article-hook 'spam-stat-store-gnus-article-buffer)) -(when spam-stat-install-hooks - (spam-stat-install-hooks-function)) - (defun spam-stat-unload-hook () "Uninstall the spam-stat function hooks." (interactive) === modified file 'lisp/gnus/spam.el' --- lisp/gnus/spam.el 2011-04-05 22:35:05 +0000 +++ lisp/gnus/spam.el 2011-06-26 12:41:14 +0000 @@ -2260,51 +2260,44 @@ (autoload 'spam-stat-save "spam-stat") (autoload 'spam-stat-split-fancy "spam-stat")) -(eval-and-compile - (when (condition-case nil - (let ((spam-stat-install-hooks nil)) - (require 'spam-stat)) - (file-error - (defalias 'spam-stat-register-ham-routine 'ignore) - (defalias 'spam-stat-register-spam-routine 'ignore) - nil)) - - (defun spam-check-stat () - "Check the spam-stat backend for the classification of this message" - (let ((spam-stat-split-fancy-spam-group spam-split-group) ; override - (spam-stat-buffer (buffer-name)) ; stat the current buffer - category return) - (spam-stat-split-fancy))) - - (defun spam-stat-register-spam-routine (articles &optional unregister) - (dolist (article articles) - (let ((article-string (spam-get-article-as-string article))) - (with-temp-buffer - (insert article-string) - (if unregister - (spam-stat-buffer-change-to-non-spam) - (spam-stat-buffer-is-spam)))))) - - (defun spam-stat-unregister-spam-routine (articles) - (spam-stat-register-spam-routine articles t)) - - (defun spam-stat-register-ham-routine (articles &optional unregister) - (dolist (article articles) - (let ((article-string (spam-get-article-as-string article))) - (with-temp-buffer - (insert article-string) - (if unregister - (spam-stat-buffer-change-to-spam) - (spam-stat-buffer-is-non-spam)))))) - - (defun spam-stat-unregister-ham-routine (articles) - (spam-stat-register-ham-routine articles t)) - - (defun spam-maybe-spam-stat-load () - (when spam-use-stat (spam-stat-load))) - - (defun spam-maybe-spam-stat-save () - (when spam-use-stat (spam-stat-save))))) +(require 'spam-stat) + +(defun spam-check-stat () + "Check the spam-stat backend for the classification of this message" + (let ((spam-stat-split-fancy-spam-group spam-split-group) ; override + (spam-stat-buffer (buffer-name)) ; stat the current buffer + category return) + (spam-stat-split-fancy))) + +(defun spam-stat-register-spam-routine (articles &optional unregister) + (dolist (article articles) + (let ((article-string (spam-get-article-as-string article))) + (with-temp-buffer + (insert article-string) + (if unregister + (spam-stat-buffer-change-to-non-spam) + (spam-stat-buffer-is-spam)))))) + +(defun spam-stat-unregister-spam-routine (articles) + (spam-stat-register-spam-routine articles t)) + +(defun spam-stat-register-ham-routine (articles &optional unregister) + (dolist (article articles) + (let ((article-string (spam-get-article-as-string article))) + (with-temp-buffer + (insert article-string) + (if unregister + (spam-stat-buffer-change-to-spam) + (spam-stat-buffer-is-non-spam)))))) + +(defun spam-stat-unregister-ham-routine (articles) + (spam-stat-register-ham-routine articles t)) + +(defun spam-maybe-spam-stat-load () + (when spam-use-stat (spam-stat-load))) + +(defun spam-maybe-spam-stat-save () + (when spam-use-stat (spam-stat-save))) ;;}}} ------------------------------------------------------------ revno: 104731 fixes bug(s): http://debbugs.gnu.org/8911 committer: Juanma Barranquero branch nick: trunk timestamp: Sun 2011-06-26 13:23:23 +0200 message: lisp/bs.el (bs-cycle-next): Pass current buffer to `bury-buffer'. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-06-26 08:43:52 +0000 +++ lisp/ChangeLog 2011-06-26 11:23:23 +0000 @@ -1,3 +1,8 @@ +2011-06-26 Juanma Barranquero + + * bs.el (bs-cycle-next): Pass current buffer to `bury-buffer' to + avoid deleting the current window in some cases (bug#8911). + 2011-06-26 Andreas Schwab * emacs-lisp/smie.el (smie-bnf->prec2): Fix last change. === modified file 'lisp/bs.el' --- lisp/bs.el 2011-06-02 11:24:12 +0000 +++ lisp/bs.el 2011-06-26 11:23:23 +0000 @@ -1214,8 +1214,8 @@ (cycle-list (cdr tupel))) (unless (window-dedicated-p (selected-window)) ;; We don't want the frame iconified if the only window in the frame - ;; happens to be dedicated; let's get the error from switch-to-buffer - (bury-buffer)) + ;; happens to be dedicated + (bury-buffer (current-buffer))) (switch-to-buffer next) (setq bs--cycle-list (append (cdr cycle-list) (list (car cycle-list)))) ------------------------------------------------------------ revno: 104730 committer: Glenn Morris branch nick: trunk timestamp: Sun 2011-06-26 06:21:22 -0400 message: Auto-commit of generated files. diff: === modified file 'autogen/Makefile.in' --- autogen/Makefile.in 2011-06-23 10:18:34 +0000 +++ autogen/Makefile.in 2011-06-26 10:21:22 +0000 @@ -24,7 +24,7 @@ # the same distribution terms as the rest of that program. # # Generated by gnulib-tool. -# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=. --makefile-name=gnulib.mk --conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files alloca-opt careadlinkat crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512 dtoastr filemode getloadavg getopt-gnu ignore-value intprops lstat mktime readlink socklen stdarg stdio strftime strtoumax symlink sys_stat +# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=. --makefile-name=gnulib.mk --conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files alloca-opt careadlinkat crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512 dtoastr dup2 filemode getloadavg getopt-gnu ignore-value intprops lstat mktime readlink socklen stdarg stdio strftime strtoumax symlink sys_stat VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ @@ -52,9 +52,10 @@ 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/extensions.m4 $(top_srcdir)/m4/filemode.m4 \ - $(top_srcdir)/m4/getloadavg.m4 $(top_srcdir)/m4/getopt.m4 \ - $(top_srcdir)/m4/gl-comp.m4 $(top_srcdir)/m4/gnulib-common.m4 \ + $(top_srcdir)/m4/dup2.m4 $(top_srcdir)/m4/extensions.m4 \ + $(top_srcdir)/m4/filemode.m4 $(top_srcdir)/m4/getloadavg.m4 \ + $(top_srcdir)/m4/getopt.m4 $(top_srcdir)/m4/gl-comp.m4 \ + $(top_srcdir)/m4/gnulib-common.m4 \ $(top_srcdir)/m4/include_next.m4 $(top_srcdir)/m4/inttypes.m4 \ $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/lstat.m4 \ $(top_srcdir)/m4/md5.m4 $(top_srcdir)/m4/mktime.m4 \ @@ -738,14 +739,14 @@ stdio.h stdlib.h sys/stat.h time.h unistd.h warn-on-use.h EXTRA_DIST = alloca.in.h allocator.h $(top_srcdir)/./arg-nonnull.h \ $(top_srcdir)/./c++defs.h careadlinkat.h md5.h sha1.h sha256.h \ - sha512.h dosname.h ftoastr.c ftoastr.h filemode.h getloadavg.c \ - getopt.c getopt.in.h getopt1.c getopt_int.h ignore-value.h \ - intprops.h inttypes.in.h lstat.c mktime-internal.h mktime.c \ - readlink.c stat.c stdarg.in.h stdbool.in.h stddef.in.h \ - stdint.in.h stdio.in.h stdlib.in.h strftime.h strtol.c \ - strtoul.c strtoull.c strtoimax.c strtoumax.c symlink.c \ - sys_stat.in.h time.in.h time_r.c u64.h unistd.in.h verify.h \ - $(top_srcdir)/./warn-on-use.h + sha512.h dosname.h ftoastr.c ftoastr.h dup2.c filemode.h \ + getloadavg.c getopt.c getopt.in.h getopt1.c getopt_int.h \ + ignore-value.h intprops.h inttypes.in.h lstat.c \ + mktime-internal.h mktime.c readlink.c stat.c stdarg.in.h \ + stdbool.in.h stddef.in.h stdint.in.h stdio.in.h stdlib.in.h \ + strftime.h strtol.c strtoul.c strtoull.c strtoimax.c \ + strtoumax.c symlink.c sys_stat.in.h time.in.h time_r.c u64.h \ + unistd.in.h verify.h $(top_srcdir)/./warn-on-use.h MOSTLYCLEANDIRS = sys MOSTLYCLEANFILES = core *.stackdump alloca.h alloca.h-t arg-nonnull.h \ arg-nonnull.h-t c++defs.h c++defs.h-t getopt.h getopt.h-t \ @@ -759,9 +760,10 @@ sha512.c dtoastr.c filemode.c $(am__append_1) strftime.c libgnu_a_LIBADD = $(gl_LIBOBJS) libgnu_a_DEPENDENCIES = $(gl_LIBOBJS) -EXTRA_libgnu_a_SOURCES = ftoastr.c getloadavg.c getopt.c getopt1.c \ - lstat.c mktime.c readlink.c stat.c strtol.c strtoul.c \ - strtoull.c strtoimax.c strtoumax.c symlink.c time_r.c +EXTRA_libgnu_a_SOURCES = ftoastr.c dup2.c getloadavg.c getopt.c \ + getopt1.c lstat.c mktime.c readlink.c stat.c strtol.c \ + strtoul.c strtoull.c strtoimax.c strtoumax.c symlink.c \ + time_r.c ARG_NONNULL_H = arg-nonnull.h CXXDEFS_H = c++defs.h WARN_ON_USE_H = warn-on-use.h @@ -817,6 +819,7 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/allocator.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/careadlinkat.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dtoastr.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dup2.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/filemode.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ftoastr.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getloadavg.Po@am__quote@ === modified file 'autogen/aclocal.m4' --- autogen/aclocal.m4 2011-06-23 10:18:34 +0000 +++ autogen/aclocal.m4 2011-06-26 10:21:22 +0000 @@ -987,6 +987,7 @@ m4_include([m4/00gnulib.m4]) m4_include([m4/alloca.m4]) m4_include([m4/c-strtod.m4]) +m4_include([m4/dup2.m4]) m4_include([m4/extensions.m4]) m4_include([m4/filemode.m4]) m4_include([m4/getloadavg.m4]) === modified file 'autogen/configure' --- autogen/configure 2011-06-23 10:18:34 +0000 +++ autogen/configure 2011-06-26 10:21:22 +0000 @@ -894,6 +894,72 @@ PRAGMA_SYSTEM_HEADER INCLUDE_NEXT_AS_FIRST_DIRECTIVE INCLUDE_NEXT +GETLOADAVG_LIBS +REPLACE_WCTOMB +REPLACE_UNSETENV +REPLACE_STRTOD +REPLACE_SETENV +REPLACE_REALPATH +REPLACE_REALLOC +REPLACE_PUTENV +REPLACE_MKSTEMP +REPLACE_MBTOWC +REPLACE_MALLOC +REPLACE_CANONICALIZE_FILE_NAME +REPLACE_CALLOC +HAVE_DECL_UNSETENV +HAVE_UNLOCKPT +HAVE_SYS_LOADAVG_H +HAVE_STRUCT_RANDOM_DATA +HAVE_STRTOULL +HAVE_STRTOLL +HAVE_STRTOD +HAVE_DECL_SETENV +HAVE_SETENV +HAVE_RPMATCH +HAVE_REALPATH +HAVE_RANDOM_R +HAVE_RANDOM_H +HAVE_PTSNAME +HAVE_MKSTEMPS +HAVE_MKSTEMP +HAVE_MKOSTEMPS +HAVE_MKOSTEMP +HAVE_MKDTEMP +HAVE_GRANTPT +HAVE_GETSUBOPT +HAVE_DECL_GETLOADAVG +HAVE_CANONICALIZE_FILE_NAME +HAVE_ATOLL +HAVE__EXIT +GNULIB_WCTOMB +GNULIB_UNSETENV +GNULIB_UNLOCKPT +GNULIB_SYSTEM_POSIX +GNULIB_STRTOULL +GNULIB_STRTOLL +GNULIB_STRTOD +GNULIB_SETENV +GNULIB_RPMATCH +GNULIB_REALPATH +GNULIB_REALLOC_POSIX +GNULIB_RANDOM_R +GNULIB_PUTENV +GNULIB_PTSNAME +GNULIB_MKSTEMPS +GNULIB_MKSTEMP +GNULIB_MKOSTEMPS +GNULIB_MKOSTEMP +GNULIB_MKDTEMP +GNULIB_MBTOWC +GNULIB_MALLOC_POSIX +GNULIB_GRANTPT +GNULIB_GETSUBOPT +GNULIB_GETLOADAVG +GNULIB_CANONICALIZE_FILE_NAME +GNULIB_CALLOC_POSIX +GNULIB_ATOLL +GNULIB__EXIT UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS UNISTD_H_HAVE_WINSOCK2_H REPLACE_WRITE @@ -1004,72 +1070,6 @@ GNULIB_DUP2 GNULIB_CLOSE GNULIB_CHOWN -GETLOADAVG_LIBS -REPLACE_WCTOMB -REPLACE_UNSETENV -REPLACE_STRTOD -REPLACE_SETENV -REPLACE_REALPATH -REPLACE_REALLOC -REPLACE_PUTENV -REPLACE_MKSTEMP -REPLACE_MBTOWC -REPLACE_MALLOC -REPLACE_CANONICALIZE_FILE_NAME -REPLACE_CALLOC -HAVE_DECL_UNSETENV -HAVE_UNLOCKPT -HAVE_SYS_LOADAVG_H -HAVE_STRUCT_RANDOM_DATA -HAVE_STRTOULL -HAVE_STRTOLL -HAVE_STRTOD -HAVE_DECL_SETENV -HAVE_SETENV -HAVE_RPMATCH -HAVE_REALPATH -HAVE_RANDOM_R -HAVE_RANDOM_H -HAVE_PTSNAME -HAVE_MKSTEMPS -HAVE_MKSTEMP -HAVE_MKOSTEMPS -HAVE_MKOSTEMP -HAVE_MKDTEMP -HAVE_GRANTPT -HAVE_GETSUBOPT -HAVE_DECL_GETLOADAVG -HAVE_CANONICALIZE_FILE_NAME -HAVE_ATOLL -HAVE__EXIT -GNULIB_WCTOMB -GNULIB_UNSETENV -GNULIB_UNLOCKPT -GNULIB_SYSTEM_POSIX -GNULIB_STRTOULL -GNULIB_STRTOLL -GNULIB_STRTOD -GNULIB_SETENV -GNULIB_RPMATCH -GNULIB_REALPATH -GNULIB_REALLOC_POSIX -GNULIB_RANDOM_R -GNULIB_PUTENV -GNULIB_PTSNAME -GNULIB_MKSTEMPS -GNULIB_MKSTEMP -GNULIB_MKOSTEMPS -GNULIB_MKOSTEMP -GNULIB_MKDTEMP -GNULIB_MBTOWC -GNULIB_MALLOC_POSIX -GNULIB_GRANTPT -GNULIB_GETSUBOPT -GNULIB_GETLOADAVG -GNULIB_CANONICALIZE_FILE_NAME -GNULIB_CALLOC_POSIX -GNULIB_ATOLL -GNULIB__EXIT GL_GENERATE_ALLOCA_H_FALSE GL_GENERATE_ALLOCA_H_TRUE ALLOCA_H @@ -3083,6 +3083,7 @@ as_fn_append ac_header_list " unistd.h" as_fn_append ac_header_list " sys/param.h" as_fn_append ac_func_list " readlinkat" +as_fn_append ac_func_list " dup2" gl_getopt_required=GNU as_fn_append ac_header_list " getopt.h" as_fn_append ac_header_list " wchar.h" @@ -6549,6 +6550,7 @@ # Code from module crypto/sha512: # Code from module dosname: # Code from module dtoastr: + # Code from module dup2: # Code from module extensions: # Code from module filemode: @@ -13586,7 +13588,7 @@ -for ac_func in gethostname getdomainname dup2 \ +for ac_func in gethostname getdomainname \ rename closedir mkdir rmdir sysinfo getrusage get_current_dir_name \ random lrand48 logb frexp fmod rint cbrt ftime setsid \ strerror fpathconf select euidaccess getpagesize tzset setlocale \ @@ -14292,119 +14294,6 @@ fi -{ $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 : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#include -int -main () -{ -struct stat s; s.st_dm_mode; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_struct_st_dm_mode=yes -else - ac_cv_struct_st_dm_mode=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_st_dm_mode" >&5 -$as_echo "$ac_cv_struct_st_dm_mode" >&6; } - - if test $ac_cv_struct_st_dm_mode = yes; then - -$as_echo "#define HAVE_ST_DM_MODE 1" >>confdefs.h - - fi - - -ac_fn_c_check_decl "$LINENO" "strmode" "ac_cv_have_decl_strmode" "$ac_includes_default" -if test "x$ac_cv_have_decl_strmode" = x""yes; then : - ac_have_decl=1 -else - ac_have_decl=0 -fi - -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_STRMODE $ac_have_decl -_ACEOF - - - GNULIB__EXIT=0; - GNULIB_ATOLL=0; - GNULIB_CALLOC_POSIX=0; - GNULIB_CANONICALIZE_FILE_NAME=0; - GNULIB_GETLOADAVG=0; - GNULIB_GETSUBOPT=0; - GNULIB_GRANTPT=0; - GNULIB_MALLOC_POSIX=0; - GNULIB_MBTOWC=0; - GNULIB_MKDTEMP=0; - GNULIB_MKOSTEMP=0; - GNULIB_MKOSTEMPS=0; - GNULIB_MKSTEMP=0; - GNULIB_MKSTEMPS=0; - GNULIB_PTSNAME=0; - GNULIB_PUTENV=0; - GNULIB_RANDOM_R=0; - GNULIB_REALLOC_POSIX=0; - GNULIB_REALPATH=0; - GNULIB_RPMATCH=0; - GNULIB_SETENV=0; - GNULIB_STRTOD=0; - GNULIB_STRTOLL=0; - GNULIB_STRTOULL=0; - GNULIB_SYSTEM_POSIX=0; - GNULIB_UNLOCKPT=0; - GNULIB_UNSETENV=0; - GNULIB_WCTOMB=0; - HAVE__EXIT=1; - HAVE_ATOLL=1; - HAVE_CANONICALIZE_FILE_NAME=1; - HAVE_DECL_GETLOADAVG=1; - HAVE_GETSUBOPT=1; - HAVE_GRANTPT=1; - HAVE_MKDTEMP=1; - HAVE_MKOSTEMP=1; - HAVE_MKOSTEMPS=1; - HAVE_MKSTEMP=1; - HAVE_MKSTEMPS=1; - HAVE_PTSNAME=1; - HAVE_RANDOM_H=1; - HAVE_RANDOM_R=1; - HAVE_REALPATH=1; - HAVE_RPMATCH=1; - HAVE_SETENV=1; - HAVE_DECL_SETENV=1; - HAVE_STRTOD=1; - HAVE_STRTOLL=1; - HAVE_STRTOULL=1; - HAVE_STRUCT_RANDOM_DATA=1; - HAVE_SYS_LOADAVG_H=0; - HAVE_UNLOCKPT=1; - HAVE_DECL_UNSETENV=1; - REPLACE_CALLOC=0; - REPLACE_CANONICALIZE_FILE_NAME=0; - REPLACE_MALLOC=0; - REPLACE_MBTOWC=0; - REPLACE_MKSTEMP=0; - REPLACE_PUTENV=0; - REPLACE_REALLOC=0; - REPLACE_REALPATH=0; - REPLACE_SETENV=0; - REPLACE_STRTOD=0; - REPLACE_UNSETENV=0; - REPLACE_WCTOMB=0; - GNULIB_CHOWN=0; GNULIB_CLOSE=0; @@ -14520,6 +14409,121 @@ +{ $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 : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +int +main () +{ +struct stat s; s.st_dm_mode; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_struct_st_dm_mode=yes +else + ac_cv_struct_st_dm_mode=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_st_dm_mode" >&5 +$as_echo "$ac_cv_struct_st_dm_mode" >&6; } + + if test $ac_cv_struct_st_dm_mode = yes; then + +$as_echo "#define HAVE_ST_DM_MODE 1" >>confdefs.h + + fi + + +ac_fn_c_check_decl "$LINENO" "strmode" "ac_cv_have_decl_strmode" "$ac_includes_default" +if test "x$ac_cv_have_decl_strmode" = x""yes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_STRMODE $ac_have_decl +_ACEOF + + + GNULIB__EXIT=0; + GNULIB_ATOLL=0; + GNULIB_CALLOC_POSIX=0; + GNULIB_CANONICALIZE_FILE_NAME=0; + GNULIB_GETLOADAVG=0; + GNULIB_GETSUBOPT=0; + GNULIB_GRANTPT=0; + GNULIB_MALLOC_POSIX=0; + GNULIB_MBTOWC=0; + GNULIB_MKDTEMP=0; + GNULIB_MKOSTEMP=0; + GNULIB_MKOSTEMPS=0; + GNULIB_MKSTEMP=0; + GNULIB_MKSTEMPS=0; + GNULIB_PTSNAME=0; + GNULIB_PUTENV=0; + GNULIB_RANDOM_R=0; + GNULIB_REALLOC_POSIX=0; + GNULIB_REALPATH=0; + GNULIB_RPMATCH=0; + GNULIB_SETENV=0; + GNULIB_STRTOD=0; + GNULIB_STRTOLL=0; + GNULIB_STRTOULL=0; + GNULIB_SYSTEM_POSIX=0; + GNULIB_UNLOCKPT=0; + GNULIB_UNSETENV=0; + GNULIB_WCTOMB=0; + HAVE__EXIT=1; + HAVE_ATOLL=1; + HAVE_CANONICALIZE_FILE_NAME=1; + HAVE_DECL_GETLOADAVG=1; + HAVE_GETSUBOPT=1; + HAVE_GRANTPT=1; + HAVE_MKDTEMP=1; + HAVE_MKOSTEMP=1; + HAVE_MKOSTEMPS=1; + HAVE_MKSTEMP=1; + HAVE_MKSTEMPS=1; + HAVE_PTSNAME=1; + HAVE_RANDOM_H=1; + HAVE_RANDOM_R=1; + HAVE_REALPATH=1; + HAVE_RPMATCH=1; + HAVE_SETENV=1; + HAVE_DECL_SETENV=1; + HAVE_STRTOD=1; + HAVE_STRTOLL=1; + HAVE_STRTOULL=1; + HAVE_STRUCT_RANDOM_DATA=1; + HAVE_SYS_LOADAVG_H=0; + HAVE_UNLOCKPT=1; + HAVE_DECL_UNSETENV=1; + REPLACE_CALLOC=0; + REPLACE_CANONICALIZE_FILE_NAME=0; + REPLACE_MALLOC=0; + REPLACE_MBTOWC=0; + REPLACE_MKSTEMP=0; + REPLACE_PUTENV=0; + REPLACE_REALLOC=0; + REPLACE_REALPATH=0; + REPLACE_SETENV=0; + REPLACE_STRTOD=0; + REPLACE_UNSETENV=0; + REPLACE_WCTOMB=0; + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5 $as_echo_n "checking whether the preprocessor supports include_next... " >&6; } if test "${gl_cv_have_include_next+set}" = set; then : @@ -16760,6 +16764,114 @@ +$as_echo "#define HAVE_DUP2 1" >>confdefs.h + + + if test $HAVE_DUP2 = 1; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dup2 works" >&5 +$as_echo_n "checking whether dup2 works... " >&6; } +if test "${gl_cv_func_dup2_works+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + case "$host_os" in + mingw*) # on this platform, dup2 always returns 0 for success + gl_cv_func_dup2_works=no;; + cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0 + gl_cv_func_dup2_works=no;; + linux*) # On linux between 2008-07-27 and 2009-05-11, dup2 of a + # closed fd may yield -EBADF instead of -1 / errno=EBADF. + gl_cv_func_dup2_works=no;; + freebsd*) # on FreeBSD 6.1, dup2(1,1000000) gives EMFILE, not EBADF. + gl_cv_func_dup2_works=no;; + haiku*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC. + gl_cv_func_dup2_works=no;; + *) gl_cv_func_dup2_works=yes;; + esac +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #include +#include +#include +int +main () +{ +int result = 0; +#ifdef FD_CLOEXEC + if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1) + result |= 1; +#endif + if (dup2 (1, 1) == 0) + result |= 2; +#ifdef FD_CLOEXEC + if (fcntl (1, F_GETFD) != FD_CLOEXEC) + result |= 4; +#endif + close (0); + if (dup2 (0, 0) != -1) + result |= 8; + /* Many gnulib modules require POSIX conformance of EBADF. */ + if (dup2 (2, 1000000) == -1 && errno != EBADF) + result |= 16; + return result; + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + gl_cv_func_dup2_works=yes +else + gl_cv_func_dup2_works=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup2_works" >&5 +$as_echo "$gl_cv_func_dup2_works" >&6; } + if test "$gl_cv_func_dup2_works" = no; then + + + + if test $ac_cv_func_dup2 = yes; then + REPLACE_DUP2=1 + fi + + + + + + + + + gl_LIBOBJS="$gl_LIBOBJS dup2.$ac_objext" + + + fi + fi + + + + + + + GNULIB_DUP2=1 + + + + + + + + + + # Persuade glibc to declare getloadavg(). ------------------------------------------------------------ revno: 104729 committer: Andreas Schwab branch nick: emacs timestamp: Sun 2011-06-26 10:43:52 +0200 message: * lisp/emacs-lisp/smie.el (smie-bnf->prec2): Fix last change. (Bug#8934) diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-06-26 08:13:07 +0000 +++ lisp/ChangeLog 2011-06-26 08:43:52 +0000 @@ -1,3 +1,8 @@ +2011-06-26 Andreas Schwab + + * emacs-lisp/smie.el (smie-bnf->prec2): Fix last change. + (Bug#8934) + 2011-06-26 Lars Magne Ingebrigtsen * net/network-stream.el (network-stream-open-starttls): Use === modified file 'lisp/emacs-lisp/smie.el' --- lisp/emacs-lisp/smie.el 2011-06-23 16:55:59 +0000 +++ lisp/emacs-lisp/smie.el 2011-06-26 08:43:52 +0000 @@ -238,9 +238,9 @@ (pushnew (car shr) last-ops) (pushnew (car shr) last-nts) (when (consp (cdr shr)) - (when (member (cadr rhs) nts) + (when (member (cadr shr) nts) (error "Adjacent non-terminals: %s %s" - (cadr rhs) (car rhs))) + (cadr shr) (car shr))) (pushnew (cadr shr) last-ops))))) (push (cons nt first-ops) first-ops-table) (push (cons nt last-ops) last-ops-table) ------------------------------------------------------------ revno: 104728 committer: Lars Magne Ingebrigtsen branch nick: trunk timestamp: Sun 2011-06-26 10:13:07 +0200 message: Use built-in TLS support if `gnutls-available-p' is true. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-06-26 06:37:04 +0000 +++ lisp/ChangeLog 2011-06-26 08:13:07 +0000 @@ -1,3 +1,9 @@ +2011-06-26 Lars Magne Ingebrigtsen + + * net/network-stream.el (network-stream-open-starttls): Use + built-in TLS support if `gnutls-available-p' is true. + (network-stream-open-tls): Ditto. + 2011-06-26 Leo Liu * register.el (registerv): New struct. === modified file 'lisp/net/network-stream.el' --- lisp/net/network-stream.el 2011-06-21 22:55:52 +0000 +++ lisp/net/network-stream.el 2011-06-26 08:13:07 +0000 @@ -46,7 +46,8 @@ (require 'starttls) (require 'auth-source) -(declare-function gnutls-negotiate "gnutls" t t) ; defun* +(autoload 'gnutls-negotiate "gnutls") +(autoload 'open-gnutls-stream "gnutls") ;;;###autoload (defun open-network-stream (name buffer host service &rest parameters) @@ -207,11 +208,13 @@ (greeting (network-stream-get-response stream start eoc)) (capabilities (network-stream-command stream capability-command eoc)) (resulting-type 'plain) + (builtin-starttls (and (fboundp 'gnutls-available-p) + (gnutls-available-p))) starttls-command) ;; If we have built-in STARTTLS support, try to upgrade the ;; connection. - (when (and (or (fboundp 'open-gnutls-stream) + (when (and (or builtin-starttls (and (or require-tls (plist-get parameters :use-starttls-if-possible)) (executable-find "gnutls-cli"))) @@ -221,7 +224,7 @@ (not (eq (plist-get parameters :type) 'plain))) ;; If using external STARTTLS, drop this connection and start ;; anew with `starttls-open-stream'. - (unless (fboundp 'open-gnutls-stream) + (unless builtin-starttls (delete-process stream) (setq start (with-current-buffer buffer (point-max))) (let* ((starttls-use-gnutls t) @@ -248,7 +251,7 @@ (when (string-match success-string (network-stream-command stream starttls-command eoc)) ;; The server said it was OK to begin STARTTLS negotiations. - (if (fboundp 'open-gnutls-stream) + (if builtin-starttls (let ((cert (network-stream-certificate host service parameters))) (gnutls-negotiate :process stream :hostname host :keylist (and cert (list cert)))) @@ -296,7 +299,8 @@ (defun network-stream-open-tls (name buffer host service parameters) (with-current-buffer buffer (let* ((start (point-max)) - (use-builtin-gnutls (fboundp 'open-gnutls-stream)) + (use-builtin-gnutls (and (fboundp 'gnutls-available-p) + (gnutls-available-p))) (stream (funcall (if use-builtin-gnutls 'open-gnutls-stream @@ -307,7 +311,8 @@ (list nil nil nil 'plain) ;; If we're using tls.el, we have to delete the output from ;; openssl/gnutls-cli. - (when (and (null use-builtin-gnutls) eoc) + (when (and (null use-builtin-gnutls) + eoc) (network-stream-get-response stream start eoc) (goto-char (point-min)) (when (re-search-forward eoc nil t) ------------------------------------------------------------ revno: 104727 committer: Leo Liu branch nick: trunk timestamp: Sun 2011-06-26 14:37:04 +0800 message: Extend emacs register to accept value from registerv-make A value object returned by `registerv-make' has slots to control jump-to-register, describe-register-1 and insert-register. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-06-26 04:05:39 +0000 +++ lisp/ChangeLog 2011-06-26 06:37:04 +0000 @@ -1,3 +1,11 @@ +2011-06-26 Leo Liu + + * register.el (registerv): New struct. + (registerv-make): New function. + (jump-to-register, describe-register-1, insert-register): Support + the jump-func, print-func and insert-func slot of a registerv + struct. (Bug#8415) + 2011-06-26 Chong Yidong * vc/vc.el (vc-revert-show-diff): New defcustom. === modified file 'lisp/register.el' --- lisp/register.el 2011-04-19 13:44:55 +0000 +++ lisp/register.el 2011-06-26 06:37:04 +0000 @@ -28,6 +28,8 @@ ;; pieces of buffer state to named variables. The entry points are ;; documented in the Emacs user's manual. +(eval-when-compile (require 'cl)) + (declare-function semantic-insert-foreign-tag "semantic/tag" (foreign-tag)) (declare-function semantic-tag-buffer "semantic/tag" (tag)) (declare-function semantic-tag-start "semantic/tag" (tag)) @@ -50,9 +52,36 @@ ;;; Code: +(defstruct + (registerv (:constructor nil) + (:constructor registerv--make (&optional data print-func + jump-func insert-func)) + (:copier nil) + (:type vector) + :named) + (data nil :read-only t) + (print-func nil :read-only t) + (jump-func nil :read-only t) + (insert-func nil :read-only t)) + +(defun* registerv-make (data &key print-func jump-func insert-func) + "Create a register value object. + +DATA can be any value. +PRINT-FUNC if provided controls how `list-registers' and +`view-register' print the register. It should be a function +recieving one argument DATA and print text that completes +this sentence: + Register X contains [TEXT PRINTED BY PRINT-FUNC] +JUMP-FUNC if provided, controls how `jump-to-register' jumps to the register. +INSERT-FUNC if provided, controls how `insert-register' insert the register. +They both receive DATA as argument." + (registerv--make data print-func jump-func insert-func)) + (defvar register-alist nil "Alist of elements (NAME . CONTENTS), one for each Emacs register. -NAME is a character (a number). CONTENTS is a string, number, marker or list. +NAME is a character (a number). CONTENTS is a string, number, marker, list +or a struct returned by `registerv-make'. A list of strings represents a rectangle. A list of the form (file . FILE-NAME) represents the file named FILE-NAME. A list of the form (file-query FILE-NAME POSITION) represents @@ -120,6 +149,11 @@ (interactive "cJump to register: \nP") (let ((val (get-register register))) (cond + ((registerv-p val) + (assert (registerv-jump-func val) nil + "Don't know how to jump to register %s" + (single-key-description register)) + (funcall (registerv-jump-func val) (registerv-data val))) ((and (consp val) (frame-configuration-p (car val))) (set-frame-configuration (car val) (not delete)) (goto-char (cadr val))) @@ -209,6 +243,11 @@ (princ " contains ") (let ((val (get-register register))) (cond + ((registerv-p val) + (if (registerv-print-func val) + (funcall (registerv-print-func val) (registerv-data val)) + (princ "[UNPRINTABLE CONTENTS]."))) + ((numberp val) (princ val)) @@ -285,8 +324,11 @@ (push-mark) (let ((val (get-register register))) (cond - ((consp val) - (insert-rectangle val)) + ((registerv-p val) + (assert (registerv-insert-func val) nil + "Don't know how to insert register %s" + (single-key-description register)) + (funcall (registerv-insert-func val) (registerv-data val))) ((stringp val) (insert-for-yank val)) ((numberp val) ------------------------------------------------------------ revno: 104726 committer: Chong Yidong branch nick: trunk timestamp: Sun 2011-06-26 00:05:39 -0400 message: New option for showing a diff in vc-revert (Bug#8927). * vc/vc.el (vc-revert-show-diff): New defcustom. (vc-diff-internal): New arg specifying diff buffer. (vc-revert): Obey vc-revert-show-diff. If we show a diff, don't reuse an existing *vc-diff* buffer. diff: === modified file 'etc/NEWS' --- etc/NEWS 2011-06-26 01:25:53 +0000 +++ etc/NEWS 2011-06-26 04:05:39 +0000 @@ -787,6 +787,9 @@ **** Currently supported for Bzr, Git, and Mercurial. +*** New option `vc-revert-show-diff' controls whether `vc-revert' +shows a diff while querying the user. It defaults to nil. + *** Log entries in some Log View buffers can be toggled to display a longer description by typing RET (log-view-toggle-entry-display). In the Log View buffers made by `C-x v L' (vc-print-root-log), you can === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-06-26 03:42:22 +0000 +++ lisp/ChangeLog 2011-06-26 04:05:39 +0000 @@ -1,5 +1,10 @@ 2011-06-26 Chong Yidong + * vc/vc.el (vc-revert-show-diff): New defcustom. + (vc-diff-internal): New arg specifying diff buffer. + (vc-revert): Obey vc-revert-show-diff. If we show a diff, don't + reuse an existing *vc-diff* buffer (Bug#8927). + * progmodes/cperl-mode.el (cperl-mode): Derive from prog-mode. 2011-06-26 Glenn Morris === modified file 'lisp/vc/vc.el' --- lisp/vc/vc.el 2011-04-20 23:34:00 +0000 +++ lisp/vc/vc.el 2011-06-26 04:05:39 +0000 @@ -775,6 +775,12 @@ :type 'hook :group 'vc) +(defcustom vc-revert-show-diff nil + "If non-nil, `vc-revert' shows a `vc-diff' buffer before querying." + :type 'boolean + :group 'vc + :version "24.1") + ;; Header-insertion hair (defcustom vc-static-header-alist @@ -1534,10 +1540,13 @@ (defvar vc-diff-added-files nil "If non-nil, diff added files by comparing them to /dev/null.") -(defun vc-diff-internal (async vc-fileset rev1 rev2 &optional verbose) +(defun vc-diff-internal (async vc-fileset rev1 rev2 &optional verbose buffer) "Report diffs between two revisions of a fileset. -Diff output goes to the *vc-diff* buffer. The function -returns t if the buffer had changes, nil otherwise." +Output goes to the buffer BUFFER, which defaults to *vc-diff*. +BUFFER, if non-nil, should be a buffer or a buffer name. +Return t if the buffer had changes, nil otherwise." + (unless buffer + (setq buffer "*vc-diff*")) (let* ((files (cadr vc-fileset)) (messages (cons (format "Finding changes in %s..." (vc-delistify files)) @@ -1549,7 +1558,7 @@ ;; be to call the back end separately for each file. (coding-system-for-read (if files (vc-coding-system-for-diff (car files)) 'undecided))) - (vc-setup-buffer "*vc-diff*") + (vc-setup-buffer buffer) (message "%s" (car messages)) ;; Many backends don't handle well the case of a file that has been ;; added but not yet committed to the repo (notably CVS and Subversion). @@ -1574,13 +1583,13 @@ (error "No revisions of %s exist" file) ;; We regard this as "changed". ;; Diff it against /dev/null. - (apply 'vc-do-command "*vc-diff*" + (apply 'vc-do-command buffer 1 "diff" file (append (vc-switches nil 'diff) '("/dev/null")))))) (setq files (nreverse filtered)))) (let ((vc-disable-async-diff (not async))) - (vc-call-backend (car vc-fileset) 'diff files rev1 rev2 "*vc-diff*")) - (set-buffer "*vc-diff*") + (vc-call-backend (car vc-fileset) 'diff files rev1 rev2 buffer)) + (set-buffer buffer) (if (and (zerop (buffer-size)) (not (get-buffer-process (current-buffer)))) ;; Treat this case specially so as not to pop the buffer. @@ -2256,11 +2265,12 @@ to the working revision (except for keyword expansion)." (interactive) (let* ((vc-fileset (vc-deduce-fileset)) - (files (cadr vc-fileset))) - ;; If any of the files is visited by the current buffer, make - ;; sure buffer is saved. If the user says `no', abort since - ;; we cannot show the changes and ask for confirmation to - ;; discard them. + (files (cadr vc-fileset)) + (queried nil) + diff-buffer) + ;; If any of the files is visited by the current buffer, make sure + ;; buffer is saved. If the user says `no', abort since we cannot + ;; show the changes and ask for confirmation to discard them. (when (or (not files) (memq (buffer-file-name) files)) (vc-buffer-sync nil)) (dolist (file files) @@ -2268,20 +2278,29 @@ (when (and buf (buffer-modified-p buf)) (error "Please kill or save all modified buffers before reverting"))) (when (vc-up-to-date-p file) - (unless (yes-or-no-p (format "%s seems up-to-date. Revert anyway? " file)) + (if (yes-or-no-p (format "%s seems up-to-date. Revert anyway? " file)) + (setq queried t) (error "Revert canceled")))) - (when (vc-diff-internal vc-allow-async-revert vc-fileset nil nil) - (unless (yes-or-no-p - (format "Discard changes in %s? " - (let ((str (vc-delistify files)) - (nfiles (length files))) - (if (< (length str) 50) - str - (format "%d file%s" nfiles - (if (= nfiles 1) "" "s")))))) - (error "Revert canceled")) - (delete-windows-on "*vc-diff*") - (kill-buffer "*vc-diff*")) + (unwind-protect + (when (if vc-revert-show-diff + (progn + (setq diff-buffer (generate-new-buffer-name "*vc-diff*")) + (vc-diff-internal vc-allow-async-revert vc-fileset + nil nil nil diff-buffer)) + ;; Avoid querying the user again. + (null queried)) + (unless (yes-or-no-p + (format "Discard changes in %s? " + (let ((str (vc-delistify files)) + (nfiles (length files))) + (if (< (length str) 50) + str + (format "%d file%s" nfiles + (if (= nfiles 1) "" "s")))))) + (error "Revert canceled"))) + (when diff-buffer + (delete-windows-on diff-buffer) + (kill-buffer diff-buffer))) (dolist (file files) (message "Reverting %s..." (vc-delistify files)) (vc-revert-file file) ------------------------------------------------------------ revno: 104725 committer: Chong Yidong branch nick: trunk timestamp: Sat 2011-06-25 23:42:22 -0400 message: * lisp/progmodes/cperl-mode.el (cperl-mode): Derive from prog-mode. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-06-26 01:22:45 +0000 +++ lisp/ChangeLog 2011-06-26 03:42:22 +0000 @@ -1,3 +1,7 @@ +2011-06-26 Chong Yidong + + * progmodes/cperl-mode.el (cperl-mode): Derive from prog-mode. + 2011-06-26 Glenn Morris * progmodes/f90.el (f90-critical-indent): New option. === modified file 'lisp/progmodes/cperl-mode.el' --- lisp/progmodes/cperl-mode.el 2011-06-25 18:08:41 +0000 +++ lisp/progmodes/cperl-mode.el 2011-06-26 03:42:22 +0000 @@ -1522,7 +1522,7 @@ (defvar compilation-error-regexp-alist) ;;;###autoload -(defun cperl-mode () +(define-derived-mode cperl-mode prog-mode "CPerl" "Major mode for editing Perl code. Expression and list commands understand all C brackets. Tab indents for Perl code. @@ -1695,9 +1695,6 @@ DO NOT FORGET to read micro-docs (available from `Perl' menu) or as help on variables `cperl-tips', `cperl-problems', `cperl-praise', `cperl-speed'." - (interactive) - (kill-all-local-variables) - (use-local-map cperl-mode-map) (if (cperl-val 'cperl-electric-linefeed) (progn (local-set-key "\C-J" 'cperl-linefeed) @@ -1710,8 +1707,6 @@ (cperl-define-key "\C-hf" 'cperl-info-on-current-command [(control h) f]) (cperl-define-key "\C-c\C-hf" 'cperl-info-on-command [(control c) (control h) f]))) - (setq major-mode cperl-use-major-mode) - (setq mode-name "CPerl") (let ((prev-a-c abbrevs-changed)) (define-abbrev-table 'cperl-mode-abbrev-table '( ("if" "if" cperl-electric-keyword 0) ------------------------------------------------------------ revno: 104724 committer: Chong Yidong branch nick: trunk timestamp: Sat 2011-06-25 23:40:40 -0400 message: Fix handling of pending signals in wait_reading_process_output (Bug#8869). * process.c (wait_reading_process_output): Bypass select if waiting for a cell while ignoring keyboard input, and input is pending. Suggested by Jan Djärv. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2011-06-25 20:53:24 +0000 +++ src/ChangeLog 2011-06-26 03:40:40 +0000 @@ -1,3 +1,9 @@ +2011-06-26 Chong Yidong + + * process.c (wait_reading_process_output): Bypass select if + waiting for a cell while ignoring keyboard input, and input is + pending. Suggested by Jan Djärv (Bug#8869). + 2011-06-25 Paul Eggert Use gnulib's dup2 module instead of rolling our own. @@ -351,7 +357,7 @@ 2011-06-22 Jim Meyering - don't leak an XBM-image-sized buffer + Don't leak an XBM-image-sized buffer * image.c (xbm_load): Free the image buffer after using it. 2011-06-21 Paul Eggert === modified file 'src/process.c' --- src/process.c 2011-06-24 21:25:22 +0000 +++ src/process.c 2011-06-26 03:40:40 +0000 @@ -4479,13 +4479,19 @@ set_waiting_for_input (&timeout); } + /* Skip the `select' call if input is available and we're + waiting for keyboard input or a cell change (which can be + triggered by processing X events). In the latter case, set + nfds to 1 to avoid breaking the loop. */ no_avail = 0; - if (read_kbd && detect_input_pending ()) + if ((read_kbd || !NILP (wait_for_cell)) + && detect_input_pending ()) { - nfds = 0; + nfds = read_kbd ? 0 : 1; no_avail = 1; } - else + + if (!no_avail) { #ifdef ADAPTIVE_READ_BUFFERING ------------------------------------------------------------ revno: 104723 committer: Glenn Morris branch nick: trunk timestamp: Sat 2011-06-25 18:37:36 -0700 message: * lisp/progmodes/f90.el (f90-looking-at-critical): Doc fix. diff: === modified file 'lisp/progmodes/f90.el' --- lisp/progmodes/f90.el 2011-06-26 01:22:45 +0000 +++ lisp/progmodes/f90.el 2011-06-26 01:37:36 +0000 @@ -1262,7 +1262,7 @@ (list (match-string 1)))) (defsubst f90-looking-at-critical () - "Return (KIND) if a critical or block block starts after point." + "Return (KIND NAME) if a critical or block block starts after point." (if (looking-at "\\(\\(\\sw+\\)[ \t]*:\\)?[ \t]*\\(critical\\|block\\)\\>") (let ((struct (match-string 3)) (label (match-string 2))) ------------------------------------------------------------ revno: 104722 committer: Glenn Morris branch nick: trunk timestamp: Sat 2011-06-25 18:25:53 -0700 message: * doc/emacs/fortran-xtra.texi (Fortran): F90 mode is also for F2008. * etc/NEWS: Mention this. diff: === modified file 'doc/emacs/ChangeLog' --- doc/emacs/ChangeLog 2011-06-25 18:05:48 +0000 +++ doc/emacs/ChangeLog 2011-06-26 01:25:53 +0000 @@ -1,3 +1,7 @@ +2011-06-26 Glenn Morris + + * fortran-xtra.texi (Fortran): F90 mode is also for F2008. + 2011-06-25 Andreas Rottmann * misc.texi (emacsclient Options): Mention --frame-parameters. === modified file 'doc/emacs/fortran-xtra.texi' --- doc/emacs/fortran-xtra.texi 2011-01-26 08:36:39 +0000 +++ doc/emacs/fortran-xtra.texi 2011-06-26 01:25:53 +0000 @@ -10,12 +10,12 @@ @cindex mode, Fortran @cindex Fortran fixed form and free form -@cindex Fortran 77 and Fortran 90, 95, 2003 +@cindex Fortran 77 and Fortran 90, 95, 2003, 2008 @findex f90-mode @findex fortran-mode Fortran mode is meant for editing ``fixed form'' (and also ``tab format'') source code (normally Fortran 77). For editing more modern -``free form'' source code (Fortran 90, 95, 2003), use F90 mode +``free form'' source code (Fortran 90, 95, 2003, 2008), use F90 mode (@code{f90-mode}). Emacs normally uses Fortran mode for files with extension @samp{.f}, @samp{.F} or @samp{.for}, and F90 mode for the extensions @samp{.f90} and @samp{.f95}. Customize === modified file 'etc/NEWS' --- etc/NEWS 2011-06-25 18:05:48 +0000 +++ etc/NEWS 2011-06-26 01:25:53 +0000 @@ -802,6 +802,9 @@ ** Miscellaneous ++++ +*** f90.el has some support for Fortran 2008 syntax. + --- *** `copyright-fix-years' can optionally convert consecutive years to ranges. ------------------------------------------------------------ revno: 104721 committer: Glenn Morris branch nick: trunk timestamp: Sat 2011-06-25 18:22:45 -0700 message: Add support for block and critical blocks to f90.el. * lisp/progmodes/f90.el (f90-critical-indent): New option. (f90-font-lock-keywords-2, f90-blocks-re, f90-end-block-re) (f90-start-block-re, f90-mode-abbrev-table): Add block, critical. (f90-mode): Doc fix. (f90-looking-at-critical, f90-looking-at-end-critical): New funcs. (f90-no-block-limit, f90-calculate-indent, f90-end-of-block) (f90-beginning-of-block, f90-next-block, f90-indent-region) (f90-match-end): Handle block, critical. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-06-26 00:01:36 +0000 +++ lisp/ChangeLog 2011-06-26 01:22:45 +0000 @@ -1,3 +1,14 @@ +2011-06-26 Glenn Morris + + * progmodes/f90.el (f90-critical-indent): New option. + (f90-font-lock-keywords-2, f90-blocks-re, f90-end-block-re) + (f90-start-block-re, f90-mode-abbrev-table): Add block, critical. + (f90-mode): Doc fix. + (f90-looking-at-critical, f90-looking-at-end-critical): New funcs. + (f90-no-block-limit, f90-calculate-indent, f90-end-of-block) + (f90-beginning-of-block, f90-next-block, f90-indent-region) + (f90-match-end): Handle block, critical. + 2011-06-25 Glenn Morris * calendar/diary-lib.el (diary-included-files): Doc fix. === modified file 'lisp/progmodes/f90.el' --- lisp/progmodes/f90.el 2011-06-26 00:23:44 +0000 +++ lisp/progmodes/f90.el 2011-06-26 01:22:45 +0000 @@ -208,6 +208,13 @@ :group 'f90-indent :version "23.1") +(defcustom f90-critical-indent 2 + "Extra indentation applied to BLOCK, CRITICAL blocks." + :type 'integer + :safe 'integerp + :group 'f90-indent + :version "24.1") + (defcustom f90-continuation-indent 5 "Extra indentation applied to continuation lines." :type 'integer @@ -589,12 +596,16 @@ ;; enum (F2003; must be followed by ", bind(C)"). '("\\<\\(enum\\)[ \t]*," (1 font-lock-keyword-face)) ;; end do, enum (F2003), if, select, where, and forall constructs. - '("\\<\\(end[ \t]*\\(do\\|if\\|enum\\|select\\|forall\\|where\\)\\)\\>\ + ;; block, critical (F2008). + ;; Note that "block data" may get somewhat mixed up with F2008 blocks, + ;; but since the former is obsolete I'm not going to worry about it. + '("\\<\\(end[ \t]*\\(do\\|if\\|enum\\|select\\|forall\\|where\\|\ +block\\|critical\\)\\)\\>\ \\([ \t]+\\(\\sw+\\)\\)?" (1 font-lock-keyword-face) (3 font-lock-constant-face nil t)) '("^[ \t0-9]*\\(\\(\\sw+\\)[ \t]*:[ \t]*\\)?\\(\\(if\\|\ do\\([ \t]*while\\)?\\|select[ \t]*\\(?:case\\|type\\)\\|where\\|\ -forall\\)\\)\\>" +forall\\|block\\|critical\\)\\)\\>" (2 font-lock-constant-face nil t) (3 font-lock-keyword-face)) ;; Implicit declaration. '("\\<\\(implicit\\)[ \t]*\\(real\\|integer\\|c\\(haracter\\|omplex\\)\ @@ -810,7 +821,7 @@ ;; F2003. "enum" "associate" ;; F2008. - "submodule")) + "submodule" "block" "critical")) "\\)\\>") "Regexp potentially indicating a \"block\" of F90 code.") @@ -873,7 +884,8 @@ (concat "^[ \t0-9]*\\") "Regexp matching the end of an F90 \"block\", from the line start. Used in the F90 entry in `hs-special-modes-alist'.") @@ -902,7 +914,7 @@ ;; "abstract interface" is F2003; "submodule" is F2008. "program\\|\\(?:abstract[ \t]*\\)?interface\\|\\(?:sub\\)?module\\|" ;; "enum", but not "enumerator". - "function\\|subroutine\\|enum[^e]\\|associate" + "function\\|subroutine\\|enum[^e]\\|associate\\|block\\|critical" "\\)" "[ \t]*") "Regexp matching the start of an F90 \"block\", from the line start. @@ -989,11 +1001,13 @@ ("`asy" . "asynchronous" ) ("`ba" . "backspace" ) ("`bd" . "block data" ) + ("`bl" . "block" ) ("`c" . "character" ) ("`cl" . "close" ) ("`cm" . "common" ) ("`cx" . "complex" ) ("`cn" . "contains" ) + ("`cr" . "critical" ) ("`cy" . "cycle" ) ("`de" . "deallocate" ) ("`df" . "define" ) @@ -1073,6 +1087,10 @@ `f90-program-indent' Extra indentation within program/module/subroutine/function blocks (default 2). +`f90-associate-indent' + Extra indentation within associate blocks (default 2). +`f90-critical-indent' + Extra indentation within critical/block blocks (default 2). `f90-continuation-indent' Extra indentation applied to continuation lines (default 5). `f90-comment-region' @@ -1243,6 +1261,25 @@ (if (looking-at "\\<\\(associate\\)[ \t]*(") (list (match-string 1)))) +(defsubst f90-looking-at-critical () + "Return (KIND) if a critical or block block starts after point." + (if (looking-at "\\(\\(\\sw+\\)[ \t]*:\\)?[ \t]*\\(critical\\|block\\)\\>") + (let ((struct (match-string 3)) + (label (match-string 2))) + (if (or (not (string-equal "block" struct)) + (save-excursion + (skip-chars-forward " \t") + (not (looking-at "data\\>")))) + (list struct label))))) + +(defsubst f90-looking-at-end-critical () + "Return non-nil if a critical or block block ends after point." + (if (looking-at "end[ \t]*\\(critical\\|block\\)\\>") + (or (not (string-equal "block" (match-string 1))) + (save-excursion + (skip-chars-forward " \t") + (not (looking-at "data\\>")))))) + (defsubst f90-looking-at-where-or-forall () "Return (KIND NAME) if a where or forall block starts after point. NAME is nil if the statement has no label." @@ -1369,7 +1406,8 @@ (save-excursion (not (or (looking-at "end") (looking-at "\\(do\\|if\\|else\\(if\\|where\\)?\ -\\|select[ \t]*\\(case\\|type\\)\\|case\\|where\\|forall\\)\\>") +\\|select[ \t]*\\(case\\|type\\)\\|case\\|where\\|forall\\|\ +block\\|critical\\)\\>") (looking-at "\\(program\\|\\(?:sub\\)?module\\|\ \\(?:abstract[ \t]*\\)?interface\\|block[ \t]*data\\)\\>") (looking-at "\\(contains\\|\\sw+[ \t]*:\\)") @@ -1413,6 +1451,8 @@ (f90-looking-at-where-or-forall) (f90-looking-at-select-case)) (setq icol (+ icol f90-if-indent))) + ;; FIXME this makes no sense, because this section/function is + ;; only for if/do/select/where/forall ? ((f90-looking-at-associate) (setq icol (+ icol f90-associate-indent)))) (end-of-line)) @@ -1426,12 +1466,16 @@ (f90-looking-at-where-or-forall) (f90-looking-at-select-case)) (setq icol (+ icol f90-if-indent))) + ;; FIXME this makes no sense, because this section/function is + ;; only for if/do/select/where/forall ? ((f90-looking-at-associate) (setq icol (+ icol f90-associate-indent))) ((looking-at f90-end-if-re) (setq icol (- icol f90-if-indent))) ((looking-at f90-end-associate-re) (setq icol (- icol f90-associate-indent))) + ((f90-looking-at-end-critical) + (setq icol (- icol f90-critical-indent))) ((looking-at "end[ \t]*do\\>") (setq icol (- icol f90-do-indent)))) (end-of-line)) @@ -1479,6 +1523,8 @@ (setq icol (+ icol f90-type-indent))) ((f90-looking-at-associate) (setq icol (+ icol f90-associate-indent))) + ((f90-looking-at-critical) + (setq icol (+ icol f90-critical-indent))) ((or (f90-looking-at-program-block-start) (looking-at "contains[ \t]*\\($\\|!\\)")) (setq icol (+ icol f90-program-indent))))) @@ -1498,6 +1544,8 @@ (setq icol (- icol f90-type-indent))) ((looking-at f90-end-associate-re) (setq icol (- icol f90-associate-indent))) + ((f90-looking-at-end-critical) + (setq icol (- icol f90-critical-indent))) ((or (looking-at "contains[ \t]*\\(!\\|$\\)") (f90-looking-at-program-block-end)) (setq icol (- icol f90-program-indent)))))))))) @@ -1604,6 +1652,7 @@ (f90-looking-at-select-case) (f90-looking-at-type-like) (f90-looking-at-associate) + (f90-looking-at-critical) (f90-looking-at-program-block-start) (f90-looking-at-if-then) (f90-looking-at-where-or-forall))) @@ -1665,6 +1714,7 @@ (f90-looking-at-select-case) (f90-looking-at-type-like) (f90-looking-at-associate) + (f90-looking-at-critical) (f90-looking-at-program-block-start) (f90-looking-at-if-then) (f90-looking-at-where-or-forall))) @@ -1706,6 +1756,7 @@ (f90-looking-at-select-case) (f90-looking-at-type-like) (f90-looking-at-associate) + (f90-looking-at-critical) (f90-looking-at-program-block-start) (f90-looking-at-if-then) (f90-looking-at-where-or-forall)) @@ -1842,6 +1893,8 @@ f90-type-indent) ((setq struct (f90-looking-at-associate)) f90-associate-indent) + ((setq struct (f90-looking-at-critical)) + f90-critical-indent) ((or (setq struct (f90-looking-at-program-block-start)) (looking-at "contains[ \t]*\\($\\|!\\)")) f90-program-indent))) @@ -1877,6 +1930,8 @@ f90-type-indent) ((setq struct (f90-looking-at-associate)) f90-associate-indent) + ((setq struct (f90-looking-at-critical)) + f90-critical-indent) ((setq struct (f90-looking-at-program-block-start)) f90-program-indent))) (setq ind-curr ind-lev) @@ -1895,6 +1950,7 @@ ((looking-at f90-end-type-re) f90-type-indent) ((looking-at f90-end-associate-re) f90-associate-indent) + ((f90-looking-at-end-critical) f90-critical-indent) ((f90-looking-at-program-block-end) f90-program-indent))) (if ind-b (setq ind-lev (- ind-lev ind-b))) @@ -2100,6 +2156,7 @@ (f90-looking-at-select-case) (f90-looking-at-type-like) (f90-looking-at-associate) + (f90-looking-at-critical) (f90-looking-at-program-block-start) ;; Interpret a single END without a block ;; start to be the END of a program block ------------------------------------------------------------ revno: 104720 committer: Glenn Morris branch nick: trunk timestamp: Sat 2011-06-25 17:23:44 -0700 message: Add some co-array stuff to f90.el. * lisp/progmodes/f90.el (f90-keywords-re, f90-keywords-level-3-re): (f90-procedures-re, f90-constants-re): Add some co-array stuff. diff: === modified file 'lisp/progmodes/f90.el' --- lisp/progmodes/f90.el 2011-06-26 00:01:36 +0000 +++ lisp/progmodes/f90.el 2011-06-26 00:23:44 +0000 @@ -312,7 +312,8 @@ "final" "generic" "import" "non_intrinsic" "non_overridable" "nopass" "pass" "protected" "same_type_as" "value" "volatile" ;; F2008. - "contiguous" "submodule" "concurrent" + "contiguous" "submodule" "concurrent" "codimension" + "sync all" "sync memory" "critical" "image_index" ) 'words) "Regexp used by the function `f90-change-keywords'.") @@ -333,7 +334,7 @@ ;; F2008. ;; "concurrent" is only in the sense of "do [,] concurrent", but given ;; the [,] it's simpler to just do every instance (cf "do while"). - "contiguous" "concurrent" + "contiguous" "concurrent" "codimension" "sync all" "sync memory" ) 'words) "Keyword-regexp for font-lock level >= 3.") @@ -380,6 +381,8 @@ "bessel_y0" "bessel_y1" "bessel_yn" "erf" "erfc" "erfc_scaled" "gamma" "hypot" "log_gamma" "norm2" "parity" "findloc" "is_contiguous" + "sync images" "lock" "unlock" "image_index" + "lcobound" "ucobound" "num_images" "this_image" ;; F2008 iso_fortran_env module. "compiler_options" "compiler_version" ;; F2008 iso_c_binding module. @@ -450,6 +453,7 @@ "character_kinds" "int8" "int16" "int32" "int64" "integer_kinds" "iostat_inquire_internal_unit" "logical_kinds" "real_kinds" "real32" "real64" "real128" + "lock_type" "atomic_int_kind" "atomic_logical_kind" ) 'words) "Regexp for Fortran intrinsic constants.") ------------------------------------------------------------ revno: 104719 committer: Glenn Morris branch nick: trunk timestamp: Sat 2011-06-25 17:01:36 -0700 message: Add some more F2008 font-locking for f90.el. * lisp/progmodes/f90.el (f90-keywords-re, f90-keywords-level-3-re): Add some F2008 stuff. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-06-25 22:22:47 +0000 +++ lisp/ChangeLog 2011-06-26 00:01:36 +0000 @@ -17,8 +17,8 @@ (f90-looking-at-program-block-start, f90-no-block-limit): Add support for submodules. - * progmodes/f90.el (f90-keywords-re, f90-procedures-re) - (f90-constants-re): Add some F2008 stuff. + * progmodes/f90.el (f90-keywords-re, f90-keywords-level-3-re) + (f90-procedures-re, f90-constants-re): Add some F2008 stuff. 2011-06-25 Eli Zaretskii === modified file 'lisp/progmodes/f90.el' --- lisp/progmodes/f90.el 2011-06-25 21:28:24 +0000 +++ lisp/progmodes/f90.el 2011-06-26 00:01:36 +0000 @@ -311,8 +311,8 @@ "deferred" "enum" "enumerator" "extends" "extends_type_of" "final" "generic" "import" "non_intrinsic" "non_overridable" "nopass" "pass" "protected" "same_type_as" "value" "volatile" - ;; F2008 - "contiguous" "submodule" + ;; F2008. + "contiguous" "submodule" "concurrent" ) 'words) "Regexp used by the function `f90-change-keywords'.") @@ -330,6 +330,10 @@ ;; F2003. asynchronous separate. "abstract" "deferred" "import" "final" "non_intrinsic" "non_overridable" "nopass" "pass" "protected" "value" "volatile" + ;; F2008. + ;; "concurrent" is only in the sense of "do [,] concurrent", but given + ;; the [,] it's simpler to just do every instance (cf "do while"). + "contiguous" "concurrent" ) 'words) "Keyword-regexp for font-lock level >= 3.") ------------------------------------------------------------ revno: 104718 committer: Glenn Morris branch nick: trunk timestamp: Sat 2011-06-25 15:33:29 -0700 message: * lisp/calendar/diary-lib.el: Comment fix. diff: === modified file 'lisp/calendar/diary-lib.el' --- lisp/calendar/diary-lib.el 2011-06-25 22:22:47 +0000 +++ lisp/calendar/diary-lib.el 2011-06-25 22:33:29 +0000 @@ -833,7 +833,7 @@ (let* ((original-date date) ; save for possible use in the hooks (date-string (calendar-date-string date)) (diary-buffer (find-buffer-visiting diary-file)) - ;; Dynamically bound in diary-include-other-diary-files. + ;; Dynamically bound in diary-include-files. (d-incp (and (boundp 'diary-including) diary-including)) diary-entries-list file-glob-attrs temp-buff) (unless d-incp @@ -1417,7 +1417,7 @@ (calendar-redraw)) (let ((diary-marking-entries-flag t) (diary-buffer (find-buffer-visiting diary-file)) - ;; Dynamically bound in diary-mark-included-diary-files. + ;; Dynamically bound in diary-include-files. (d-incp (and (boundp 'diary-including) diary-including)) file-glob-attrs temp-buff) (unless d-incp ------------------------------------------------------------ revno: 104717 committer: Glenn Morris branch nick: trunk timestamp: Sat 2011-06-25 15:22:47 -0700 message: Avoid some code duplication in diary-lib.el. * lisp/calendar/diary-lib.el (diary-included-files): Doc fix. (diary-include-files): New function, extracted from diary-include-other-diary-files and diary-mark-included-diary-files. (diary-include-other-diary-files, diary-mark-included-diary-files): Just call diary-include-files. (diary-mark-entries): Reset diary-included-files on first call. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-06-25 22:10:21 +0000 +++ lisp/ChangeLog 2011-06-25 22:22:47 +0000 @@ -1,5 +1,12 @@ 2011-06-25 Glenn Morris + * calendar/diary-lib.el (diary-included-files): Doc fix. + (diary-include-files): New function, extracted from + diary-include-other-diary-files and diary-mark-included-diary-files. + (diary-include-other-diary-files, diary-mark-included-diary-files): + Just call diary-include-files. + (diary-mark-entries): Reset diary-included-files on first call. + * calendar/diary-lib.el (diary-mark-entries) (diary-mark-included-diary-files): Visit included diary-files in temp buffers. === modified file 'lisp/calendar/diary-lib.el' --- lisp/calendar/diary-lib.el 2011-06-25 22:10:21 +0000 +++ lisp/calendar/diary-lib.el 2011-06-25 22:22:47 +0000 @@ -776,7 +776,8 @@ (goto-char (point-min))) (defvar diary-included-files nil - "List of any diary files included in the last call to `diary-list-entries'.") + "List of any diary files included in the last call to `diary-list-entries'. +Or to `diary-mark-entries'.") (defun diary-list-entries (date number &optional list-only) "Create and display a buffer containing the relevant lines in `diary-file'. @@ -921,19 +922,20 @@ (defvar original-date) ; bound in diary-list-entries ;(defvar number) ; already declared above -(defun diary-include-other-diary-files () - "Add diary entries from included diary files to `diary-entries-list'. +(defun diary-include-files (&optional mark) + "Process diary entries from included diary files. +By default, lists included entries, but if optional argument MARK is non-nil +marks entries instead. For example, this enables you to share common diary files. -To use, add this function to `diary-list-entries-hook'. Specify include files using lines matching `diary-include-string', e.g. #include \"filename\" -This is recursive; that is, included files may include other files. -See also `diary-mark-included-diary-files'." +This is recursive; that is, included files may include other files." (goto-char (point-min)) (while (re-search-forward (format "^%s \"\\([^\"]*\\)\"" (regexp-quote diary-include-string)) nil t) (let ((diary-file (match-string-no-properties 1)) + (diary-mark-entries-hook 'diary-mark-included-diary-files) (diary-list-entries-hook 'diary-include-other-diary-files) (diary-including t) diary-hook diary-list-include-blanks efile) @@ -943,10 +945,12 @@ diary-included-files) (error "Recursive diary include for %s" diary-file) (setq diary-included-files - (append diary-included-files (list efile)) - diary-entries-list - (append diary-entries-list - (diary-list-entries original-date number t)))) + (append diary-included-files (list efile))) + (if mark + (diary-mark-entries) + (setq diary-entries-list + (append diary-entries-list + (diary-list-entries original-date number t))))) (beep) (message "Can't read included diary file %s" diary-file) (sleep-for 2)) @@ -955,6 +959,13 @@ (sleep-for 2)))) (goto-char (point-min))) +(defun diary-include-other-diary-files () + "Add diary entries from included diary files to `diary-entries-list'. +To use, add this function to `diary-list-entries-hook'. +For details, see `diary-include-files'. +See also `diary-mark-included-diary-files'." + (diary-include-files)) + (define-obsolete-function-alias 'include-other-diary-files 'diary-include-other-diary-files "23.1") @@ -1410,6 +1421,7 @@ (d-incp (and (boundp 'diary-including) diary-including)) file-glob-attrs temp-buff) (unless d-incp + (setq diary-included-files nil) (message "Marking diary entries...")) (unwind-protect (with-current-buffer (or diary-buffer @@ -1518,29 +1530,10 @@ (defun diary-mark-included-diary-files () "Mark diary entries from included diary files. -For example, this enables you to share common diary files. To use, add this function to `diary-mark-entries-hook'. -Specify include files using lines matching `diary-include-string', e.g. - #include \"filename\" -This is recursive; that is, included files may include other files. +For details, see `diary-include-files'. See also `diary-include-other-diary-files'." - (goto-char (point-min)) - (while (re-search-forward - (format "^%s \"\\([^\"]*\\)\"" (regexp-quote diary-include-string)) - nil t) - (let ((diary-file (match-string-no-properties 1)) - (diary-mark-entries-hook 'diary-mark-included-diary-files) - (diary-including t)) - (if (file-exists-p diary-file) - (if (file-readable-p diary-file) - (diary-mark-entries) - (beep) - (message "Can't read included diary file %s" diary-file) - (sleep-for 2)) - (beep) - (message "Can't find included diary file %s" diary-file) - (sleep-for 2)))) - (goto-char (point-min))) + (diary-include-files t)) (define-obsolete-function-alias 'mark-included-diary-files 'diary-mark-included-diary-files "23.1") ------------------------------------------------------------ revno: 104716 committer: Glenn Morris branch nick: trunk timestamp: Sat 2011-06-25 15:10:21 -0700 message: When marking, visit included diary-files in temp buffers. Ref: bug#8920, but not a bug. * lisp/calendar/diary-lib.el (diary-mark-entries) (diary-mark-included-diary-files): Visit included diary-files in temp buffers. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-06-25 21:21:45 +0000 +++ lisp/ChangeLog 2011-06-25 22:10:21 +0000 @@ -1,5 +1,9 @@ 2011-06-25 Glenn Morris + * calendar/diary-lib.el (diary-mark-entries) + (diary-mark-included-diary-files): + Visit included diary-files in temp buffers. + * progmodes/f90.el (f90-keywords-re, f90-font-lock-keywords-1) (f90-blocks-re, f90-program-block-re, f90-end-block-re) (f90-start-block-re, f90-imenu-generic-expression) === modified file 'lisp/calendar/diary-lib.el' --- lisp/calendar/diary-lib.el 2011-05-18 03:20:13 +0000 +++ lisp/calendar/diary-lib.el 2011-06-25 22:10:21 +0000 @@ -1405,22 +1405,36 @@ (setq calendar-mark-diary-entries-flag nil) (calendar-redraw)) (let ((diary-marking-entries-flag t) - file-glob-attrs) - (with-current-buffer (find-file-noselect (diary-check-diary-file) t) - (save-excursion - (when (eq major-mode (default-value 'major-mode)) (diary-mode)) - (setq calendar-mark-diary-entries-flag t) - (message "Marking diary entries...") - (setq file-glob-attrs (nth 1 (diary-pull-attrs nil '()))) - (with-syntax-table diary-syntax-table - (diary-mark-entries-1 'calendar-mark-date-pattern) - (diary-mark-sexp-entries) - ;; Although it looks like mark-entries-hook runs every time, - ;; diary-mark-included-diary-files binds it to nil - ;; (essentially) when it runs in included files. - (run-hooks 'diary-nongregorian-marking-hook - 'diary-mark-entries-hook)) - (message "Marking diary entries...done"))))) + (diary-buffer (find-buffer-visiting diary-file)) + ;; Dynamically bound in diary-mark-included-diary-files. + (d-incp (and (boundp 'diary-including) diary-including)) + file-glob-attrs temp-buff) + (unless d-incp + (message "Marking diary entries...")) + (unwind-protect + (with-current-buffer (or diary-buffer + (if d-incp + (setq temp-buff (generate-new-buffer + " *diary-temp*")) + (find-file-noselect + (diary-check-diary-file) t))) + (if temp-buff + ;; If including, caller has already verified it is readable. + (insert-file-contents diary-file) + (if (eq major-mode (default-value 'major-mode)) (diary-mode))) + (setq calendar-mark-diary-entries-flag t) + (setq file-glob-attrs (nth 1 (diary-pull-attrs nil '()))) + (with-syntax-table diary-syntax-table + (save-excursion + (diary-mark-entries-1 'calendar-mark-date-pattern) + (diary-mark-sexp-entries) + ;; Although it looks like mark-entries-hook runs every time, + ;; diary-mark-included-diary-files binds it to nil + ;; (essentially) when it runs in included files. + (run-hooks 'diary-nongregorian-marking-hook + 'diary-mark-entries-hook)))) + (and temp-buff (buffer-name temp-buff) (kill-buffer temp-buff))) + (or d-incp (message "Marking diary entries...done")))) ;;;###cal-autoload (define-obsolete-function-alias 'mark-diary-entries 'diary-mark-entries "23.1") @@ -1514,15 +1528,12 @@ (while (re-search-forward (format "^%s \"\\([^\"]*\\)\"" (regexp-quote diary-include-string)) nil t) - (let* ((diary-file (match-string-no-properties 1)) - (diary-mark-entries-hook 'diary-mark-included-diary-files) - (dbuff (find-buffer-visiting diary-file))) + (let ((diary-file (match-string-no-properties 1)) + (diary-mark-entries-hook 'diary-mark-included-diary-files) + (diary-including t)) (if (file-exists-p diary-file) (if (file-readable-p diary-file) - (progn - (diary-mark-entries) - (unless dbuff - (kill-buffer (find-buffer-visiting diary-file)))) + (diary-mark-entries) (beep) (message "Can't read included diary file %s" diary-file) (sleep-for 2)) ------------------------------------------------------------ revno: 104715 committer: Glenn Morris branch nick: trunk timestamp: Sat 2011-06-25 14:28:24 -0700 message: * lisp/progmodes/f90.el (f90-procedures-re): Add F2008 "is_contiguous". diff: === modified file 'lisp/progmodes/f90.el' --- lisp/progmodes/f90.el 2011-06-25 21:21:45 +0000 +++ lisp/progmodes/f90.el 2011-06-25 21:28:24 +0000 @@ -375,7 +375,7 @@ "bessel_j0" "bessel_j1" "bessel_jn" "bessel_y0" "bessel_y1" "bessel_yn" "erf" "erfc" "erfc_scaled" "gamma" "hypot" "log_gamma" - "norm2" "parity" "findloc" + "norm2" "parity" "findloc" "is_contiguous" ;; F2008 iso_fortran_env module. "compiler_options" "compiler_version" ;; F2008 iso_c_binding module. ------------------------------------------------------------ revno: 104714 committer: Glenn Morris branch nick: trunk timestamp: Sat 2011-06-25 14:21:45 -0700 message: Add submodule support to f90.el. * lisp/progmodes/f90.el (f90-keywords-re, f90-font-lock-keywords-1) (f90-blocks-re, f90-program-block-re, f90-end-block-re) (f90-start-block-re, f90-imenu-generic-expression) (f90-looking-at-program-block-start, f90-no-block-limit): Add support for submodules. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-06-25 20:51:40 +0000 +++ lisp/ChangeLog 2011-06-25 21:21:45 +0000 @@ -1,5 +1,11 @@ 2011-06-25 Glenn Morris + * progmodes/f90.el (f90-keywords-re, f90-font-lock-keywords-1) + (f90-blocks-re, f90-program-block-re, f90-end-block-re) + (f90-start-block-re, f90-imenu-generic-expression) + (f90-looking-at-program-block-start, f90-no-block-limit): + Add support for submodules. + * progmodes/f90.el (f90-keywords-re, f90-procedures-re) (f90-constants-re): Add some F2008 stuff. === modified file 'lisp/progmodes/f90.el' --- lisp/progmodes/f90.el 2011-06-25 20:49:56 +0000 +++ lisp/progmodes/f90.el 2011-06-25 21:21:45 +0000 @@ -26,6 +26,7 @@ ;; Major mode for editing F90 programs in FREE FORMAT. ;; The minor language revision F95 is also supported (with font-locking). ;; Some/many (?) aspects of F2003 are supported. +;; Some aspects of F2008 are supported. ;; Knows about continuation lines, named structured statements, and other ;; features in F90 including HPF (High Performance Fortran) structures. @@ -311,7 +312,7 @@ "final" "generic" "import" "non_intrinsic" "non_overridable" "nopass" "pass" "protected" "same_type_as" "value" "volatile" ;; F2008 - "contiguous" + "contiguous" "submodule" ) 'words) "Regexp used by the function `f90-change-keywords'.") @@ -482,13 +483,18 @@ ;;; (1 font-lock-keyword-face) (3 font-lock-function-name-face)) '(f90-typedef-matcher (1 font-lock-keyword-face) (2 font-lock-function-name-face)) - ;; F2003. Prevent operators being highlighted as functions. - '("\\<\\(\\(?:end[ \t]*\\)?interface[ \t]*\\(?:assignment\\|operator\\|\ + ;; F2003. Prevent operators being highlighted as functions. + '("\\<\\(\\(?:end[ \t]*\\)?interface[ \t]*\\(?:assignment\\|operator\\|\ read\\|write\\)\\)[ \t]*(" (1 font-lock-keyword-face t)) ;; Other functions and declarations. Named interfaces = F2003. - '("\\<\\(\\(?:end[ \t]*\\)?\\(program\\|module\\|function\\|associate\\|\ -subroutine\\|interface\\)\\|use\\|call\\)\\>[ \t]*\\(\\sw+\\)?" + ;; F2008: end submodule submodule_name. + '("\\<\\(\\(?:end[ \t]*\\)?\\(program\\|\\(?:sub\\)?module\\|\ +function\\|associate\\|subroutine\\|interface\\)\\|use\\|call\\)\ +\\>[ \t]*\\(\\sw+\\)?" (1 font-lock-keyword-face) (3 font-lock-function-name-face nil t)) + ;; F2008: submodule (parent_name) submodule_name. + '("\\<\\(submodule\\)\\>[ \t]*([^)\n]+)[ \t]*\\(\\sw+\\)?" + (1 font-lock-keyword-face) (2 font-lock-function-name-face nil t)) ;; F2003. '("\\<\\(use\\)[ \t]*,[ \t]*\\(\\(?:non_\\)?intrinsic\\)[ \t]*::[ \t]*\ \\(\\sw+\\)" @@ -794,12 +800,14 @@ (regexp-opt '("do" "if" "interface" "function" "module" "program" "select" "subroutine" "type" "where" "forall" ;; F2003. - "enum" "associate")) + "enum" "associate" + ;; F2008. + "submodule")) "\\)\\>") "Regexp potentially indicating a \"block\" of F90 code.") (defconst f90-program-block-re - (regexp-opt '("program" "module" "subroutine" "function") 'paren) + (regexp-opt '("program" "module" "subroutine" "function" "submodule") 'paren) "Regexp used to locate the start/end of a \"subprogram\".") ;; "class is" is F2003. @@ -857,7 +865,7 @@ (concat "^[ \t0-9]*\\") "Regexp matching the end of an F90 \"block\", from the line start. Used in the F90 entry in `hs-special-modes-alist'.") @@ -883,8 +891,8 @@ "[^i(!\n\"\& \t]\\|" ; not-i( "i[^s!\n\"\& \t]\\|" ; i not-s "is\\sw\\)\\|" - ;; "abstract interface" is F2003. - "program\\|\\(?:abstract[ \t]*\\)?interface\\|module\\|" + ;; "abstract interface" is F2003; "submodule" is F2008. + "program\\|\\(?:abstract[ \t]*\\)?interface\\|\\(?:sub\\)?module\\|" ;; "enum", but not "enumerator". "function\\|subroutine\\|enum[^e]\\|associate" "\\)" @@ -924,6 +932,8 @@ ) (list '(nil "^[ \t0-9]*program[ \t]+\\(\\sw+\\)" 1) + '("Submodules" "^[ \t0-9]*submodule[ \t]*([^)\n]+)[ \t]*\ +\\(\\sw+\\)[ \t]*\\(!\\|$\\)" 1) '("Modules" "^[ \t0-9]*module[ \t]+\\(\\sw+\\)[ \t]*\\(!\\|$\\)" 1) (list "Types" 'f90-imenu-type-matcher 1) ;; Does not handle: "type[, stuff] :: foo". @@ -1275,6 +1285,8 @@ ((and (not (looking-at "module[ \t]*procedure\\>")) (looking-at "\\(module\\)[ \t]+\\(\\sw+\\)\\>")) (list (match-string 1) (match-string 2))) + ((looking-at "\\(submodule\\)[ \t]*([^)\n]+)[ \t]*\\(\\sw+\\)\\>") + (list (match-string 1) (match-string 2))) ((and (not (looking-at "end[ \t]*\\(function\\|subroutine\\)")) (looking-at "[^!'\"\&\n]*\\(function\\|subroutine\\)[ \t]+\ \\(\\sw+\\)")) @@ -1350,7 +1362,7 @@ (not (or (looking-at "end") (looking-at "\\(do\\|if\\|else\\(if\\|where\\)?\ \\|select[ \t]*\\(case\\|type\\)\\|case\\|where\\|forall\\)\\>") - (looking-at "\\(program\\|module\\|\ + (looking-at "\\(program\\|\\(?:sub\\)?module\\|\ \\(?:abstract[ \t]*\\)?interface\\|block[ \t]*data\\)\\>") (looking-at "\\(contains\\|\\sw+[ \t]*:\\)") (looking-at f90-type-def-re) ------------------------------------------------------------ revno: 104713 committer: Glenn Morris branch nick: trunk timestamp: Sat 2011-06-25 13:53:24 -0700 message: ChangeLog fix. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2011-06-25 18:31:36 +0000 +++ src/ChangeLog 2011-06-25 20:53:24 +0000 @@ -371,7 +371,7 @@ * fns.c (secure_hash): Rename from crypto_hash_function and change the first arg to accept symbols. - (Fsecure_hash): New primtive. + (Fsecure_hash): New primitive. (syms_of_fns): New symbols. 2011-06-20 Deniz Dogan ------------------------------------------------------------ revno: 104712 committer: Glenn Morris branch nick: trunk timestamp: Sat 2011-06-25 13:51:40 -0700 message: Add missing ChangeLog for previous commit. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-06-25 18:21:00 +0000 +++ lisp/ChangeLog 2011-06-25 20:51:40 +0000 @@ -1,9 +1,13 @@ +2011-06-25 Glenn Morris + + * progmodes/f90.el (f90-keywords-re, f90-procedures-re) + (f90-constants-re): Add some F2008 stuff. + 2011-06-25 Eli Zaretskii * net/ange-ftp.el (ange-ftp-insert-file-contents): Let-bind buffer-file-type before setting its value, to avoid disastrous - global effects on decoding files for DOS/Windows systems. - (Bug#8780) + global effects on decoding files for DOS/Windows systems. (Bug#8780) 2011-06-25 Juanma Barranquero ------------------------------------------------------------ revno: 104711 committer: Glenn Morris branch nick: trunk timestamp: Sat 2011-06-25 13:49:56 -0700 message: Add some F2008 keywords to f90.el font-locking. * lisp/progmodes/f90.el (f90-keywords-re, f90-procedures-re) (f90-constants-re): Add some F2008 stuff. diff: === modified file 'lisp/progmodes/f90.el' --- lisp/progmodes/f90.el 2011-06-12 00:57:24 +0000 +++ lisp/progmodes/f90.el 2011-06-25 20:49:56 +0000 @@ -310,6 +310,8 @@ "deferred" "enum" "enumerator" "extends" "extends_type_of" "final" "generic" "import" "non_intrinsic" "non_overridable" "nopass" "pass" "protected" "same_type_as" "value" "volatile" + ;; F2008 + "contiguous" ) 'words) "Regexp used by the function `f90-change-keywords'.") @@ -365,6 +367,18 @@ ;; F2003 iso_c_binding intrinsic module. "c_loc" "c_funloc" "c_associated" "c_f_pointer" "c_f_procpointer" + ;; F2008. + "bge" "bgt" "ble" "blt" "dshiftl" "dshiftr" "leadz" "popcnt" + "poppar" "trailz" "maskl" "maskr" "shifta" "shiftl" "shiftr" + "merge_bits" "iall" "iany" "iparity" "storage_size" + "bessel_j0" "bessel_j1" "bessel_jn" + "bessel_y0" "bessel_y1" "bessel_yn" + "erf" "erfc" "erfc_scaled" "gamma" "hypot" "log_gamma" + "norm2" "parity" "findloc" + ;; F2008 iso_fortran_env module. + "compiler_options" "compiler_version" + ;; F2008 iso_c_binding module. + "c_sizeof" ) t) ;; A left parenthesis to avoid highlighting non-procedures. "[ \t]*(") @@ -427,6 +441,10 @@ "ieee_exceptions" "ieee_arithmetic" "ieee_features" + ;; F2008 iso_fortran_env constants. + "character_kinds" "int8" "int16" "int32" "int64" + "integer_kinds" "iostat_inquire_internal_unit" + "logical_kinds" "real_kinds" "real32" "real64" "real128" ) 'words) "Regexp for Fortran intrinsic constants.") ------------------------------------------------------------ revno: 104710 committer: Glenn Morris branch nick: trunk timestamp: Sat 2011-06-25 12:52:34 -0700 message: * lib-src/emacsclient.c (print_help_and_exit): More fixing of previous. diff: === modified file 'lib-src/emacsclient.c' --- lib-src/emacsclient.c 2011-06-25 19:33:07 +0000 +++ lib-src/emacsclient.c 2011-06-25 19:52:34 +0000 @@ -674,7 +674,7 @@ -nw, -t, --tty Open a new Emacs frame on the current terminal\n\ -c, --create-frame Create a new frame instead of trying to\n\ use the current Emacs frame\n\ --F, --frame-parameters=ALIST\n\ +-F ALIST, --frame-parameters=ALIST\n\ Set the parameters of a new frame\n\ -e, --eval Evaluate the FILE arguments as ELisp expressions\n\ -n, --no-wait Don't wait for the server to return\n\ ------------------------------------------------------------ revno: 104709 committer: Glenn Morris branch nick: trunk timestamp: Sat 2011-06-25 12:33:07 -0700 message: * lib-src/emacsclient.c (print_help_and_exit): Fix previous change. diff: === modified file 'lib-src/emacsclient.c' --- lib-src/emacsclient.c 2011-06-25 18:13:14 +0000 +++ lib-src/emacsclient.c 2011-06-25 19:33:07 +0000 @@ -674,7 +674,8 @@ -nw, -t, --tty Open a new Emacs frame on the current terminal\n\ -c, --create-frame Create a new frame instead of trying to\n\ use the current Emacs frame\n\ --F, --frame-parameters Set the parameters of a new frame\n\ +-F, --frame-parameters=ALIST\n\ + Set the parameters of a new frame\n\ -e, --eval Evaluate the FILE arguments as ELisp expressions\n\ -n, --no-wait Don't wait for the server to return\n\ -q, --quiet Don't display messages on success\n\ ------------------------------------------------------------ revno: 104708 [merge] committer: Paul Eggert branch nick: trunk timestamp: Sat 2011-06-25 11:39:15 -0700 message: Merge: Use gnulib's dup2 module instead of rolling our own. diff: === modified file 'ChangeLog' --- ChangeLog 2011-06-23 08:10:57 +0000 +++ ChangeLog 2011-06-25 08:40:38 +0000 @@ -1,3 +1,10 @@ +2011-06-25 Paul Eggert + + Use gnulib's dup2 module instead of rolling our own. + * Makefile.in (GNULIB_MODULES): Add dup2. + * configure.in: Do not check for dup2; gnulib does that now. + * lib/dup2.c, m4/dup2.m4: New files, from gnulib. + 2011-06-23 Paul Eggert * lib/getopt.c, lib/stat.c, m4/gl-comp.m4: Merge from gnulib. === modified file 'Makefile.in' --- Makefile.in 2011-06-21 16:15:07 +0000 +++ Makefile.in 2011-06-25 08:40:38 +0000 @@ -334,6 +334,7 @@ GNULIB_MODULES = \ alloca-opt \ careadlinkat crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512 dtoastr \ + dup2 \ filemode getloadavg getopt-gnu ignore-value intprops lstat mktime readlink \ socklen stdarg stdio strftime strtoumax symlink sys_stat GNULIB_TOOL_FLAGS = \ === modified file 'configure.in' --- configure.in 2011-06-21 17:10:10 +0000 +++ configure.in 2011-06-25 08:40:38 +0000 @@ -2645,7 +2645,7 @@ AC_SUBST(BLESSMAIL_TARGET) -AC_CHECK_FUNCS(gethostname getdomainname dup2 \ +AC_CHECK_FUNCS(gethostname getdomainname \ rename closedir mkdir rmdir sysinfo getrusage get_current_dir_name \ random lrand48 logb frexp fmod rint cbrt ftime setsid \ strerror fpathconf select euidaccess getpagesize tzset setlocale \ === added file 'lib/dup2.c' --- lib/dup2.c 1970-01-01 00:00:00 +0000 +++ lib/dup2.c 2011-06-25 08:40:38 +0000 @@ -0,0 +1,132 @@ +/* Duplicate an open file descriptor to a specified file descriptor. + + Copyright (C) 1999, 2004-2007, 2009-2011 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* written by Paul Eggert */ + +#include + +/* Specification. */ +#include + +#include +#include + +#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +/* Get declarations of the Win32 API functions. */ +# define WIN32_LEAN_AND_MEAN +# include +#endif + +#if HAVE_DUP2 + +# undef dup2 + +int +rpl_dup2 (int fd, int desired_fd) +{ + int result; +# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ + /* If fd is closed, mingw hangs on dup2 (fd, fd). If fd is open, + dup2 (fd, fd) returns 0, but all further attempts to use fd in + future dup2 calls will hang. */ + if (fd == desired_fd) + { + if ((HANDLE) _get_osfhandle (fd) == INVALID_HANDLE_VALUE) + { + errno = EBADF; + return -1; + } + return fd; + } + /* Wine 1.0.1 return 0 when desired_fd is negative but not -1: + http://bugs.winehq.org/show_bug.cgi?id=21289 */ + if (desired_fd < 0) + { + errno = EBADF; + return -1; + } +# elif !defined __linux__ + /* On Haiku, dup2 (fd, fd) mistakenly clears FD_CLOEXEC. */ + if (fd == desired_fd) + return fcntl (fd, F_GETFL) == -1 ? -1 : fd; +# endif + result = dup2 (fd, desired_fd); +# ifdef __linux__ + /* Correct a Linux return value. + + */ + if (fd == desired_fd && result == (unsigned int) -EBADF) + { + errno = EBADF; + result = -1; + } +# endif + if (result == 0) + result = desired_fd; + /* Correct a cygwin 1.5.x errno value. */ + else if (result == -1 && errno == EMFILE) + errno = EBADF; +# if REPLACE_FCHDIR + if (fd != desired_fd && result != -1) + result = _gl_register_dup (fd, result); +# endif + return result; +} + +#else /* !HAVE_DUP2 */ + +/* On older platforms, dup2 did not exist. */ + +# ifndef F_DUPFD +static int +dupfd (int fd, int desired_fd) +{ + int duplicated_fd = dup (fd); + if (duplicated_fd < 0 || duplicated_fd == desired_fd) + return duplicated_fd; + else + { + int r = dupfd (fd, desired_fd); + int e = errno; + close (duplicated_fd); + errno = e; + return r; + } +} +# endif + +int +dup2 (int fd, int desired_fd) +{ + int result = fcntl (fd, F_GETFL) < 0 ? -1 : fd; + if (result == -1 || fd == desired_fd) + return result; + close (desired_fd); +# ifdef F_DUPFD + result = fcntl (fd, F_DUPFD, desired_fd); +# if REPLACE_FCHDIR + if (0 <= result) + result = _gl_register_dup (fd, result); +# endif +# else + result = dupfd (fd, desired_fd); +# endif + if (result == -1 && (errno == EMFILE || errno == EINVAL)) + errno = EBADF; + return result; +} +#endif /* !HAVE_DUP2 */ === modified file 'lib/gnulib.mk' --- lib/gnulib.mk 2011-06-21 16:15:07 +0000 +++ lib/gnulib.mk 2011-06-25 08:40:38 +0000 @@ -9,7 +9,7 @@ # the same distribution terms as the rest of that program. # # Generated by gnulib-tool. -# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=. --makefile-name=gnulib.mk --conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files alloca-opt careadlinkat crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512 dtoastr filemode getloadavg getopt-gnu ignore-value intprops lstat mktime readlink socklen stdarg stdio strftime strtoumax symlink sys_stat +# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=. --makefile-name=gnulib.mk --conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files alloca-opt careadlinkat crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512 dtoastr dup2 filemode getloadavg getopt-gnu ignore-value intprops lstat mktime readlink socklen stdarg stdio strftime strtoumax symlink sys_stat MOSTLYCLEANFILES += core *.stackdump @@ -159,6 +159,15 @@ ## end gnulib module dtoastr +## begin gnulib module dup2 + + +EXTRA_DIST += dup2.c + +EXTRA_libgnu_a_SOURCES += dup2.c + +## end gnulib module dup2 + ## begin gnulib module filemode libgnu_a_SOURCES += filemode.c === added file 'm4/dup2.m4' --- m4/dup2.m4 1970-01-01 00:00:00 +0000 +++ m4/dup2.m4 2011-06-25 08:40:38 +0000 @@ -0,0 +1,76 @@ +#serial 13 +dnl Copyright (C) 2002, 2005, 2007, 2009-2011 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +AC_DEFUN([gl_FUNC_DUP2], +[ + AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) + AC_REQUIRE([AC_CANONICAL_HOST]) + m4_ifdef([gl_FUNC_DUP2_OBSOLETE], [ + AC_CHECK_FUNCS_ONCE([dup2]) + if test $ac_cv_func_dup2 = no; then + HAVE_DUP2=0 + AC_LIBOBJ([dup2]) + fi + ], [ + AC_DEFINE([HAVE_DUP2], [1], [Define to 1 if you have the 'dup2' function.]) + ]) + if test $HAVE_DUP2 = 1; then + AC_CACHE_CHECK([whether dup2 works], [gl_cv_func_dup2_works], + [AC_RUN_IFELSE([ + AC_LANG_PROGRAM([[#include +#include +#include ]], + [int result = 0; +#ifdef FD_CLOEXEC + if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1) + result |= 1; +#endif + if (dup2 (1, 1) == 0) + result |= 2; +#ifdef FD_CLOEXEC + if (fcntl (1, F_GETFD) != FD_CLOEXEC) + result |= 4; +#endif + close (0); + if (dup2 (0, 0) != -1) + result |= 8; + /* Many gnulib modules require POSIX conformance of EBADF. */ + if (dup2 (2, 1000000) == -1 && errno != EBADF) + result |= 16; + return result; + ]) + ], + [gl_cv_func_dup2_works=yes], [gl_cv_func_dup2_works=no], + [case "$host_os" in + mingw*) # on this platform, dup2 always returns 0 for success + gl_cv_func_dup2_works=no;; + cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0 + gl_cv_func_dup2_works=no;; + linux*) # On linux between 2008-07-27 and 2009-05-11, dup2 of a + # closed fd may yield -EBADF instead of -1 / errno=EBADF. + gl_cv_func_dup2_works=no;; + freebsd*) # on FreeBSD 6.1, dup2(1,1000000) gives EMFILE, not EBADF. + gl_cv_func_dup2_works=no;; + haiku*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC. + gl_cv_func_dup2_works=no;; + *) gl_cv_func_dup2_works=yes;; + esac]) + ]) + if test "$gl_cv_func_dup2_works" = no; then + gl_REPLACE_DUP2 + fi + fi +]) + +AC_DEFUN([gl_REPLACE_DUP2], +[ + AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) + AC_CHECK_FUNCS_ONCE([dup2]) + if test $ac_cv_func_dup2 = yes; then + REPLACE_DUP2=1 + fi + AC_LIBOBJ([dup2]) +]) === modified file 'm4/gl-comp.m4' --- m4/gl-comp.m4 2011-06-23 08:10:57 +0000 +++ m4/gl-comp.m4 2011-06-25 08:40:38 +0000 @@ -37,6 +37,7 @@ # Code from module crypto/sha512: # Code from module dosname: # Code from module dtoastr: + # Code from module dup2: # Code from module extensions: AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) # Code from module filemode: @@ -102,6 +103,8 @@ gl_SHA256 gl_SHA512 AC_REQUIRE([gl_C99_STRTOLD]) +gl_FUNC_DUP2 +gl_UNISTD_MODULE_INDICATOR([dup2]) gl_FILEMODE gl_GETLOADAVG if test $HAVE_GETLOADAVG = 0; then @@ -404,6 +407,7 @@ lib/careadlinkat.h lib/dosname.h lib/dtoastr.c + lib/dup2.c lib/filemode.c lib/filemode.h lib/ftoastr.c @@ -453,6 +457,7 @@ m4/00gnulib.m4 m4/alloca.m4 m4/c-strtod.m4 + m4/dup2.m4 m4/extensions.m4 m4/filemode.m4 m4/getloadavg.m4 === modified file 'src/ChangeLog' --- src/ChangeLog 2011-06-25 18:21:00 +0000 +++ src/ChangeLog 2011-06-25 18:31:36 +0000 @@ -1,3 +1,8 @@ +2011-06-25 Paul Eggert + + Use gnulib's dup2 module instead of rolling our own. + * sysdep.c (dup2) [!HAVE_DUP2]: Remove; gnulib now does this. + 2011-06-25 YAMAMOTO Mitsuharu * dispnew.c (scrolling_window): Before scrolling, turn off a === modified file 'src/sysdep.c' --- src/sysdep.c 2011-05-03 05:47:50 +0000 +++ src/sysdep.c 2011-06-25 08:40:38 +0000 @@ -2012,37 +2012,6 @@ } #endif /* HPUX and not HAVE_PERROR */ -#ifndef HAVE_DUP2 - -/* - * Emulate BSD dup2. First close newd if it already exists. - * Then, attempt to dup oldd. If not successful, call dup2 recursively - * until we are, then close the unsuccessful ones. - */ - -int -dup2 (int oldd, int newd) -{ - register int fd, ret; - - emacs_close (newd); - -#ifdef F_DUPFD - return fcntl (oldd, F_DUPFD, newd); -#else - fd = dup (old); - if (fd == -1) - return -1; - if (fd == new) - return new; - ret = dup2 (old,new); - emacs_close (fd); - return ret; -#endif -} - -#endif /* not HAVE_DUP2 */ - /* * Gettimeofday. Simulate as much as possible. Only accurate * to nearest second. Emacs doesn't use tzp so ignore it for now. ------------------------------------------------------------ revno: 104707 [merge] committer: Glenn Morris branch nick: trunk timestamp: Sat 2011-06-25 11:21:00 -0700 message: Merge from emacs-23; up to r100601. diff: === modified file 'doc/lispref/ChangeLog' --- doc/lispref/ChangeLog 2011-06-15 18:45:28 +0000 +++ doc/lispref/ChangeLog 2011-06-25 18:21:00 +0000 @@ -1,3 +1,9 @@ +2011-06-25 Chong Yidong + + * keymaps.texi (Searching Keymaps): + * display.texi (Overlay Properties): Fix errors in 2011-05-29 + change. Suggested by Johan Bockgård. + 2011-06-15 Chong Yidong * text.texi (Special Properties): Clarify role of font-lock-face. === modified file 'doc/lispref/display.texi' --- doc/lispref/display.texi 2011-05-29 22:41:06 +0000 +++ doc/lispref/display.texi 2011-06-25 18:21:00 +0000 @@ -1441,9 +1441,9 @@ Attributes}. @item -A cons cell, either of the form @code{(fg-color . @var{color-name})} -or @code{(bg-color . @var{color-name})}. These elements specify just -the foreground color or just the background color. +A cons cell, of the form @code{(foreground-color . @var{color-name})} +or @code{(background-color . @var{color-name})}. These elements +specify just the foreground color or just the background color. @code{(foreground-color . @var{color-name})} has the same effect as @code{(:foreground @var{color-name})}; likewise for the background. === modified file 'doc/lispref/keymaps.texi' --- doc/lispref/keymaps.texi 2011-05-29 22:41:06 +0000 +++ doc/lispref/keymaps.texi 2011-06-25 18:21:00 +0000 @@ -723,13 +723,13 @@ (@var{find-in} overriding-terminal-local-map)) (overriding-local-map (@var{find-in} overriding-local-map)) - (or (@var{find-in} (get-char-property (point) 'keymap)) - (@var{find-in-any} emulation-mode-map-alists) - (@var{find-in-any} minor-mode-overriding-map-alist) - (@var{find-in-any} minor-mode-map-alist) - (if (get-text-property (point) 'local-map) - (@var{find-in} (get-char-property (point) 'local-map)) - (@var{find-in} (current-local-map))))) + ((or (@var{find-in} (get-char-property (point) 'keymap)) + (@var{find-in-any} emulation-mode-map-alists) + (@var{find-in-any} minor-mode-overriding-map-alist) + (@var{find-in-any} minor-mode-map-alist) + (if (get-text-property (point) 'local-map) + (@var{find-in} (get-char-property (point) 'local-map)) + (@var{find-in} (current-local-map)))))) (@var{find-in} (current-global-map))) @end lisp === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-06-25 18:08:41 +0000 +++ lisp/ChangeLog 2011-06-25 18:21:00 +0000 @@ -1,3 +1,10 @@ +2011-06-25 Eli Zaretskii + + * net/ange-ftp.el (ange-ftp-insert-file-contents): Let-bind + buffer-file-type before setting its value, to avoid disastrous + global effects on decoding files for DOS/Windows systems. + (Bug#8780) + 2011-06-25 Juanma Barranquero * allout.el (allout-unload-function): Pass -1 to `allout-mode'. === modified file 'lisp/net/ange-ftp.el' --- lisp/net/ange-ftp.el 2011-06-09 06:07:11 +0000 +++ lisp/net/ange-ftp.el 2011-06-25 18:21:00 +0000 @@ -3278,6 +3278,7 @@ (name (ange-ftp-quote-string (nth 2 parsed))) (temp (ange-ftp-make-tmp-name host)) (binary (ange-ftp-binary-file filename)) + (buffer-file-type buffer-file-type) (abbr (ange-ftp-abbreviate-filename filename)) (coding-system-used last-coding-system-used) size) === modified file 'src/ChangeLog' --- src/ChangeLog 2011-06-24 21:25:22 +0000 +++ src/ChangeLog 2011-06-25 18:21:00 +0000 @@ -1,3 +1,8 @@ +2011-06-25 YAMAMOTO Mitsuharu + + * dispnew.c (scrolling_window): Before scrolling, turn off a + mouse-highlight in the window being scrolled. + 2011-06-24 Juanma Barranquero Move DEFSYM to lisp.h and use everywhere. === modified file 'src/dispnew.c' --- src/dispnew.c 2011-06-24 21:25:22 +0000 +++ src/dispnew.c 2011-06-25 18:21:00 +0000 @@ -4543,6 +4543,7 @@ /* Copy on the display. */ if (r->current_y != r->desired_y) { + rif->clear_window_mouse_face (w); rif->scroll_run_hook (w, r); /* Invalidate runs that copy from where we copied to. */ ------------------------------------------------------------ revno: 104706 committer: Glenn Morris branch nick: trunk timestamp: Sat 2011-06-25 11:13:14 -0700 message: Minor additions for previous emacsclient change. * lib-src/emacsclient.c (decode_options) : Add `F:'. (print_help_and_exit): Mention --frame-parameters. diff: === modified file 'lib-src/ChangeLog' --- lib-src/ChangeLog 2011-06-25 18:05:48 +0000 +++ lib-src/ChangeLog 2011-06-25 18:13:14 +0000 @@ -1,3 +1,8 @@ +2011-06-25 Glenn Morris + + * emacsclient.c (decode_options) : Add `F:'. + (print_help_and_exit): Mention --frame-parameters. + 2011-06-25 Andreas Rottmann * emacsclient.c (longopts, decode_options, main): Add frame-parameters. === modified file 'lib-src/emacsclient.c' --- lib-src/emacsclient.c 2011-06-25 18:05:48 +0000 +++ lib-src/emacsclient.c 2011-06-25 18:13:14 +0000 @@ -531,9 +531,9 @@ { int opt = getopt_long_only (argc, argv, #ifndef NO_SOCKETS_IN_FILE_SYSTEM - "VHneqa:s:f:d:tc", + "VHneqa:s:f:d:F:tc", #else - "VHneqa:f:d:tc", + "VHneqa:f:d:F:tc", #endif longopts, 0); @@ -674,6 +674,7 @@ -nw, -t, --tty Open a new Emacs frame on the current terminal\n\ -c, --create-frame Create a new frame instead of trying to\n\ use the current Emacs frame\n\ +-F, --frame-parameters Set the parameters of a new frame\n\ -e, --eval Evaluate the FILE arguments as ELisp expressions\n\ -n, --no-wait Don't wait for the server to return\n\ -q, --quiet Don't display messages on success\n\ ------------------------------------------------------------ Use --include-merges or -n0 to see merged revisions.