------------------------------------------------------------ revno: 114656 committer: Paul Eggert branch nick: trunk timestamp: Mon 2013-10-14 00:12:49 -0700 message: * lisp.h (bool_vector_size): New function. All uses of XBOOL_VECTOR (x)->size changed to bool_vector_size (x). * data.c (bool_vector_spare_mask, bool_vector_binop_driver) (Fbool_vector_not, Fbool_vector_count_matches_at): Remove uses of 'eassume' that should no longer be needed, because they are subsumed by the 'eassume' in bool_vector_size. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-10-13 00:28:30 +0000 +++ src/ChangeLog 2013-10-14 07:12:49 +0000 @@ -1,3 +1,12 @@ +2013-10-14 Paul Eggert + + * lisp.h (bool_vector_size): New function. + All uses of XBOOL_VECTOR (x)->size changed to bool_vector_size (x). + * data.c (bool_vector_spare_mask, bool_vector_binop_driver) + (Fbool_vector_not, Fbool_vector_count_matches_at): + Remove uses of 'eassume' that should no longer be needed, + because they are subsumed by the 'eassume' in bool_vector_size. + 2013-10-12 Eli Zaretskii * image.c (GIFLIB_MAJOR, GIFLIB_MINOR, GIFLIB_RELEASE): Move back === modified file 'src/category.h' --- src/category.h 2013-09-20 15:34:36 +0000 +++ src/category.h 2013-10-14 07:12:49 +0000 @@ -63,7 +63,7 @@ #define XCATEGORY_SET XBOOL_VECTOR #define CATEGORY_SET_P(x) \ - (BOOL_VECTOR_P (x) && XBOOL_VECTOR (x)->size == 128) + (BOOL_VECTOR_P (x) && bool_vector_size (x) == 128) /* Return a new empty category set. */ #define MAKE_CATEGORY_SET (Fmake_bool_vector (make_number (128), Qnil)) === modified file 'src/data.c' --- src/data.c 2013-10-11 06:32:29 +0000 +++ src/data.c 2013-10-14 07:12:49 +0000 @@ -2130,7 +2130,7 @@ { int val; - if (idxval < 0 || idxval >= XBOOL_VECTOR (array)->size) + if (idxval < 0 || idxval >= bool_vector_size (array)) args_out_of_range (array, idx); val = (unsigned char) XBOOL_VECTOR (array)->data[idxval / BOOL_VECTOR_BITS_PER_CHAR]; @@ -2180,7 +2180,7 @@ { int val; - if (idxval < 0 || idxval >= XBOOL_VECTOR (array)->size) + if (idxval < 0 || idxval >= bool_vector_size (array)) args_out_of_range (array, idx); val = (unsigned char) XBOOL_VECTOR (array)->data[idxval / BOOL_VECTOR_BITS_PER_CHAR]; @@ -2969,7 +2969,6 @@ static bits_word bool_vector_spare_mask (ptrdiff_t nr_bits) { - eassume (nr_bits > 0); return (((bits_word) 1) << (nr_bits % BITS_PER_BITS_WORD)) - 1; } @@ -3005,8 +3004,7 @@ CHECK_BOOL_VECTOR (op1); CHECK_BOOL_VECTOR (op2); - nr_bits = min (XBOOL_VECTOR (op1)->size, - XBOOL_VECTOR (op2)->size); + nr_bits = min (bool_vector_size (op1), bool_vector_size (op2)); if (NILP (dest)) { @@ -3016,10 +3014,9 @@ else { CHECK_BOOL_VECTOR (dest); - nr_bits = min (nr_bits, XBOOL_VECTOR (dest)->size); + nr_bits = min (nr_bits, bool_vector_size (dest)); } - eassume (nr_bits >= 0); nr_words = ROUNDUP (nr_bits, BITS_PER_BITS_WORD) / BITS_PER_BITS_WORD; adata = (bits_word *) XBOOL_VECTOR (dest)->data; @@ -3172,21 +3169,19 @@ bits_word mword; CHECK_BOOL_VECTOR (a); - nr_bits = XBOOL_VECTOR (a)->size; + nr_bits = bool_vector_size (a); if (NILP (b)) b = Fmake_bool_vector (make_number (nr_bits), Qnil); else { CHECK_BOOL_VECTOR (b); - nr_bits = min (nr_bits, XBOOL_VECTOR (b)->size); + nr_bits = min (nr_bits, bool_vector_size (b)); } bdata = (bits_word *) XBOOL_VECTOR (b)->data; adata = (bits_word *) XBOOL_VECTOR (a)->data; - eassume (nr_bits >= 0); - for (i = 0; i < nr_bits / BITS_PER_BITS_WORD; i++) bdata[i] = ~adata[i]; @@ -3215,13 +3210,11 @@ CHECK_BOOL_VECTOR (a); - nr_bits = XBOOL_VECTOR (a)->size; + nr_bits = bool_vector_size (a); count = 0; match = NILP (b) ? -1 : 0; adata = (bits_word *) XBOOL_VECTOR (a)->data; - eassume (nr_bits >= 0); - for (i = 0; i < nr_bits / BITS_PER_BITS_WORD; ++i) count += popcount_bits_word (adata[i] ^ match); @@ -3256,13 +3249,12 @@ CHECK_BOOL_VECTOR (a); CHECK_NATNUM (i); - nr_bits = XBOOL_VECTOR (a)->size; + nr_bits = bool_vector_size (a); if (XFASTINT (i) > nr_bits) /* Allow one past the end for convenience */ args_out_of_range (a, i); adata = (bits_word *) XBOOL_VECTOR (a)->data; - eassume (nr_bits >= 0); nr_words = ROUNDUP (nr_bits, BITS_PER_BITS_WORD) / BITS_PER_BITS_WORD; pos = XFASTINT (i) / BITS_PER_BITS_WORD; === modified file 'src/fns.c' --- src/fns.c 2013-10-09 22:39:57 +0000 +++ src/fns.c 2013-10-14 07:12:49 +0000 @@ -114,7 +114,7 @@ else if (CHAR_TABLE_P (sequence)) XSETFASTINT (val, MAX_CHAR); else if (BOOL_VECTOR_P (sequence)) - XSETFASTINT (val, XBOOL_VECTOR (sequence)->size); + XSETFASTINT (val, bool_vector_size (sequence)); else if (COMPILEDP (sequence)) XSETFASTINT (val, ASIZE (sequence) & PSEUDOVECTOR_SIZE_MASK); else if (CONSP (sequence)) @@ -437,7 +437,7 @@ { Lisp_Object val; ptrdiff_t size_in_chars - = ((XBOOL_VECTOR (arg)->size + BOOL_VECTOR_BITS_PER_CHAR - 1) + = ((bool_vector_size (arg) + BOOL_VECTOR_BITS_PER_CHAR - 1) / BOOL_VECTOR_BITS_PER_CHAR); val = Fmake_bool_vector (Flength (arg), Qnil); @@ -540,7 +540,7 @@ if (! ASCII_CHAR_P (c) && ! CHAR_BYTE8_P (c)) some_multibyte = 1; } - else if (BOOL_VECTOR_P (this) && XBOOL_VECTOR (this)->size > 0) + else if (BOOL_VECTOR_P (this) && bool_vector_size (this) > 0) wrong_type_argument (Qintegerp, Faref (this, make_number (0))); else if (CONSP (this)) for (; CONSP (this); this = XCDR (this)) @@ -2070,11 +2070,11 @@ /* Boolvectors are compared much like strings. */ if (BOOL_VECTOR_P (o1)) { - if (XBOOL_VECTOR (o1)->size != XBOOL_VECTOR (o2)->size) + EMACS_INT size = bool_vector_size (o1); + if (size != bool_vector_size (o2)) return 0; if (memcmp (XBOOL_VECTOR (o1)->data, XBOOL_VECTOR (o2)->data, - ((XBOOL_VECTOR (o1)->size - + BOOL_VECTOR_BITS_PER_CHAR - 1) + ((size + BOOL_VECTOR_BITS_PER_CHAR - 1) / BOOL_VECTOR_BITS_PER_CHAR))) return 0; return 1; @@ -2166,10 +2166,9 @@ } else if (BOOL_VECTOR_P (array)) { - register unsigned char *p = XBOOL_VECTOR (array)->data; - size = - ((XBOOL_VECTOR (array)->size + BOOL_VECTOR_BITS_PER_CHAR - 1) - / BOOL_VECTOR_BITS_PER_CHAR); + unsigned char *p = XBOOL_VECTOR (array)->data; + size = ((bool_vector_size (array) + BOOL_VECTOR_BITS_PER_CHAR - 1) + / BOOL_VECTOR_BITS_PER_CHAR); if (size) { @@ -4188,11 +4187,12 @@ static EMACS_UINT sxhash_bool_vector (Lisp_Object vec) { - EMACS_UINT hash = XBOOL_VECTOR (vec)->size; + EMACS_INT size = bool_vector_size (vec); + EMACS_UINT hash = size; int i, n; n = min (SXHASH_MAX_LEN, - ((XBOOL_VECTOR (vec)->size + BOOL_VECTOR_BITS_PER_CHAR - 1) + ((size + BOOL_VECTOR_BITS_PER_CHAR - 1) / BOOL_VECTOR_BITS_PER_CHAR)); for (i = 0; i < n; ++i) hash = sxhash_combine (hash, XBOOL_VECTOR (vec)->data[i]); === modified file 'src/image.c' --- src/image.c 2013-10-12 08:48:31 +0000 +++ src/image.c 2013-10-14 07:12:49 +0000 @@ -2456,7 +2456,7 @@ } else if (BOOL_VECTOR_P (elt)) { - if (XBOOL_VECTOR (elt)->size < width) + if (bool_vector_size (elt) < width) return 0; } else @@ -2471,7 +2471,7 @@ } else if (BOOL_VECTOR_P (data)) { - if (XBOOL_VECTOR (data)->size / height < width) + if (bool_vector_size (data) / height < width) return 0; } else === modified file 'src/lisp.h' --- src/lisp.h 2013-10-11 06:32:29 +0000 +++ src/lisp.h 2013-10-14 07:12:49 +0000 @@ -1184,6 +1184,14 @@ unsigned char data[FLEXIBLE_ARRAY_MEMBER]; }; +INLINE EMACS_INT +bool_vector_size (Lisp_Object a) +{ + EMACS_INT size = XBOOL_VECTOR (a)->size; + eassume (0 <= size); + return size; +} + /* Some handy constants for calculating sizes and offsets, mostly of vectorlike objects. */ === modified file 'src/print.c' --- src/print.c 2013-09-03 13:29:38 +0000 +++ src/print.c 2013-10-14 07:12:49 +0000 @@ -1704,15 +1704,14 @@ int len; unsigned char c; struct gcpro gcpro1; - ptrdiff_t size_in_chars - = ((XBOOL_VECTOR (obj)->size + BOOL_VECTOR_BITS_PER_CHAR - 1) - / BOOL_VECTOR_BITS_PER_CHAR); - + EMACS_INT size = bool_vector_size (obj); + ptrdiff_t size_in_chars = ((size + BOOL_VECTOR_BITS_PER_CHAR - 1) + / BOOL_VECTOR_BITS_PER_CHAR); GCPRO1 (obj); PRINTCHAR ('#'); PRINTCHAR ('&'); - len = sprintf (buf, "%"pI"d", XBOOL_VECTOR (obj)->size); + len = sprintf (buf, "%"pI"d", size); strout (buf, len, len, printcharfun); PRINTCHAR ('\"'); ------------------------------------------------------------ revno: 114655 committer: Dmitry Gutov branch nick: trunk timestamp: Mon 2013-10-14 04:51:20 +0300 message: * lisp/progmodes/ruby-mode.el (ruby-smie--args-separator-p): Handle methods ending with `?' and `!'. * test/indent/ruby.rb: More examples for bug#15594, both failing and now passing. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-10-14 00:23:29 +0000 +++ lisp/ChangeLog 2013-10-14 01:51:20 +0000 @@ -1,3 +1,8 @@ +2013-10-14 Dmitry Gutov + + * progmodes/ruby-mode.el (ruby-smie--args-separator-p): Handle + methods ending with `?' and `!'. + 2013-10-14 Akinori MUSHA * progmodes/ruby-mode.el (ruby-encoding-map): Add a mapping from === modified file 'lisp/progmodes/ruby-mode.el' --- lisp/progmodes/ruby-mode.el 2013-10-14 00:23:29 +0000 +++ lisp/progmodes/ruby-mode.el 2013-10-14 01:51:20 +0000 @@ -327,7 +327,9 @@ (defun ruby-smie--args-separator-p (pos) (and - (eq ?w (char-syntax (char-before))) + (or (eq (char-syntax (preceding-char)) '?w) + (and (memq (preceding-char) '(?! ??)) + (eq (char-syntax (char-before (1- (point)))) '?w))) (< pos (point-max)) (memq (char-syntax (char-after pos)) '(?w ?\")))) === modified file 'test/ChangeLog' --- test/ChangeLog 2013-10-13 00:28:30 +0000 +++ test/ChangeLog 2013-10-14 01:51:20 +0000 @@ -1,3 +1,8 @@ +2013-10-14 Dmitry Gutov + + * indent/ruby.rb: More examples for bug#15594, both failing and + now passing. + 2013-10-11 Dmitry Gutov * indent/ruby.rb: Add two more cases. === modified file 'test/indent/ruby.rb' --- test/indent/ruby.rb 2013-10-12 20:40:50 +0000 +++ test/indent/ruby.rb 2013-10-14 01:51:20 +0000 @@ -155,6 +155,16 @@ bar end +method arg1, # bug#15594 + method2 arg2, + arg3 + +method? arg1, + arg2 + +method! arg1, + arg2 + # Examples below still fail with `ruby-use-smie' on: foo + @@ -171,6 +181,17 @@ bar end -method1 arg1, # bug#15594 - method2 arg2, - arg3 +method !arg1, + arg2 + +method [], + arg2 + +method {:a => 1, :b => 2}, + arg2 + +method :foo, + :bar + +method (a + b), + c ------------------------------------------------------------ revno: 114654 author: Akinori MUSHA committer: Dmitry Gutov branch nick: trunk timestamp: Mon 2013-10-14 03:23:29 +0300 message: * progmodes/ruby-mode.el (ruby-encoding-map): Add a mapping from `japanese-cp932' to `cp932' to fix the problem where saving a source file written in Shift_JIS twice would end up having `coding: japanese-cp932' which Ruby could not recognize. (ruby-mode-set-encoding): Add support for encodings mapped to nil in `ruby-encoding-map'. (ruby-encoding-map): Map `us-ascii' to nil by default, meaning it doesn't need to be explicitly declared in magic comment. (ruby-encoding-map): Add type declaration for better customize UI. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-10-13 23:21:56 +0000 +++ lisp/ChangeLog 2013-10-14 00:23:29 +0000 @@ -1,3 +1,15 @@ +2013-10-14 Akinori MUSHA + + * progmodes/ruby-mode.el (ruby-encoding-map): Add a mapping from + `japanese-cp932' to `cp932' to fix the problem where saving a + source file written in Shift_JIS twice would end up having + `coding: japanese-cp932' which Ruby could not recognize. + (ruby-mode-set-encoding): Add support for encodings mapped to nil + in `ruby-encoding-map'. + (ruby-encoding-map): Map `us-ascii' to nil by default, meaning it + doesn't need to be explicitly declared in magic comment. + (ruby-encoding-map): Add type declaration for better customize UI. + 2013-10-13 Glenn Morris * progmodes/sh-script.el (sh-mark-line, sh-learn-buffer-indent): @@ -54,7 +66,7 @@ 2013-10-12 Stefan Monnier * progmodes/ruby-mode.el (ruby-smie-grammar): Add rule for paren-free - method calls (bug#bug#15594). + method calls (bug#15594). (ruby-smie--args-separator-p): New function. (ruby-smie--forward-token, ruby-smie--backward-token): Use it to recognize paren-free method calls. === modified file 'lisp/progmodes/ruby-mode.el' --- lisp/progmodes/ruby-mode.el 2013-10-13 21:35:31 +0000 +++ lisp/progmodes/ruby-mode.el 2013-10-14 00:23:29 +0000 @@ -217,8 +217,15 @@ "Default deep indent style." :options '(t nil space) :group 'ruby) -(defcustom ruby-encoding-map '((shift_jis . cp932) (shift-jis . cp932)) - "Alist to map encoding name from Emacs to Ruby." +(defcustom ruby-encoding-map + '((us-ascii . nil) ;; Do not put coding: us-ascii + (shift-jis . cp932) ;; Emacs charset name of Shift_JIS + (shift_jis . cp932) ;; MIME charset name of Shift_JIS + (japanese-cp932 . cp932)) ;; Emacs charset name of CP932 + "Alist to map encoding name from Emacs to Ruby. +Associating an encoding name with nil means it needs not be +explicitly declared in magic comment." + :type '(repeat (cons (symbol :tag "From") (symbol :tag "To"))) :group 'ruby) (defcustom ruby-insert-encoding-magic-comment t @@ -538,26 +545,28 @@ (setq coding-system (if coding-system (symbol-name - (or (and ruby-use-encoding-map - (cdr (assq coding-system ruby-encoding-map))) - coding-system)) + (if ruby-use-encoding-map + (let ((elt (assq coding-system ruby-encoding-map))) + (if elt (cdr elt) coding-system)) + coding-system)) "ascii-8bit")) - (if (looking-at "^#!") (beginning-of-line 2)) - (cond ((looking-at "\\s *#.*-\*-\\s *\\(en\\)?coding\\s *:\\s *\\([-a-z0-9_]*\\)\\s *\\(;\\|-\*-\\)") - (unless (string= (match-string 2) coding-system) - (goto-char (match-beginning 2)) - (delete-region (point) (match-end 2)) - (and (looking-at "-\*-") - (let ((n (skip-chars-backward " "))) - (cond ((= n 0) (insert " ") (backward-char)) - ((= n -1) (insert " ")) - ((forward-char))))) - (insert coding-system))) - ((looking-at "\\s *#.*coding\\s *[:=]")) - (t (when ruby-insert-encoding-magic-comment - (insert "# -*- coding: " coding-system " -*-\n")))) - (when (buffer-modified-p) - (basic-save-buffer-1)))))) + (when coding-system + (if (looking-at "^#!") (beginning-of-line 2)) + (cond ((looking-at "\\s *#.*-\*-\\s *\\(en\\)?coding\\s *:\\s *\\([-a-z0-9_]*\\)\\s *\\(;\\|-\*-\\)") + (unless (string= (match-string 2) coding-system) + (goto-char (match-beginning 2)) + (delete-region (point) (match-end 2)) + (and (looking-at "-\*-") + (let ((n (skip-chars-backward " "))) + (cond ((= n 0) (insert " ") (backward-char)) + ((= n -1) (insert " ")) + ((forward-char))))) + (insert coding-system))) + ((looking-at "\\s *#.*coding\\s *[:=]")) + (t (when ruby-insert-encoding-magic-comment + (insert "# -*- coding: " coding-system " -*-\n")))) + (when (buffer-modified-p) + (basic-save-buffer-1))))))) (defun ruby-current-indentation () "Return the indentation level of current line." ------------------------------------------------------------ revno: 114653 committer: Glenn Morris branch nick: trunk timestamp: Sun 2013-10-13 16:21:56 -0700 message: * lisp/progmodes/sh-script.el (sh-mark-line, sh-learn-buffer-indent): Occur buffers are read-only. http://bugs.debian.org/720775 diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-10-13 23:01:20 +0000 +++ lisp/ChangeLog 2013-10-13 23:21:56 +0000 @@ -1,5 +1,8 @@ 2013-10-13 Glenn Morris + * progmodes/sh-script.el (sh-mark-line, sh-learn-buffer-indent): + Occur buffers are read-only. http://bugs.debian.org/720775 + * emacs-lisp/authors.el (authors-fixed-entries): Comment out old alpha stuff. === modified file 'lisp/progmodes/sh-script.el' --- lisp/progmodes/sh-script.el 2013-10-11 03:28:31 +0000 +++ lisp/progmodes/sh-script.el 2013-10-13 23:21:56 +0000 @@ -3438,26 +3438,23 @@ ) (goto-char (point-max)) (setq start (point)) - (insert line) - (if occur-point - (setq occur-point (point))) - (insert message) - (if point - (add-text-properties - start (point) - '(mouse-face highlight - help-echo "mouse-2: go to the line where I learned this"))) - (insert "\n") - (if point - (progn - (put-text-property start (point) 'occur-target m1) - (if occur-point - (put-text-property start occur-point - 'occur-match t)) - )) - ))) - - + (let ((inhibit-read-only t)) + (insert line) + (if occur-point + (setq occur-point (point))) + (insert message) + (if point + (add-text-properties + start (point) + '(mouse-face highlight + help-echo "mouse-2: go to the line where I learned this"))) + (insert "\n") + (when point + (put-text-property start (point) 'occur-target m1) + (if occur-point + (put-text-property start occur-point + 'occur-match t)) + ))))) ;; Is this really worth having? (defvar sh-learned-buffer-hook nil @@ -3689,15 +3686,15 @@ (nth 2 learned-var) out-buffer))) (with-current-buffer out-buffer (goto-char (point-min)) - (insert - (format "Indentation values for buffer %s.\n" name) - (format "%d indentation variable%s different values%s\n\n" - num-diffs - (if (= num-diffs 1) - " has" "s have") - (if (zerop num-diffs) - "." ":")) - ))) + (let ((inhibit-read-only t)) + (insert + (format "Indentation values for buffer %s.\n" name) + (format "%d indentation variable%s different values%s\n\n" + num-diffs + (if (= num-diffs 1) + " has" "s have") + (if (zerop num-diffs) + "." ":")))))) ;; Are abnormal hooks considered bad form? (run-hook-with-args 'sh-learned-buffer-hook learned-var-list) (and (called-interactively-p 'any) ------------------------------------------------------------ revno: 114652 fixes bug: http://debbugs.gnu.org/15601 committer: Glenn Morris branch nick: trunk timestamp: Sun 2013-10-13 16:01:20 -0700 message: * configure.ac [alpha]: Explicit error in non-ELF case. * doc/emacs/ack.texi (Acknowledgments): Comment out old alpha stuff. * lisp/emacs-lisp/authors.el (authors-fixed-entries): Comment out old alpha stuff. diff: === modified file 'ChangeLog' --- ChangeLog 2013-10-12 20:00:38 +0000 +++ ChangeLog 2013-10-13 23:01:20 +0000 @@ -1,3 +1,7 @@ +2013-10-13 Glenn Morris + + * configure.ac [alpha]: Explicit error in non-ELF case. (Bug#15601) + 2013-10-12 Paul Eggert Merge from gnulib, incorporating: === modified file 'configure.ac' --- configure.ac 2013-10-11 18:29:18 +0000 +++ configure.ac 2013-10-13 23:01:20 +0000 @@ -1175,10 +1175,13 @@ if test "x$GCC" = "xyes"; then C_SWITCH_MACHINE="-fno-common" else - AC_MSG_ERROR([What gives? Fix me if DEC Unix supports ELF now.]) + AC_MSG_ERROR([Non-GCC compilers are not supported.]) fi else - UNEXEC_OBJ=unexalpha.o + dnl This was the unexalpha.c case. Removed in 24.1, 2010-07-24, + dnl albeit under the mistaken assumption that said file + dnl was no longer used. + AC_MSG_ERROR([Non-ELF systems are not supported since Emacs 24.1.]) fi ;; esac === modified file 'doc/emacs/ChangeLog' --- doc/emacs/ChangeLog 2013-10-13 10:22:34 +0000 +++ doc/emacs/ChangeLog 2013-10-13 23:01:20 +0000 @@ -1,3 +1,7 @@ +2013-10-13 Glenn Morris + + * ack.texi (Acknowledgments): Comment out old alpha stuff. + 2013-10-13 Xue Fuqiao * calendar.texi (Special Diary Entries): Remove @refill. === modified file 'doc/emacs/ack.texi' --- doc/emacs/ack.texi 2013-10-13 00:31:19 +0000 +++ doc/emacs/ack.texi 2013-10-13 23:01:20 +0000 @@ -1099,9 +1099,11 @@ Philippe Schnoebelen wrote @file{gomoku.el}, a Go Moku game played against Emacs; and @file{mpuz.el}, a multiplication puzzle. -@c FIXME files no longer included; but see bug 15601. +@ignore +@c Removed in 24.1. @item Rainer Schöpf contributed to Alpha and OSF1 support. +@end ignore @item Jan Schormann wrote @file{solitaire.el}, an implementation of the === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-10-13 21:35:31 +0000 +++ lisp/ChangeLog 2013-10-13 23:01:20 +0000 @@ -1,3 +1,8 @@ +2013-10-13 Glenn Morris + + * emacs-lisp/authors.el (authors-fixed-entries): + Comment out old alpha stuff. + 2013-10-13 Dmitry Gutov * progmodes/ruby-mode.el (ruby-mode): Add `ruby-mode-set-encoding' === modified file 'lisp/emacs-lisp/authors.el' --- lisp/emacs-lisp/authors.el 2013-10-13 00:31:19 +0000 +++ lisp/emacs-lisp/authors.el 2013-10-13 23:01:20 +0000 @@ -518,8 +518,8 @@ ("Schlumberger Technology Corporation" :changed "gud.el") ;; Replaced by tcl.el. ;;; ("Gregor Schmid" :wrote "tcl-mode.el") - ;; FIXME files no longer included; but see bug 15601 - ("Rainer Schöpf" :wrote "alpha.h" "unexalpha.c") + ;; No longer distributed since 24.1. +;;; ("Rainer Schöpf" :wrote "alpha.h" "unexalpha.c") ;; No longer distributed: emacsserver.c. ("William Sommerfeld" :wrote "emacsclient.c" "scribe.el") ;; No longer distributed: emacsserver.c. ------------------------------------------------------------ revno: 114651 committer: Dmitry Gutov branch nick: trunk timestamp: Mon 2013-10-14 00:35:31 +0300 message: * lisp/progmodes/ruby-mode.el (ruby-mode): Add `ruby-mode-set-encoding' to `after-save-hook' instead of `before-save-hook'. (ruby-mode-set-encoding): Use the value of coding system used to write the file. Call `basic-save-buffer-1' after modifying the buffer. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-10-13 19:54:46 +0000 +++ lisp/ChangeLog 2013-10-13 21:35:31 +0000 @@ -1,3 +1,11 @@ +2013-10-13 Dmitry Gutov + + * progmodes/ruby-mode.el (ruby-mode): Add `ruby-mode-set-encoding' + to `after-save-hook' instead of `before-save-hook'. + (ruby-mode-set-encoding): Use the value of coding system used to + write the file. Call `basic-save-buffer-1' after modifying the + buffer. + 2013-10-13 Alan Mackenzie Fix indentation/fontification of Java enum with === modified file 'lisp/progmodes/ruby-mode.el' --- lisp/progmodes/ruby-mode.el 2013-10-12 20:40:50 +0000 +++ lisp/progmodes/ruby-mode.el 2013-10-13 21:35:31 +0000 @@ -529,7 +529,7 @@ (when (re-search-forward "[^\0-\177]" nil t) (goto-char (point-min)) (let ((coding-system - (or coding-system-for-write + (or save-buffer-coding-system buffer-file-coding-system))) (if coding-system (setq coding-system @@ -555,7 +555,9 @@ (insert coding-system))) ((looking-at "\\s *#.*coding\\s *[:=]")) (t (when ruby-insert-encoding-magic-comment - (insert "# -*- coding: " coding-system " -*-\n")))))))) + (insert "# -*- coding: " coding-system " -*-\n")))) + (when (buffer-modified-p) + (basic-save-buffer-1)))))) (defun ruby-current-indentation () "Return the indentation level of current line." @@ -2017,11 +2019,7 @@ (set (make-local-variable 'end-of-defun-function) 'ruby-end-of-defun) - (add-hook - (cond ((boundp 'before-save-hook) 'before-save-hook) - ((boundp 'write-contents-functions) 'write-contents-functions) - ((boundp 'write-contents-hooks) 'write-contents-hooks)) - 'ruby-mode-set-encoding nil 'local) + (add-hook 'after-save-hook 'ruby-mode-set-encoding nil 'local) (set (make-local-variable 'electric-indent-chars) (append '(?\{ ?\}) electric-indent-chars)) ------------------------------------------------------------ revno: 114650 committer: Alan Mackenzie branch nick: trunk timestamp: Sun 2013-10-13 19:54:46 +0000 message: Fix indentation/fontification of Java enum with "implements"/generic. * progmodes/cc-engine.el (c-backward-over-enum-header): Extracted from the three other places and enhanced to handle generics. (c-inside-bracelist-p): Uses new function above. * progmodes/cc-fonts.el (c-font-lock-declarations): Uses new function above. (c-font-lock-enum-tail): Uses new function above. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-10-13 11:55:00 +0000 +++ lisp/ChangeLog 2013-10-13 19:54:46 +0000 @@ -1,3 +1,15 @@ +2013-10-13 Alan Mackenzie + + Fix indentation/fontification of Java enum with + "implements"/generic. + + * progmodes/cc-engine.el (c-backward-over-enum-header): Extracted + from the three other places and enhanced to handle generics. + (c-inside-bracelist-p): Uses new function above. + * progmodes/cc-fonts.el (c-font-lock-declarations): Uses new + function above. + (c-font-lock-enum-tail): Uses new function above. + 2013-10-13 Kenichi Handa * international/mule-cmds.el (select-safe-coding-system): Remove a === modified file 'lisp/progmodes/cc-engine.el' --- lisp/progmodes/cc-engine.el 2013-09-28 17:17:01 +0000 +++ lisp/progmodes/cc-engine.el 2013-10-13 19:54:46 +0000 @@ -8471,6 +8471,32 @@ (not (looking-at "="))))) b-pos))) +(defun c-backward-over-enum-header () + ;; We're at a "{". Move back to the enum-like keyword that starts this + ;; declaration and return t, otherwise don't move and return nil. + (let ((here (point)) + up-sexp-pos before-identifier) + (while + (and + (eq (c-backward-token-2) 0) + (or (not (looking-at "\\s)")) + (c-go-up-list-backward)) + (cond + ((and (looking-at c-symbol-key) (c-on-identifier)) + (setq before-identifier t)) + ((and before-identifier + (looking-at c-postfix-decl-spec-key)) + (setq before-identifier nil) + t) + ((looking-at c-brace-list-key) nil) + ((and c-recognize-<>-arglists + (eq (char-after) ?<) + (looking-at "\\s(")) + t) + (t nil)))) + (or (looking-at c-brace-list-key) + (progn (goto-char here) nil)))) + (defun c-inside-bracelist-p (containing-sexp paren-state) ;; return the buffer position of the beginning of the brace list ;; statement if we're inside a brace list, otherwise return nil. @@ -8485,22 +8511,9 @@ ;; This function might do hidden buffer changes. (or ;; This will pick up brace list declarations. - (c-safe - (save-excursion - (goto-char containing-sexp) - (let (before-identifier) - (while - (progn - (c-forward-sexp -1) - (cond - ((c-on-identifier) (setq before-identifier t)) - ((and before-identifier - (looking-at c-postfix-decl-spec-key)) - (setq before-identifier nil) - t) - ((looking-at c-brace-list-key) nil) - (t nil)))) - (looking-at c-brace-list-key)))) + (save-excursion + (goto-char containing-sexp) + (c-backward-over-enum-header)) ;; this will pick up array/aggregate init lists, even if they are nested. (save-excursion (let ((class-key === modified file 'lisp/progmodes/cc-fonts.el' --- lisp/progmodes/cc-fonts.el 2013-09-28 17:17:01 +0000 +++ lisp/progmodes/cc-fonts.el 2013-10-13 19:54:46 +0000 @@ -1471,22 +1471,9 @@ (let ((paren-state (c-parse-state))) (and (numberp (car paren-state)) - (c-safe - (save-excursion - (goto-char (car paren-state)) - (let (before-identifier) - (while - (progn - (c-forward-sexp -1) - (cond - ((c-on-identifier) (setq before-identifier t)) - ((and before-identifier - (looking-at c-postfix-decl-spec-key)) - (setq before-identifier nil) - t) - ((looking-at c-brace-list-key) nil) ; "enum" - (t nil)))) - (looking-at c-brace-list-key))))))) + (save-excursion + (goto-char (car paren-state)) + (c-backward-over-enum-header))))) (c-forward-token-2) nil) @@ -1574,22 +1561,9 @@ (when (and encl-pos (eq (char-after encl-pos) ?\{) - (c-safe - (save-excursion - (goto-char encl-pos) - (let (before-identifier) - (while - (progn - (c-forward-sexp -1) - (cond - ((c-on-identifier) (setq before-identifier t)) - ((and before-identifier - (looking-at c-postfix-decl-spec-key)) - (setq before-identifier nil) - t) - ((looking-at c-brace-list-key) nil) ; "enum" - (t nil)))) - (looking-at c-brace-list-key))))) + (save-excursion + (goto-char encl-pos) + (c-backward-over-enum-header))) (c-syntactic-skip-backward "^{," nil t) (c-put-char-property (1- (point)) 'c-type 'c-decl-id-start) ------------------------------------------------------------ revno: 114649 committer: Xue Fuqiao branch nick: trunk timestamp: Sun 2013-10-13 20:14:28 +0800 message: NEWS tweak. diff: === modified file 'etc/NEWS' --- etc/NEWS 2013-10-08 17:49:20 +0000 +++ etc/NEWS 2013-10-13 12:14:28 +0000 @@ -182,9 +182,9 @@ ** C-x TAB enters a transient interactive mode. You can then use the left/right cursor keys to move the block of text. -** `tab-stop-list' is now implicitly extended to infinity. -Its default value is changed to nil which means a tab stop every -`tab-width' columns. +** `tab-stop-list' is now implicitly extended to infinity by repeating +the last step. Its default value is changed to nil which means a tab +stop every `tab-width' columns. ** `split-window' is no longer a command, just a non-interactive function. As a command it was a special case of `split-window-below', and as such