Now on revision 111615. ------------------------------------------------------------ revno: 111615 committer: Dmitry Antipov branch nick: trunk timestamp: Mon 2013-01-28 09:47:51 +0400 message: Remove obsolete redisplay code. See the discussion at http://lists.gnu.org/archive/html/emacs-devel/2013-01/msg00576.html. * dispnew.c (preemption_period, preemption_next_check): Remove. (Vredisplay_preemption_period): Likewise. (update_frame, update_single_window, update_window, update_frame_1): Adjust users. Always assume that PERIODIC_PREEMPTION_CHECKING is not used, following the 2012-06-22 change. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-01-25 17:13:31 +0000 +++ src/ChangeLog 2013-01-28 05:47:51 +0000 @@ -1,3 +1,13 @@ +2013-01-28 Dmitry Antipov + + Remove obsolete redisplay code. See the discussion at + http://lists.gnu.org/archive/html/emacs-devel/2013-01/msg00576.html. + * dispnew.c (preemption_period, preemption_next_check): Remove. + (Vredisplay_preemption_period): Likewise. + (update_frame, update_single_window, update_window, update_frame_1): + Adjust users. Always assume that PERIODIC_PREEMPTION_CHECKING is not + used, following the 2012-06-22 change. + 2013-01-25 Eli Zaretskii * w32notify.c (Fw32notify_add_watch): Doc fix. (Bug#13540) === modified file 'src/dispnew.c' --- src/dispnew.c 2013-01-23 20:07:28 +0000 +++ src/dispnew.c 2013-01-28 05:47:51 +0000 @@ -107,12 +107,6 @@ static void adjust_frame_glyphs_for_window_redisplay (struct frame *); static void adjust_frame_glyphs_for_frame_redisplay (struct frame *); - -/* Redisplay preemption timers. */ - -static EMACS_TIME preemption_period; -static EMACS_TIME preemption_next_check; - /* True upon entry to redisplay means do not assume anything about current contents of actual terminal frame; clear and redraw it. */ @@ -3080,21 +3074,10 @@ if (redisplay_dont_pause) force_p = 1; - else if (NILP (Vredisplay_preemption_period)) - force_p = 1; - else if (!force_p && NUMBERP (Vredisplay_preemption_period)) + else if (!force_p && detect_input_pending_ignore_squeezables ()) { - double p = XFLOATINT (Vredisplay_preemption_period); - - if (detect_input_pending_ignore_squeezables ()) - { - paused_p = 1; - goto do_pause; - } - - preemption_period = EMACS_TIME_FROM_DOUBLE (p); - preemption_next_check = add_emacs_time (current_emacs_time (), - preemption_period); + paused_p = 1; + goto do_pause; } if (FRAME_WINDOW_P (f)) @@ -3232,15 +3215,6 @@ if (redisplay_dont_pause) force_p = 1; - else if (NILP (Vredisplay_preemption_period)) - force_p = 1; - else if (!force_p && NUMBERP (Vredisplay_preemption_period)) - { - double p = XFLOATINT (Vredisplay_preemption_period); - preemption_period = EMACS_TIME_FROM_DOUBLE (p); - preemption_next_check = add_emacs_time (current_emacs_time (), - preemption_period); - } /* Update W. */ update_begin (f); @@ -3394,9 +3368,7 @@ { struct glyph_matrix *desired_matrix = w->desired_matrix; bool paused_p; -#if !PERIODIC_PREEMPTION_CHECKING int preempt_count = baud_rate / 2400 + 1; -#endif struct redisplay_interface *rif = FRAME_RIF (XFRAME (WINDOW_FRAME (w))); #ifdef GLYPH_DEBUG /* Check that W's frame doesn't have glyph matrices. */ @@ -3404,10 +3376,8 @@ #endif /* Check pending input the first time so that we can quickly return. */ -#if !PERIODIC_PREEMPTION_CHECKING if (!force_p) detect_input_pending_ignore_squeezables (); -#endif /* If forced to complete the update, or if no input is pending, do the update. */ @@ -3418,9 +3388,7 @@ struct glyph_row *header_line_row; int yb; bool changed_p = 0, mouse_face_overwritten_p = 0; -#if ! PERIODIC_PREEMPTION_CHECKING int n_updated = 0; -#endif rif->update_window_begin_hook (w); yb = window_text_bottom_y (w); @@ -3484,22 +3452,8 @@ detect_input_pending. If it's done too often, scrolling large windows with repeated scroll-up commands will too quickly pause redisplay. */ -#if PERIODIC_PREEMPTION_CHECKING - if (!force_p) - { - EMACS_TIME tm = current_emacs_time (); - if (EMACS_TIME_LT (preemption_next_check, tm)) - { - preemption_next_check = add_emacs_time (tm, - preemption_period); - if (detect_input_pending_ignore_squeezables ()) - break; - } - } -#else if (!force_p && ++n_updated % preempt_count == 0) detect_input_pending_ignore_squeezables (); -#endif changed_p |= update_window_line (w, vpos, &mouse_face_overwritten_p); @@ -4531,13 +4485,11 @@ if (preempt_count <= 0) preempt_count = 1; -#if !PERIODIC_PREEMPTION_CHECKING if (!force_p && detect_input_pending_ignore_squeezables ()) { pause_p = 1; goto do_pause; } -#endif /* If we cannot insert/delete lines, it's no use trying it. */ if (!FRAME_LINE_INS_DEL_OK (f)) @@ -4578,21 +4530,8 @@ } } -#if PERIODIC_PREEMPTION_CHECKING - if (!force_p) - { - EMACS_TIME tm = current_emacs_time (); - if (EMACS_TIME_LT (preemption_next_check, tm)) - { - preemption_next_check = add_emacs_time (tm, preemption_period); - if (detect_input_pending_ignore_squeezables ()) - break; - } - } -#else if (!force_p && (i - 1) % preempt_count == 0) detect_input_pending_ignore_squeezables (); -#endif update_frame_line (f, i); } @@ -4698,9 +4637,7 @@ } } -#if !PERIODIC_PREEMPTION_CHECKING do_pause: -#endif clear_desired_matrices (f); return pause_p; @@ -6410,15 +6347,6 @@ doc: /* Non-nil means display update isn't paused when input is detected. */); redisplay_dont_pause = 1; -#if PERIODIC_PREEMPTION_CHECKING - DEFVAR_LISP ("redisplay-preemption-period", Vredisplay_preemption_period, - doc: /* Period in seconds between checking for input during redisplay. -This has an effect only if `redisplay-dont-pause' is nil; in that -case, arriving input preempts redisplay until the input is processed. -If the value is nil, redisplay is never preempted. */); - Vredisplay_preemption_period = make_float (0.10); -#endif - #ifdef CANNOT_DUMP if (noninteractive) #endif ------------------------------------------------------------ revno: 111614 committer: Dmitry Gutov branch nick: trunk timestamp: Mon 2013-01-28 06:07:42 +0400 message: * progmodes/ruby-mode.el (ruby-font-lock-keywords): Highlight nested constants, too. \_< broke that. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-01-28 01:20:42 +0000 +++ lisp/ChangeLog 2013-01-28 02:07:42 +0000 @@ -4,6 +4,8 @@ checks made superfluous by the \_< operator. * progmodes/ruby-mode.el (ruby-move-to-block): Work with (maybe temporarily) broken indentation. + * progmodes/ruby-mode.el (ruby-font-lock-keywords): Highlight + nested constants, too. \_< broke that. 2013-01-27 Nobuyoshi Nakada === modified file 'lisp/progmodes/ruby-mode.el' --- lisp/progmodes/ruby-mode.el 2013-01-28 01:20:42 +0000 +++ lisp/progmodes/ruby-mode.el 2013-01-28 02:07:42 +0000 @@ -1613,7 +1613,7 @@ '("\\(\\$\\|@\\|@@\\)\\(\\w\\|_\\)+" 0 font-lock-variable-name-face) ;; constants - '("\\_<\\([A-Z]+\\(\\w\\|_\\)*\\)" + '("\\(?:\\_<\\|::\\)\\([A-Z]+\\(\\w\\|_\\)*\\)" 1 font-lock-type-face) '("\\(^\\s *\\|[\[\{\(,]\\s *\\|\\sw\\s +\\)\\(\\(\\sw\\|_\\)+\\):[^:]" 2 font-lock-constant-face) ;; expression expansion ------------------------------------------------------------ revno: 111613 committer: Dmitry Gutov branch nick: trunk timestamp: Mon 2013-01-28 05:20:42 +0400 message: * progmodes/ruby-mode.el (ruby-move-to-block): Work with (maybe temporarily) broken indentation. * automated/ruby-mode-tests.el (ruby-block-test-example): Break indentation of the do block opener and add a line inside it. * automated/ruby-mode-tests.el (works-on-do, ok-with-three): Adjust line numbers. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-01-27 22:32:11 +0000 +++ lisp/ChangeLog 2013-01-28 01:20:42 +0000 @@ -2,6 +2,8 @@ * progmodes/ruby-mode.el (ruby-font-lock-keywords): Remove some checks made superfluous by the \_< operator. + * progmodes/ruby-mode.el (ruby-move-to-block): Work with (maybe + temporarily) broken indentation. 2013-01-27 Nobuyoshi Nakada === modified file 'lisp/progmodes/ruby-mode.el' --- lisp/progmodes/ruby-mode.el 2013-01-27 22:32:11 +0000 +++ lisp/progmodes/ruby-mode.el 2013-01-28 01:20:42 +0000 @@ -905,7 +905,7 @@ ((and backward (looking-at "^=end\\>")) (re-search-backward "^=begin\\>")) (t - (setq pos (current-indentation)) + (setq pos (ruby-calculate-indent)) (cond ;; Deeper indentation, we found a block. ;; FIXME: We can't recognize empty blocks this way. === modified file 'test/ChangeLog' --- test/ChangeLog 2013-01-27 22:46:41 +0000 +++ test/ChangeLog 2013-01-28 01:20:42 +0000 @@ -2,6 +2,10 @@ * automated/ruby-mode-tests.el (ruby-indent-spread-args-in-parens): New test. + * automated/ruby-mode-tests.el (ruby-block-test-example): + Break indentation of the do block opener and add a line inside it. + * automated/ruby-mode-tests.el (works-on-do, ok-with-three): + Adjust line numbers. 2013-01-15 Stefan Monnier === modified file 'test/automated/ruby-mode-tests.el' --- test/automated/ruby-mode-tests.el 2013-01-27 22:47:34 +0000 +++ test/automated/ruby-mode-tests.el 2013-01-28 01:20:42 +0000 @@ -408,7 +408,8 @@ | end | | def baz - | some do + |some do + |3 | end | end |end")) @@ -425,7 +426,7 @@ (ruby-deftest-move-to-block works-on-do (goto-line 11) (ruby-end-of-block) - (should (= 12 (line-number-at-pos))) + (should (= 13 (line-number-at-pos))) (ruby-beginning-of-block) (should (= 11 (line-number-at-pos)))) @@ -437,7 +438,7 @@ (ruby-deftest-move-to-block ok-with-three (goto-line 2) (ruby-move-to-block 3) - (should (= 13 (line-number-at-pos)))) + (should (= 14 (line-number-at-pos)))) (ruby-deftest-move-to-block ok-with-minus-two (goto-line 10) ------------------------------------------------------------ revno: 111612 committer: Dmitry Gutov branch nick: trunk timestamp: Mon 2013-01-28 02:47:34 +0400 message: * automated/ruby-mode-tests.el (ruby-indent-spread-args-in-parens): New test. diff: === modified file 'test/automated/ruby-mode-tests.el' --- test/automated/ruby-mode-tests.el 2013-01-02 16:13:04 +0000 +++ test/automated/ruby-mode-tests.el 2013-01-27 22:47:34 +0000 @@ -237,6 +237,18 @@ |end |statement")) +(ert-deftest ruby-indent-spread-args-in-parens () + (let ((ruby-deep-indent-paren '(?\())) + (ruby-should-indent-buffer + "foo(1, + | 2, + | 3) + |" + "foo(1, + | 2, + | 3) + |"))) + (ert-deftest ruby-move-to-block-stops-at-indentation () (ruby-with-temp-buffer "def f\nend" (beginning-of-line) ------------------------------------------------------------ revno: 111611 committer: Dmitry Gutov branch nick: trunk timestamp: Mon 2013-01-28 02:46:41 +0400 message: * automated/ruby-mode-tests.el (ruby-indent-spread-args-in-parens): New test. diff: === modified file 'test/ChangeLog' --- test/ChangeLog 2013-01-15 06:05:22 +0000 +++ test/ChangeLog 2013-01-27 22:46:41 +0000 @@ -1,3 +1,8 @@ +2013-01-27 Dmitry Gutov + + * automated/ruby-mode-tests.el + (ruby-indent-spread-args-in-parens): New test. + 2013-01-15 Stefan Monnier * automated/advice-tests.el: Split up. Add advice-test-preactivate. ------------------------------------------------------------ revno: 111610 committer: Dmitry Gutov branch nick: trunk timestamp: Mon 2013-01-28 02:32:11 +0400 message: * progmodes/ruby-mode.el (ruby-font-lock-keywords): Use "\\_<" instead of "\\b". Remove some checks made superfluous as a result. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-01-27 10:43:33 +0000 +++ lisp/ChangeLog 2013-01-27 22:32:11 +0000 @@ -1,3 +1,13 @@ +2013-01-27 Dmitry Gutov + + * progmodes/ruby-mode.el (ruby-font-lock-keywords): Remove some + checks made superfluous by the \_< operator. + +2013-01-27 Nobuyoshi Nakada + + * progmodes/ruby-mode.el (ruby-font-lock-keywords): Use "\\_<" + instead of "\\b". + 2013-01-27 Michael Albinus * autorevert.el (auto-revert-handler): Notifications which result === modified file 'lisp/progmodes/ruby-mode.el' --- lisp/progmodes/ruby-mode.el 2013-01-02 16:13:04 +0000 +++ lisp/progmodes/ruby-mode.el 2013-01-27 22:32:11 +0000 @@ -1552,7 +1552,7 @@ 1 font-lock-function-name-face) ;; keywords (cons (concat - "\\(^\\|[^_:.@$]\\|\\.\\.\\)\\b\\(defined\\?\\|" + "\\(^\\|[^.@$]\\|\\.\\.\\)\\_<\\(defined\\?\\|" (regexp-opt '("alias_method" "alias" @@ -1602,7 +1602,7 @@ `(,ruby-here-doc-beg-re 0 (unless (ruby-singleton-class-p (match-beginning 0)) 'font-lock-string-face)) ;; variables - '("\\(^\\|[^_:.@$]\\|\\.\\.\\)\\b\\(nil\\|self\\|true\\|false\\)\\>" + '("\\(^\\|[^.@$]\\|\\.\\.\\)\\_<\\(nil\\|self\\|true\\|false\\)\\>" 2 font-lock-variable-name-face) ;; symbols '("\\(^\\|[^:]\\)\\(:\\([-+~]@?\\|[/%&|^`]\\|\\*\\*?\\|<\\(<\\|=>?\\)?\\|>[>=]?\\|===?\\|=~\\|![~=]?\\|\\[\\]=?\\|@?\\(\\w\\|_\\)+\\([!?=]\\|\\b_*\\)\\|#{[^}\n\\\\]*\\(\\\\.[^}\n\\\\]*\\)*}\\)\\)" @@ -1613,8 +1613,8 @@ '("\\(\\$\\|@\\|@@\\)\\(\\w\\|_\\)+" 0 font-lock-variable-name-face) ;; constants - '("\\(^\\|[^_]\\)\\b\\([A-Z]+\\(\\w\\|_\\)*\\)" - 2 font-lock-type-face) + '("\\_<\\([A-Z]+\\(\\w\\|_\\)*\\)" + 1 font-lock-type-face) '("\\(^\\s *\\|[\[\{\(,]\\s *\\|\\sw\\s +\\)\\(\\(\\sw\\|_\\)+\\):[^:]" 2 font-lock-constant-face) ;; expression expansion '(ruby-match-expression-expansion ------------------------------------------------------------ revno: 111609 committer: Michael Albinus branch nick: trunk timestamp: Sun 2013-01-27 11:43:33 +0100 message: * autorevert.el (auto-revert-handler): Notifications which result from a saved file shall not be taken into account. (Bug#13557) diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-01-26 15:13:09 +0000 +++ lisp/ChangeLog 2013-01-27 10:43:33 +0000 @@ -1,3 +1,8 @@ +2013-01-27 Michael Albinus + + * autorevert.el (auto-revert-handler): Notifications which result + from a saved file shall not be taken into account. (Bug#13557) + 2013-01-26 Andreas Schwab * emacs-lisp/lisp-mode.el (lisp-mode-variables): Add optional === modified file 'lisp/autorevert.el' --- lisp/autorevert.el 2013-01-25 13:15:22 +0000 +++ lisp/autorevert.el 2013-01-27 10:43:33 +0000 @@ -612,21 +612,16 @@ (or (and buffer-file-name (or auto-revert-remote-files (not (file-remote-p buffer-file-name))) + (or (not auto-revert-use-notify) + auto-revert-notify-modified-p) (if auto-revert-tail-mode - (and (or (not auto-revert-use-notify) - auto-revert-notify-modified-p) - (file-readable-p buffer-file-name) + (and (file-readable-p buffer-file-name) (/= auto-revert-tail-pos (setq size (nth 7 (file-attributes buffer-file-name))))) - ;; When `auto-revert-use-notify' is set, we do - ;; not apply further checks for performance - ;; reasons. - (if auto-revert-use-notify - auto-revert-notify-modified-p - (and (file-readable-p buffer-file-name) - (not (verify-visited-file-modtime buffer)))))) + (and (file-readable-p buffer-file-name) + (not (verify-visited-file-modtime buffer))))) (and (or auto-revert-mode global-auto-revert-non-file-buffers) revert-buffer-function @@ -634,8 +629,8 @@ (functionp buffer-stale-function) (funcall buffer-stale-function t)))) eob eoblist) + (setq auto-revert-notify-modified-p nil) (when revert - (setq auto-revert-notify-modified-p nil) (when (and auto-revert-verbose (not (eq revert 'fast))) (message "Reverting buffer `%s'." (buffer-name))) ------------------------------------------------------------ revno: 111608 committer: Andreas Schwab branch nick: emacs timestamp: Sat 2013-01-26 16:13:09 +0100 message: Fixes: debbugs:13556 * emacs-lisp/lisp-mode.el (lisp-mode-variables): Add optional parameter BAR-NOT-SYMBOL to control syntax of | for font-lock. (lisp-mode): Pass t for it. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-01-25 18:18:14 +0000 +++ lisp/ChangeLog 2013-01-26 15:13:09 +0000 @@ -1,3 +1,9 @@ +2013-01-26 Andreas Schwab + + * emacs-lisp/lisp-mode.el (lisp-mode-variables): Add optional + parameter BAR-NOT-SYMBOL to control syntax of | for font-lock. + (lisp-mode): Pass t for it. (Bug#13556) + 2013-01-25 Alan Mackenzie AWK Mode: Fix indentation bug at top level. Bug #12274. === modified file 'lisp/emacs-lisp/lisp-mode.el' --- lisp/emacs-lisp/lisp-mode.el 2013-01-20 02:40:49 +0000 +++ lisp/emacs-lisp/lisp-mode.el 2013-01-26 15:13:09 +0000 @@ -187,12 +187,14 @@ font-lock-string-face)))) font-lock-comment-face)) -(defun lisp-mode-variables (&optional lisp-syntax keywords-case-insensitive) +(defun lisp-mode-variables (&optional lisp-syntax keywords-case-insensitive + bar-not-symbol) "Common initialization routine for lisp modes. The LISP-SYNTAX argument is used by code in inf-lisp.el and is \(uselessly) passed from pp.el, chistory.el, gnus-kill.el and score-mode.el. KEYWORDS-CASE-INSENSITIVE non-nil means that for -font-lock keywords will not be case sensitive." +font-lock keywords will not be case sensitive. BAR-NOT-SYMBOL +non-nil means that | is not a symbol character." (when lisp-syntax (set-syntax-table lisp-mode-syntax-table)) (setq-local paragraph-ignore-fill-prefix t) @@ -226,7 +228,9 @@ (setq font-lock-defaults `((lisp-font-lock-keywords lisp-font-lock-keywords-1 lisp-font-lock-keywords-2) - nil ,keywords-case-insensitive (("+-*/.<>=!?$%_&~^:@" . "w")) nil + nil ,keywords-case-insensitive + ((,(concat "+-*/.<>=!?$%_&~^:@" (if bar-not-symbol "" "|")) . "w")) + nil (font-lock-mark-block-function . mark-defun) (font-lock-syntactic-face-function . lisp-font-lock-syntactic-face-function)))) @@ -549,7 +553,7 @@ Entry to this mode calls the value of `lisp-mode-hook' if that value is non-nil." - (lisp-mode-variables nil t) + (lisp-mode-variables nil t t) (setq-local find-tag-default-function 'lisp-find-tag-default) (setq-local comment-start-skip "\\(\\(^\\|[^\\\\\n]\\)\\(\\\\\\\\\\)*\\)\\(;+\\|#|\\) *")