------------------------------------------------------------ revno: 115438 committer: Jan Djärv branch nick: trunk timestamp: Mon 2013-12-09 09:23:01 +0100 message: * alloc.c (Fmemory_limit): Avoid compiler warning. Return 0 always. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-12-08 12:59:14 +0000 +++ src/ChangeLog 2013-12-09 08:23:01 +0000 @@ -1,3 +1,7 @@ +2013-12-09 Jan Djärv + + * alloc.c (Fmemory_limit): Avoid compiler warning. Return 0 always. + 2013-12-08 Jan Djärv * nsterm.m (updateFrameSize:): Fix GNUStep toolbar not updating. === modified file 'src/alloc.c' --- src/alloc.c 2013-12-01 22:33:13 +0000 +++ src/alloc.c 2013-12-09 08:23:01 +0000 @@ -6633,7 +6633,12 @@ { Lisp_Object end; +#ifdef HAVE_NS + /* Avoid warning. sbrk has no relation to memory allocated anyway. */ + XSETINT (end, 0); +#else XSETINT (end, (intptr_t) (char *) sbrk (0) / 1024); +#endif return end; } ------------------------------------------------------------ revno: 115437 committer: Dmitry Gutov branch nick: trunk timestamp: Mon 2013-12-09 06:19:16 +0200 message: * lisp/progmodes/ruby-mode.el (ruby-smie--implicit-semi-p): Return t after the end of a percent literal. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-12-09 03:43:34 +0000 +++ lisp/ChangeLog 2013-12-09 04:19:16 +0000 @@ -1,3 +1,8 @@ +2013-12-09 Dmitry Gutov + + * progmodes/ruby-mode.el (ruby-smie--implicit-semi-p): Return t + after the end of a percent literal. + 2013-12-09 Cameron Desautels (tiny change) * progmodes/ruby-mode.el (ruby-forward-string): Document. Handle === modified file 'lisp/progmodes/ruby-mode.el' --- lisp/progmodes/ruby-mode.el 2013-12-09 03:43:34 +0000 +++ lisp/progmodes/ruby-mode.el 2013-12-09 04:19:16 +0000 @@ -362,8 +362,8 @@ (and (memq (char-before) '(?\; ?- ?+ ?* ?/ ?: ?. ?, ?\[ ?\( ?\{ ?\\ ?& ?> ?< ?% ?~ ?^)) - ;; Make sure it's not the end of a regexp. - (not (eq (car (syntax-after (1- (point)))) 7))) + ;; Not the end of a regexp or a percent literal. + (not (memq (car (syntax-after (1- (point)))) '(7 15)))) (and (eq (char-before) ?\?) (equal (save-excursion (ruby-smie--backward-token)) "?")) (and (eq (char-before) ?=) === modified file 'test/indent/ruby.rb' --- test/indent/ruby.rb 2013-11-12 14:15:14 +0000 +++ test/indent/ruby.rb 2013-12-09 04:19:16 +0000 @@ -299,3 +299,6 @@ tee end end + +%^abc^ +ddd ------------------------------------------------------------ revno: 115436 fixes bug: http://debbugs.gnu.org/16079 author: Cameron Desautels committer: Dmitry Gutov branch nick: trunk timestamp: Mon 2013-12-09 05:43:34 +0200 message: * lisp/progmodes/ruby-mode.el (ruby-forward-string): Document. Handle caret-delimited strings. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-12-09 03:27:21 +0000 +++ lisp/ChangeLog 2013-12-09 03:43:34 +0000 @@ -1,3 +1,8 @@ +2013-12-09 Cameron Desautels (tiny change) + + * progmodes/ruby-mode.el (ruby-forward-string): Document. Handle + caret-delimited strings (Bug#16079). + 2013-12-09 Dmitry Gutov * progmodes/ruby-mode.el (ruby-accurate-end-of-block): When === modified file 'lisp/progmodes/ruby-mode.el' --- lisp/progmodes/ruby-mode.el 2013-12-09 03:27:21 +0000 +++ lisp/progmodes/ruby-mode.el 2013-12-09 03:43:34 +0000 @@ -795,11 +795,28 @@ (t nil))))))))) (defun ruby-forward-string (term &optional end no-error expand) - "TODO: document." + "Move forward across one balanced pair of string delimiters. +Skips escaped delimiters. If EXPAND is non-nil, also ignores +delimiters in interpolated strings. + +TERM should be a string containing either a single, self-matching +delimiter (e.g. \"/\"), or a pair of matching delimiters with the +close delimiter first (e.g. \"][\"). + +When non-nil, search is bounded by position END. + +Throws an error if a balanced match is not found, unless NO-ERROR +is non-nil, in which case nil will be returned. + +This command assumes the character after point is an opening +delimiter." (let ((n 1) (c (string-to-char term)) - (re (if expand - (concat "[^\\]\\(\\\\\\\\\\)*\\([" term "]\\|\\(#{\\)\\)") - (concat "[^\\]\\(\\\\\\\\\\)*[" term "]")))) + (re (concat "[^\\]\\(\\\\\\\\\\)*\\(" + (if (string= term "^") ;[^] is not a valid regexp + "\\^" + (concat "[" term "]")) + (when expand "\\|\\(#{\\)") + "\\)"))) (while (and (re-search-forward re end no-error) (if (match-beginning 3) (ruby-forward-string "}{" end no-error nil) ------------------------------------------------------------ revno: 115435 fixes bug: http://debbugs.gnu.org/16078 committer: Dmitry Gutov branch nick: trunk timestamp: Mon 2013-12-09 05:27:21 +0200 message: * lisp/progmodes/ruby-mode.el (ruby-accurate-end-of-block): When `ruby-use-smie' is t, use `smie-forward-sexp' instead of `ruby-parse-partial'. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-12-09 02:38:42 +0000 +++ lisp/ChangeLog 2013-12-09 03:27:21 +0000 @@ -1,3 +1,9 @@ +2013-12-09 Dmitry Gutov + + * progmodes/ruby-mode.el (ruby-accurate-end-of-block): When + `ruby-use-smie' is t, use `smie-forward-sexp' instead of + `ruby-parse-partial' (Bug#16078). + 2013-12-09 Leo Liu * subr.el (read-passwd): Disable show-paren-mode. (Bug#16091) === modified file 'lisp/progmodes/ruby-mode.el' --- lisp/progmodes/ruby-mode.el 2013-12-06 14:24:10 +0000 +++ lisp/progmodes/ruby-mode.el 2013-12-09 03:27:21 +0000 @@ -614,11 +614,16 @@ (nreverse (ruby-imenu-create-index-in-block nil (point-min) nil))) (defun ruby-accurate-end-of-block (&optional end) - "TODO: document." + "Jump to the end of the current block or END, whichever is closer." (let (state (end (or end (point-max)))) - (while (and (setq state (apply 'ruby-parse-partial end state)) - (>= (nth 2 state) 0) (< (point) end))))) + (if ruby-use-smie + (save-restriction + (back-to-indentation) + (narrow-to-region (point) end) + (smie-forward-sexp)) + (while (and (setq state (apply 'ruby-parse-partial end state)) + (>= (nth 2 state) 0) (< (point) end)))))) (defun ruby-mode-variables () "Set up initial buffer-local variables for Ruby mode." ------------------------------------------------------------ revno: 115434 fixes bug: http://debbugs.gnu.org/16091 committer: Leo Liu branch nick: trunk timestamp: Mon 2013-12-09 10:38:42 +0800 message: * subr.el (read-passwd): Disable show-paren-mode. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-12-08 16:08:45 +0000 +++ lisp/ChangeLog 2013-12-09 02:38:42 +0000 @@ -1,3 +1,7 @@ +2013-12-09 Leo Liu + + * subr.el (read-passwd): Disable show-paren-mode. (Bug#16091) + 2013-12-08 Dmitry Gutov * progmodes/js.el (js-auto-indent-flag): Remove, was unused. === modified file 'lisp/subr.el' --- lisp/subr.el 2013-12-02 07:13:01 +0000 +++ lisp/subr.el 2013-12-09 02:38:42 +0000 @@ -2038,6 +2038,7 @@ (setq-local select-active-regions nil) (use-local-map read-passwd-map) (setq-local inhibit-modification-hooks nil) ;bug#15501. + (setq-local show-paren-mode nil) ;bug#16091. (add-hook 'after-change-functions hide-chars-fun nil 'local)) (unwind-protect (let ((enable-recursive-minibuffers t)) ------------------------------------------------------------ revno: 115433 committer: Katsumi Yamaoka branch nick: trunk timestamp: Mon 2013-12-09 00:35:15 +0000 message: lisp/gnus/gnus-msg.el (gnus-setup-message): Fix last commit diff: === modified file 'lisp/gnus/gnus-msg.el' --- lisp/gnus/gnus-msg.el 2013-12-08 23:11:14 +0000 +++ lisp/gnus/gnus-msg.el 2013-12-09 00:35:15 +0000 @@ -433,12 +433,14 @@ (,buffer (buffer-name (current-buffer))) (,article (if (and (gnus-nnir-group-p gnus-newsgroup-name) gnus-article-reply) - (nnir-article-number (length gnus-article-reply)) + (nnir-article-number (or (car-safe gnus-article-reply) + gnus-article-reply)) gnus-article-reply)) (,yanked gnus-article-yanked-articles) (,group (if (and (gnus-nnir-group-p gnus-newsgroup-name) gnus-article-reply) - (nnir-article-group (length gnus-article-reply)) + (nnir-article-group (or (car-safe gnus-article-reply) + gnus-article-reply)) gnus-newsgroup-name)) (message-header-setup-hook (copy-sequence message-header-setup-hook)) ------------------------------------------------------------ revno: 115432 committer: Katsumi Yamaoka branch nick: trunk timestamp: Sun 2013-12-08 23:11:14 +0000 message: lisp/gnus/gnus-msg.el (gnus-setup-message): Fix the type of argument passed to nnir-article-number and nnir-article-group diff: === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2013-12-03 01:17:02 +0000 +++ lisp/gnus/ChangeLog 2013-12-08 23:11:14 +0000 @@ -1,3 +1,8 @@ +2013-12-08 Katsumi Yamaoka + + * gnus-msg.el (gnus-setup-message): Fix the type of argument passed to + nnir-article-number and nnir-article-group. + 2013-12-03 Vitalie Spinu * message.el (message-send-mail-with-sendmail): === modified file 'lisp/gnus/gnus-msg.el' --- lisp/gnus/gnus-msg.el 2013-07-23 07:04:24 +0000 +++ lisp/gnus/gnus-msg.el 2013-12-08 23:11:14 +0000 @@ -433,12 +433,12 @@ (,buffer (buffer-name (current-buffer))) (,article (if (and (gnus-nnir-group-p gnus-newsgroup-name) gnus-article-reply) - (nnir-article-number gnus-article-reply) + (nnir-article-number (length gnus-article-reply)) gnus-article-reply)) (,yanked gnus-article-yanked-articles) (,group (if (and (gnus-nnir-group-p gnus-newsgroup-name) gnus-article-reply) - (nnir-article-group gnus-article-reply) + (nnir-article-group (length gnus-article-reply)) gnus-newsgroup-name)) (message-header-setup-hook (copy-sequence message-header-setup-hook)) @@ -446,7 +446,7 @@ (message-mode-hook (copy-sequence message-mode-hook))) (setq mml-buffer-list nil) (add-hook 'message-header-setup-hook (lambda () - (gnus-inews-insert-gcc ,group))) + (gnus-inews-insert-gcc ,group))) ;; message-newsreader and message-mailer were formerly set in ;; gnus-inews-add-send-actions, but this is too late when ;; message-generate-headers-first is used. --ansel ------------------------------------------------------------ revno: 115431 committer: Paul Eggert branch nick: trunk timestamp: Sun 2013-12-08 13:23:50 -0800 message: Spelling fixes. diff: === modified file 'lisp/ChangeLog.10' --- lisp/ChangeLog.10 2013-07-26 17:02:22 +0000 +++ lisp/ChangeLog.10 2013-12-08 21:23:50 +0000 @@ -5639,7 +5639,7 @@ add handling of entry attributes using diary-pull-attrs. (mark-calendar-days-named, mark-calendar-days-named) (mark-calendar-date-pattern, mark-calendar-month) - (add-to-diary-list): Add optional paramater `color' for passing + (add-to-diary-list): Add optional parameter `color' for passing face attribute info through the callchain. Pass this parameter around. 2003-02-11 Stefan Monnier === modified file 'lisp/emacs-lisp/debug.el' --- lisp/emacs-lisp/debug.el 2013-12-02 14:45:22 +0000 +++ lisp/emacs-lisp/debug.el 2013-12-08 21:23:50 +0000 @@ -642,7 +642,7 @@ (define-key map "h" 'describe-mode) (define-key map "q" 'top-level) (define-key map "e" 'debugger-eval-expression) - (define-key map "v" 'debugger-toggle-locals) ;"v" is for "v"ariables. + (define-key map "v" 'debugger-toggle-locals) ; "v" is for "variables". (define-key map " " 'next-line) (define-key map "R" 'debugger-record-expression) (define-key map "\C-m" 'debug-help-follow) === modified file 'lisp/org/ox-ascii.el' --- lisp/org/ox-ascii.el 2013-12-06 11:21:31 +0000 +++ lisp/org/ox-ascii.el 2013-12-08 21:23:50 +0000 @@ -1198,7 +1198,7 @@ (todo type priority name tags contents width inlinetask info) "Format an inline task element for ASCII export. See `org-ascii-format-inlinetask-function' for a description -of the paramaters." +of the parameters." (let* ((utf8p (eq (plist-get info :ascii-charset) 'utf-8)) (width (or width org-ascii-inlinetask-width))) (org-ascii--indent-string === modified file 'src/ChangeLog.3' --- src/ChangeLog.3 2013-06-11 16:51:12 +0000 +++ src/ChangeLog.3 2013-12-08 21:23:50 +0000 @@ -12845,8 +12845,8 @@ longer DEFVARed: they are already declared in window.c. * screen.c (window_from_coordinates): Use Fnext_window, even if - MULTI_SCREEN, to obtain the next window. This is an test. - Also, new paramater part returns text or modeline symbol. + MULTI_SCREEN, to obtain the next window. This is a test. + Also, new parameter part returns text or modeline symbol. (Flocate_window_from_coordinates): Pass &part to window_from_coordinates. (coordinates_in_window): Don't say modeline if window_height is 1, === modified file 'src/eval.c' --- src/eval.c 2013-12-02 14:45:22 +0000 +++ src/eval.c 2013-12-08 21:23:50 +0000 @@ -3597,7 +3597,7 @@ /* The specpdl entries normally contain the symbol being bound along with its `old_value', so it can be restored. The new value to which it is bound is available in one of two places: either in the current value of the - variable (if it hasn't been rebount yet) or in the `old_value' slot of the + variable (if it hasn't been rebound yet) or in the `old_value' slot of the next specpdl entry for it. `backtrace_eval_unrewind' happens to swap the role of `old_value' and "new value", so we abuse it here, to fetch the new value. ------------------------------------------------------------ revno: 115430 committer: Eli Zaretskii branch nick: trunk timestamp: Sun 2013-12-08 21:28:29 +0200 message: Fix librsvg build on MS-Windows. configure.ac (HAVE_RSVG) [mingw32]: Don't link against librsvg statically. diff: === modified file 'ChangeLog' --- ChangeLog 2013-12-08 08:53:49 +0000 +++ ChangeLog 2013-12-08 19:28:29 +0000 @@ -1,3 +1,8 @@ +2013-12-08 Eli Zaretskii + + * configure.ac (HAVE_RSVG) [mingw32]: Don't link against librsvg + statically. + 2013-12-08 Paul Eggert * configure.ac: Simplify supression of GTK deprecation warning. === modified file 'configure.ac' --- configure.ac 2013-12-08 08:53:49 +0000 +++ configure.ac 2013-12-08 19:28:29 +0000 @@ -2136,6 +2136,10 @@ if test $HAVE_RSVG = yes; then AC_DEFINE(HAVE_RSVG, 1, [Define to 1 if using librsvg.]) CFLAGS="$CFLAGS $RSVG_CFLAGS" + # Windows loads librsvg dynamically + if test "${opsys}" = "mingw32"; then + RSVG_LIBS= + fi LIBS="$RSVG_LIBS $LIBS" fi fi ------------------------------------------------------------ revno: 115429 committer: Dmitry Gutov branch nick: trunk timestamp: Sun 2013-12-08 18:11:08 +0200 message: Mention test/indent/js.js, and restore one lost piece of it * test/indent/js.js: New file. diff: === modified file 'test/ChangeLog' --- test/ChangeLog 2013-12-06 15:35:11 +0000 +++ test/ChangeLog 2013-12-08 16:11:08 +0000 @@ -1,3 +1,7 @@ +2013-12-08 Dmitry Gutov + + * indent/js.js: New file. + 2013-12-05 Michael Albinus * automated/dbus-tests.el: New file. === modified file 'test/indent/js.js' --- test/indent/js.js 2013-12-08 16:08:45 +0000 +++ test/indent/js.js 2013-12-08 16:11:08 +0000 @@ -39,7 +39,11 @@ 3; } -var ; +var p = { + case: 'zzzz', + default: 'donkey', + tee: 'ornery' +}; var evens = [e for each (e in range(0, 21)) if (ed % 2 == 0)]; ------------------------------------------------------------ revno: 115428 committer: Dmitry Gutov branch nick: trunk timestamp: Sun 2013-12-08 18:08:45 +0200 message: Port indentation code from js2-mode to js-mode * lisp/progmodes/js.el (js-auto-indent-flag): Remove, was unused. (js-switch-indent-offset): New option. (js--proper-indentation): Use it. And handle the case when "default" is actually a key in an object literal. (js--same-line): New function. (js--multi-line-declaration-indentation): Use it. (js--indent-in-array-comp, js--array-comp-indentation): New functions. (js--proper-indentation): Use them, to handle array comprehension continuations. diff: === modified file 'etc/NEWS' --- etc/NEWS 2013-12-06 14:31:42 +0000 +++ etc/NEWS 2013-12-08 16:08:45 +0000 @@ -661,6 +661,17 @@ *** Add more Ruby file types to `auto-mode-alist'. +** JS Mode + +*** Better indentation of multiple-variable declarations. +If declaration spans several lines, variables on the following lines +are lined up to the first one. + +*** We now recognize and better indent continuations in array +comprehensions. + +*** New option `js-switch-indent-offset`. + * New Modes and Packages in Emacs 24.4 === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-12-08 09:18:55 +0000 +++ lisp/ChangeLog 2013-12-08 16:08:45 +0000 @@ -1,3 +1,16 @@ +2013-12-08 Dmitry Gutov + + * progmodes/js.el (js-auto-indent-flag): Remove, was unused. + (js-switch-indent-offset): New option. + (js--proper-indentation): Use it. And handle the case when + "default" is actually a key in an object literal. + (js--same-line): New function. + (js--multi-line-declaration-indentation): Use it. + (js--indent-in-array-comp, js--array-comp-indentation): New + functions. + (js--proper-indentation): Use them, to handle array comprehension + continuations. + 2013-12-08 Leo Liu * progmodes/flymake.el (flymake-highlight-line): Re-write. === modified file 'lisp/progmodes/js.el' --- lisp/progmodes/js.el 2013-11-24 22:01:08 +0000 +++ lisp/progmodes/js.el 2013-12-08 16:08:45 +0000 @@ -459,12 +459,13 @@ :group 'js :version "24.1") -(defcustom js-auto-indent-flag t - "Whether to automatically indent when typing punctuation characters. -If non-nil, the characters {}();,: also indent the current line -in Javascript mode." - :type 'boolean - :group 'js) +(defcustom js-switch-indent-offset 0 + "Number of additional spaces for indenting the contents of a switch block. +The value must not be negative." + :type 'integer + :safe 'integerp + :group 'js + :version "24.4") (defcustom js-flat-functions nil "Treat nested functions as top-level functions in `js-mode'. @@ -1766,6 +1767,10 @@ (list (cons 'c js-comment-lineup-func)))) (c-get-syntactic-indentation (list (cons symbol anchor))))) +(defun js--same-line (pos) + (and (>= pos (point-at-bol)) + (<= pos (point-at-eol)))) + (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 @@ -1788,8 +1793,7 @@ (looking-at js--indent-operator-re) (js--backward-syntactic-ws)) (not (eq (char-before) ?\;))) - (and (>= pos (point-at-bol)) - (<= pos (point-at-eol))))))) + (js--same-line pos))))) (condition-case nil (backward-sexp) (scan-error (setq at-opening-bracket t)))) @@ -1797,23 +1801,68 @@ (goto-char (match-end 0)) (1+ (current-column))))))) +(defun js--indent-in-array-comp (bracket) + "Return non-nil if we think we're in an array comprehension. +In particular, return the buffer position of the first `for' kwd." + (let ((end (point))) + (save-excursion + (goto-char bracket) + (when (looking-at "\\[") + (forward-char 1) + (js--forward-syntactic-ws) + (if (looking-at "[[{]") + (let (forward-sexp-function) ; Use Lisp version. + (forward-sexp) ; Skip destructuring form. + (js--forward-syntactic-ws) + (if (and (/= (char-after) ?,) ; Regular array. + (looking-at "for")) + (match-beginning 0))) + ;; To skip arbitrary expressions we need the parser, + ;; so we'll just guess at it. + (if (and (> end (point)) ; Not empty literal. + (re-search-forward "[^,]]* \\(for\\) " end t) + ;; Not inside comment or string literal. + (not (nth 8 (parse-partial-sexp bracket (point))))) + (match-beginning 1))))))) + +(defun js--array-comp-indentation (bracket for-kwd) + (if (js--same-line for-kwd) + ;; First continuation line. + (save-excursion + (goto-char bracket) + (forward-char 1) + (skip-chars-forward " \t") + (current-column)) + (save-excursion + (goto-char for-kwd) + (current-column)))) + (defun js--proper-indentation (parse-status) "Return the proper indentation for the current line." (save-excursion (back-to-indentation) - (cond ((nth 4 parse-status) + (cond ((nth 4 parse-status) ; inside comment (js--get-c-offset 'c (nth 8 parse-status))) - ((nth 8 parse-status) 0) ; inside string + ((nth 3 parse-status) 0) ; inside string + ((eq (char-after) ?#) 0) + ((save-excursion (js--beginning-of-macro)) 4) + ;; Indent array comprehension continuation lines specially. + ((let ((bracket (nth 1 parse-status)) + beg) + (and bracket + (not (js--same-line bracket)) + (setq beg (js--indent-in-array-comp bracket)) + ;; At or after the first loop? + (>= (point) beg) + (js--array-comp-indentation bracket beg)))) ((js--ctrl-statement-indentation)) ((js--multi-line-declaration-indentation)) - ((eq (char-after) ?#) 0) - ((save-excursion (js--beginning-of-macro)) 4) ((nth 1 parse-status) ;; A single closing paren/bracket should be indented at the ;; same level as the opening statement. Same goes for ;; "case" and "default". - (let ((same-indent-p (looking-at - "[]})]\\|\\_\\|\\_")) + (let ((same-indent-p (looking-at "[]})]")) + (switch-keyword-p (looking-at "default\\_>\\|case\\_>[^:]")) (continued-expr-p (js--continued-expression-p))) (goto-char (nth 1 parse-status)) ; go to the opening char (if (looking-at "[({[]\\s-*\\(/[/*]\\|$\\)") @@ -1821,17 +1870,26 @@ (skip-syntax-backward " ") (when (eq (char-before) ?\)) (backward-list)) (back-to-indentation) - (cond (same-indent-p - (current-column)) - (continued-expr-p - (+ (current-column) (* 2 js-indent-level) - js-expr-indent-offset)) - (t - (+ (current-column) js-indent-level - (pcase (char-after (nth 1 parse-status)) - (?\( js-paren-indent-offset) - (?\[ js-square-indent-offset) - (?\{ js-curly-indent-offset)))))) + (let* ((in-switch-p (unless same-indent-p + (looking-at "\\_"))) + (same-indent-p (or same-indent-p + (and switch-keyword-p + in-switch-p))) + (indent + (cond (same-indent-p + (current-column)) + (continued-expr-p + (+ (current-column) (* 2 js-indent-level) + js-expr-indent-offset)) + (t + (+ (current-column) js-indent-level + (pcase (char-after (nth 1 parse-status)) + (?\( js-paren-indent-offset) + (?\[ js-square-indent-offset) + (?\{ js-curly-indent-offset))))))) + (if in-switch-p + (+ indent js-switch-indent-offset) + indent))) ;; If there is something following the opening ;; paren/bracket, everything else should be indented at ;; the same level. === added file 'test/indent/js.js' --- test/indent/js.js 1970-01-01 00:00:00 +0000 +++ test/indent/js.js 2013-12-08 16:08:45 +0000 @@ -0,0 +1,45 @@ +var a = 1; +b = 2; + +let c = 1, + d = 2; + +var e = 100500, + + 1; + +var f = bar('/protocols/') +baz(); + +var h = 100500 +1; + +const i = 1, + j = 2; + +var k = 1, + l = [ + 1, 2, + 3, 4 + ], + m = 5; + +var n = function() { + return 7; +}, + o = 8; + +foo(bar, function() { + return 2; +}); + +switch (b) { +case "a": + 2; +default: + 3; +} + +var ; + +var evens = [e for each (e in range(0, 21)) + if (ed % 2 == 0)]; ------------------------------------------------------------ revno: 115427 fixes bug: http://debbugs.gnu.org/16089 committer: Juanma Barranquero branch nick: trunk timestamp: Sun 2013-12-08 16:33:27 +0100 message: Fix typos in doc files (bug#16089). * emacs/msdog.texi (Windows Keyboard): Fix typo. * lispref/display.texi (Progress, Face Remapping): * lispref/processes.texi (Serial Ports): * lispref/windows.texi (Recombining Windows): Fix typos. * misc/dbus.texi (Properties and Annotations): Fix typo. diff: === modified file 'doc/emacs/ChangeLog' --- doc/emacs/ChangeLog 2013-11-30 18:34:58 +0000 +++ doc/emacs/ChangeLog 2013-12-08 15:33:27 +0000 @@ -1,3 +1,7 @@ +2013-12-08 Juanma Barranquero + + * msdog.texi (Windows Keyboard): Fix typo. + 2013-11-30 Glenn Morris * Makefile.in (distclean): Remove Makefile. === modified file 'doc/emacs/msdog.texi' --- doc/emacs/msdog.texi 2013-02-09 12:52:01 +0000 +++ doc/emacs/msdog.texi 2013-12-08 15:33:27 +0000 @@ -482,7 +482,7 @@ @kbd{Alt-@key{TAB}}, for its own use. These key combinations are intercepted by the system before Emacs can see them. You can use the @code{w32-register-hot-key} function to allow a key sequence to be -seen by Emacs instead of being grabbed by Windows. This functions +seen by Emacs instead of being grabbed by Windows. This function registers a key sequence as a @dfn{hot key}, overriding the special meaning of that key sequence for Windows. (MS-Windows is told that the key sequence is a hot key only when one of the Emacs windows has === modified file 'doc/lispref/ChangeLog' --- doc/lispref/ChangeLog 2013-12-04 00:12:02 +0000 +++ doc/lispref/ChangeLog 2013-12-08 15:33:27 +0000 @@ -1,3 +1,9 @@ +2013-12-08 Juanma Barranquero + + * display.texi (Progress, Face Remapping): + * processes.texi (Serial Ports): + * windows.texi (Recombining Windows): Fix typos. (Bug#16089) + 2013-12-04 Juri Linkov * searching.texi (Search and Replace): Fix `unread-command-events' === modified file 'doc/lispref/display.texi' --- doc/lispref/display.texi 2013-11-08 10:27:15 +0000 +++ doc/lispref/display.texi 2013-12-08 15:33:27 +0000 @@ -439,7 +439,7 @@ The first two arguments have the same meaning as for @code{progress-reporter-update}. Optional @var{new-message} allows -you to change the message of the @var{reporter}. Since this functions +you to change the message of the @var{reporter}. Since this function always updates the echo area, such a change will be immediately presented to the user. @end defun @@ -2683,7 +2683,7 @@ modes to remap faces in the buffers they control. @defun face-remap-add-relative face &rest specs -This functions adds the face spec in @var{specs} as relative +This function adds the face spec in @var{specs} as relative remappings for face @var{face} in the current buffer. The remaining arguments, @var{specs}, should form either a list of face names, or a property list of attribute/value pairs. === modified file 'doc/lispref/processes.texi' --- doc/lispref/processes.texi 2013-02-12 17:36:54 +0000 +++ doc/lispref/processes.texi 2013-12-08 15:33:27 +0000 @@ -2613,7 +2613,7 @@ @cindex stopbits, in serial connections @cindex flowcontrol, in serial connections -This functions configures a serial port connection. Arguments are +This function configures a serial port connection. Arguments are specified as keyword/argument pairs. Attributes that are not given are re-initialized from the process's current configuration (available via the function @code{process-contact}), or set to reasonable default === modified file 'doc/lispref/windows.texi' --- doc/lispref/windows.texi 2013-12-03 01:19:24 +0000 +++ doc/lispref/windows.texi 2013-12-08 15:33:27 +0000 @@ -1164,7 +1164,7 @@ @cindex window combination limit @defun set-window-combination-limit window limit -This functions sets the @dfn{combination limit} of the window +This function sets the @dfn{combination limit} of the window @var{window} to @var{limit}. This value can be retrieved via the function @code{window-combination-limit}. See below for its effects; note that it is only meaningful for internal windows. The === modified file 'doc/misc/ChangeLog' --- doc/misc/ChangeLog 2013-12-06 14:43:10 +0000 +++ doc/misc/ChangeLog 2013-12-08 15:33:27 +0000 @@ -1,3 +1,7 @@ +2013-12-08 Juanma Barranquero + + * dbus.texi (Properties and Annotations): Fix typo. + 2013-12-06 Bastien Guerry * org.texi: Don't include Emacs version within Org's version. === modified file 'doc/misc/dbus.texi' --- doc/misc/dbus.texi 2013-12-05 15:34:30 +0000 +++ doc/misc/dbus.texi 2013-12-08 15:33:27 +0000 @@ -760,7 +760,7 @@ @end defun @defun dbus-get-all-managed-objects bus service path -This functions returns all objects at @var{bus}, @var{service}, +This function returns all objects at @var{bus}, @var{service}, @var{path}, and the children of @var{path}. The result is a list of objects. Every object is a cons of an existing path name, and the list of available interface objects. An interface object is another ------------------------------------------------------------ revno: 115426 committer: Jan D. branch nick: trunk timestamp: Sun 2013-12-08 13:59:14 +0100 message: Fix GNUStep toolbar not updating. * src/nsterm.m (updateFrameSize:): Fix GNUStep toolbar not updating. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-12-08 12:18:13 +0000 +++ src/ChangeLog 2013-12-08 12:59:14 +0000 @@ -1,5 +1,7 @@ 2013-12-08 Jan Djärv + * nsterm.m (updateFrameSize:): Fix GNUStep toolbar not updating. + * emacs.c (main): Call fixup_locale a second time for GNUStep. 2013-12-08 Martin Rudalics === modified file 'src/nsterm.m' --- src/nsterm.m 2013-12-07 16:48:12 +0000 +++ src/nsterm.m 2013-12-08 12:59:14 +0000 @@ -5682,6 +5682,11 @@ if (! [self isFullscreen]) { +#ifdef NS_IMPL_GNUSTEP + // GNUStep does not always update the tool bar height. Force it. + if (toolbar) update_frame_tool_bar (emacsframe); +#endif + extra = FRAME_NS_TITLEBAR_HEIGHT (emacsframe) + FRAME_TOOLBAR_HEIGHT (emacsframe); } ------------------------------------------------------------ revno: 115425 committer: Jan D. branch nick: trunk timestamp: Sun 2013-12-08 13:18:13 +0100 message: * emacs.c (main): Call fixup_locale a second time for GNUStep. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-12-08 09:56:02 +0000 +++ src/ChangeLog 2013-12-08 12:18:13 +0000 @@ -1,3 +1,7 @@ +2013-12-08 Jan Djärv + + * emacs.c (main): Call fixup_locale a second time for GNUStep. + 2013-12-08 Martin Rudalics * frame.c (x_set_font): Mark frame as garbaged (Bug#16028). === modified file 'src/emacs.c' --- src/emacs.c 2013-11-28 19:40:15 +0000 +++ src/emacs.c 2013-12-08 12:18:13 +0000 @@ -1195,6 +1195,11 @@ #ifdef HAVE_NS ns_pool = ns_alloc_autorelease_pool (); +#ifdef NS_IMPL_GNUSTEP + /* GNUStep stupidly resets our locale settings after we made them. */ + fixup_locale (); +#endif + if (!noninteractive) { #ifdef NS_IMPL_COCOA ------------------------------------------------------------ revno: 115424 committer: martin rudalics branch nick: trunk timestamp: Sun 2013-12-08 10:56:02 +0100 message: In x_set_font mark frame as garbaged (Bug#16028). * frame.c (x_set_font): Mark frame as garbaged (Bug#16028). diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-12-08 08:05:36 +0000 +++ src/ChangeLog 2013-12-08 09:56:02 +0000 @@ -1,3 +1,7 @@ +2013-12-08 Martin Rudalics + + * frame.c (x_set_font): Mark frame as garbaged (Bug#16028). + 2013-12-08 Paul Eggert Use libcrypto's checksum implementations if available, for speed. === modified file 'src/frame.c' --- src/frame.c 2013-12-01 17:09:18 +0000 +++ src/frame.c 2013-12-08 09:56:02 +0000 @@ -3314,9 +3314,13 @@ #endif /* Recalculate toolbar height. */ f->n_tool_bar_rows = 0; + /* Ensure we redraw it. */ clear_current_matrices (f); + /* Attempt to hunt down bug#16028. */ + SET_FRAME_GARBAGED (f); + recompute_basic_faces (f); do_pending_window_change (0); ------------------------------------------------------------ revno: 115423 committer: Leo Liu branch nick: trunk timestamp: Sun 2013-12-08 17:18:55 +0800 message: Re-write flymake-highlight-line in flymake.el * progmodes/flymake.el (flymake-highlight-line): Re-write. (flymake-make-overlay): Remove arg MOUSE-FACE. (flymake-save-string-to-file, flymake-read-file-to-string): Remove. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-12-08 08:11:50 +0000 +++ lisp/ChangeLog 2013-12-08 09:18:55 +0000 @@ -1,3 +1,9 @@ +2013-12-08 Leo Liu + + * progmodes/flymake.el (flymake-highlight-line): Re-write. + (flymake-make-overlay): Remove arg MOUSE-FACE. + (flymake-save-string-to-file, flymake-read-file-to-string): Remove. + 2013-12-08 Stefan Monnier * emulation/cua-rect.el (cua--rectangle-highlight-for-redisplay): === modified file 'lisp/progmodes/flymake.el' --- lisp/progmodes/flymake.el 2013-12-08 07:18:46 +0000 +++ lisp/progmodes/flymake.el 2013-12-08 09:18:55 +0000 @@ -509,16 +509,6 @@ (write-region nil nil file-name nil 566) (flymake-log 3 "saved buffer %s in file %s" (buffer-name) file-name)) -(defun flymake-save-string-to-file (file-name data) - "Save string DATA to file FILE-NAME." - (write-region data nil file-name nil 566)) - -(defun flymake-read-file-to-string (file-name) - "Read contents of file FILE-NAME and return as a string." - (with-temp-buffer - (insert-file-contents file-name) - (buffer-substring (point-min) (point-max)))) - (defun flymake-process-filter (process output) "Parse OUTPUT and highlight error lines. It's flymake process filter." @@ -697,7 +687,7 @@ "Determine whether overlay OV was created by flymake." (and (overlayp ov) (overlay-get ov 'flymake-overlay))) -(defun flymake-make-overlay (beg end tooltip-text face bitmap mouse-face) +(defun flymake-make-overlay (beg end tooltip-text face bitmap) "Allocate a flymake overlay in range BEG and END." (when (not (flymake-region-has-flymake-overlays beg end)) (let ((ov (make-overlay beg end nil t t)) @@ -708,7 +698,6 @@ bitmap (list bitmap))))))) (overlay-put ov 'face face) - (overlay-put ov 'mouse-face mouse-face) (overlay-put ov 'help-echo tooltip-text) (overlay-put ov 'flymake-overlay t) (overlay-put ov 'priority 100) @@ -760,42 +749,19 @@ Perhaps use text from LINE-ERR-INFO-LIST to enhance highlighting." (goto-char (point-min)) (forward-line (1- line-no)) - (let* ((line-beg (point-at-bol)) - (line-end (point-at-eol)) - (beg line-beg) - (end line-end) - (tooltip-text (flymake-ler-text (nth 0 line-err-info-list))) - (face nil) - (bitmap nil)) - - (goto-char line-beg) - (while (looking-at "[ \t]") - (forward-char)) - - (setq beg (point)) - - (goto-char line-end) - (while (and (looking-at "[ \t\r\n]") (> (point) 1)) - (backward-char)) - - (setq end (1+ (point))) - - (when (<= end beg) - (setq beg line-beg) - (setq end line-end)) - - (when (= end beg) - (goto-char end) - (forward-line) - (setq end (point))) - - (if (> (flymake-get-line-err-count line-err-info-list "e") 0) - (setq face 'flymake-errline - bitmap flymake-error-bitmap) - (setq face 'flymake-warnline - bitmap flymake-warning-bitmap)) - - (flymake-make-overlay beg end tooltip-text face bitmap nil))) + (pcase-let* ((beg (progn (back-to-indentation) (point))) + (end (progn + (end-of-line) + (skip-chars-backward " \t\f\t\n" beg) + (if (eq (point) beg) + (line-beginning-position 2) + (point)))) + (tooltip-text (mapconcat #'flymake-ler-text line-err-info-list "\n")) + (`(,face ,bitmap) + (if (> (flymake-get-line-err-count line-err-info-list "e") 0) + (list 'flymake-errline flymake-error-bitmap) + (list 'flymake-warnline flymake-warning-bitmap)))) + (flymake-make-overlay beg end tooltip-text face bitmap))) (defun flymake-parse-err-lines (err-info-list lines) "Parse err LINES, store info in ERR-INFO-LIST." @@ -883,19 +849,6 @@ Use `flymake-reformat-err-line-patterns-from-compile-el' to add patterns from compile.el") -;;(defcustom flymake-err-line-patterns -;; '( -;; ; MS Visual C++ 6.0 -;; ("\\(\\([a-zA-Z]:\\)?[^:(\t\n]+\\)(\\([0-9]+\\)) \: \\(\\(error\\|warning\\|fatal error\\) \\(C[0-9]+\\):[ \t\n]*\\(.+\\)\\)" -;; 1 3 4) -;; ; jikes -;; ("\\(\\([a-zA-Z]:\\)?[^:(\t\n]+\\)\:\\([0-9]+\\)\:[0-9]+\:[0-9]+\:[0-9]+\: \\(\\(Error\\|Warning\\|Caution\\):[ \t\n]*\\(.+\\)\\)" -;; 1 3 4)) -;; "patterns for matching error/warning lines, (regexp file-idx line-idx err-text-idx)" -;; :group 'flymake -;; :type '(repeat (string number number number)) -;;) - (define-obsolete-variable-alias 'flymake-warning-re 'flymake-warning-predicate "24.4") (defvar flymake-warning-predicate "^[wW]arning" "Predicate matching against error text to detect a warning.