Now on revision 111497. ------------------------------------------------------------ revno: 111497 committer: Paul Eggert branch nick: trunk timestamp: Fri 2013-01-11 22:15:12 -0800 message: * indent.c (Fvertical_motion): Remove now-incorrect GCPROs for old_charpos and old_bytepos. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-01-12 01:15:06 +0000 +++ src/ChangeLog 2013-01-12 06:15:12 +0000 @@ -1,3 +1,8 @@ +2013-01-12 Dmitry Antipov + + * indent.c (Fvertical_motion): Remove now-incorrect GCPROs + for old_charpos and old_bytepos. + 2013-01-12 Paul Eggert Fix bug with set-time-zone-rule and LOCALTIME_CACHE (Bug#13415). === modified file 'src/indent.c' --- src/indent.c 2013-01-02 16:13:04 +0000 +++ src/indent.c 2013-01-12 06:15:12 +0000 @@ -1970,7 +1970,7 @@ struct window *w; Lisp_Object old_buffer; EMACS_INT old_charpos IF_LINT (= 0), old_bytepos IF_LINT (= 0); - struct gcpro gcpro1, gcpro2, gcpro3; + struct gcpro gcpro1; Lisp_Object lcols = Qnil; double cols IF_LINT (= 0); void *itdata = NULL; @@ -1987,7 +1987,7 @@ w = decode_live_window (window); old_buffer = Qnil; - GCPRO3 (old_buffer, old_charpos, old_bytepos); + GCPRO1 (old_buffer); if (XBUFFER (w->buffer) != current_buffer) { /* Set the window's buffer temporarily to the current buffer. */ ------------------------------------------------------------ revno: 111496 committer: Paul Eggert branch nick: trunk timestamp: Fri 2013-01-11 21:21:06 -0800 message: Enable conservative stack scanning for all architectures. Suggested by Stefan Monnier in . * configure.ac (GC_MARK_STACK): Remove. diff: === modified file 'ChangeLog' --- ChangeLog 2013-01-11 23:28:04 +0000 +++ ChangeLog 2013-01-12 05:21:06 +0000 @@ -1,3 +1,10 @@ +2013-01-12 Paul Eggert + + Enable conservative stack scanning for all architectures. + Suggested by Stefan Monnier in + . + * configure.ac (GC_MARK_STACK): Remove. + 2013-01-11 Paul Eggert * lib/getopt_.h: Remove trailing CRs that crept in. === modified file 'configure.ac' --- configure.ac 2013-01-10 03:43:02 +0000 +++ configure.ac 2013-01-12 05:21:06 +0000 @@ -3777,22 +3777,13 @@ esac -dnl These won't be used automatically yet. We also need to know, at least, +dnl This won't be used automatically yet. We also need to know, at least, dnl that the stack is continuous. AH_TEMPLATE(GC_SETJMP_WORKS, [Define if setjmp is known to save all registers relevant for conservative garbage collection in the jmp_buf.]) -AH_TEMPLATE(GC_MARK_STACK, [Define to GC_USE_GCPROS_AS_BEFORE if - conservative garbage collection is not known to work.]) - case $opsys in - aix4-2 | hpux* | unixware) - dnl Conservative garbage collection has not been tested, so for now - dnl play it safe and stick with the old-fashioned way of marking. - AC_DEFINE(GC_MARK_STACK, [GC_USE_GCPROS_AS_BEFORE]) - ;; - dnl Not all the architectures are tested, but there are Debian packages dnl for SCM and/or Guile on them, so the technique must work. See also dnl comments in alloc.c concerning setjmp and gcc. @@ -3807,8 +3798,7 @@ #else # error "setjmp not known to work on this arch" #endif - ]], [[]])], AC_DEFINE(GC_SETJMP_WORKS, 1), - AC_DEFINE(GC_MARK_STACK, [GC_USE_GCPROS_AS_BEFORE]) ) + ]], [[]])], AC_DEFINE(GC_SETJMP_WORKS, 1)) ;; esac === modified file 'src/lisp.h' --- src/lisp.h 2013-01-11 13:25:10 +0000 +++ src/lisp.h 2013-01-12 05:21:06 +0000 @@ -2217,8 +2217,12 @@ 2 Mark the stack, and check that everything GCPRO'd is marked. 3 Mark using GCPRO's, mark stack last, and count how many - dead objects are kept alive. */ + dead objects are kept alive. + Formerly, method 0 was used. Currently, method 1 is used unless + otherwise specified by hand when building, e.g., + "make CPPFLAGS='-DGC_MARK_STACK=GC_USE_GCPROS_AS_BEFORE'". + Methods 2 and 3 are present mainly to debug the transition from 0 to 1. */ #define GC_USE_GCPROS_AS_BEFORE 0 #define GC_MAKE_GCPROS_NOOPS 1 ------------------------------------------------------------ revno: 111495 committer: Stefan Monnier branch nick: trunk timestamp: Fri 2013-01-11 23:17:08 -0500 message: * lisp/autorevert.el: Use cl-lib instead of cl. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-01-12 03:15:14 +0000 +++ lisp/ChangeLog 2013-01-12 04:17:08 +0000 @@ -1,5 +1,7 @@ 2013-01-12 Stefan Monnier + * autorevert.el: Use cl-lib instead of cl. + * vc/vc-bzr.el (vc-bzr--sanitize-header): New function (bug#13307). (vc-bzr-checkin): Use it. * vc/log-edit.el (log-edit-extract-headers): Don't presume FUNCTION === modified file 'lisp/autorevert.el' --- lisp/autorevert.el 2013-01-11 22:54:42 +0000 +++ lisp/autorevert.el 2013-01-12 04:17:08 +0000 @@ -97,7 +97,7 @@ ;; Dependencies: -(eval-when-compile (require 'cl)) +(eval-when-compile (require 'cl-lib)) (require 'timer) ;; Custom Group: @@ -527,14 +527,14 @@ (ignore-errors ;; Check, that event is meant for us. ;; TODO: Filter events which stop watching, like `move' or `removed'. - (assert descriptor) - (when (featurep 'inotify) (assert (memq 'modify descriptor))) - (when (featurep 'w32notify) (assert (eq 'modified descriptor))) - (assert (bufferp buffer)) + (cl-assert descriptor) + (when (featurep 'inotify) (cl-assert (memq 'modify descriptor))) + (when (featurep 'w32notify) (cl-assert (eq 'modified descriptor))) + (cl-assert (bufferp buffer)) (when (stringp file) - (assert (string-equal - (directory-file-name file) - (directory-file-name (buffer-file-name buffer))))) + (cl-assert (string-equal + (directory-file-name file) + (directory-file-name (buffer-file-name buffer))))) ;; Mark buffer modified. (with-current-buffer buffer ------------------------------------------------------------ revno: 111494 fixes bug: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=13307 committer: Stefan Monnier branch nick: trunk timestamp: Fri 2013-01-11 22:15:14 -0500 message: * lisp/vc/vc-bzr.el (vc-bzr--sanitize-header): New function. (vc-bzr-checkin): Use it. * lisp/vc/log-edit.el (log-edit-extract-headers): Don't presume FUNCTION will preserve match-data. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-01-11 23:24:52 +0000 +++ lisp/ChangeLog 2013-01-12 03:15:14 +0000 @@ -1,3 +1,10 @@ +2013-01-12 Stefan Monnier + + * vc/vc-bzr.el (vc-bzr--sanitize-header): New function (bug#13307). + (vc-bzr-checkin): Use it. + * vc/log-edit.el (log-edit-extract-headers): Don't presume FUNCTION + will preserve match-data. + 2013-01-11 Felix H. Dahlke * progmodes/js.el: Fix multiline declarations's indentation (bug#8576). === modified file 'lisp/vc/log-edit.el' --- lisp/vc/log-edit.el 2013-01-01 09:11:05 +0000 +++ lisp/vc/log-edit.el 2013-01-12 03:15:14 +0000 @@ -953,13 +953,14 @@ (while (re-search-forward (concat "^" (car header) ":" log-edit-header-contents-regexp) nil t) - (if (eq t (cdr header)) - (setq summary (match-string 1)) - (if (functionp (cdr header)) - (setq res (nconc res (funcall (cdr header) (match-string 1)))) - (push (match-string 1) res) - (push (or (cdr header) (car header)) res))) - (replace-match "" t t))) + (let ((txt (match-string 1))) + (replace-match "" t t) + (if (eq t (cdr header)) + (setq summary txt) + (if (functionp (cdr header)) + (setq res (nconc res (funcall (cdr header) txt))) + (push txt res) + (push (or (cdr header) (car header)) res)))))) ;; Remove header separator if the header is empty. (widen) (goto-char (point-min)) === modified file 'lisp/vc/vc-bzr.el' --- lisp/vc/vc-bzr.el 2013-01-01 09:11:05 +0000 +++ lisp/vc/vc-bzr.el 2013-01-12 03:15:14 +0000 @@ -620,15 +620,24 @@ (declare-function log-edit-extract-headers "log-edit" (headers string)) +(defun vc-bzr--sanitize-header (arg) + ;; Newlines in --fixes (and probably other fields as well) trigger a nasty + ;; Bazaar bug; see https://bugs.launchpad.net/bzr/+bug/1094180. + (lambda (str) (list arg + (replace-regexp-in-string "\\`[ \t]+\\|[ \t]+\\'" + "" (replace-regexp-in-string + "\n[ \t]?" " " str))))) + (defun vc-bzr-checkin (files rev comment) "Check FILES in to bzr with log message COMMENT. REV non-nil gets an error." (if rev (error "Can't check in a specific revision with bzr")) - (apply 'vc-bzr-command "commit" nil 0 - files (cons "-m" (log-edit-extract-headers '(("Author" . "--author") - ("Date" . "--commit-time") - ("Fixes" . "--fixes")) - comment)))) + (apply 'vc-bzr-command "commit" nil 0 files + (cons "-m" (log-edit-extract-headers + `(("Author" . ,(vc-bzr--sanitize-header "--author")) + ("Date" . ,(vc-bzr--sanitize-header "--commit-time")) + ("Fixes" . ,(vc-bzr--sanitize-header "--fixes"))) + comment)))) (defun vc-bzr-find-revision (file rev buffer) "Fetch revision REV of file FILE and put it into BUFFER." ------------------------------------------------------------ revno: 111493 committer: Paul Eggert branch nick: trunk timestamp: Fri 2013-01-11 17:47:07 -0800 message: Remove obsolete comment about NON_SAVING_SETJMP. diff: === modified file 'src/alloc.c' --- src/alloc.c 2013-01-02 16:13:04 +0000 +++ src/alloc.c 2013-01-12 01:47:07 +0000 @@ -4446,11 +4446,6 @@ } } -/* setjmp will work with GCC unless NON_SAVING_SETJMP is defined in - the GCC system configuration. In gcc 3.2, the only systems for - which this is so are i386-sco5 non-ELF, i386-sysv3 (maybe included - by others?) and ns32k-pc532-min. */ - #if !defined GC_SAVE_REGISTERS_ON_STACK && !defined GC_SETJMP_WORKS static bool setjmp_tested_p; ------------------------------------------------------------ revno: 111492 fixes bug: http://debbugs.gnu.org/13415 committer: Paul Eggert branch nick: trunk timestamp: Fri 2013-01-11 17:15:06 -0800 message: Fix bug with set-time-zone-rule and LOCALTIME_CACHE. * editfns.c (set_time_zone_rule) [LOCALTIME_CACHE]: Clear tzvalbuf_in_environ if this workaround is in effect. Problem and fix reported by Kazuhiro Ito. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-01-11 23:08:55 +0000 +++ src/ChangeLog 2013-01-12 01:15:06 +0000 @@ -1,3 +1,10 @@ +2013-01-12 Paul Eggert + + Fix bug with set-time-zone-rule and LOCALTIME_CACHE (Bug#13415). + * editfns.c (set_time_zone_rule) [LOCALTIME_CACHE]: + Clear tzvalbuf_in_environ if this workaround is in effect. + Problem and fix reported by Kazuhiro Ito. + 2013-01-11 Aaron S. Hawley * insdel.c (Fcombine_after_change_execute, syms_of_insdel): Fix === modified file 'src/editfns.c' --- src/editfns.c 2013-01-11 13:25:10 +0000 +++ src/editfns.c 2013-01-12 01:15:06 +0000 @@ -2188,6 +2188,7 @@ xputenv (set_time_zone_rule_tz[1]); } tzset (); + tzvalbuf_in_environ = 0; #endif if (!tzstring) ------------------------------------------------------------ revno: 111491 committer: Paul Eggert branch nick: trunk timestamp: Fri 2013-01-11 15:28:04 -0800 message: * lib/getopt_.h: Remove trailing CRs that crept in. diff: === modified file 'ChangeLog' --- ChangeLog 2013-01-11 09:20:41 +0000 +++ ChangeLog 2013-01-11 23:28:04 +0000 @@ -1,3 +1,7 @@ +2013-01-11 Paul Eggert + + * lib/getopt_.h: Remove trailing CRs that crept in. + 2013-01-11 Eli Zaretskii * lib/getopt_.h: Regenerate. === modified file 'lib/getopt_.h' --- lib/getopt_.h 2013-01-11 09:20:41 +0000 +++ lib/getopt_.h 2013-01-11 23:28:04 +0000 @@ -1,285 +1,285 @@ -/* Declarations for getopt. - Copyright (C) 1989-1994, 1996-1999, 2001, 2003-2007, 2009-2013 Free Software - Foundation, Inc. - This file is part of the GNU C Library. - - 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 . */ - -#ifndef _GL_GETOPT_H - -#if __GNUC__ >= 3 -#pragma GCC system_header -#endif - - -/* The include_next requires a split double-inclusion guard. We must - also inform the replacement unistd.h to not recursively use - ; our definitions will be present soon enough. */ -#if HAVE_GETOPT_H -# define _GL_SYSTEM_GETOPT -# ifndef __GNUC__ -# include -# else -# include_next -# endif -# undef _GL_SYSTEM_GETOPT -#endif - -#ifndef _GL_GETOPT_H - -#ifndef __need_getopt -# define _GL_GETOPT_H 1 -#endif - -/* Standalone applications should #define __GETOPT_PREFIX to an - identifier that prefixes the external functions and variables - defined in this header. When this happens, include the - headers that might declare getopt so that they will not cause - confusion if included after this file (if the system had , - we have already included it). Then systematically rename - identifiers so that they do not collide with the system functions - and variables. Renaming avoids problems with some compilers and - linkers. */ -#if defined __GETOPT_PREFIX && !defined __need_getopt -# if !HAVE_GETOPT_H -# define __need_system_stdlib_h -# include -# undef __need_system_stdlib_h -# include -# include -# endif -# undef __need_getopt -# undef getopt -# undef getopt_long -# undef getopt_long_only -# undef optarg -# undef opterr -# undef optind -# undef optopt -# undef option -# define __GETOPT_CONCAT(x, y) x ## y -# define __GETOPT_XCONCAT(x, y) __GETOPT_CONCAT (x, y) -# define __GETOPT_ID(y) __GETOPT_XCONCAT (__GETOPT_PREFIX, y) -# define getopt __GETOPT_ID (getopt) -# define getopt_long __GETOPT_ID (getopt_long) -# define getopt_long_only __GETOPT_ID (getopt_long_only) -# define optarg __GETOPT_ID (optarg) -# define opterr __GETOPT_ID (opterr) -# define optind __GETOPT_ID (optind) -# define optopt __GETOPT_ID (optopt) -# define option __GETOPT_ID (option) -# define _getopt_internal __GETOPT_ID (getopt_internal) -#endif - -/* Standalone applications get correct prototypes for getopt_long and - getopt_long_only; they declare "char **argv". libc uses prototypes - with "char *const *argv" that are incorrect because getopt_long and - getopt_long_only can permute argv; this is required for backward - compatibility (e.g., for LSB 2.0.1). - - This used to be '#if defined __GETOPT_PREFIX && !defined __need_getopt', - but it caused redefinition warnings if both unistd.h and getopt.h were - included, since unistd.h includes getopt.h having previously defined - __need_getopt. - - The only place where __getopt_argv_const is used is in definitions - of getopt_long and getopt_long_only below, but these are visible - only if __need_getopt is not defined, so it is quite safe to rewrite - the conditional as follows: -*/ -#if !defined __need_getopt -# if defined __GETOPT_PREFIX -# define __getopt_argv_const /* empty */ -# else -# define __getopt_argv_const const -# endif -#endif - -/* If __GNU_LIBRARY__ is not already defined, either we are being used - standalone, or this is the first header included in the source file. - If we are being used with glibc, we need to include , but - that does not exist if we are standalone. So: if __GNU_LIBRARY__ is - not defined, include , which will pull in for us - if it's from glibc. (Why ctype.h? It's guaranteed to exist and it - doesn't flood the namespace with stuff the way some other headers do.) */ -#if !defined __GNU_LIBRARY__ -# include -#endif - -#ifndef __THROW -# ifndef __GNUC_PREREQ -# define __GNUC_PREREQ(maj, min) (0) -# endif -# if defined __cplusplus && __GNUC_PREREQ (2,8) -# define __THROW throw () -# else -# define __THROW -# endif -#endif - -/* The definition of _GL_ARG_NONNULL is copied here. */ -/* A C macro for declaring that specific arguments must not be NULL. - Copyright (C) 2009-2013 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 . */ - -/* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools - that the values passed as arguments n, ..., m must be non-NULL pointers. - n = 1 stands for the first argument, n = 2 for the second argument etc. */ -#ifndef _GL_ARG_NONNULL -# if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3 -# define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) -# else -# define _GL_ARG_NONNULL(params) -# endif -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -/* For communication from 'getopt' to the caller. - When 'getopt' finds an option that takes an argument, - the argument value is returned here. - Also, when 'ordering' is RETURN_IN_ORDER, - each non-option ARGV-element is returned here. */ - -extern char *optarg; - -/* Index in ARGV of the next element to be scanned. - This is used for communication to and from the caller - and for communication between successive calls to 'getopt'. - - On entry to 'getopt', zero means this is the first call; initialize. - - When 'getopt' returns -1, this is the index of the first of the - non-option elements that the caller should itself scan. - - Otherwise, 'optind' communicates from one call to the next - how much of ARGV has been scanned so far. */ - -extern int optind; - -/* Callers store zero here to inhibit the error message 'getopt' prints - for unrecognized options. */ - -extern int opterr; - -/* Set to an option character which was unrecognized. */ - -extern int optopt; - -#ifndef __need_getopt -/* Describe the long-named options requested by the application. - The LONG_OPTIONS argument to getopt_long or getopt_long_only is a vector - of 'struct option' terminated by an element containing a name which is - zero. - - The field 'has_arg' is: - no_argument (or 0) if the option does not take an argument, - required_argument (or 1) if the option requires an argument, - optional_argument (or 2) if the option takes an optional argument. - - If the field 'flag' is not NULL, it points to a variable that is set - to the value given in the field 'val' when the option is found, but - left unchanged if the option is not found. - - To have a long-named option do something other than set an 'int' to - a compiled-in constant, such as set a value from 'optarg', set the - option's 'flag' field to zero and its 'val' field to a nonzero - value (the equivalent single-letter option character, if there is - one). For long options that have a zero 'flag' field, 'getopt' - returns the contents of the 'val' field. */ - -# if !GNULIB_defined_struct_option -struct option -{ - const char *name; - /* has_arg can't be an enum because some compilers complain about - type mismatches in all the code that assumes it is an int. */ - int has_arg; - int *flag; - int val; -}; -# define GNULIB_defined_struct_option 1 -# endif - -/* Names for the values of the 'has_arg' field of 'struct option'. */ - -# define no_argument 0 -# define required_argument 1 -# define optional_argument 2 -#endif /* need getopt */ - - -/* Get definitions and prototypes for functions to process the - arguments in ARGV (ARGC of them, minus the program name) for - options given in OPTS. - - Return the option character from OPTS just read. Return -1 when - there are no more options. For unrecognized options, or options - missing arguments, 'optopt' is set to the option letter, and '?' is - returned. - - The OPTS string is a list of characters which are recognized option - letters, optionally followed by colons, specifying that that letter - takes an argument, to be placed in 'optarg'. - - If a letter in OPTS is followed by two colons, its argument is - optional. This behavior is specific to the GNU 'getopt'. - - The argument '--' causes premature termination of argument - scanning, explicitly telling 'getopt' that there are no more - options. - - If OPTS begins with '-', then non-option arguments are treated as - arguments to the option '\1'. This behavior is specific to the GNU - 'getopt'. If OPTS begins with '+', or POSIXLY_CORRECT is set in - the environment, then do not permute arguments. */ - -extern int getopt (int ___argc, char *const *___argv, const char *__shortopts) - __THROW _GL_ARG_NONNULL ((2, 3)); - -#ifndef __need_getopt -extern int getopt_long (int ___argc, char *__getopt_argv_const *___argv, - const char *__shortopts, - const struct option *__longopts, int *__longind) - __THROW _GL_ARG_NONNULL ((2, 3)); -extern int getopt_long_only (int ___argc, char *__getopt_argv_const *___argv, - const char *__shortopts, - const struct option *__longopts, int *__longind) - __THROW _GL_ARG_NONNULL ((2, 3)); - -#endif - -#ifdef __cplusplus -} -#endif - -/* Make sure we later can get all the definitions and declarations. */ -#undef __need_getopt - -#endif /* _GL_GETOPT_H */ -#endif /* _GL_GETOPT_H */ +/* Declarations for getopt. + Copyright (C) 1989-1994, 1996-1999, 2001, 2003-2007, 2009-2013 Free Software + Foundation, Inc. + This file is part of the GNU C Library. + + 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 . */ + +#ifndef _GL_GETOPT_H + +#if __GNUC__ >= 3 +#pragma GCC system_header +#endif + + +/* The include_next requires a split double-inclusion guard. We must + also inform the replacement unistd.h to not recursively use + ; our definitions will be present soon enough. */ +#if HAVE_GETOPT_H +# define _GL_SYSTEM_GETOPT +# ifndef __GNUC__ +# include +# else +# include_next +# endif +# undef _GL_SYSTEM_GETOPT +#endif + +#ifndef _GL_GETOPT_H + +#ifndef __need_getopt +# define _GL_GETOPT_H 1 +#endif + +/* Standalone applications should #define __GETOPT_PREFIX to an + identifier that prefixes the external functions and variables + defined in this header. When this happens, include the + headers that might declare getopt so that they will not cause + confusion if included after this file (if the system had , + we have already included it). Then systematically rename + identifiers so that they do not collide with the system functions + and variables. Renaming avoids problems with some compilers and + linkers. */ +#if defined __GETOPT_PREFIX && !defined __need_getopt +# if !HAVE_GETOPT_H +# define __need_system_stdlib_h +# include +# undef __need_system_stdlib_h +# include +# include +# endif +# undef __need_getopt +# undef getopt +# undef getopt_long +# undef getopt_long_only +# undef optarg +# undef opterr +# undef optind +# undef optopt +# undef option +# define __GETOPT_CONCAT(x, y) x ## y +# define __GETOPT_XCONCAT(x, y) __GETOPT_CONCAT (x, y) +# define __GETOPT_ID(y) __GETOPT_XCONCAT (__GETOPT_PREFIX, y) +# define getopt __GETOPT_ID (getopt) +# define getopt_long __GETOPT_ID (getopt_long) +# define getopt_long_only __GETOPT_ID (getopt_long_only) +# define optarg __GETOPT_ID (optarg) +# define opterr __GETOPT_ID (opterr) +# define optind __GETOPT_ID (optind) +# define optopt __GETOPT_ID (optopt) +# define option __GETOPT_ID (option) +# define _getopt_internal __GETOPT_ID (getopt_internal) +#endif + +/* Standalone applications get correct prototypes for getopt_long and + getopt_long_only; they declare "char **argv". libc uses prototypes + with "char *const *argv" that are incorrect because getopt_long and + getopt_long_only can permute argv; this is required for backward + compatibility (e.g., for LSB 2.0.1). + + This used to be '#if defined __GETOPT_PREFIX && !defined __need_getopt', + but it caused redefinition warnings if both unistd.h and getopt.h were + included, since unistd.h includes getopt.h having previously defined + __need_getopt. + + The only place where __getopt_argv_const is used is in definitions + of getopt_long and getopt_long_only below, but these are visible + only if __need_getopt is not defined, so it is quite safe to rewrite + the conditional as follows: +*/ +#if !defined __need_getopt +# if defined __GETOPT_PREFIX +# define __getopt_argv_const /* empty */ +# else +# define __getopt_argv_const const +# endif +#endif + +/* If __GNU_LIBRARY__ is not already defined, either we are being used + standalone, or this is the first header included in the source file. + If we are being used with glibc, we need to include , but + that does not exist if we are standalone. So: if __GNU_LIBRARY__ is + not defined, include , which will pull in for us + if it's from glibc. (Why ctype.h? It's guaranteed to exist and it + doesn't flood the namespace with stuff the way some other headers do.) */ +#if !defined __GNU_LIBRARY__ +# include +#endif + +#ifndef __THROW +# ifndef __GNUC_PREREQ +# define __GNUC_PREREQ(maj, min) (0) +# endif +# if defined __cplusplus && __GNUC_PREREQ (2,8) +# define __THROW throw () +# else +# define __THROW +# endif +#endif + +/* The definition of _GL_ARG_NONNULL is copied here. */ +/* A C macro for declaring that specific arguments must not be NULL. + Copyright (C) 2009-2013 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 . */ + +/* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools + that the values passed as arguments n, ..., m must be non-NULL pointers. + n = 1 stands for the first argument, n = 2 for the second argument etc. */ +#ifndef _GL_ARG_NONNULL +# if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3 +# define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) +# else +# define _GL_ARG_NONNULL(params) +# endif +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +/* For communication from 'getopt' to the caller. + When 'getopt' finds an option that takes an argument, + the argument value is returned here. + Also, when 'ordering' is RETURN_IN_ORDER, + each non-option ARGV-element is returned here. */ + +extern char *optarg; + +/* Index in ARGV of the next element to be scanned. + This is used for communication to and from the caller + and for communication between successive calls to 'getopt'. + + On entry to 'getopt', zero means this is the first call; initialize. + + When 'getopt' returns -1, this is the index of the first of the + non-option elements that the caller should itself scan. + + Otherwise, 'optind' communicates from one call to the next + how much of ARGV has been scanned so far. */ + +extern int optind; + +/* Callers store zero here to inhibit the error message 'getopt' prints + for unrecognized options. */ + +extern int opterr; + +/* Set to an option character which was unrecognized. */ + +extern int optopt; + +#ifndef __need_getopt +/* Describe the long-named options requested by the application. + The LONG_OPTIONS argument to getopt_long or getopt_long_only is a vector + of 'struct option' terminated by an element containing a name which is + zero. + + The field 'has_arg' is: + no_argument (or 0) if the option does not take an argument, + required_argument (or 1) if the option requires an argument, + optional_argument (or 2) if the option takes an optional argument. + + If the field 'flag' is not NULL, it points to a variable that is set + to the value given in the field 'val' when the option is found, but + left unchanged if the option is not found. + + To have a long-named option do something other than set an 'int' to + a compiled-in constant, such as set a value from 'optarg', set the + option's 'flag' field to zero and its 'val' field to a nonzero + value (the equivalent single-letter option character, if there is + one). For long options that have a zero 'flag' field, 'getopt' + returns the contents of the 'val' field. */ + +# if !GNULIB_defined_struct_option +struct option +{ + const char *name; + /* has_arg can't be an enum because some compilers complain about + type mismatches in all the code that assumes it is an int. */ + int has_arg; + int *flag; + int val; +}; +# define GNULIB_defined_struct_option 1 +# endif + +/* Names for the values of the 'has_arg' field of 'struct option'. */ + +# define no_argument 0 +# define required_argument 1 +# define optional_argument 2 +#endif /* need getopt */ + + +/* Get definitions and prototypes for functions to process the + arguments in ARGV (ARGC of them, minus the program name) for + options given in OPTS. + + Return the option character from OPTS just read. Return -1 when + there are no more options. For unrecognized options, or options + missing arguments, 'optopt' is set to the option letter, and '?' is + returned. + + The OPTS string is a list of characters which are recognized option + letters, optionally followed by colons, specifying that that letter + takes an argument, to be placed in 'optarg'. + + If a letter in OPTS is followed by two colons, its argument is + optional. This behavior is specific to the GNU 'getopt'. + + The argument '--' causes premature termination of argument + scanning, explicitly telling 'getopt' that there are no more + options. + + If OPTS begins with '-', then non-option arguments are treated as + arguments to the option '\1'. This behavior is specific to the GNU + 'getopt'. If OPTS begins with '+', or POSIXLY_CORRECT is set in + the environment, then do not permute arguments. */ + +extern int getopt (int ___argc, char *const *___argv, const char *__shortopts) + __THROW _GL_ARG_NONNULL ((2, 3)); + +#ifndef __need_getopt +extern int getopt_long (int ___argc, char *__getopt_argv_const *___argv, + const char *__shortopts, + const struct option *__longopts, int *__longind) + __THROW _GL_ARG_NONNULL ((2, 3)); +extern int getopt_long_only (int ___argc, char *__getopt_argv_const *___argv, + const char *__shortopts, + const struct option *__longopts, int *__longind) + __THROW _GL_ARG_NONNULL ((2, 3)); + +#endif + +#ifdef __cplusplus +} +#endif + +/* Make sure we later can get all the definitions and declarations. */ +#undef __need_getopt + +#endif /* _GL_GETOPT_H */ +#endif /* _GL_GETOPT_H */ ------------------------------------------------------------ revno: 111490 fixes bug: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=8576 author: Felix H. Dahlke committer: Stefan Monnier branch nick: trunk timestamp: Fri 2013-01-11 18:24:52 -0500 message: * lisp/progmodes/js.el: Fix multiline declarations's indentation. (js--declaration-keyword-re): New var. (js--multi-line-declaration-indentation): New function. (js--proper-indentation): Use it. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-01-11 23:08:55 +0000 +++ lisp/ChangeLog 2013-01-11 23:24:52 +0000 @@ -1,102 +1,63 @@ +2013-01-11 Felix H. Dahlke + + * progmodes/js.el: Fix multiline declarations's indentation (bug#8576). + (js--declaration-keyword-re): New var. + (js--multi-line-declaration-indentation): New function. + (js--proper-indentation): Use it. + 2013-01-11 Aaron S. Hawley * calc/calc.el (calc-highlight-selections-with-faces) - (calc-dispatch): Fix ambiguous doc string cross-reference(s). - - * comint.el (comint-history-isearch-message): Fix ambiguous doc - string cross-reference(s). - - * emacs-lisp/edebug.el (edebug-read, edebug-eval-defun): Fix - ambiguous doc string cross-reference(s). - + (calc-dispatch): + * comint.el (comint-history-isearch-message): + * emacs-lisp/edebug.el (edebug-read, edebug-eval-defun): * ffap.el (ffap-string-at-point-region, ffap-next) (ffap-string-at-point, ffap-string-around) (ffap-copy-string-as-kill, ffap-highlight-overlay) - (ffap-literally): Fix ambiguous doc string cross-reference(s). - + (ffap-literally): * font-lock.el (font-lock-keywords-alist) - (font-lock-removed-keywords-alist): Fix ambiguous doc string - cross-reference(s). - - * help-mode.el (help-xref-symbol-regexp): Add "call" as a hint for - a cross-reference to a function. - - * info.el (Info-find-emacs-command-nodes): Fix ambiguous doc - string cross-reference(s). - - * international/mule.el (add-to-coding-system-list): Fix ambiguous - doc string cross-reference(s). - - * isearch.el (isearch-message-function, isearch-fail-pos): Fix - ambiguous doc string cross-reference(s). - - * misearch.el (multi-isearch-next-buffer-function): Fix ambiguous - doc string cross-reference(s). - - * newcomment.el (comment-box): Fix ambiguous doc string - cross-reference(s). - + (font-lock-removed-keywords-alist): + * help-mode.el (help-xref-symbol-regexp): + * info.el (Info-find-emacs-command-nodes): + * international/mule.el (add-to-coding-system-list): + * isearch.el (isearch-message-function, isearch-fail-pos): + * misearch.el (multi-isearch-next-buffer-function): + * newcomment.el (comment-box): * printing.el (pr-txt-printer-alist, pr-ps-printer-alist) - (pr-setting-database): Fix ambiguous doc string - cross-reference(s). - + (pr-setting-database): * progmodes/cc-fonts.el (c-font-lock-keywords-3) (c++-font-lock-keywords-3, objc-font-lock-keywords-3) (java-font-lock-keywords-3, idl-font-lock-keywords-3) - (pike-font-lock-keywords-3): Fix ambiguous doc string - cross-reference(s). - - * progmodes/compile.el (compile): Fix ambiguous doc string - cross-reference(s). - + (pike-font-lock-keywords-3): + * progmodes/compile.el (compile): * progmodes/etags.el (tags-table-files) - (tags-table-files-function, tags-included-tables-function): Fix - ambiguous doc string cross-reference(s). - + (tags-table-files-function, tags-included-tables-function): * progmodes/gdb-mi.el (gdb, gdb-setup-windows) - (gdb-restore-windows): Fix ambiguous doc string - cross-reference(s). - + (gdb-restore-windows): * ps-print.el (ps-even-or-odd-pages, ps-spool-buffer-with-faces) - (ps-n-up-filling-database): Fix ambiguous doc string - cross-reference(s). - - * server.el (server-buffer, server-log): Fix ambiguous doc string - cross-reference(s). - + (ps-n-up-filling-database): + * server.el (server-buffer, server-log): * simple.el (newline, delete-backward-char, delete-forward-char) (minibuffer-history-isearch-message, kill-line, track-eol) - (temporary-goal-column): Fix ambiguous doc string - cross-reference(s). - + (temporary-goal-column): * textmodes/flyspell.el (flyspell-mark-duplications-flag) - (flyspell-default-deplacement-commands): Fix ambiguous doc string - cross-reference(s). - - * textmodes/ispell.el (ispell-accept-output): Fix ambiguous doc - string cross-reference(s). - - * textmodes/sgml-mode.el (html-tag-help): Fix ambiguous doc string - cross-reference(s). - + (flyspell-default-deplacement-commands): + * textmodes/ispell.el (ispell-accept-output): + * textmodes/sgml-mode.el (html-tag-help): * vc/compare-w.el (compare-ignore-whitespace) - (compare-ignore-case, compare-windows-dehighlight): Fix ambiguous - doc string cross-reference(s). - - * vc/diff.el (diff): Fix ambiguous doc string cross-reference(s). - + (compare-ignore-case, compare-windows-dehighlight): + * vc/diff.el (diff): * whitespace.el (whitespace-point) (whitespace-font-lock-refontify, whitespace-bob-marker) - (whitespace-eob-marker): Fix ambiguous doc string - cross-reference(s). + (whitespace-eob-marker): Fix ambiguous doc string cross-reference(s). 2013-01-11 Michael Albinus * autorevert.el (top): Require 'cl in order to pacify byte compiler. (auto-revert-notify-rm-watch): Ignore errors. (auto-revert-notify-add-watch): Ignore errors. Use '(modify) for - inotify, and '(size last-write-time) for w32notify. Set - buffer-local `auto-revert-use-notify' to nil when adding a file + inotify, and '(size last-write-time) for w32notify. + Set buffer-local `auto-revert-use-notify' to nil when adding a file watch fails - this is a fallback to the file modification check. (auto-revert-notify-event-p, auto-revert-notify-event-descriptor) (auto-revert-notify-event-action) === modified file 'lisp/progmodes/js.el' --- lisp/progmodes/js.el 2013-01-02 16:13:04 +0000 +++ lisp/progmodes/js.el 2013-01-11 23:24:52 +0000 @@ -1680,12 +1680,15 @@ "each")) "Regexp matching keywords optionally followed by an opening brace.") +(defconst js--declaration-keyword-re + (regexp-opt '("var" "let" "const") 'words) + "Regular expression matching variable declaration keywords.") + (defconst js--indent-operator-re (concat "[-+*/%<>=&^|?:.]\\([^-+*/]\\|$\\)\\|" (js--regexp-opt-symbol '("in" "instanceof"))) "Regexp matching operators that affect indentation of continued expressions.") - (defun js--looking-at-operator-p () "Return non-nil if point is on a JavaScript operator, other than a comma." (save-match-data @@ -1764,6 +1767,37 @@ (list (cons 'c js-comment-lineup-func)))) (c-get-syntactic-indentation (list (cons symbol anchor))))) +(defun js--multi-line-declaration-indentation () + "Helper function for `js--proper-indentation'. +Return the proper indentation of the current line if it belongs to a declaration +statement spanning multiple lines; otherwise, return nil." + (let (at-opening-bracket) + (save-excursion + (back-to-indentation) + (when (not (looking-at js--declaration-keyword-re)) + (when (looking-at js--indent-operator-re) + (goto-char (match-end 0))) + (while (and (not at-opening-bracket) + (not (bobp)) + (let ((pos (point))) + (save-excursion + (js--backward-syntactic-ws) + (or (eq (char-before) ?,) + (and (not (eq (char-before) ?\;)) + (prog2 + (skip-chars-backward "[[:punct:]]") + (looking-at js--indent-operator-re) + (js--backward-syntactic-ws)) + (not (eq (char-before) ?\;))) + (and (>= pos (point-at-bol)) + (<= pos (point-at-eol))))))) + (condition-case err + (backward-sexp) + (scan-error (setq at-opening-bracket t)))) + (when (looking-at js--declaration-keyword-re) + (goto-char (match-end 0)) + (1+ (current-column))))))) + (defun js--proper-indentation (parse-status) "Return the proper indentation for the current line." (save-excursion @@ -1772,6 +1806,7 @@ (js--get-c-offset 'c (nth 8 parse-status))) ((nth 8 parse-status) 0) ; inside string ((js--ctrl-statement-indentation)) + ((js--multi-line-declaration-indentation)) ((eq (char-after) ?#) 0) ((save-excursion (js--beginning-of-macro)) 4) ((nth 1 parse-status) ------------------------------------------------------------ revno: 111489 fixes bug: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=12686 author: Aaron S. Hawley committer: Stefan Monnier branch nick: trunk timestamp: Fri 2013-01-11 18:08:55 -0500 message: Disambiguate function and variable references in docstrings. * lisp/comint.el (comint-history-isearch-message): Fix ambiguous doc string cross-reference(s). * lisp/ffap.el (ffap-string-at-point-region, ffap-next) (ffap-string-at-point, ffap-string-around) (ffap-copy-string-as-kill, ffap-highlight-overlay) (ffap-literally): Fix ambiguous doc string cross-reference(s). * lisp/font-lock.el (font-lock-keywords-alist) (font-lock-removed-keywords-alist): Fix ambiguous doc string cross-reference(s). * lisp/help-mode.el (help-xref-symbol-regexp): Add "call" as a hint for a cross-reference to a function. * lisp/info.el (Info-find-emacs-command-nodes): Fix ambiguous doc string cross-reference(s). * lisp/isearch.el (isearch-message-function, isearch-fail-pos): Fix ambiguous doc string cross-reference(s). * lisp/misearch.el (multi-isearch-next-buffer-function): Fix ambiguous doc string cross-reference(s). * lisp/newcomment.el (comment-box): Fix ambiguous doc string cross-reference(s). * lisp/printing.el (pr-txt-printer-alist, pr-ps-printer-alist) (pr-setting-database): Fix ambiguous doc string cross-reference(s). * lisp/ps-print.el (ps-even-or-odd-pages, ps-spool-buffer-with-faces) (ps-n-up-filling-database): Fix ambiguous doc string cross-reference(s). * lisp/server.el (server-buffer, server-log): Fix ambiguous doc string cross-reference(s). * lisp/simple.el (newline, delete-backward-char, delete-forward-char) (minibuffer-history-isearch-message, kill-line, track-eol) (temporary-goal-column): Fix ambiguous doc string cross-reference(s). * lisp/whitespace.el (whitespace-point) (whitespace-font-lock-refontify, whitespace-bob-marker) (whitespace-eob-marker): Fix ambiguous doc string cross-reference(s). * lisp/calc/calc.el (calc-highlight-selections-with-faces) (calc-dispatch): Fix ambiguous doc string cross-reference(s). * lisp/emacs-lisp/edebug.el (edebug-read, edebug-eval-defun): Fix ambiguous doc string cross-reference(s). * lisp/gnus/gnus-start.el (gnus-check-new-newsgroups): Fix ambiguous doc string cross-reference(s). * lisp/gnus/gnus-sum.el (gnus-summary-newsgroup-prefix): Fix ambiguous doc string cross-reference(s). * lisp/international/mule.el (add-to-coding-system-list): Fix ambiguous doc string cross-reference(s). * lisp/progmodes/cc-fonts.el (c-font-lock-keywords-3) (c++-font-lock-keywords-3, objc-font-lock-keywords-3) (java-font-lock-keywords-3, idl-font-lock-keywords-3) (pike-font-lock-keywords-3): Fix ambiguous doc string cross-reference(s). * lisp/progmodes/compile.el (compile): Fix ambiguous doc string cross-reference(s). * lisp/progmodes/etags.el (tags-table-files) (tags-table-files-function, tags-included-tables-function): Fix ambiguous doc string cross-reference(s). * lisp/progmodes/gdb-mi.el (gdb, gdb-setup-windows) (gdb-restore-windows): Fix ambiguous doc string cross-reference(s). * lisp/textmodes/flyspell.el (flyspell-mark-duplications-flag) (flyspell-default-deplacement-commands): Fix ambiguous doc string cross-reference(s). * lisp/textmodes/ispell.el (ispell-accept-output): Fix ambiguous doc string cross-reference(s). * lisp/textmodes/sgml-mode.el (html-tag-help): Fix ambiguous doc string cross-reference(s). * lisp/vc/compare-w.el (compare-ignore-whitespace) (compare-ignore-case, compare-windows-dehighlight): Fix ambiguous doc string cross-reference(s). * lisp/vc/diff.el (diff): Fix ambiguous doc string cross-reference(s). * src/insdel.c (Fcombine_after_change_execute, syms_of_insdel): Fix ambiguous doc string cross-reference(s). * src/keyboard.c (Fcommand_execute, syms_of_keyboard): Fix ambiguous doc string cross-reference(s). * src/window.c (Fwindow_point, syms_of_window): Fix ambiguous doc string cross-reference(s). diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-01-11 22:36:32 +0000 +++ lisp/ChangeLog 2013-01-11 23:08:55 +0000 @@ -1,3 +1,95 @@ +2013-01-11 Aaron S. Hawley + + * calc/calc.el (calc-highlight-selections-with-faces) + (calc-dispatch): Fix ambiguous doc string cross-reference(s). + + * comint.el (comint-history-isearch-message): Fix ambiguous doc + string cross-reference(s). + + * emacs-lisp/edebug.el (edebug-read, edebug-eval-defun): Fix + ambiguous doc string cross-reference(s). + + * ffap.el (ffap-string-at-point-region, ffap-next) + (ffap-string-at-point, ffap-string-around) + (ffap-copy-string-as-kill, ffap-highlight-overlay) + (ffap-literally): Fix ambiguous doc string cross-reference(s). + + * font-lock.el (font-lock-keywords-alist) + (font-lock-removed-keywords-alist): Fix ambiguous doc string + cross-reference(s). + + * help-mode.el (help-xref-symbol-regexp): Add "call" as a hint for + a cross-reference to a function. + + * info.el (Info-find-emacs-command-nodes): Fix ambiguous doc + string cross-reference(s). + + * international/mule.el (add-to-coding-system-list): Fix ambiguous + doc string cross-reference(s). + + * isearch.el (isearch-message-function, isearch-fail-pos): Fix + ambiguous doc string cross-reference(s). + + * misearch.el (multi-isearch-next-buffer-function): Fix ambiguous + doc string cross-reference(s). + + * newcomment.el (comment-box): Fix ambiguous doc string + cross-reference(s). + + * printing.el (pr-txt-printer-alist, pr-ps-printer-alist) + (pr-setting-database): Fix ambiguous doc string + cross-reference(s). + + * progmodes/cc-fonts.el (c-font-lock-keywords-3) + (c++-font-lock-keywords-3, objc-font-lock-keywords-3) + (java-font-lock-keywords-3, idl-font-lock-keywords-3) + (pike-font-lock-keywords-3): Fix ambiguous doc string + cross-reference(s). + + * progmodes/compile.el (compile): Fix ambiguous doc string + cross-reference(s). + + * progmodes/etags.el (tags-table-files) + (tags-table-files-function, tags-included-tables-function): Fix + ambiguous doc string cross-reference(s). + + * progmodes/gdb-mi.el (gdb, gdb-setup-windows) + (gdb-restore-windows): Fix ambiguous doc string + cross-reference(s). + + * ps-print.el (ps-even-or-odd-pages, ps-spool-buffer-with-faces) + (ps-n-up-filling-database): Fix ambiguous doc string + cross-reference(s). + + * server.el (server-buffer, server-log): Fix ambiguous doc string + cross-reference(s). + + * simple.el (newline, delete-backward-char, delete-forward-char) + (minibuffer-history-isearch-message, kill-line, track-eol) + (temporary-goal-column): Fix ambiguous doc string + cross-reference(s). + + * textmodes/flyspell.el (flyspell-mark-duplications-flag) + (flyspell-default-deplacement-commands): Fix ambiguous doc string + cross-reference(s). + + * textmodes/ispell.el (ispell-accept-output): Fix ambiguous doc + string cross-reference(s). + + * textmodes/sgml-mode.el (html-tag-help): Fix ambiguous doc string + cross-reference(s). + + * vc/compare-w.el (compare-ignore-whitespace) + (compare-ignore-case, compare-windows-dehighlight): Fix ambiguous + doc string cross-reference(s). + + * vc/diff.el (diff): Fix ambiguous doc string cross-reference(s). + + * whitespace.el (whitespace-point) + (whitespace-font-lock-refontify, whitespace-bob-marker) + (whitespace-eob-marker): Fix ambiguous doc string + cross-reference(s). + 2013-01-11 Michael Albinus * autorevert.el (top): Require 'cl in order to pacify byte compiler. === modified file 'lisp/calc/calc.el' --- lisp/calc/calc.el 2013-01-02 16:13:04 +0000 +++ lisp/calc/calc.el 2013-01-11 23:08:55 +0000 @@ -435,9 +435,9 @@ (defcustom calc-highlight-selections-with-faces nil "If non-nil, use a separate face to indicate selected sub-formulas. -If `calc-show-selections' is non-nil, then selected sub-formulas are shown -by displaying the rest of the formula in `calc-nonselected-face'. -If `calc-show-selections' is nil, then selected sub-formulas are shown +If option `calc-show-selections' is non-nil, then selected sub-formulas are +shown by displaying the rest of the formula in `calc-nonselected-face'. +If option `calc-show-selections' is nil, then selected sub-formulas are shown by displaying the sub-formula in `calc-selected-face'." :version "24.1" :group 'calc @@ -1183,7 +1183,7 @@ ;;;###autoload (defun calc-dispatch (&optional arg) - "Invoke the GNU Emacs Calculator. See `calc-dispatch-help' for details." + "Invoke the GNU Emacs Calculator. See \\[calc-dispatch-help] for details." (interactive "P") ; (sit-for echo-keystrokes) (condition-case err ; look for other keys bound to calc-dispatch === modified file 'lisp/comint.el' --- lisp/comint.el 2013-01-09 08:30:21 +0000 +++ lisp/comint.el 2013-01-11 23:08:55 +0000 @@ -1521,7 +1521,7 @@ If there are no search errors, this function displays an overlay with the Isearch prompt which replaces the original comint prompt. Otherwise, it displays the standard Isearch message returned from -`isearch-message'." +the function `isearch-message'." (if (not (and isearch-success (not isearch-error))) ;; Use standard function `isearch-message' when not in comint prompt, ;; or search fails, or has an error (like incomplete regexp). === modified file 'lisp/emacs-lisp/edebug.el' --- lisp/emacs-lisp/edebug.el 2013-01-02 16:13:04 +0000 +++ lisp/emacs-lisp/edebug.el 2013-01-11 23:08:55 +0000 @@ -461,8 +461,8 @@ This version, from Edebug, maybe instruments the expression. But the STREAM must be the current buffer to do so. Whether it instruments is -also dependent on the values of `edebug-all-defs' and -`edebug-all-forms'." +also dependent on the values of the option `edebug-all-defs' and +the option `edebug-all-forms'." (or stream (setq stream standard-input)) (if (eq stream (current-buffer)) (edebug-read-and-maybe-wrap-form) @@ -484,8 +484,8 @@ With a prefix argument, instrument the code for Edebug. -Setting `edebug-all-defs' to a non-nil value reverses the meaning of -the prefix argument. Code is then instrumented when this function is +Setting option `edebug-all-defs' to a non-nil value reverses the meaning +of the prefix argument. Code is then instrumented when this function is invoked without a prefix argument If acting on a `defun' for FUNCTION, and the function was instrumented, === modified file 'lisp/ffap.el' --- lisp/ffap.el 2013-01-02 16:13:04 +0000 +++ lisp/ffap.el 2013-01-11 23:08:55 +0000 @@ -321,7 +321,7 @@ "Last value returned by `ffap-next-guess'.") (defvar ffap-string-at-point-region '(1 1) - "List (BEG END), last region returned by `ffap-string-at-point'.") + "List (BEG END), last region returned by the function `ffap-string-at-point'.") (defun ffap-next-guess (&optional back lim) "Move point to next file or URL, and return it as a string. @@ -346,7 +346,7 @@ Optional argument WRAP says to try wrapping around if necessary. Interactively: use a single prefix to search backwards, double prefix to wrap forward, triple to wrap backwards. -Actual search is done by `ffap-next-guess'." +Actual search is done by the function `ffap-next-guess'." (interactive (cdr (assq (prefix-numeric-value current-prefix-arg) '((1) (4 t) (16 nil t) (64 t t))))) @@ -1028,14 +1028,14 @@ "Alist of \(MODE CHARS BEG END\), where MODE is a symbol, possibly a major-mode name, or one of the symbol `file', `url', `machine', and `nocolon'. -`ffap-string-at-point' uses the data fields as follows: +Function `ffap-string-at-point' uses the data fields as follows: 1. find a maximal string of CHARS around point, 2. strip BEG chars before point from the beginning, 3. Strip END chars after point from the end.") (defvar ffap-string-at-point nil ;; Added at suggestion of RHOGEE (for ff-paths), 7/24/95. - "Last string returned by `ffap-string-at-point'.") + "Last string returned by the function `ffap-string-at-point'.") (defun ffap-string-at-point (&optional mode) "Return a string of characters from around point. @@ -1043,7 +1043,8 @@ syntax parameters in `ffap-string-at-point-mode-alist'. If MODE is not found, we use `file' instead of MODE. If the region is active, return a string from the region. -Sets `ffap-string-at-point' and `ffap-string-at-point-region'." +Sets the variable `ffap-string-at-point' and the variable +`ffap-string-at-point-region'." (let* ((args (cdr (or (assq (or mode major-mode) ffap-string-at-point-mode-alist) @@ -1068,7 +1069,8 @@ (defun ffap-string-around () ;; Sometimes useful to decide how to treat a string. - "Return string of two chars around last `ffap-string-at-point'. + "Return string of two chars around last result of function +`ffap-string-at-point'. Assumes the buffer has not changed." (save-excursion (format "%c%c" @@ -1082,7 +1084,7 @@ (defun ffap-copy-string-as-kill (&optional mode) ;; Requested by MCOOK. Useful? - "Call `ffap-string-at-point', and copy result to `kill-ring'." + "Call function `ffap-string-at-point', and copy result to `kill-ring'." (interactive) (let ((str (ffap-string-at-point mode))) (if (equal "" str) @@ -1364,7 +1366,7 @@ :version "22.1") (defvar ffap-highlight-overlay nil - "Overlay used by `ffap-highlight'.") + "Overlay used by function `ffap-highlight'.") (defun ffap-highlight (&optional remove) "If `ffap-highlight' is set, highlight the guess in this buffer. @@ -1734,7 +1736,7 @@ (call-interactively 'ffap))) (defun ffap-literally () - "Like `ffap' and `find-file-literally'. + "Like `ffap' and command `find-file-literally'. Only intended for interactive use." (interactive) (let ((ffap-file-finder 'find-file-literally)) === modified file 'lisp/font-lock.el' --- lisp/font-lock.el 2013-01-01 09:11:05 +0000 +++ lisp/font-lock.el 2013-01-11 23:08:55 +0000 @@ -469,7 +469,7 @@ "Alist of additional `font-lock-keywords' elements for major modes. Each element has the form (MODE KEYWORDS . HOW). -`font-lock-set-defaults' adds the elements in the list KEYWORDS to +Function `font-lock-set-defaults' adds the elements in the list KEYWORDS to `font-lock-keywords' when Font Lock is turned on in major mode MODE. If HOW is nil, KEYWORDS are added at the beginning of @@ -484,7 +484,7 @@ (defvar font-lock-removed-keywords-alist nil "Alist of `font-lock-keywords' elements to be removed for major modes. -Each element has the form (MODE . KEYWORDS). `font-lock-set-defaults' +Each element has the form (MODE . KEYWORDS). Function `font-lock-set-defaults' removes the elements in the list KEYWORDS from `font-lock-keywords' when Font Lock is turned on in major mode MODE. === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2013-01-11 10:40:54 +0000 +++ lisp/gnus/ChangeLog 2013-01-11 23:08:55 +0000 @@ -1,3 +1,11 @@ +2013-01-11 Aaron S. Hawley + + * gnus-start.el (gnus-check-new-newsgroups): Fix ambiguous doc string + cross-reference(s). + + * gnus-sum.el (gnus-summary-newsgroup-prefix): Fix ambiguous doc string + cross-reference(s). + 2013-01-11 Dmitry Antipov * gnus-art.el (gnus-mime-display-security): Use point-min-marker === modified file 'lisp/gnus/gnus-start.el' --- lisp/gnus/gnus-start.el 2013-01-02 16:13:04 +0000 +++ lisp/gnus/gnus-start.el 2013-01-11 23:08:55 +0000 @@ -110,7 +110,7 @@ groups since the last time it checked: 1. This variable is `ask-server'. 2. This variable is a list of select methods (see below). - 3. `gnus-read-active-file' is nil or `some'. + 3. Option `gnus-read-active-file' is nil or `some'. 4. A prefix argument is given to `gnus-find-new-newsgroups' interactively. Thus, if this variable is `ask-server' or a list of select methods or === modified file 'lisp/gnus/gnus-sum.el' --- lisp/gnus/gnus-sum.el 2013-01-02 16:13:04 +0000 +++ lisp/gnus/gnus-sum.el 2013-01-11 23:08:55 +0000 @@ -1167,7 +1167,7 @@ (defcustom gnus-summary-newsgroup-prefix "=> " "*String prefixed to the Newsgroup field in the summary -line when using `gnus-ignored-from-addresses'." +line when using the option `gnus-ignored-from-addresses'." :version "22.1" :group 'gnus-summary :type 'string) === modified file 'lisp/help-mode.el' --- lisp/help-mode.el 2013-01-02 16:13:04 +0000 +++ lisp/help-mode.el 2013-01-11 23:08:55 +0000 @@ -322,7 +322,7 @@ (defconst help-xref-symbol-regexp (purecopy (concat "\\(\\<\\(\\(variable\\|option\\)\\|" ; Link to var - "\\(function\\|command\\)\\|" ; Link to function + "\\(function\\|command\\|call\\)\\|" ; Link to function "\\(face\\)\\|" ; Link to face "\\(symbol\\|program\\|property\\)\\|" ; Don't link "\\(source \\(?:code \\)?\\(?:of\\|for\\)\\)\\)" === modified file 'lisp/info.el' --- lisp/info.el 2013-01-08 00:28:55 +0000 +++ lisp/info.el 2013-01-11 23:08:55 +0000 @@ -4313,7 +4313,7 @@ The `info-file' property of COMMAND says which Info manual to search. If COMMAND has no property, the variable `Info-file-list-for-emacs' defines heuristics for which Info manual to try. -The locations are of the format used in `Info-history', i.e. +The locations are of the format used in the variable `Info-history', i.e. \(FILENAME NODENAME BUFFERPOS), where BUFFERPOS is the line number in the first element of the returned list (which is treated specially in `Info-goto-emacs-command-node'), and 0 for the rest elements of a list." === modified file 'lisp/international/mule.el' --- lisp/international/mule.el 2013-01-01 09:11:05 +0000 +++ lisp/international/mule.el 2013-01-11 23:08:55 +0000 @@ -891,7 +891,7 @@ (and (vectorp eol-type-1) (vectorp eol-type-2))))))) (defun add-to-coding-system-list (coding-system) - "Add CODING-SYSTEM to `coding-system-list' while keeping it sorted." + "Add CODING-SYSTEM to variable `coding-system-list' while keeping it sorted." (if (or (null coding-system-list) (coding-system-lessp coding-system (car coding-system-list))) (setq coding-system-list (cons coding-system coding-system-list)) === modified file 'lisp/isearch.el' --- lisp/isearch.el 2013-01-02 16:13:04 +0000 +++ lisp/isearch.el 2013-01-11 23:08:55 +0000 @@ -176,7 +176,7 @@ (defvar isearch-message-function nil "Function to call to display the search prompt. -If nil, use `isearch-message'.") +If nil, use function `isearch-message'.") (defvar isearch-wrap-function nil "Function to call to wrap the search when search is failed. @@ -1101,7 +1101,7 @@ (defun isearch-fail-pos (&optional msg) "Return position of first mismatch in search string, or nil if none. -If MSG is non-nil, use `isearch-message', otherwise `isearch-string'." +If MSG is non-nil, use variable `isearch-message', otherwise `isearch-string'." (let ((cmds isearch-cmds) (curr-msg (if msg isearch-message isearch-string)) succ-msg) === modified file 'lisp/misearch.el' --- lisp/misearch.el 2013-01-01 09:11:05 +0000 +++ lisp/misearch.el 2013-01-11 23:08:55 +0000 @@ -73,7 +73,7 @@ The first argument of this function is the current buffer where the search is currently searching. It defines the base buffer relative to which this function should find the next buffer. When the isearch -direction is backward (when `isearch-forward' is nil), this function +direction is backward (when option `isearch-forward' is nil), this function should return the previous buffer to search. If the second argument of this function WRAP is non-nil, then it === modified file 'lisp/newcomment.el' --- lisp/newcomment.el 2013-01-01 09:11:05 +0000 +++ lisp/newcomment.el 2013-01-11 23:08:55 +0000 @@ -1206,7 +1206,8 @@ (defun comment-box (beg end &optional arg) "Comment out the BEG .. END region, putting it inside a box. The numeric prefix ARG specifies how many characters to add to begin- and -end- comment markers additionally to what `comment-add' already specifies." +end- comment markers additionally to what variable `comment-add' already +specifies." (interactive "*r\np") (comment-normalize-vars) (let ((comment-style (if (cadr (assoc comment-style comment-styles)) === modified file 'lisp/printing.el' --- lisp/printing.el 2013-01-02 16:13:04 +0000 +++ lisp/printing.el 2013-01-11 23:08:55 +0000 @@ -1800,7 +1800,7 @@ Where: SYMBOL It's a symbol to identify a text printer. It's for - `pr-txt-name' variable setting and for menu selection. + setting option `pr-txt-name' and for menu selection. Examples: 'prt_06a 'my_printer @@ -1951,7 +1951,7 @@ Where: SYMBOL It's a symbol to identify a PostScript printer. It's for - `pr-ps-name' variable setting and for menu selection. + setting option `pr-ps-name' and for menu selection. Examples: 'prt_06a 'my_printer @@ -2935,9 +2935,9 @@ The example above has two setting groups: no-duplex and no-duplex-and-landscape. When setting no-duplex is activated - through `inherits-from:' (see `pr-ps-utility', `pr-mode-alist' - and `pr-ps-printer-alist'), the variables pr-file-duplex and - pr-file-tumble are both set to nil. + through `inherits-from:' (see option `pr-ps-utility', + `pr-mode-alist' and `pr-ps-printer-alist'), the variables + pr-file-duplex and pr-file-tumble are both set to nil. Now when setting no-duplex-and-landscape is activated through `inherits-from:', the variable pr-file-landscape is set to nil === modified file 'lisp/progmodes/cc-fonts.el' --- lisp/progmodes/cc-fonts.el 2013-01-01 09:11:05 +0000 +++ lisp/progmodes/cc-fonts.el 2013-01-11 23:08:55 +0000 @@ -2049,7 +2049,7 @@ (defconst c-font-lock-keywords-3 (c-lang-const c-matchers-3 c) "Accurate normal font locking for C mode. -Like `c-font-lock-keywords-2' but detects declarations in a more +Like the variable `c-font-lock-keywords-2' but detects declarations in a more accurate way that works in most cases for arbitrary types without the need for `c-font-lock-extra-types'.") @@ -2207,7 +2207,7 @@ (defconst c++-font-lock-keywords-3 (c-lang-const c-matchers-3 c++) "Accurate normal font locking for C++ mode. -Like `c++-font-lock-keywords-2' but detects declarations in a more +Like the variable `c++-font-lock-keywords-2' but detects declarations in a more accurate way that works in most cases for arbitrary types without the need for `c++-font-lock-extra-types'.") @@ -2313,7 +2313,7 @@ (defconst objc-font-lock-keywords-3 (c-lang-const c-matchers-3 objc) "Accurate normal font locking for Objective-C mode. -Like `objc-font-lock-keywords-2' but detects declarations in a more +Like the variable `objc-font-lock-keywords-2' but detects declarations in a more accurate way that works in most cases for arbitrary types without the need for `objc-font-lock-extra-types'.") @@ -2356,7 +2356,7 @@ (defconst java-font-lock-keywords-3 (c-lang-const c-matchers-3 java) "Accurate normal font locking for Java mode. -Like `java-font-lock-keywords-2' but detects declarations in a more +Like variable `java-font-lock-keywords-2' but detects declarations in a more accurate way that works in most cases for arbitrary types without the need for `java-font-lock-extra-types'.") @@ -2389,7 +2389,7 @@ (defconst idl-font-lock-keywords-3 (c-lang-const c-matchers-3 idl) "Accurate normal font locking for CORBA IDL mode. -Like `idl-font-lock-keywords-2' but detects declarations in a more +Like the variable `idl-font-lock-keywords-2' but detects declarations in a more accurate way that works in most cases for arbitrary types without the need for `idl-font-lock-extra-types'.") @@ -2422,7 +2422,7 @@ (defconst pike-font-lock-keywords-3 (c-lang-const c-matchers-3 pike) "Accurate normal font locking for Pike mode. -Like `pike-font-lock-keywords-2' but detects declarations in a more +Like the variable `pike-font-lock-keywords-2' but detects declarations in a more accurate way that works in most cases for arbitrary types without the need for `pike-font-lock-extra-types'.") === modified file 'lisp/progmodes/compile.el' --- lisp/progmodes/compile.el 2013-01-09 08:30:21 +0000 +++ lisp/progmodes/compile.el 2013-01-11 23:08:55 +0000 @@ -1427,8 +1427,9 @@ If optional second arg COMINT is t the buffer will be in Comint mode with `compilation-shell-minor-mode'. -Interactively, prompts for the command if `compilation-read-command' is -non-nil; otherwise uses `compile-command'. With prefix arg, always prompts. +Interactively, prompts for the command if the variable +`compilation-read-command' is non-nil; otherwise uses`compile-command'. +With prefix arg, always prompts. Additionally, with universal prefix arg, compilation buffer will be in comint mode, i.e. interactive. === modified file 'lisp/progmodes/etags.el' --- lisp/progmodes/etags.el 2013-01-04 19:22:37 +0000 +++ lisp/progmodes/etags.el 2013-01-11 23:08:55 +0000 @@ -199,7 +199,8 @@ (defvar tags-table-files nil "List of file names covered by current tags table. -nil means it has not yet been computed; use `tags-table-files' to do so.") +nil means it has not yet been computed; +use function `tags-table-files' to do so.") (defvar tags-completion-table nil "Obarray of tag names defined in current tags table.") @@ -224,7 +225,7 @@ One optional argument, a boolean specifying to return complete path (nil) or relative path (non-nil).") (defvar tags-table-files-function nil - "Function to do the work of `tags-table-files' (which see).") + "Function to do the work of function `tags-table-files' (which see).") (defvar tags-completion-table-function nil "Function to build the `tags-completion-table'.") (defvar snarf-tag-function nil @@ -251,7 +252,7 @@ (defvar tags-apropos-function nil "Function to do the work of `tags-apropos' (which see).") (defvar tags-included-tables-function nil - "Function to do the work of `tags-included-tables' (which see).") + "Function to do the work of function `tags-included-tables' (which see).") (defvar verify-tags-table-function nil "Function to return t if current buffer contains valid tags file.") === modified file 'lisp/progmodes/gdb-mi.el' --- lisp/progmodes/gdb-mi.el 2013-01-01 09:11:05 +0000 +++ lisp/progmodes/gdb-mi.el 2013-01-11 23:08:55 +0000 @@ -607,12 +607,12 @@ options should include \"-i=mi\" to use gdb's MI text interface. Note that the old \"--annotate\" option is no longer supported. -If `gdb-many-windows' is nil (the default value) then gdb just +If option `gdb-many-windows' is nil (the default value) then gdb just pops up the GUD buffer unless `gdb-show-main' is t. In this case it starts with two windows: one displaying the GUD buffer and the other with the source file with the main routine of the inferior. -If `gdb-many-windows' is t, regardless of the value of +If option `gdb-many-windows' is t, regardless of the value of `gdb-show-main', the layout below will appear. Keybindings are shown in some of the buffers. @@ -4069,7 +4069,7 @@ (set-window-dedicated-p window t)) (defun gdb-setup-windows () - "Layout the window pattern for `gdb-many-windows'." + "Layout the window pattern for option `gdb-many-windows'." (gdb-get-buffer-create 'gdb-locals-buffer) (gdb-get-buffer-create 'gdb-stack-buffer) (gdb-get-buffer-create 'gdb-breakpoints-buffer) @@ -4120,7 +4120,7 @@ (defun gdb-restore-windows () "Restore the basic arrangement of windows used by gdb. -This arrangement depends on the value of `gdb-many-windows'." +This arrangement depends on the value of option `gdb-many-windows'." (interactive) (switch-to-buffer gud-comint-buffer) ;Select the right window and frame. (delete-other-windows) === modified file 'lisp/ps-print.el' --- lisp/ps-print.el 2013-01-01 09:11:05 +0000 +++ lisp/ps-print.el 2013-01-11 23:08:55 +0000 @@ -1959,13 +1959,13 @@ Any other value is treated as nil. -If you set `ps-selected-pages' (see it for documentation), first the pages are -filtered by `ps-selected-pages' and then by `ps-even-or-odd-pages'. For -example, if we have: +If you set option `ps-selected-pages', first the pages are +filtered by option `ps-selected-pages' and then by `ps-even-or-odd-pages'. +For example, if we have: (setq ps-selected-pages '(1 4 (6 . 10) (12 . 16) 20)) -Combining with `ps-even-or-odd-pages' and `ps-n-up-printing', we have: +Combining with `ps-even-or-odd-pages' and option `ps-n-up-printing', we have: `ps-n-up-printing' = 1: `ps-even-or-odd-pages' PAGES PRINTED @@ -3566,9 +3566,9 @@ ;;;###autoload (defun ps-spool-buffer-with-faces () "Generate and spool a PostScript image of the buffer. -Like `ps-spool-buffer', but includes font, color, and underline information in -the generated image. This command works only if you are using a window system, -so it has a way to determine color values. +Like the command `ps-spool-buffer', but includes font, color, and underline +information in the generated image. This command works only if you are using +a window system, so it has a way to determine color values. Use the command `ps-despool' to send the spooled images to the printer." (interactive) @@ -5369,7 +5369,7 @@ (KIND XCOL YCOL XLIN YLIN REPEAT END XSTART YSTART) Where: -KIND is a valid value of `ps-n-up-filling'. +KIND is a valid value of the variable `ps-n-up-filling'. XCOL YCOL are the relative position for the next column. XLIN YLIN are the relative position for the beginning of next line. REPEAT is the number of repetitions for external loop. === modified file 'lisp/server.el' --- lisp/server.el 2013-01-02 16:13:04 +0000 +++ lisp/server.el 2013-01-11 23:08:55 +0000 @@ -361,7 +361,7 @@ (defconst server-buffer " *server*" "Buffer used internally by Emacs's server. -One use is to log the I/O for debugging purposes (see `server-log'), +One use is to log the I/O for debugging purposes (see option `server-log'), the other is to provide a current buffer in which the process filter can safely let-bind buffer-local variables like `default-directory'.") @@ -369,7 +369,7 @@ "If non-nil, log the server's inputs and outputs in the `server-buffer'.") (defun server-log (string &optional client) - "If `server-log' is non-nil, log STRING to `server-buffer'. + "If option `server-log' is non-nil, log STRING to `server-buffer'. If CLIENT is non-nil, add a description of it to the logged message." (when server-log (with-current-buffer (get-buffer-create server-buffer) === modified file 'lisp/simple.el' --- lisp/simple.el 2013-01-10 03:43:02 +0000 +++ lisp/simple.el 2013-01-11 23:08:55 +0000 @@ -401,7 +401,7 @@ (defun newline (&optional arg) "Insert a newline, and move to left margin of the new line if it's blank. -If `use-hard-newlines' is non-nil, the newline is marked with the +If option `use-hard-newlines' is non-nil, the newline is marked with the text-property `hard'. With ARG, insert that many newlines. Call `auto-fill-function' if the current column number is greater @@ -837,7 +837,7 @@ "Delete the previous N characters (following if N is negative). If Transient Mark mode is enabled, the mark is active, and N is 1, delete the text in the region and deactivate the mark instead. -To disable this, set `delete-active-region' to nil. +To disable this, set option `delete-active-region' to nil. Optional second arg KILLFLAG, if non-nil, means to kill (save in kill ring) instead of delete. Interactively, N is the prefix @@ -873,7 +873,7 @@ "Delete the following N characters (previous if N is negative). If Transient Mark mode is enabled, the mark is active, and N is 1, delete the text in the region and deactivate the mark instead. -To disable this, set `delete-active-region' to nil. +To disable this, set variable `delete-active-region' to nil. Optional second arg KILLFLAG non-nil means to kill (save in kill ring) instead of delete. Interactively, N is the prefix arg, and @@ -1778,7 +1778,7 @@ If there are no search errors, this function displays an overlay with the isearch prompt which replaces the original minibuffer prompt. Otherwise, it displays the standard isearch message returned from -`isearch-message'." +the function `isearch-message'." (if (not (and (minibufferp) isearch-success (not isearch-error))) ;; Use standard function `isearch-message' when not in the minibuffer, ;; or search fails, or has an error (like incomplete regexp). @@ -3805,7 +3805,7 @@ kill the rest of the current line, even if there are only nonblanks there. -If `kill-whole-line' is non-nil, then this command kills the whole line +If option `kill-whole-line' is non-nil, then this command kills the whole line including its terminating newline, when used at the beginning of a line with no argument. As a consequence, you can always kill a whole line by typing \\[move-beginning-of-line] \\[kill-line]. @@ -4575,13 +4575,13 @@ "Non-nil means vertical motion starting at end of line keeps to ends of lines. This means moving to the end of each line moved onto. The beginning of a blank line does not count as the end of a line. -This has no effect when `line-move-visual' is non-nil." +This has no effect when the variable `line-move-visual' is non-nil." :type 'boolean :group 'editing-basics) (defcustom goal-column nil "Semipermanent goal column for vertical motion, as set by \\[set-goal-column], or nil. -A non-nil setting overrides `line-move-visual', which see." +A non-nil setting overrides the variable `line-move-visual', which see." :type '(choice integer (const :tag "None" nil)) :group 'editing-basics) @@ -4592,7 +4592,7 @@ It is the column where point was at the start of the current run of vertical motion commands. -When moving by visual lines via `line-move-visual', it is a cons +When moving by visual lines via the function `line-move-visual', it is a cons cell (COL . HSCROLL), where COL is the x-position, in pixels, divided by the default column width, and HSCROLL is the number of columns by which window is scrolled from left margin. === modified file 'lisp/textmodes/flyspell.el' --- lisp/textmodes/flyspell.el 2013-01-08 23:50:40 +0000 +++ lisp/textmodes/flyspell.el 2013-01-11 23:08:55 +0000 @@ -63,7 +63,7 @@ "Non-nil means Flyspell reports a repeated word as an error. See `flyspell-mark-duplications-exceptions' to add exceptions to this rule. Detection of repeated words is not implemented in -\"large\" regions; see `flyspell-large-region'." +\"large\" regions; see variable `flyspell-large-region'." :group 'flyspell :type 'boolean) @@ -145,9 +145,10 @@ (defcustom flyspell-default-deplacement-commands '(next-line previous-line handle-switch-frame handle-select-window - scroll-up scroll-down) + scroll-up + scroll-down) "The standard list of deplacement commands for Flyspell. -See `flyspell-deplacement-commands'." +See variable `flyspell-deplacement-commands'." :group 'flyspell :version "21.1" :type '(repeat (symbol))) === modified file 'lisp/textmodes/ispell.el' --- lisp/textmodes/ispell.el 2013-01-02 16:13:04 +0000 +++ lisp/textmodes/ispell.el 2013-01-11 23:08:55 +0000 @@ -1594,8 +1594,8 @@ (defun ispell-accept-output (&optional timeout-secs timeout-msecs) "Wait for output from ispell process, or TIMEOUT-SECS and TIMEOUT-MSECS. -If asynchronous subprocesses are not supported, call `ispell-filter' and -pass it the output of the last ispell invocation." +If asynchronous subprocesses are not supported, call function `ispell-filter' +and pass it the output of the last ispell invocation." (if ispell-async-processp (accept-process-output ispell-process timeout-secs timeout-msecs) (if (null ispell-process) === modified file 'lisp/textmodes/sgml-mode.el' --- lisp/textmodes/sgml-mode.el 2013-01-02 16:13:04 +0000 +++ lisp/textmodes/sgml-mode.el 2013-01-11 23:08:55 +0000 @@ -1926,7 +1926,7 @@ ("ul" . "Unordered list") ("var" . "Math variable face") ("wbr" . "Enable
within ")) - "Value of `sgml-tag-help' for HTML mode.") + "Value of variable `sgml-tag-help' for HTML mode.") (defvar outline-regexp) (defvar outline-heading-end-regexp) === modified file 'lisp/vc/compare-w.el' --- lisp/vc/compare-w.el 2013-01-01 09:11:05 +0000 +++ lisp/vc/compare-w.el 2013-01-11 23:08:55 +0000 @@ -53,13 +53,13 @@ :group 'compare-windows) (defcustom compare-ignore-whitespace nil - "Non-nil means `compare-windows' ignores whitespace." + "Non-nil means command `compare-windows' ignores whitespace." :type 'boolean :group 'compare-windows :version "22.1") (defcustom compare-ignore-case nil - "Non-nil means `compare-windows' ignores case differences." + "Non-nil means command `compare-windows' ignores case differences." :type 'boolean :group 'compare-windows) @@ -379,7 +379,7 @@ (delete-overlay compare-windows-overlay2))))) (defun compare-windows-dehighlight () - "Remove highlighting created by `compare-windows-highlight'." + "Remove highlighting created by function `compare-windows-highlight'." (interactive) (remove-hook 'pre-command-hook 'compare-windows-dehighlight) (mapc 'delete-overlay compare-windows-overlays1) === modified file 'lisp/vc/diff.el' --- lisp/vc/diff.el 2013-01-01 09:11:05 +0000 +++ lisp/vc/diff.el 2013-01-11 23:08:55 +0000 @@ -86,7 +86,7 @@ When called interactively with a prefix argument, prompt interactively for diff switches. Otherwise, the switches -specified in `diff-switches' are passed to the diff command." +specified in the variable `diff-switches' are passed to the diff command." (interactive (let* ((newf (if (and buffer-file-name (file-exists-p buffer-file-name)) (read-file-name === modified file 'lisp/whitespace.el' --- lisp/whitespace.el 2013-01-01 09:11:05 +0000 +++ lisp/whitespace.el 2013-01-11 23:08:55 +0000 @@ -1271,19 +1271,19 @@ (defvar whitespace-point (point) "Used to save locally current point value. -Used by `whitespace-trailing-regexp' function (which see).") +Used by function `whitespace-trailing-regexp' (which see).") (defvar whitespace-font-lock-refontify nil "Used to save locally the font-lock refontify state. -Used by `whitespace-post-command-hook' function (which see).") +Used by function `whitespace-post-command-hook' (which see).") (defvar whitespace-bob-marker nil "Used to save locally the bob marker value. -Used by `whitespace-post-command-hook' function (which see).") +Used by function `whitespace-post-command-hook' (which see).") (defvar whitespace-eob-marker nil "Used to save locally the eob marker value. -Used by `whitespace-post-command-hook' function (which see).") +Used by function `whitespace-post-command-hook' (which see).") (defvar whitespace-buffer-changed nil "Used to indicate locally if buffer changed. === modified file 'src/ChangeLog' --- src/ChangeLog 2013-01-11 13:25:10 +0000 +++ src/ChangeLog 2013-01-11 23:08:55 +0000 @@ -1,3 +1,14 @@ +2013-01-11 Aaron S. Hawley + + * insdel.c (Fcombine_after_change_execute, syms_of_insdel): Fix + ambiguous doc string cross-reference(s). + + * keyboard.c (Fcommand_execute, syms_of_keyboard): Fix ambiguous + doc string cross-reference(s). + + * window.c (Fwindow_point, syms_of_window): Fix ambiguous doc + string cross-reference(s). + 2013-01-11 Dmitry Antipov Avoid unnecessary byte position calculation for the gap movement. === modified file 'src/insdel.c' --- src/insdel.c 2013-01-11 13:25:10 +0000 +++ src/insdel.c 2013-01-11 23:08:55 +0000 @@ -2084,7 +2084,7 @@ DEFUN ("combine-after-change-execute", Fcombine_after_change_execute, Scombine_after_change_execute, 0, 0, 0, - doc: /* This function is for use internally in `combine-after-change-calls'. */) + doc: /* This function is for use internally in the function `combine-after-change-calls'. */) (void) { ptrdiff_t count = SPECPDL_INDEX (); @@ -2176,7 +2176,7 @@ combine_after_change_buffer = Qnil; DEFVAR_LISP ("combine-after-change-calls", Vcombine_after_change_calls, - doc: /* Used internally by the `combine-after-change-calls' macro. */); + doc: /* Used internally by the function `combine-after-change-calls' macro. */); Vcombine_after_change_calls = Qnil; DEFVAR_BOOL ("inhibit-modification-hooks", inhibit_modification_hooks, === modified file 'src/keyboard.c' --- src/keyboard.c 2013-01-08 16:51:11 +0000 +++ src/keyboard.c 2013-01-11 23:08:55 +0000 @@ -10170,7 +10170,7 @@ doc: /* Execute CMD as an editor command. CMD must be a symbol that satisfies the `commandp' predicate. Optional second arg RECORD-FLAG non-nil -means unconditionally put this command in `command-history'. +means unconditionally put this command in the variable `command-history'. Otherwise, that is done only if an arg is read using the minibuffer. The argument KEYS specifies the value to use instead of (this-command-keys) when reading the arguments; if it is nil, (this-command-keys) is used. @@ -12055,8 +12055,8 @@ Vsaved_region_selection, doc: /* Contents of active region prior to buffer modification. If `select-active-regions' is non-nil, Emacs sets this to the -text in the region before modifying the buffer. The next -`deactivate-mark' call uses this to set the window selection. */); +text in the region before modifying the buffer. The next call to +the function `deactivate-mark' uses this to set the window selection. */); Vsaved_region_selection = Qnil; DEFVAR_LISP ("selection-inhibit-update-commands", === modified file 'src/window.c' --- src/window.c 2013-01-02 16:13:04 +0000 +++ src/window.c 2013-01-11 23:08:55 +0000 @@ -1436,7 +1436,7 @@ Note that, when WINDOW is selected, the value returned is the same as that returned by `point' for WINDOW's buffer. It would be more strictly -correct to return the `top-level' value of `point', outside of any +correct to return the top-level value of `point', outside of any `save-excursion' forms. But that is hard to define. */) (Lisp_Object window) { @@ -6793,7 +6793,8 @@ Other values are reserved for future use. -This variable takes no effect if `window-combination-limit' is non-nil. */); +This variable takes no effect if the variable `window-combination-limit' is +non-nil. */); Vwindow_combination_resize = Qnil; DEFVAR_LISP ("window-combination-limit", Vwindow_combination_limit, ------------------------------------------------------------ revno: 111488 committer: Stefan Monnier branch nick: trunk timestamp: Fri 2013-01-11 18:03:04 -0500 message: *** empty log message *** diff: === modified file 'lisp/emacs-lisp/trace.el' --- lisp/emacs-lisp/trace.el 2013-01-09 08:30:21 +0000 +++ lisp/emacs-lisp/trace.el 2013-01-11 23:03:04 +0000 @@ -167,6 +167,8 @@ (mapconcat 'char-to-string (make-string (1- level) ?|) " ") (if (> level 1) " " "") level + ;; FIXME: Make it so we can click the function name to jump to its + ;; definition and/or untrace it. (cons function args) context))) @@ -275,16 +277,8 @@ ;;;###autoload (defun trace-function-background (function &optional buffer context) "Traces FUNCTION with trace output going quietly to BUFFER. -When this tracing is enabled, every call to FUNCTION writes -a Lisp-style trace message (showing the arguments and return value) -into BUFFER. This function generates advice to trace FUNCTION -and activates it together with any other advice there might be. -The trace output goes to BUFFER quietly, without changing -the window or buffer configuration. - -BUFFER defaults to `trace-buffer'. - -To untrace a function, use `untrace-function' or `untrace-all'." +Like `trace-function-foreground' but without popping up the trace BUFFER or +changing the window configuration." (interactive (trace--read-args "Trace function in background: ")) (trace-function-internal function buffer t context)) ------------------------------------------------------------ revno: 111487 committer: Michael Albinus branch nick: trunk timestamp: Fri 2013-01-11 23:54:42 +0100 message: Fix a scoping error. diff: === modified file 'lisp/autorevert.el' --- lisp/autorevert.el 2013-01-11 22:36:32 +0000 +++ lisp/autorevert.el 2013-01-11 22:54:42 +0000 @@ -524,9 +524,9 @@ (file (auto-revert-notify-event-file-name event)) (buffer (gethash descriptor auto-revert-notify-watch-descriptor-hash-list))) - ;; Check, that event is meant for us. - ;; TODO: Filter events which stop watching, like `move' or `removed'. (ignore-errors + ;; Check, that event is meant for us. + ;; TODO: Filter events which stop watching, like `move' or `removed'. (assert descriptor) (when (featurep 'inotify) (assert (memq 'modify descriptor))) (when (featurep 'w32notify) (assert (eq 'modified descriptor))) @@ -534,11 +534,11 @@ (when (stringp file) (assert (string-equal (directory-file-name file) - (directory-file-name (buffer-file-name buffer)))))) + (directory-file-name (buffer-file-name buffer))))) - ;; Mark buffer modified. - (with-current-buffer buffer - (setq auto-revert-notify-modified-p t))))) + ;; Mark buffer modified. + (with-current-buffer buffer + (setq auto-revert-notify-modified-p t)))))) (defun auto-revert-active-p () "Check if auto-revert is active (in current buffer or globally)." ------------------------------------------------------------ revno: 111486 committer: Michael Albinus branch nick: trunk timestamp: Fri 2013-01-11 23:36:32 +0100 message: * autorevert.el (top): Require 'cl in order to pacify byte compiler. (auto-revert-notify-rm-watch): Ignore errors. (auto-revert-notify-add-watch): Ignore errors. Use '(modify) for inotify, and '(size last-write-time) for w32notify. Set buffer-local `auto-revert-use-notify' to nil when adding a file watch fails - this is a fallback to the file modification check. (auto-revert-notify-event-p, auto-revert-notify-event-descriptor) (auto-revert-notify-event-action) (auto-revert-notify-event-file-name): New defuns. (auto-revert-notify-handler): Use them. Implement first plausibility checks. (auto-revert-handler): Handle also `auto-revert-tail-mode'. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-01-11 15:04:24 +0000 +++ lisp/ChangeLog 2013-01-11 22:36:32 +0000 @@ -1,3 +1,18 @@ +2013-01-11 Michael Albinus + + * autorevert.el (top): Require 'cl in order to pacify byte compiler. + (auto-revert-notify-rm-watch): Ignore errors. + (auto-revert-notify-add-watch): Ignore errors. Use '(modify) for + inotify, and '(size last-write-time) for w32notify. Set + buffer-local `auto-revert-use-notify' to nil when adding a file + watch fails - this is a fallback to the file modification check. + (auto-revert-notify-event-p, auto-revert-notify-event-descriptor) + (auto-revert-notify-event-action) + (auto-revert-notify-event-file-name): New defuns. + (auto-revert-notify-handler): Use them. Implement first + plausibility checks. + (auto-revert-handler): Handle also `auto-revert-tail-mode'. + 2013-01-11 Julien Danjou * color.el (color-rgb-to-hsv): Fix conversion computing in case min and === modified file 'lisp/autorevert.el' --- lisp/autorevert.el 2013-01-11 09:45:54 +0000 +++ lisp/autorevert.el 2013-01-11 22:36:32 +0000 @@ -97,6 +97,7 @@ ;; Dependencies: +(eval-when-compile (require 'cl)) (require 'timer) ;; Custom Group: @@ -466,9 +467,10 @@ (defun auto-revert-notify-rm-watch () "Disable file watch for current buffer's associated file." (when auto-revert-notify-watch-descriptor - (funcall (if (fboundp 'inotify-rm-watch) - 'inotify-rm-watch 'w32notify-rm-watch) - auto-revert-notify-watch-descriptor) + (ignore-errors + (funcall (if (fboundp 'inotify-rm-watch) + 'inotify-rm-watch 'w32notify-rm-watch) + auto-revert-notify-watch-descriptor)) (remhash auto-revert-notify-watch-descriptor auto-revert-notify-watch-descriptor-hash-list)) (setq auto-revert-notify-watch-descriptor nil @@ -481,21 +483,62 @@ (let ((func (if (fboundp 'inotify-add-watch) 'inotify-add-watch 'w32notify-add-watch)) (aspect (if (fboundp 'inotify-add-watch) - '(close-write) '(last-write-time)))) + '(modify) '(size last-write-time)))) (setq auto-revert-notify-watch-descriptor - (funcall func buffer-file-name aspect 'auto-revert-notify-handler)) - (puthash auto-revert-notify-watch-descriptor - (current-buffer) - auto-revert-notify-watch-descriptor-hash-list)))) + (ignore-errors + (funcall + func buffer-file-name aspect 'auto-revert-notify-handler))) + (if auto-revert-notify-watch-descriptor + (puthash auto-revert-notify-watch-descriptor + (current-buffer) + auto-revert-notify-watch-descriptor-hash-list) + ;; Fallback to file checks. + (set (make-local-variable 'auto-revert-use-notify) nil))))) + +(defun auto-revert-notify-event-p (event) + "Check that event is a file watch event." + (cond ((featurep 'inotify) + (and (listp event) (= (length event) 4))) + ((featurep 'w32notify) + (and (listp event) (= (length event) 3) (stringp (nth 2 event)))))) + +(defun auto-revert-notify-event-descriptor (event) + "Return watch descriptor of notification event, or nil." + (and (auto-revert-notify-event-p event) (car event))) + +(defun auto-revert-notify-event-action (event) + "Return action of notification event, or nil." + (and (auto-revert-notify-event-p event) (nth 1 event))) + +(defun auto-revert-notify-event-file-name (event) + "Return file name of notification event, or nil." + (and (auto-revert-notify-event-p event) + (cond ((featurep 'inotify) (nth 3 event)) + ((featurep 'w32notify) (nth 2 event))))) (defun auto-revert-notify-handler (event) "Handle an event returned from file watch." - (when (listp event) - (let ((buffer - (gethash (car event) auto-revert-notify-watch-descriptor-hash-list))) - (when (bufferp buffer) - (with-current-buffer buffer - (setq auto-revert-notify-modified-p t)))))) + (when (auto-revert-notify-event-p event) + (let* ((descriptor (auto-revert-notify-event-descriptor event)) + (action (auto-revert-notify-event-action event)) + (file (auto-revert-notify-event-file-name event)) + (buffer (gethash descriptor + auto-revert-notify-watch-descriptor-hash-list))) + ;; Check, that event is meant for us. + ;; TODO: Filter events which stop watching, like `move' or `removed'. + (ignore-errors + (assert descriptor) + (when (featurep 'inotify) (assert (memq 'modify descriptor))) + (when (featurep 'w32notify) (assert (eq 'modified descriptor))) + (assert (bufferp buffer)) + (when (stringp file) + (assert (string-equal + (directory-file-name file) + (directory-file-name (buffer-file-name buffer)))))) + + ;; Mark buffer modified. + (with-current-buffer buffer + (setq auto-revert-notify-modified-p t))))) (defun auto-revert-active-p () "Check if auto-revert is active (in current buffer or globally)." @@ -514,6 +557,8 @@ (let* ((buffer (current-buffer)) size (revert (or (and buffer-file-name + (or (not auto-revert-use-notify) + auto-revert-notify-modified-p) (if auto-revert-tail-mode ;; Tramp caches the file attributes. Setting ;; `remote-file-name-inhibit-cache' forces Tramp @@ -524,12 +569,9 @@ (setq size (nth 7 (file-attributes buffer-file-name)))))) - (if auto-revert-use-notify - ;; There are file watches. - auto-revert-notify-modified-p - (and (not (file-remote-p buffer-file-name)) - (file-readable-p buffer-file-name) - (not (verify-visited-file-modtime buffer)))))) + (and (not (file-remote-p buffer-file-name)) + (file-readable-p buffer-file-name) + (not (verify-visited-file-modtime buffer))))) (and (or auto-revert-mode global-auto-revert-non-file-buffers) revert-buffer-function ------------------------------------------------------------ revno: 111485 author: Julien Danjou committer: Katsumi Yamaoka branch nick: trunk timestamp: Fri 2013-01-11 15:04:24 +0000 message: color.el: fix color-rgb-to-hsv computing diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-01-11 10:40:54 +0000 +++ lisp/ChangeLog 2013-01-11 15:04:24 +0000 @@ -1,3 +1,9 @@ +2013-01-11 Julien Danjou + + * color.el (color-rgb-to-hsv): Fix conversion computing in case min and + max are almost equal. Also return the correct value for V which is + already between 0 and 1. + 2013-01-11 Dmitry Antipov * emacs-lisp/ert.el (ert-run-test): Use point-max-marker. === modified file 'lisp/color.el' --- lisp/color.el 2013-01-02 16:13:04 +0000 +++ lisp/color.el 2013-01-11 15:04:24 +0000 @@ -130,7 +130,7 @@ (max (max r g b)) (min (min r g b))) (if (< (- max min) 1e-8) - (list 0.0 0.0 0.0) + (list 0.0 0.0 min) (list (/ (* 2 float-pi (cond ((and (= r g) (= g b)) 0) @@ -146,7 +146,7 @@ (+ 240 (* 60 (/ (- r g) (- max min))))))) 360) (if (= max 0) 0 (- 1 (/ min max))) - (/ max 255.0))))) + max)))) (defun color-rgb-to-hsl (red green blue) "Convert RGB colors to their HSL representation. ------------------------------------------------------------ revno: 111484 committer: Dmitry Antipov branch nick: trunk timestamp: Fri 2013-01-11 17:25:10 +0400 message: Avoid unnecessary byte position calculation for the gap movement. Since all users of move_gap do CHAR_TO_BYTE for other purposes anyway, all of them should use move_gap_both instead. * lisp.h (move_gap): Remove prototype. * insdel.c (move_gap): Remove. (move_gap_both): Add eassert. * editfns.c (Ftranspose_regions): Tweak to use move_gap_both. * xml.c (parse_region): Likewise. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-01-11 02:40:58 +0000 +++ src/ChangeLog 2013-01-11 13:25:10 +0000 @@ -1,3 +1,14 @@ +2013-01-11 Dmitry Antipov + + Avoid unnecessary byte position calculation for the gap movement. + Since all users of move_gap do CHAR_TO_BYTE for other purposes + anyway, all of them should use move_gap_both instead. + * lisp.h (move_gap): Remove prototype. + * insdel.c (move_gap): Remove. + (move_gap_both): Add eassert. + * editfns.c (Ftranspose_regions): Tweak to use move_gap_both. + * xml.c (parse_region): Likewise. + 2013-01-11 Paul Eggert emacsclient -t should not suspend Emacs server (Bug#13387) === modified file 'src/editfns.c' --- src/editfns.c 2013-01-09 13:50:22 +0000 +++ src/editfns.c 2013-01-11 13:25:10 +0000 @@ -4522,7 +4522,7 @@ (Lisp_Object startr1, Lisp_Object endr1, Lisp_Object startr2, Lisp_Object endr2, Lisp_Object leave_markers) { register ptrdiff_t start1, end1, start2, end2; - ptrdiff_t start1_byte, start2_byte, len1_byte, len2_byte; + ptrdiff_t start1_byte, start2_byte, len1_byte, len2_byte, end2_byte; ptrdiff_t gap, len1, len_mid, len2; unsigned char *start1_addr, *start2_addr, *temp; @@ -4583,20 +4583,22 @@ the gap the minimum distance to get it out of the way, and then deal with an unbroken array. */ + start1_byte = CHAR_TO_BYTE (start1); + end2_byte = CHAR_TO_BYTE (end2); + /* Make sure the gap won't interfere, by moving it out of the text we will operate on. */ if (start1 < gap && gap < end2) { if (gap - start1 < end2 - gap) - move_gap (start1); + move_gap_both (start1, start1_byte); else - move_gap (end2); + move_gap_both (end2, end2_byte); } - start1_byte = CHAR_TO_BYTE (start1); start2_byte = CHAR_TO_BYTE (start2); len1_byte = CHAR_TO_BYTE (end1) - start1_byte; - len2_byte = CHAR_TO_BYTE (end2) - start2_byte; + len2_byte = end2_byte - start2_byte; #ifdef BYTE_COMBINING_DEBUG if (end1 == start2) === modified file 'src/insdel.c' --- src/insdel.c 2013-01-09 14:08:49 +0000 +++ src/insdel.c 2013-01-11 13:25:10 +0000 @@ -84,21 +84,14 @@ #endif /* MARKER_DEBUG */ -/* Move gap to position CHARPOS. - Note that this can quit! */ - -void -move_gap (ptrdiff_t charpos) -{ - move_gap_both (charpos, CHAR_TO_BYTE (charpos)); -} - /* Move gap to byte position BYTEPOS, which is also char position CHARPOS. Note that this can quit! */ void move_gap_both (ptrdiff_t charpos, ptrdiff_t bytepos) { + eassert (charpos == BYTE_TO_CHAR (bytepos) + && bytepos == CHAR_TO_BYTE (charpos)); if (bytepos < GPT_BYTE) gap_left (charpos, bytepos, 0); else if (bytepos > GPT_BYTE) === modified file 'src/lisp.h' --- src/lisp.h 2013-01-11 02:40:58 +0000 +++ src/lisp.h 2013-01-11 13:25:10 +0000 @@ -2775,7 +2775,6 @@ /* Defined in insdel.c. */ extern Lisp_Object Qinhibit_modification_hooks; -extern void move_gap (ptrdiff_t); extern void move_gap_both (ptrdiff_t, ptrdiff_t); extern _Noreturn void buffer_overflow (void); extern void make_gap (ptrdiff_t); === modified file 'src/xml.c' --- src/xml.c 2013-01-01 09:11:05 +0000 +++ src/xml.c 2013-01-11 13:25:10 +0000 @@ -180,8 +180,7 @@ xmlDoc *doc; Lisp_Object result = Qnil; const char *burl = ""; - ptrdiff_t bytes; - ptrdiff_t istart, iend; + ptrdiff_t istart, iend, istart_byte, iend_byte; fn_xmlCheckVersion (LIBXML_VERSION); @@ -189,9 +188,11 @@ istart = XINT (start); iend = XINT (end); + istart_byte = CHAR_TO_BYTE (istart); + iend_byte = CHAR_TO_BYTE (iend); if (istart < GPT && GPT < iend) - move_gap (iend); + move_gap_both (iend, iend_byte); if (! NILP (base_url)) { @@ -199,17 +200,15 @@ burl = SSDATA (base_url); } - bytes = CHAR_TO_BYTE (iend) - CHAR_TO_BYTE (istart); - if (htmlp) - doc = fn_htmlReadMemory ((char *) BYTE_POS_ADDR (CHAR_TO_BYTE (istart)), - bytes, burl, "utf-8", + doc = fn_htmlReadMemory ((char *) BYTE_POS_ADDR (istart_byte), + iend_byte - istart_byte, burl, "utf-8", HTML_PARSE_RECOVER|HTML_PARSE_NONET| HTML_PARSE_NOWARNING|HTML_PARSE_NOERROR| HTML_PARSE_NOBLANKS); else - doc = fn_xmlReadMemory ((char *) BYTE_POS_ADDR (CHAR_TO_BYTE (istart)), - bytes, burl, "utf-8", + doc = fn_xmlReadMemory ((char *) BYTE_POS_ADDR (istart_byte), + iend_byte - istart_byte, burl, "utf-8", XML_PARSE_NONET|XML_PARSE_NOWARNING| XML_PARSE_NOBLANKS |XML_PARSE_NOERROR); ------------------------------------------------------------ revno: 111483 committer: Dmitry Antipov branch nick: trunk timestamp: Fri 2013-01-11 14:40:54 +0400 message: Use point-max-marker and point-min-marker here and there. * lisp/emacs-lisp/ert.el (ert-run-test): Use point-max-marker. * lisp/erc/erc-dcc.el (erc-dcc-chat-setup): Likewise. * lisp/gnus/gnus-async.el (gnus-async-article-callback): Likewise. * lisp/erc/erc-dcc.el (erc-dcc-send-file): Use point-min-marker. * lisp/gnus/gnus-art.el (gnus-mime-display-security): Use point-min-marker and point-max-marker. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-01-11 09:45:54 +0000 +++ lisp/ChangeLog 2013-01-11 10:40:54 +0000 @@ -1,3 +1,7 @@ +2013-01-11 Dmitry Antipov + + * emacs-lisp/ert.el (ert-run-test): Use point-max-marker. + 2013-01-11 Eli Zaretskii * autorevert.el (auto-revert-notify-rm-watch) === modified file 'lisp/emacs-lisp/ert.el' --- lisp/emacs-lisp/ert.el 2013-01-02 16:13:04 +0000 +++ lisp/emacs-lisp/ert.el 2013-01-11 10:40:54 +0000 @@ -937,7 +937,7 @@ (cl-block error (let ((begin-marker (with-current-buffer (get-buffer-create "*Messages*") - (set-marker (make-marker) (point-max))))) + (point-max-marker)))) (unwind-protect (let ((info (make-ert--test-execution-info :test ert-test === modified file 'lisp/erc/ChangeLog' --- lisp/erc/ChangeLog 2013-01-04 01:31:52 +0000 +++ lisp/erc/ChangeLog 2013-01-11 10:40:54 +0000 @@ -1,3 +1,8 @@ +2013-01-11 Dmitry Antipov + + * erc-dcc.el (erc-dcc-send-file): Use point-min-marker. + (erc-dcc-chat-setup): Use point-max-marker. + 2013-01-04 Glenn Morris * erc-backend.el (312): Fix typo. (Bug#13235) === modified file 'lisp/erc/erc-dcc.el' --- lisp/erc/erc-dcc.el 2013-01-02 16:13:04 +0000 +++ lisp/erc/erc-dcc.el 2013-01-11 10:40:54 +0000 @@ -897,7 +897,7 @@ (let* ((buffer (erc-dcc-find-file file)) (size (buffer-size buffer)) (start (with-current-buffer buffer - (set-marker (make-marker) (point-min)))) + (point-min-marker))) (sproc (erc-dcc-server "dcc-send" 'erc-dcc-send-filter 'erc-dcc-send-sentinel)) @@ -1166,7 +1166,7 @@ (setq erc-dcc-from nick) (setq erc-dcc-entry-data entry) (setq erc-dcc-unprocessed-output "") - (setq erc-insert-marker (set-marker (make-marker) (point-max))) + (setq erc-insert-marker (point-max-marker)) (setq erc-input-marker (make-marker)) (erc-display-prompt buffer (point-max)) (set-process-buffer proc buffer) === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2013-01-11 03:06:13 +0000 +++ lisp/gnus/ChangeLog 2013-01-11 10:40:54 +0000 @@ -1,3 +1,9 @@ +2013-01-11 Dmitry Antipov + + * gnus-art.el (gnus-mime-display-security): Use point-min-marker + and point-max-marker. + * gnus-async.el (gnus-async-article-callback): Use point-max-marker. + 2013-01-10 Uwe Brauer (tiny change) * mml-smime.el (mml-smime-encrypt-to-self): New user option analogous === modified file 'lisp/gnus/gnus-art.el' --- lisp/gnus/gnus-art.el 2013-01-02 16:13:04 +0000 +++ lisp/gnus/gnus-art.el 2013-01-11 10:40:54 +0000 @@ -8688,9 +8688,7 @@ gnus-mime-security-button-end-line-format)) (gnus-insert-mime-security-button handle))) (mm-set-handle-multipart-parameter - handle 'gnus-region - (cons (set-marker (make-marker) (point-min)) - (set-marker (make-marker) (point-max)))) + handle 'gnus-region (cons (point-min-marker) (point-max-marker))) (goto-char (point-max)))) (defun gnus-mime-security-run-function (function) === modified file 'lisp/gnus/gnus-async.el' --- lisp/gnus/gnus-async.el 2013-01-01 09:11:05 +0000 +++ lisp/gnus/gnus-async.el 2013-01-11 10:40:54 +0000 @@ -254,7 +254,7 @@ gnus-async-article-alist (cons (list (intern (format "%s-%d" group article) gnus-async-hashtb) - mark (set-marker (make-marker) (point-max)) + mark (point-max-marker) group article) gnus-async-article-alist)))) (if (not (gnus-buffer-live-p summary)) ------------------------------------------------------------ revno: 111482 committer: Eli Zaretskii branch nick: trunk timestamp: Fri 2013-01-11 11:45:54 +0200 message: Fix last commit in autorevert.el. lisp/autorevert.el (auto-revert-notify-rm-watch) (auto-revert-notify-add-watch): Fix typos in w32notify function names. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-01-10 20:26:15 +0000 +++ lisp/ChangeLog 2013-01-11 09:45:54 +0000 @@ -1,3 +1,9 @@ +2013-01-11 Eli Zaretskii + + * autorevert.el (auto-revert-notify-rm-watch) + (auto-revert-notify-add-watch): Fix typos in w32notify function + names. + 2013-01-10 Michael Albinus * autorevert.el (auto-revert-notify-enabled): Move up. === modified file 'lisp/autorevert.el' --- lisp/autorevert.el 2013-01-10 20:26:15 +0000 +++ lisp/autorevert.el 2013-01-11 09:45:54 +0000 @@ -466,7 +466,8 @@ (defun auto-revert-notify-rm-watch () "Disable file watch for current buffer's associated file." (when auto-revert-notify-watch-descriptor - (funcall (if (fboundp 'inotify-rm-watch) 'inotify-rm-watch 'w32-rm-watch) + (funcall (if (fboundp 'inotify-rm-watch) + 'inotify-rm-watch 'w32notify-rm-watch) auto-revert-notify-watch-descriptor) (remhash auto-revert-notify-watch-descriptor auto-revert-notify-watch-descriptor-hash-list)) @@ -478,7 +479,7 @@ (when (and buffer-file-name auto-revert-use-notify) (auto-revert-notify-rm-watch) (let ((func (if (fboundp 'inotify-add-watch) - 'inotify-add-watch 'w32-add-watch)) + 'inotify-add-watch 'w32notify-add-watch)) (aspect (if (fboundp 'inotify-add-watch) '(close-write) '(last-write-time)))) (setq auto-revert-notify-watch-descriptor ------------------------------------------------------------ revno: 111481 fixes bug: http://debbugs.gnu.org/13387 committer: Eli Zaretskii branch nick: trunk timestamp: Fri 2013-01-11 11:33:54 +0200 message: MS-Windows followup to bugfix #13387. nt/inc/unistd.h (O_IGNORE_CTTY): Define, as it is unconditionally used in term.c. diff: === modified file 'nt/ChangeLog' --- nt/ChangeLog 2013-01-09 15:07:44 +0000 +++ nt/ChangeLog 2013-01-11 09:33:54 +0000 @@ -1,3 +1,8 @@ +2013-01-11 Eli Zaretskii + + * inc/unistd.h (O_IGNORE_CTTY): Define, as it is unconditionally + used in term.c. (Bug#13387) + 2013-01-09 Juanma Barranquero * config.nt: Sync with autogen/config.in. === modified file 'nt/inc/unistd.h' --- nt/inc/unistd.h 2012-12-09 22:10:18 +0000 +++ nt/inc/unistd.h 2013-01-11 09:33:54 +0000 @@ -27,6 +27,7 @@ #define AT_SYMLINK_NOFOLLOW 4096 #define O_NOCTTY 0 +#define O_IGNORE_CTTY 0 /* This is normally on stdlib.h, but we don't override that header. */ extern int unsetenv (const char *); ------------------------------------------------------------ revno: 111480 committer: Eli Zaretskii branch nick: trunk timestamp: Fri 2013-01-11 11:20:41 +0200 message: lib/getopt_.h: Regenerate. diff: === modified file 'ChangeLog' --- ChangeLog 2013-01-10 02:19:44 +0000 +++ ChangeLog 2013-01-11 09:20:41 +0000 @@ -1,3 +1,7 @@ +2013-01-11 Eli Zaretskii + + * lib/getopt_.h: Regenerate. + 2013-01-10 Paul Eggert Merge from gnulib, incorporating: === modified file 'lib/getopt_.h' --- lib/getopt_.h 2013-01-01 09:11:05 +0000 +++ lib/getopt_.h 2013-01-11 09:20:41 +0000 @@ -1,283 +1,285 @@ -/* Declarations for getopt. - Copyright (C) 1989-1994, 1996-1999, 2001, 2003-2007, 2009-2013 Free - Software Foundation, Inc. - This file is part of the GNU C Library. - - 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 . */ - -#ifndef _GL_GETOPT_H - -#if __GNUC__ >= 3 -#pragma GCC system_header -#endif - - -/* The include_next requires a split double-inclusion guard. We must - also inform the replacement unistd.h to not recursively use - ; our definitions will be present soon enough. */ -#if HAVE_GETOPT_H -# define _GL_SYSTEM_GETOPT -# ifndef __GNUC__ -# include -# else -# include_next -# endif -# undef _GL_SYSTEM_GETOPT -#endif - -#ifndef _GL_GETOPT_H - -#ifndef __need_getopt -# define _GL_GETOPT_H 1 -#endif - -/* Standalone applications should #define __GETOPT_PREFIX to an - identifier that prefixes the external functions and variables - defined in this header. When this happens, include the - headers that might declare getopt so that they will not cause - confusion if included after this file (if the system had , - we have already included it). Then systematically rename - identifiers so that they do not collide with the system functions - and variables. Renaming avoids problems with some compilers and - linkers. */ -#if defined __GETOPT_PREFIX && !defined __need_getopt -# if !HAVE_GETOPT_H -# include -# include -# include -# endif -# undef __need_getopt -# undef getopt -# undef getopt_long -# undef getopt_long_only -# undef optarg -# undef opterr -# undef optind -# undef optopt -# undef option -# define __GETOPT_CONCAT(x, y) x ## y -# define __GETOPT_XCONCAT(x, y) __GETOPT_CONCAT (x, y) -# define __GETOPT_ID(y) __GETOPT_XCONCAT (__GETOPT_PREFIX, y) -# define getopt __GETOPT_ID (getopt) -# define getopt_long __GETOPT_ID (getopt_long) -# define getopt_long_only __GETOPT_ID (getopt_long_only) -# define optarg __GETOPT_ID (optarg) -# define opterr __GETOPT_ID (opterr) -# define optind __GETOPT_ID (optind) -# define optopt __GETOPT_ID (optopt) -# define option __GETOPT_ID (option) -# define _getopt_internal __GETOPT_ID (getopt_internal) -#endif - -/* Standalone applications get correct prototypes for getopt_long and - getopt_long_only; they declare "char **argv". libc uses prototypes - with "char *const *argv" that are incorrect because getopt_long and - getopt_long_only can permute argv; this is required for backward - compatibility (e.g., for LSB 2.0.1). - - This used to be '#if defined __GETOPT_PREFIX && !defined __need_getopt', - but it caused redefinition warnings if both unistd.h and getopt.h were - included, since unistd.h includes getopt.h having previously defined - __need_getopt. - - The only place where __getopt_argv_const is used is in definitions - of getopt_long and getopt_long_only below, but these are visible - only if __need_getopt is not defined, so it is quite safe to rewrite - the conditional as follows: -*/ -#if !defined __need_getopt -# if defined __GETOPT_PREFIX -# define __getopt_argv_const /* empty */ -# else -# define __getopt_argv_const const -# endif -#endif - -/* If __GNU_LIBRARY__ is not already defined, either we are being used - standalone, or this is the first header included in the source file. - If we are being used with glibc, we need to include , but - that does not exist if we are standalone. So: if __GNU_LIBRARY__ is - not defined, include , which will pull in for us - if it's from glibc. (Why ctype.h? It's guaranteed to exist and it - doesn't flood the namespace with stuff the way some other headers do.) */ -#if !defined __GNU_LIBRARY__ -# include -#endif - -#ifndef __THROW -# ifndef __GNUC_PREREQ -# define __GNUC_PREREQ(maj, min) (0) -# endif -# if defined __cplusplus && __GNUC_PREREQ (2,8) -# define __THROW throw () -# else -# define __THROW -# endif -#endif - -/* The definition of _GL_ARG_NONNULL is copied here. */ -/* A C macro for declaring that specific arguments must not be NULL. - Copyright (C) 2009-2012 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools - that the values passed as arguments n, ..., m must be non-NULL pointers. - n = 1 stands for the first argument, n = 2 for the second argument etc. */ -#ifndef _GL_ARG_NONNULL -# if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3 -# define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) -# else -# define _GL_ARG_NONNULL(params) -# endif -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -/* For communication from 'getopt' to the caller. - When 'getopt' finds an option that takes an argument, - the argument value is returned here. - Also, when 'ordering' is RETURN_IN_ORDER, - each non-option ARGV-element is returned here. */ - -extern char *optarg; - -/* Index in ARGV of the next element to be scanned. - This is used for communication to and from the caller - and for communication between successive calls to 'getopt'. - - On entry to 'getopt', zero means this is the first call; initialize. - - When 'getopt' returns -1, this is the index of the first of the - non-option elements that the caller should itself scan. - - Otherwise, 'optind' communicates from one call to the next - how much of ARGV has been scanned so far. */ - -extern int optind; - -/* Callers store zero here to inhibit the error message 'getopt' prints - for unrecognized options. */ - -extern int opterr; - -/* Set to an option character which was unrecognized. */ - -extern int optopt; - -#ifndef __need_getopt -/* Describe the long-named options requested by the application. - The LONG_OPTIONS argument to getopt_long or getopt_long_only is a vector - of 'struct option' terminated by an element containing a name which is - zero. - - The field 'has_arg' is: - no_argument (or 0) if the option does not take an argument, - required_argument (or 1) if the option requires an argument, - optional_argument (or 2) if the option takes an optional argument. - - If the field 'flag' is not NULL, it points to a variable that is set - to the value given in the field 'val' when the option is found, but - left unchanged if the option is not found. - - To have a long-named option do something other than set an 'int' to - a compiled-in constant, such as set a value from 'optarg', set the - option's 'flag' field to zero and its 'val' field to a nonzero - value (the equivalent single-letter option character, if there is - one). For long options that have a zero 'flag' field, 'getopt' - returns the contents of the 'val' field. */ - -# if !GNULIB_defined_struct_option -struct option -{ - const char *name; - /* has_arg can't be an enum because some compilers complain about - type mismatches in all the code that assumes it is an int. */ - int has_arg; - int *flag; - int val; -}; -# define GNULIB_defined_struct_option 1 -# endif - -/* Names for the values of the 'has_arg' field of 'struct option'. */ - -# define no_argument 0 -# define required_argument 1 -# define optional_argument 2 -#endif /* need getopt */ - - -/* Get definitions and prototypes for functions to process the - arguments in ARGV (ARGC of them, minus the program name) for - options given in OPTS. - - Return the option character from OPTS just read. Return -1 when - there are no more options. For unrecognized options, or options - missing arguments, 'optopt' is set to the option letter, and '?' is - returned. - - The OPTS string is a list of characters which are recognized option - letters, optionally followed by colons, specifying that that letter - takes an argument, to be placed in 'optarg'. - - If a letter in OPTS is followed by two colons, its argument is - optional. This behavior is specific to the GNU 'getopt'. - - The argument '--' causes premature termination of argument - scanning, explicitly telling 'getopt' that there are no more - options. - - If OPTS begins with '-', then non-option arguments are treated as - arguments to the option '\1'. This behavior is specific to the GNU - 'getopt'. If OPTS begins with '+', or POSIXLY_CORRECT is set in - the environment, then do not permute arguments. */ - -extern int getopt (int ___argc, char *const *___argv, const char *__shortopts) - __THROW _GL_ARG_NONNULL ((2, 3)); - -#ifndef __need_getopt -extern int getopt_long (int ___argc, char *__getopt_argv_const *___argv, - const char *__shortopts, - const struct option *__longopts, int *__longind) - __THROW _GL_ARG_NONNULL ((2, 3)); -extern int getopt_long_only (int ___argc, char *__getopt_argv_const *___argv, - const char *__shortopts, - const struct option *__longopts, int *__longind) - __THROW _GL_ARG_NONNULL ((2, 3)); - -#endif - -#ifdef __cplusplus -} -#endif - -/* Make sure we later can get all the definitions and declarations. */ -#undef __need_getopt - -#endif /* _GL_GETOPT_H */ -#endif /* _GL_GETOPT_H */ +/* Declarations for getopt. + Copyright (C) 1989-1994, 1996-1999, 2001, 2003-2007, 2009-2013 Free Software + Foundation, Inc. + This file is part of the GNU C Library. + + 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 . */ + +#ifndef _GL_GETOPT_H + +#if __GNUC__ >= 3 +#pragma GCC system_header +#endif + + +/* The include_next requires a split double-inclusion guard. We must + also inform the replacement unistd.h to not recursively use + ; our definitions will be present soon enough. */ +#if HAVE_GETOPT_H +# define _GL_SYSTEM_GETOPT +# ifndef __GNUC__ +# include +# else +# include_next +# endif +# undef _GL_SYSTEM_GETOPT +#endif + +#ifndef _GL_GETOPT_H + +#ifndef __need_getopt +# define _GL_GETOPT_H 1 +#endif + +/* Standalone applications should #define __GETOPT_PREFIX to an + identifier that prefixes the external functions and variables + defined in this header. When this happens, include the + headers that might declare getopt so that they will not cause + confusion if included after this file (if the system had , + we have already included it). Then systematically rename + identifiers so that they do not collide with the system functions + and variables. Renaming avoids problems with some compilers and + linkers. */ +#if defined __GETOPT_PREFIX && !defined __need_getopt +# if !HAVE_GETOPT_H +# define __need_system_stdlib_h +# include +# undef __need_system_stdlib_h +# include +# include +# endif +# undef __need_getopt +# undef getopt +# undef getopt_long +# undef getopt_long_only +# undef optarg +# undef opterr +# undef optind +# undef optopt +# undef option +# define __GETOPT_CONCAT(x, y) x ## y +# define __GETOPT_XCONCAT(x, y) __GETOPT_CONCAT (x, y) +# define __GETOPT_ID(y) __GETOPT_XCONCAT (__GETOPT_PREFIX, y) +# define getopt __GETOPT_ID (getopt) +# define getopt_long __GETOPT_ID (getopt_long) +# define getopt_long_only __GETOPT_ID (getopt_long_only) +# define optarg __GETOPT_ID (optarg) +# define opterr __GETOPT_ID (opterr) +# define optind __GETOPT_ID (optind) +# define optopt __GETOPT_ID (optopt) +# define option __GETOPT_ID (option) +# define _getopt_internal __GETOPT_ID (getopt_internal) +#endif + +/* Standalone applications get correct prototypes for getopt_long and + getopt_long_only; they declare "char **argv". libc uses prototypes + with "char *const *argv" that are incorrect because getopt_long and + getopt_long_only can permute argv; this is required for backward + compatibility (e.g., for LSB 2.0.1). + + This used to be '#if defined __GETOPT_PREFIX && !defined __need_getopt', + but it caused redefinition warnings if both unistd.h and getopt.h were + included, since unistd.h includes getopt.h having previously defined + __need_getopt. + + The only place where __getopt_argv_const is used is in definitions + of getopt_long and getopt_long_only below, but these are visible + only if __need_getopt is not defined, so it is quite safe to rewrite + the conditional as follows: +*/ +#if !defined __need_getopt +# if defined __GETOPT_PREFIX +# define __getopt_argv_const /* empty */ +# else +# define __getopt_argv_const const +# endif +#endif + +/* If __GNU_LIBRARY__ is not already defined, either we are being used + standalone, or this is the first header included in the source file. + If we are being used with glibc, we need to include , but + that does not exist if we are standalone. So: if __GNU_LIBRARY__ is + not defined, include , which will pull in for us + if it's from glibc. (Why ctype.h? It's guaranteed to exist and it + doesn't flood the namespace with stuff the way some other headers do.) */ +#if !defined __GNU_LIBRARY__ +# include +#endif + +#ifndef __THROW +# ifndef __GNUC_PREREQ +# define __GNUC_PREREQ(maj, min) (0) +# endif +# if defined __cplusplus && __GNUC_PREREQ (2,8) +# define __THROW throw () +# else +# define __THROW +# endif +#endif + +/* The definition of _GL_ARG_NONNULL is copied here. */ +/* A C macro for declaring that specific arguments must not be NULL. + Copyright (C) 2009-2013 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 . */ + +/* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools + that the values passed as arguments n, ..., m must be non-NULL pointers. + n = 1 stands for the first argument, n = 2 for the second argument etc. */ +#ifndef _GL_ARG_NONNULL +# if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3 +# define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) +# else +# define _GL_ARG_NONNULL(params) +# endif +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +/* For communication from 'getopt' to the caller. + When 'getopt' finds an option that takes an argument, + the argument value is returned here. + Also, when 'ordering' is RETURN_IN_ORDER, + each non-option ARGV-element is returned here. */ + +extern char *optarg; + +/* Index in ARGV of the next element to be scanned. + This is used for communication to and from the caller + and for communication between successive calls to 'getopt'. + + On entry to 'getopt', zero means this is the first call; initialize. + + When 'getopt' returns -1, this is the index of the first of the + non-option elements that the caller should itself scan. + + Otherwise, 'optind' communicates from one call to the next + how much of ARGV has been scanned so far. */ + +extern int optind; + +/* Callers store zero here to inhibit the error message 'getopt' prints + for unrecognized options. */ + +extern int opterr; + +/* Set to an option character which was unrecognized. */ + +extern int optopt; + +#ifndef __need_getopt +/* Describe the long-named options requested by the application. + The LONG_OPTIONS argument to getopt_long or getopt_long_only is a vector + of 'struct option' terminated by an element containing a name which is + zero. + + The field 'has_arg' is: + no_argument (or 0) if the option does not take an argument, + required_argument (or 1) if the option requires an argument, + optional_argument (or 2) if the option takes an optional argument. + + If the field 'flag' is not NULL, it points to a variable that is set + to the value given in the field 'val' when the option is found, but + left unchanged if the option is not found. + + To have a long-named option do something other than set an 'int' to + a compiled-in constant, such as set a value from 'optarg', set the + option's 'flag' field to zero and its 'val' field to a nonzero + value (the equivalent single-letter option character, if there is + one). For long options that have a zero 'flag' field, 'getopt' + returns the contents of the 'val' field. */ + +# if !GNULIB_defined_struct_option +struct option +{ + const char *name; + /* has_arg can't be an enum because some compilers complain about + type mismatches in all the code that assumes it is an int. */ + int has_arg; + int *flag; + int val; +}; +# define GNULIB_defined_struct_option 1 +# endif + +/* Names for the values of the 'has_arg' field of 'struct option'. */ + +# define no_argument 0 +# define required_argument 1 +# define optional_argument 2 +#endif /* need getopt */ + + +/* Get definitions and prototypes for functions to process the + arguments in ARGV (ARGC of them, minus the program name) for + options given in OPTS. + + Return the option character from OPTS just read. Return -1 when + there are no more options. For unrecognized options, or options + missing arguments, 'optopt' is set to the option letter, and '?' is + returned. + + The OPTS string is a list of characters which are recognized option + letters, optionally followed by colons, specifying that that letter + takes an argument, to be placed in 'optarg'. + + If a letter in OPTS is followed by two colons, its argument is + optional. This behavior is specific to the GNU 'getopt'. + + The argument '--' causes premature termination of argument + scanning, explicitly telling 'getopt' that there are no more + options. + + If OPTS begins with '-', then non-option arguments are treated as + arguments to the option '\1'. This behavior is specific to the GNU + 'getopt'. If OPTS begins with '+', or POSIXLY_CORRECT is set in + the environment, then do not permute arguments. */ + +extern int getopt (int ___argc, char *const *___argv, const char *__shortopts) + __THROW _GL_ARG_NONNULL ((2, 3)); + +#ifndef __need_getopt +extern int getopt_long (int ___argc, char *__getopt_argv_const *___argv, + const char *__shortopts, + const struct option *__longopts, int *__longind) + __THROW _GL_ARG_NONNULL ((2, 3)); +extern int getopt_long_only (int ___argc, char *__getopt_argv_const *___argv, + const char *__shortopts, + const struct option *__longopts, int *__longind) + __THROW _GL_ARG_NONNULL ((2, 3)); + +#endif + +#ifdef __cplusplus +} +#endif + +/* Make sure we later can get all the definitions and declarations. */ +#undef __need_getopt + +#endif /* _GL_GETOPT_H */ +#endif /* _GL_GETOPT_H */ ------------------------------------------------------------ revno: 111479 author: Uwe Brauer (tiny change) committer: Katsumi Yamaoka branch nick: trunk timestamp: Fri 2013-01-11 03:06:13 +0000 message: lisp/gnus/mml-smime.el: Add mml-smime-encrypt-to-self * mml-smime.el (mml-smime-encrypt-to-self): New user option analogous to mml2015-encrypt-to-self. (mml-smime-epg-encrypt): Respect mml-smime-encrypt-to-self. diff: === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2013-01-09 05:11:16 +0000 +++ lisp/gnus/ChangeLog 2013-01-11 03:06:13 +0000 @@ -1,3 +1,9 @@ +2013-01-10 Uwe Brauer (tiny change) + + * mml-smime.el (mml-smime-encrypt-to-self): New user option analogous + to mml2015-encrypt-to-self. + (mml-smime-epg-encrypt): Respect mml-smime-encrypt-to-self. + 2013-01-09 Daiki Ueno * mml-smime.el (epg-sub-key-fingerprint): Autoload for === modified file 'lisp/gnus/mml-smime.el' --- lisp/gnus/mml-smime.el 2013-01-09 05:11:16 +0000 +++ lisp/gnus/mml-smime.el 2013-01-11 03:06:13 +0000 @@ -80,6 +80,12 @@ :version "24.4" :type 'boolean) +(defcustom mml-smime-encrypt-to-self nil + "If t, add your own key ID to recipient list when encryption." + :group 'mime-security + :version "24.4" + :type 'boolean) + (defun mml-smime-sign (cont) (let ((func (nth 1 (assq mml-smime-use mml-smime-function-alist)))) (if func @@ -475,13 +481,17 @@ (goto-char (point-max)))) (defun mml-smime-epg-encrypt (cont) - (let ((inhibit-redisplay t) - (context (epg-make-context 'CMS)) - (config (epg-configuration)) - (recipients (message-options-get 'mml-smime-epg-recipients)) - cipher signers - (boundary (mml-compute-boundary cont)) - recipient-key) + (let* ((inhibit-redisplay t) + (context (epg-make-context 'CMS)) + (config (epg-configuration)) + (recipients (message-options-get 'mml-smime-epg-recipients)) + cipher signers + (sender (message-options-get 'message-sender)) + (signer-names (or mml-smime-signers + (if (and mml-smime-sign-with-sender sender) + (list (concat "<" sender ">"))))) + (boundary (mml-compute-boundary cont)) + recipient-key) (unless recipients (setq recipients (apply #'nconc @@ -494,6 +504,10 @@ (message-options-set 'message-recipients (read-string "Recipients: "))) "[ \f\t\n\r\v,]+")))) + (when mml-smime-encrypt-to-self + (unless signer-names + (error "Neither message sender nor mml-smime-signers are set")) + (setq recipients (nconc recipients signer-names))) (if (eq mm-encrypt-option 'guided) (setq recipients (epa-select-keys context "\