Now on revision 112631. ------------------------------------------------------------ revno: 112631 committer: Paul Eggert branch nick: trunk timestamp: Fri 2013-05-17 22:32:17 -0700 message: Port --enable-gcc-warnings to clang. * configure.ac (nw): Remove obsolescent warnings. These aren't needed for clang, or for gcc for that matter. (emacs_cv_clang): New var, which tests for clang. Omit warnings that clang is too picky about. (GLIB_DISABLE_DEPRECATION_WARNINGS): Define this; needed for Ubuntu 13.04 + clang + --enable-gcc-warnings. * lib-src/etags.c: Omit unnecessary forward decls. (print_version, print_help): Declare _Noreturn. * lib-src/pop.c (socket_connection) [HAVE_GETADDRINFO]: Simplify. * src/bytecode.c (exec_byte_code): * src/regex.c: Redo diagnostic pragmas to pacify clang, too. * src/dbusbind.c (xd_retrieve_arg): Do not use uninitialized variable. * src/editfns.c (Fencode_time): * src/fileio.c (file_accessible_directory_p): * src/font.c (font_unparse_xlfd): Use '&"string"[index]' instead of '"string" + (index)'. * src/undo.c (user_error): Remove; unused. diff: === modified file 'ChangeLog' --- ChangeLog 2013-05-18 05:21:24 +0000 +++ ChangeLog 2013-05-18 05:32:17 +0000 @@ -1,5 +1,13 @@ 2013-05-18 Paul Eggert + Port --enable-gcc-warnings to clang. + * configure.ac (nw): Remove obsolescent warnings. + These aren't needed for clang, or for gcc for that matter. + (emacs_cv_clang): New var, which tests for clang. + Omit warnings that clang is too picky about. + (GLIB_DISABLE_DEPRECATION_WARNINGS): Define this; + needed for Ubuntu 13.04 + clang + --enable-gcc-warnings. + * make-dist (files): Add nt/Makefile.in, nt/gnulib.mk. Otherwise, 'configure; make' fails on non-Windows builds. === modified file 'configure.ac' --- configure.ac 2013-05-15 16:15:07 +0000 +++ configure.ac 2013-05-18 05:32:17 +0000 @@ -554,7 +554,7 @@ i[3456]86-*-* ) case "${canonical}" in *-darwin* ) opsys=darwin ;; - *-mingw32 ) + *-mingw32 ) opsys=mingw32 # MinGW overrides and adds some system headers in nt/inc. GCC_TEST_OPTIONS="-I $srcdir/nt/inc" @@ -747,27 +747,13 @@ esac AC_SUBST([WERROR_CFLAGS]) - nw="$nw -Waggregate-return" # anachronistic - nw="$nw -Wlong-long" # C90 is anachronistic - nw="$nw -Wc++-compat" # We don't care about C++ compilers - nw="$nw -Wundef" # Warns on '#if GNULIB_FOO' etc in gnulib - nw="$nw -Wtraditional" # Warns on #elif which we use often - nw="$nw -Wcast-qual" # Too many warnings for now - nw="$nw -Wconversion" # Too many warnings for now nw="$nw -Wsystem-headers" # Don't let system headers trigger warnings - nw="$nw -Wsign-conversion" # Too many warnings for now nw="$nw -Woverlength-strings" # Not a problem these days - nw="$nw -Wtraditional-conversion" # Too many warnings for now - nw="$nw -Wunreachable-code" # so buggy that it's now silently ignored - nw="$nw -Wpadded" # Our structs are not padded - nw="$nw -Wredundant-decls" # we regularly (re)declare functions nw="$nw -Wlogical-op" # any use of fwrite provokes this nw="$nw -Wformat-nonliteral" # we do this a lot nw="$nw -Wvla" # warnings in gettext.h nw="$nw -Wnested-externs" # use of XARGMATCH/verify_function__ - nw="$nw -Wswitch-enum" # Too many warnings for now nw="$nw -Wswitch-default" # Too many warnings for now - nw="$nw -Wfloat-equal" # warns about high-quality code nw="$nw -Winline" # OK to ignore 'inline' nw="$nw -Wjump-misses-init" # We sometimes safely jump over init. nw="$nw -Wstrict-overflow" # OK to optimize assuming that @@ -785,6 +771,20 @@ # The following line should be removable at some point. nw="$nw -Wsuggest-attribute=pure" + # clang is unduly picky about some things. + AC_CACHE_CHECK([whether the compiler is clang], [emacs_cv_clang], + [AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM([[ + #ifndef __clang__ + #error "not clang" + #endif + ]])], + [emacs_cv_clang=yes], + [emacs_cv_clang=no])]) + if test $emacs_cv_clang = yes; then + nw="$nw -Wcast-align" + fi + gl_MANYWARN_ALL_GCC([ws]) gl_MANYWARN_COMPLEMENT([ws], [$ws], [$nw]) for w in $ws; do @@ -801,6 +801,14 @@ # gcc 4.5.0 20090517. gl_WARN_ADD([-Wno-logical-op]) + # More things that clang is unduly picky about. + if test $emacs_cv_clang = yes; then + gl_WARN_ADD([-Wno-format-extra-args]) + gl_WARN_ADD([-Wno-tautological-constant-out-of-range-compare]) + gl_WARN_ADD([-Wno-unused-command-line-argument]) + gl_WARN_ADD([-Wno-unused-value]) + fi + gl_WARN_ADD([-fdiagnostics-show-option]) gl_WARN_ADD([-funit-at-a-time]) @@ -1604,15 +1612,15 @@ EMACS_MANIFEST= if test "${with_w32}" != no; then case "${opsys}" in - cygwin) + cygwin) AC_CHECK_HEADER([windows.h], [HAVE_W32=yes], [AC_MSG_ERROR([`--with-w32' was specified, but windows.h - cannot be found.])]) + cannot be found.])]) ;; mingw32) ## Using --with-w32 with MinGW is a no-op, but we allow it. ;; - *) + *) AC_MSG_ERROR([Using w32 with an autotools build is only supported for Cygwin and MinGW32.]) ;; esac @@ -1626,7 +1634,7 @@ [[void test(PIMAGE_NT_HEADERS pHeader) {PIMAGE_SECTION_HEADER pSection = IMAGE_FIRST_SECTION(pHeader);}]])], [emacs_cv_w32api=yes - HAVE_W32=yes], + HAVE_W32=yes], emacs_cv_w32api=no) AC_MSG_RESULT($emacs_cv_w32api) if test "${emacs_cv_w32api}" = "no"; then @@ -2074,6 +2082,7 @@ USE_GTK_TOOLKIT="GTK3" if test "x$ac_enable_gtk_deprecation_warnings" = x; then GTK_CFLAGS="$GTK_CFLAGS -DGDK_DISABLE_DEPRECATION_WARNINGS" + GTK_CFLAGS="$GTK_CFLAGS -DGLIB_DISABLE_DEPRECATION_WARNINGS" fi else check_gtk2=yes === modified file 'lib-src/ChangeLog' --- lib-src/ChangeLog 2013-05-16 12:48:54 +0000 +++ lib-src/ChangeLog 2013-05-18 05:32:17 +0000 @@ -1,3 +1,10 @@ +2013-05-18 Paul Eggert + + Port --enable-gcc-warnings to clang. + * etags.c: Omit unnecessary forward decls. + (print_version, print_help): Declare _Noreturn. + * pop.c (socket_connection) [HAVE_GETADDRINFO]: Simplify. + 2013-05-16 Eli Zaretskii * update-game-score.c [WINDOWSNT]: Include "ntlib.h". === modified file 'lib-src/etags.c' --- lib-src/etags.c 2013-03-13 07:27:34 +0000 +++ lib-src/etags.c 2013-05-18 05:32:17 +0000 @@ -316,15 +316,7 @@ static void Yacc_entries (FILE *); static void just_read_file (FILE *); -static void print_language_names (void); -static void print_version (void); -static void print_help (argument *); -int main (int, char **); - -static compressor *get_compressor_from_suffix (char *, char **); static language *get_language_from_langname (const char *); -static language *get_language_from_interpreter (char *); -static language *get_language_from_filename (char *, bool); static void readline (linebuffer *, FILE *); static long readline_internal (linebuffer *, FILE *); static bool nocase_tail (const char *); @@ -346,7 +338,6 @@ static void free_tree (node *); static void free_fdesc (fdesc *); static void pfnote (char *, bool, char *, int, int, long); -static void make_tag (const char *, int, bool, char *, int, int, long); static void invalidate_nodes (fdesc *, node **); static void put_entries (node *); @@ -816,7 +807,7 @@ #ifndef VERSION # define VERSION "17.38.1.4" #endif -static void +static _Noreturn void print_version (void) { char emacs_copyright[] = COPYRIGHT; @@ -832,7 +823,7 @@ # define PRINT_UNDOCUMENTED_OPTIONS_HELP FALSE #endif -static void +static _Noreturn void print_help (argument *argbuffer) { bool help_for_lang = FALSE; === modified file 'lib-src/pop.c' --- lib-src/pop.c 2013-03-12 22:00:07 +0000 +++ lib-src/pop.c 2013-05-18 05:32:17 +0000 @@ -1075,28 +1075,22 @@ } } while (ret != 0); - if (ret == 0) + for (it = res; it; it = it->ai_next) + if (it->ai_addrlen == sizeof addr) + { + struct sockaddr_in *in_a = (struct sockaddr_in *) it->ai_addr; + addr.sin_addr = in_a->sin_addr; + if (! connect (sock, (struct sockaddr *) &addr, sizeof addr)) + break; + } + connect_ok = it != NULL; + if (connect_ok) { - it = res; - while (it) - { - if (it->ai_addrlen == sizeof (addr)) - { - struct sockaddr_in *in_a = (struct sockaddr_in *) it->ai_addr; - addr.sin_addr = in_a->sin_addr; - if (! connect (sock, (struct sockaddr *) &addr, sizeof (addr))) - break; - } - it = it->ai_next; - } - connect_ok = it != NULL; - if (connect_ok) - { - realhost = alloca (strlen (it->ai_canonname) + 1); - strcpy (realhost, it->ai_canonname); - } - freeaddrinfo (res); + realhost = alloca (strlen (it->ai_canonname) + 1); + strcpy (realhost, it->ai_canonname); } + freeaddrinfo (res); + #else /* !HAVE_GETADDRINFO */ do { === modified file 'src/ChangeLog' --- src/ChangeLog 2013-05-16 19:15:32 +0000 +++ src/ChangeLog 2013-05-18 05:32:17 +0000 @@ -1,3 +1,16 @@ +2013-05-18 Paul Eggert + + Port --enable-gcc-warnings to clang. + * bytecode.c (exec_byte_code): + * regex.c: + Redo diagnostic pragmas to pacify clang, too. + * dbusbind.c (xd_retrieve_arg): Do not use uninitialized variable. + * editfns.c (Fencode_time): + * fileio.c (file_accessible_directory_p): + * font.c (font_unparse_xlfd): + Use '&"string"[index]' instead of '"string" + (index)'. + * undo.c (user_error): Remove; unused. + 2013-05-16 Eli Zaretskii * insdel.c (insert_1_both): Document the arguments, instead of === modified file 'src/bytecode.c' --- src/bytecode.c 2013-03-24 12:59:45 +0000 +++ src/bytecode.c 2013-05-18 05:32:17 +0000 @@ -660,9 +660,12 @@ the table clearer. */ #define LABEL(OP) [OP] = &&insn_ ## OP -#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6) +#if 4 < __GNUC__ + (6 <= __GNUC_MINOR__) # pragma GCC diagnostic push # pragma GCC diagnostic ignored "-Woverride-init" +#elif defined __clang__ +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Winitializer-overrides" #endif /* This is the dispatch table for the threaded interpreter. */ @@ -676,7 +679,7 @@ #undef DEFINE }; -#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6) +#if 4 < __GNUC__ + (6 <= __GNUC_MINOR__) || defined __clang__ # pragma GCC diagnostic pop #endif === modified file 'src/dbusbind.c' --- src/dbusbind.c 2013-01-02 16:13:04 +0000 +++ src/dbusbind.c 2013-05-18 05:32:17 +0000 @@ -882,7 +882,7 @@ #endif { dbus_uint32_t val; - unsigned int pval = val; + unsigned int pval; dbus_message_iter_get_basic (iter, &val); pval = val; XD_DEBUG_MESSAGE ("%c %u", dtype, pval); === modified file 'src/editfns.c' --- src/editfns.c 2013-04-02 01:54:56 +0000 +++ src/editfns.c 2013-05-18 05:32:17 +0000 @@ -1946,7 +1946,7 @@ EMACS_INT zone_hr = abszone / (60*60); int zone_min = (abszone/60) % 60; int zone_sec = abszone % 60; - sprintf (tzbuf, tzbuf_format, "-" + (XINT (zone) < 0), + sprintf (tzbuf, tzbuf_format, &"-"[XINT (zone) < 0], zone_hr, zone_min, zone_sec); tzstring = tzbuf; } === modified file 'src/fileio.c' --- src/fileio.c 2013-05-07 21:34:03 +0000 +++ src/fileio.c 2013-05-18 05:32:17 +0000 @@ -2873,7 +2873,7 @@ and it's a safe optimization here. */ char *buf = SAFE_ALLOCA (len + 3); memcpy (buf, file, len); - strcpy (buf + len, "/." + (file[len - 1] == '/')); + strcpy (buf + len, &"/."[file[len - 1] == '/']); dir = buf; } === modified file 'src/font.c' --- src/font.c 2013-04-27 13:32:24 +0000 +++ src/font.c 2013-05-18 05:32:17 +0000 @@ -1219,7 +1219,7 @@ return -1; f[j] = p = alloca (alloc); sprintf (p, "%s%s-*", SDATA (val), - "*" + (SDATA (val)[SBYTES (val) - 1] == '*')); + &"*"[SDATA (val)[SBYTES (val) - 1] == '*']); } else f[j] = SSDATA (val); @@ -1618,7 +1618,7 @@ } if (point_size > 0) { - int len = snprintf (p, lim - p, "-%d" + (p == name), point_size); + int len = snprintf (p, lim - p, &"-%d"[p == name], point_size); if (! (0 <= len && len < lim - p)) return -1; p += len; === modified file 'src/regex.c' --- src/regex.c 2013-05-15 00:52:07 +0000 +++ src/regex.c 2013-05-18 05:32:17 +0000 @@ -33,10 +33,9 @@ /* Ignore some GCC warnings for now. This section should go away once the Emacs and Gnulib regex code is merged. */ -#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5) +#if 4 < __GNUC__ + (5 <= __GNUC_MINOR__) || defined __clang__ # pragma GCC diagnostic ignored "-Wstrict-overflow" # ifndef emacs -# pragma GCC diagnostic ignored "-Wunused-but-set-variable" # pragma GCC diagnostic ignored "-Wunused-function" # pragma GCC diagnostic ignored "-Wunused-macros" # pragma GCC diagnostic ignored "-Wunused-result" @@ -44,6 +43,10 @@ # endif #endif +#if 4 < __GNUC__ + (5 <= __GNUC_MINOR__) && ! defined __clang__ +# pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#endif + #include #include === modified file 'src/undo.c' --- src/undo.c 2013-01-08 19:13:31 +0000 +++ src/undo.c 2013-05-18 05:32:17 +0000 @@ -445,12 +445,6 @@ unbind_to (count, Qnil); } -static _Noreturn void -user_error (const char *msg) -{ - xsignal1 (Quser_error, build_string (msg)); -} - void syms_of_undo (void) ------------------------------------------------------------ revno: 112630 committer: Paul Eggert branch nick: trunk timestamp: Fri 2013-05-17 22:21:24 -0700 message: * make-dist (files): Add nt/Makefile.in, nt/gnulib.mk. Otherwise, 'configure; make' fails on non-Windows builds. diff: === modified file 'ChangeLog' --- ChangeLog 2013-05-16 12:48:54 +0000 +++ ChangeLog 2013-05-18 05:21:24 +0000 @@ -1,3 +1,8 @@ +2013-05-18 Paul Eggert + + * make-dist (files): Add nt/Makefile.in, nt/gnulib.mk. + Otherwise, 'configure; make' fails on non-Windows builds. + 2013-05-16 Eli Zaretskii * lib/Makefile.am: If building for MS-Windows, include === modified file 'make-dist' --- make-dist 2013-05-01 19:28:41 +0000 +++ make-dist 2013-05-18 05:21:24 +0000 @@ -389,6 +389,7 @@ ln emacs-x86.manifest emacs-x64.manifest emacs.rc ../${tempdir}/nt ln config.nt emacsclient.rc emacs-src.tags ../${tempdir}/nt ln nmake.defs gmake.defs subdirs.el [a-z]*.bat [a-z]*.[ch] ../${tempdir}/nt + ln Makefile.in gnulib.mk ../${tempdir}/nt ln ChangeLog INSTALL README README.W32 makefile.w32-in ../${tempdir}/nt) echo "Making links to \`nt/inc' and its subdirectories" ------------------------------------------------------------ revno: 112629 committer: Leo Liu branch nick: trunk timestamp: Sat 2013-05-18 11:17:35 +0800 message: Teach inferior-octave-startup to handle Octave > 3.7 diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-05-18 01:17:50 +0000 +++ lisp/ChangeLog 2013-05-18 03:17:35 +0000 @@ -1,7 +1,7 @@ 2013-05-18 Leo Liu * progmodes/octave.el (inferior-octave-startup): Use OCTAVE_SRCDIR - instead. + instead. Include "--no-gui" to prevent hangs for Octave > 3.7. (octave-source-directories): Don't check process. (octave-source-directories, octave-find-definition): Doc fix. === modified file 'lisp/progmodes/octave.el' --- lisp/progmodes/octave.el 2013-05-18 01:17:50 +0000 +++ lisp/progmodes/octave.el 2013-05-18 03:17:35 +0000 @@ -707,6 +707,11 @@ inferior-octave-buffer inferior-octave-program (append (list "-i" "--no-line-editing") + ;; --no-gui is introduced in Octave > 3.7 + (when (zerop (process-file inferior-octave-program + nil nil nil + "--no-gui" "--help")) + (list "--no-gui")) inferior-octave-startup-args)))) (set-process-filter proc 'inferior-octave-output-digest) (setq inferior-octave-process proc ------------------------------------------------------------ revno: 112628 committer: Leo Liu branch nick: trunk timestamp: Sat 2013-05-18 09:17:50 +0800 message: * progmodes/octave.el (inferior-octave-startup): Use OCTAVE_SRCDIR instead. (octave-source-directories): Don't check process. (octave-source-directories, octave-find-definition): Doc fix. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-05-18 00:25:02 +0000 +++ lisp/ChangeLog 2013-05-18 01:17:50 +0000 @@ -1,3 +1,10 @@ +2013-05-18 Leo Liu + + * progmodes/octave.el (inferior-octave-startup): Use OCTAVE_SRCDIR + instead. + (octave-source-directories): Don't check process. + (octave-source-directories, octave-find-definition): Doc fix. + 2013-05-18 Glenn Morris * progmodes/vhdl-mode.el (vhdl-mode-map-init): === modified file 'lisp/progmodes/octave.el' --- lisp/progmodes/octave.el 2013-05-17 22:46:10 +0000 +++ lisp/progmodes/octave.el 2013-05-18 01:17:50 +0000 @@ -738,8 +738,10 @@ (inferior-octave-send-list-and-digest (list "PS2 (\"> \");\n"))) (inferior-octave-send-list-and-digest - (list "if exist(\"__octave_srcdir__\") disp(__octave_srcdir__) endif\n")) - (process-put proc 'octave-srcdir (car inferior-octave-output-list)) + (list "disp(getenv(\"OCTAVE_SRCDIR\"))\n")) + (process-put proc 'octave-srcdir + (unless (equal (car inferior-octave-output-list) "") + (car inferior-octave-output-list))) ;; O.K., now we are ready for the Inferior Octave startup commands. (inferior-octave-send-list-and-digest @@ -1627,14 +1629,16 @@ :type 'octave-help-function)))))))) (defcustom octave-source-directories nil - "A list of directories for Octave sources." + "A list of directories for Octave sources. +If the environment variable OCTAVE_SRCDIR is set, it is searched first." :type '(repeat directory) :group 'octave :version "24.4") (defun octave-source-directories () - (inferior-octave-check-process) - (let ((srcdir (process-get inferior-octave-process 'octave-srcdir))) + (let ((srcdir (or (and inferior-octave-process + (process-get inferior-octave-process 'octave-srcdir)) + (getenv "OCTAVE_SRCDIR")))) (if srcdir (cons srcdir octave-source-directories) octave-source-directories))) @@ -1668,7 +1672,7 @@ (defun octave-find-definition (fn) "Find the definition of FN. -Definitions for functions implemented in C++ can be found if +Functions implemented in C++ can be found if `octave-source-directories' is set correctly." (interactive (list (octave-completing-read))) (inferior-octave-send-list-and-digest ------------------------------------------------------------ revno: 112627 committer: Glenn Morris branch nick: trunk timestamp: Fri 2013-05-17 20:30:49 -0400 message: * lisp/gnus/message.el (message-mode): Use message-mode-abbrev-table, with text-mode-abbrev-table as parent. (Bug#14413) diff: === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2013-05-16 23:29:10 +0000 +++ lisp/gnus/ChangeLog 2013-05-18 00:30:49 +0000 @@ -1,3 +1,8 @@ +2013-05-18 Glenn Morris + + * message.el (message-mode): Use message-mode-abbrev-table, + with text-mode-abbrev-table as parent. (Bug#14413) + 2013-05-16 Katsumi Yamaoka * message.el (message-expand-group): Decode group names. === modified file 'lisp/gnus/message.el' --- lisp/gnus/message.el 2013-05-16 23:29:10 +0000 +++ lisp/gnus/message.el 2013-05-18 00:30:49 +0000 @@ -2939,7 +2939,6 @@ C-c M-m `message-mark-inserted-region' (mark region with enclosing tags). C-c M-f `message-mark-insert-file' (insert file marked with enclosing tags). M-RET `message-newline-and-reformat' (break the line and reformat)." - (setq local-abbrev-table text-mode-abbrev-table) (set (make-local-variable 'message-reply-buffer) nil) (set (make-local-variable 'message-inserted-headers) nil) (set (make-local-variable 'message-send-actions) nil) ------------------------------------------------------------ revno: 112626 committer: Glenn Morris branch nick: trunk timestamp: Fri 2013-05-17 20:25:02 -0400 message: * vhdl-mode.el (vhdl-mode-map-init): Remove backspace/delete bindings. (Bug#14392) diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-05-18 00:22:56 +0000 +++ lisp/ChangeLog 2013-05-18 00:25:02 +0000 @@ -1,5 +1,8 @@ 2013-05-18 Glenn Morris + * progmodes/vhdl-mode.el (vhdl-mode-map-init): + Remove backspace/delete bindings. (Bug#14392) + * cus-dep.el (custom-make-dependencies): Sort the output. (custom-versions-load-alist): Convert comment to doc. === modified file 'lisp/progmodes/vhdl-mode.el' --- lisp/progmodes/vhdl-mode.el 2013-05-16 07:56:46 +0000 +++ lisp/progmodes/vhdl-mode.el 2013-05-18 00:25:02 +0000 @@ -2784,11 +2784,6 @@ (define-key vhdl-mode-map "\M-\C-h" 'vhdl-mark-defun)) (define-key vhdl-mode-map "\M-\C-q" 'vhdl-indent-sexp) (define-key vhdl-mode-map "\M-^" 'vhdl-delete-indentation) - ;; backspace/delete key bindings - (define-key vhdl-mode-map [backspace] 'backward-delete-char-untabify) - (unless (boundp 'delete-key-deletes-forward) ; XEmacs variable - (define-key vhdl-mode-map [delete] 'delete-char) - (define-key vhdl-mode-map [(meta delete)] 'kill-word)) ;; mode specific key bindings (define-key vhdl-mode-map "\C-c\C-m\C-e" 'vhdl-electric-mode) (define-key vhdl-mode-map "\C-c\C-m\C-s" 'vhdl-stutter-mode) ------------------------------------------------------------ revno: 112625 committer: Glenn Morris branch nick: trunk timestamp: Fri 2013-05-17 20:22:56 -0400 message: * lisp/cus-dep.el (custom-make-dependencies): Sort the output. (custom-versions-load-alist): Convert comment to doc. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-05-17 22:46:10 +0000 +++ lisp/ChangeLog 2013-05-18 00:22:56 +0000 @@ -1,3 +1,8 @@ +2013-05-18 Glenn Morris + + * cus-dep.el (custom-make-dependencies): Sort the output. + (custom-versions-load-alist): Convert comment to doc. + 2013-05-17 Leo Liu * newcomment.el (comment-search-backward): Stricter in finding === modified file 'lisp/cus-dep.el' --- lisp/cus-dep.el 2013-05-16 09:58:56 +0000 +++ lisp/cus-dep.el 2013-05-18 00:22:56 +0000 @@ -121,36 +121,32 @@ (insert (autoload-rubric generated-custom-dependencies-file "custom dependencies" t)) (search-backward " ") - (mapatoms (lambda (symbol) - (let ((members (get symbol 'custom-group)) - where found) - (when members - (dolist (member - ;; So x and no-x builds won't differ. - (sort (mapcar 'car members) 'string<)) - (setq where (get member 'custom-where)) - (unless (or (null where) - (member where found)) - (push where found))) - (when found - (insert "(put '" (symbol-name symbol) - " 'custom-loads '") - (prin1 (nreverse found) (current-buffer)) - (insert ")\n")))))) + (let (alist) + (mapatoms (lambda (symbol) + (let ((members (get symbol 'custom-group)) + where found) + (when members + (dolist (member (mapcar 'car members)) + (setq where (get member 'custom-where)) + (unless (or (null where) + (member where found)) + (push where found))) + (when found + (push (cons (symbol-name symbol) + (with-output-to-string + (prin1 (sort found 'string<)))) alist)))))) + (dolist (e (sort alist (lambda (e1 e2) (string< (car e1) (car e2))))) + (insert "(put '" (car e) " 'custom-loads '" (cdr e) ")\n"))) (insert "\ -;; These are for handling :version. We need to have a minimum of -;; information so `customize-changed-options' could do its job. + +;; The remainder of this file is for handling :version. +;; We provide a minimum of information so that `customize-changed-options' +;; can do its job. ;; For groups we set `custom-version', `group-documentation' and ;; `custom-tag' (which are shown in the customize buffer), so we ;; don't have to load the file containing the group. -;; `custom-versions-load-alist' is an alist that has as car a version -;; number and as elts the files that have variables or faces that -;; contain that version. These files should be loaded before showing -;; the customization buffer that `customize-changed-options' -;; generates. - ;; This macro is used so we don't modify the information about ;; variables and groups if it's already set. (We don't know when ;; " (file-name-nondirectory generated-custom-dependencies-file) @@ -161,7 +157,8 @@ (put ,symbol ,propname ,value))) ") - (let ((version-alist nil)) + (let ((version-alist nil) + groups) (mapatoms (lambda (symbol) (let ((version (get symbol 'custom-version)) where) @@ -179,25 +176,32 @@ (push where (cdr (assoc version version-alist)))) (push (list version where) version-alist))) ;; This is a group - (insert "(custom-put-if-not '" (symbol-name symbol) - " 'custom-version ") - (prin1 version (current-buffer)) - (insert ")\n") - (insert "(custom-put-if-not '" (symbol-name symbol)) - (insert " 'group-documentation ") - (prin1 (get symbol 'group-documentation) (current-buffer)) - (insert ")\n") - (when (get symbol 'custom-tag) - (insert "(custom-put-if-not '" (symbol-name symbol)) - (insert " 'custom-tag ") - (prin1 (get symbol 'custom-tag) (current-buffer)) - (insert ")\n")) - )))))) + (push (list (symbol-name symbol) + (with-output-to-string (prin1 version)) + (with-output-to-string + (prin1 (get symbol 'group-documentation))) + (if (get symbol 'custom-tag) + (with-output-to-string + (prin1 (get symbol 'custom-tag))))) + groups))))))) + (dolist (e (sort groups (lambda (e1 e2) (string< (car e1) (car e2))))) + (insert "(custom-put-if-not '" (car e) " 'custom-version '" + (nth 1 e) ")\n") + (insert "(custom-put-if-not '" (car e) " 'group-documentation " + (nth 2 e) ")\n") + (if (nth 3 e) + (insert "(custom-put-if-not '" (car e) " 'custom-tag " + (nth 3 e) ")\n"))) (insert "\n(defvar custom-versions-load-alist " (if version-alist "'" "")) - (prin1 version-alist (current-buffer)) - (insert "\n \"For internal use by custom.\")\n")) + (prin1 (sort version-alist (lambda (e1 e2) (version< (car e1) (car e2)))) + (current-buffer)) + (insert "\n \"For internal use by custom. +This is an alist whose members have as car a version string, and as +elements the files that have variables or faces that contain that +version. These files should be loaded before showing the customization +buffer that `customize-changed-options' generates.\")\n\n")) (save-buffer) (message "Generating %s...done" generated-custom-dependencies-file)) ------------------------------------------------------------ revno: 112624 committer: Glenn Morris branch nick: trunk timestamp: Fri 2013-05-17 19:18:15 -0400 message: Fix typos in previous subword.el change diff: === modified file 'lisp/progmodes/subword.el' --- lisp/progmodes/subword.el 2013-05-15 23:55:41 +0000 +++ lisp/progmodes/subword.el 2013-05-17 23:18:15 +0000 @@ -148,8 +148,8 @@ ;;;###autoload (define-global-minor-mode global-subword-mode subword-mode - :group 'convenience - (lambda () (subword-mode 1))) + (lambda () (subword-mode 1)) + :group 'convenience) (defun subword-forward (&optional arg) "Do the same as `forward-word' but on subwords. @@ -302,8 +302,8 @@ ;;;###autoload (define-global-minor-mode global-superword-mode superword-mode - :group 'convenience - (lambda () (superword-mode 1))) + (lambda () (superword-mode 1)) + :group 'convenience) ;; ------------------------------------------------------------ revno: 112623 fixes bug: http://debbugs.gnu.org/14303 committer: Leo Liu branch nick: trunk timestamp: Sat 2013-05-18 06:46:10 +0800 message: * newcomment.el (comment-search-backward): Stricter in finding comment start. * progmodes/octave.el (octave-comment-start): Remove the SPC char. (octave-comment-start-skip): Properly anchored. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-05-17 04:33:12 +0000 +++ lisp/ChangeLog 2013-05-17 22:46:10 +0000 @@ -1,5 +1,13 @@ 2013-05-17 Leo Liu + * newcomment.el (comment-search-backward): Stricter in finding + comment start. (Bug#14303) + + * progmodes/octave.el (octave-comment-start): Remove the SPC char. + (octave-comment-start-skip): Properly anchored. + +2013-05-17 Leo Liu + * emacs-lisp/smie.el (smie-highlight-matching-block-mode): Clean up when turned off. (Bug#14395) (smie--highlight-matching-block-overlay): No longer buffer-local. === modified file 'lisp/newcomment.el' --- lisp/newcomment.el 2013-01-11 23:08:55 +0000 +++ lisp/newcomment.el 2013-05-17 22:46:10 +0000 @@ -485,27 +485,29 @@ Moves point to inside the comment and returns the position of the comment-starter. If no comment is found, moves point to LIMIT and raises an error or returns nil if NOERROR is non-nil." - ;; FIXME: If a comment-start appears inside a comment, we may erroneously - ;; stop there. This can be rather bad in general, but since - ;; comment-search-backward is only used to find the comment-column (in - ;; comment-set-column) and to find the comment-start string (via - ;; comment-beginning) in indent-new-comment-line, it should be harmless. - (if (not (re-search-backward comment-start-skip limit t)) - (unless noerror (error "No comment")) - (beginning-of-line) - (let* ((end (match-end 0)) - (cs (comment-search-forward end t)) - (pt (point))) - (if (not cs) - (progn (beginning-of-line) - (comment-search-backward limit noerror)) - (while (progn (goto-char cs) - (comment-forward) - (and (< (point) end) - (setq cs (comment-search-forward end t)))) - (setq pt (point))) - (goto-char pt) - cs)))) + (let (found end) + (while (and (not found) + (re-search-backward comment-start-skip limit t)) + (setq end (match-end 0)) + (unless (and comment-use-syntax + (nth 8 (syntax-ppss (or (match-end 1) + (match-beginning 0))))) + (setq found t))) + (if (not found) + (unless noerror (error "No comment")) + (beginning-of-line) + (let ((cs (comment-search-forward end t)) + (pt (point))) + (if (not cs) + (progn (beginning-of-line) + (comment-search-backward limit noerror)) + (while (progn (goto-char cs) + (comment-forward) + (and (< (point) end) + (setq cs (comment-search-forward end t)))) + (setq pt (point))) + (goto-char pt) + cs))))) (defun comment-beginning () "Find the beginning of the enclosing comment. === modified file 'lisp/progmodes/octave.el' --- lisp/progmodes/octave.el 2013-05-17 02:43:41 +0000 +++ lisp/progmodes/octave.el 2013-05-17 22:46:10 +0000 @@ -62,12 +62,11 @@ (defvar octave-comment-char ?# "Character to start an Octave comment.") -(defvar octave-comment-start - (string octave-comment-char ?\s) - "String to insert to start a new Octave in-line comment.") +(defvar octave-comment-start (char-to-string octave-comment-char) + "Octave-specific `comment-start' (which see).") -(defvar octave-comment-start-skip "\\(?:%!\\|\\s<+\\)\\s-*" - "Regexp to match the start of an Octave comment up to its body.") +(defvar octave-comment-start-skip "\\(^\\|\\S<\\)\\(?:%!\\|\\s<+\\)\\s-*" + "Octave-specific `comment-start-skip' (which see).") (defvar octave-begin-keywords '("classdef" "do" "enumeration" "events" "for" "function" "if" "methods" ------------------------------------------------------------ revno: 112622 [merge] committer: Eli Zaretskii branch nick: trunk timestamp: Fri 2013-05-17 12:36:54 +0300 message: Support invocation of un-installed runemacs.exe. nt/runemacs.c (WinMain): Support invocation of un-installed nt/runemacs.exe, by looking for src/emacs.exe. diff: === modified file 'nt/ChangeLog' --- nt/ChangeLog 2013-05-16 17:31:25 +0000 +++ nt/ChangeLog 2013-05-17 09:35:23 +0000 @@ -1,3 +1,8 @@ +2013-05-17 Eli Zaretskii + + * runemacs.c (WinMain): Support invocation of un-installed + nt/runemacs.exe, by looking for src/emacs.exe. + 2013-05-16 Eli Zaretskii * inc/stdint.h (SIZE_MAX) [!__GNUC__]: Define. (Bug#14409) === modified file 'nt/runemacs.c' --- nt/runemacs.c 2013-01-01 09:11:05 +0000 +++ nt/runemacs.c 2013-05-17 09:35:23 +0000 @@ -75,6 +75,11 @@ /* Quote executable name in case of spaces in the path. */ *new_cmdline = '"'; strcpy (new_cmdline + 1, modname); + /* Detect and handle un-installed runemacs.exe in nt/ subdirectory, + while emacs.exe is in src/. */ + if ((p = strrchr (new_cmdline, '\\')) != NULL + && stricmp (p, "\\nt") == 0) + strcpy (p, "\\src"); #ifdef CHOOSE_NEWEST_EXE { ------------------------------------------------------------ revno: 112621 fixes bug: http://debbugs.gnu.org/14395 committer: Leo Liu branch nick: trunk timestamp: Fri 2013-05-17 12:33:12 +0800 message: * emacs-lisp/smie.el (smie-highlight-matching-block-mode): Clean up when turned off. (smie--highlight-matching-block-overlay): No longer buffer-local. (smie-highlight-matching-block): Adjust. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-05-17 04:09:16 +0000 +++ lisp/ChangeLog 2013-05-17 04:33:12 +0000 @@ -1,3 +1,10 @@ +2013-05-17 Leo Liu + + * emacs-lisp/smie.el (smie-highlight-matching-block-mode): Clean + up when turned off. (Bug#14395) + (smie--highlight-matching-block-overlay): No longer buffer-local. + (smie-highlight-matching-block): Adjust. + 2013-05-17 Paul Eggert Doc string fix for "nanoseconds" (Bug#14406). === modified file 'lisp/emacs-lisp/smie.el' --- lisp/emacs-lisp/smie.el 2013-05-16 22:58:58 +0000 +++ lisp/emacs-lisp/smie.el 2013-05-17 04:33:12 +0000 @@ -1025,7 +1025,7 @@ "Face used to highlight matching block." :group 'smie) -(defvar-local smie--highlight-matching-block-overlay nil) +(defvar smie--highlight-matching-block-overlay nil) (defvar-local smie--highlight-matching-block-lastpos -1) (defun smie-highlight-matching-block () @@ -1056,7 +1056,8 @@ nil)))) (highlight (lambda (beg end) - (move-overlay smie--highlight-matching-block-overlay beg end) + (move-overlay smie--highlight-matching-block-overlay + beg end (current-buffer)) (overlay-put smie--highlight-matching-block-overlay 'face 'smie-matching-block-highlight)))) (save-excursion @@ -1095,10 +1096,15 @@ (when (timerp smie--highlight-matching-block-timer) (cancel-timer smie--highlight-matching-block-timer)) (setq smie--highlight-matching-block-timer nil) - (when smie-highlight-matching-block-mode - (remove-hook 'post-self-insert-hook #'smie-blink-matching-open 'local) - (setq smie--highlight-matching-block-timer - (run-with-idle-timer 0.2 t #'smie-highlight-matching-block)))) + (if smie-highlight-matching-block-mode + (progn + (remove-hook 'post-self-insert-hook #'smie-blink-matching-open 'local) + (setq smie--highlight-matching-block-timer + (run-with-idle-timer 0.2 t #'smie-highlight-matching-block))) + (when smie--highlight-matching-block-overlay + (delete-overlay smie--highlight-matching-block-overlay) + (setq smie--highlight-matching-block-overlay nil)) + (kill-local-variable 'smie--highlight-matching-block-lastpos))) ;;; The indentation engine. ------------------------------------------------------------ Use --include-merged or -n0 to see merged revisions.