Now on revision 112097. ------------------------------------------------------------ revno: 112097 committer: Paul Eggert branch nick: trunk timestamp: Tue 2013-03-19 22:18:31 -0700 message: * Makefile.in ($(srcdir)/ja-dic/ja-dic.el): Use batch-skkdic-convert. diff: === modified file 'leim/ChangeLog' --- leim/ChangeLog 2013-03-18 18:56:27 +0000 +++ leim/ChangeLog 2013-03-20 05:18:31 +0000 @@ -1,3 +1,7 @@ +2013-03-20 Paul Eggert + + * Makefile.in ($(srcdir)/ja-dic/ja-dic.el): Use batch-skkdic-convert. + 2013-03-18 Eli Zaretskii * makefile.w32-in ($(srcdir)/ja-dic/ja-dic.el): New target. === modified file 'leim/Makefile.in' --- leim/Makefile.in 2013-03-18 04:30:20 +0000 +++ leim/Makefile.in 2013-03-20 05:18:31 +0000 @@ -146,8 +146,9 @@ $(srcdir)/ja-dic/ja-dic.el: $(srcdir)/SKK-DIC/SKK-JISYO.L @$(MKDIR_P) $(srcdir)/ja-dic - $(RUN_EMACS) -l $(buildlisppath)/international/ja-dic-cnv \ - --eval '(skkdic-convert "$(srcdir)/SKK-DIC/SKK-JISYO.L" "$(srcdir)/ja-dic")' + $(RUN_EMACS) -batch -l $(buildlisppath)/international/ja-dic-cnv \ + -f batch-skkdic-convert -dir "$(srcdir)/ja-dic" \ + "$(srcdir)/SKK-DIC/SKK-JISYO.L" ## Following adapted from lisp/Makefile.in. setwins=wins="${srcdir}/ja-dic quail"; \ ------------------------------------------------------------ revno: 112096 committer: Paul Eggert branch nick: trunk timestamp: Tue 2013-03-19 22:17:04 -0700 message: Suppress unnecessary non-ASCII chatter during build process. * international/ja-dic-cnv.el (skkdic-collect-okuri-nasi) (batch-skkdic-convert): Suppress most of the chatter. It's not needed so much now that machines are faster, and its non-ASCII component was confusing; see Dmitry Gutov in . diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-03-20 03:05:34 +0000 +++ lisp/ChangeLog 2013-03-20 05:17:04 +0000 @@ -1,3 +1,12 @@ +2013-03-20 Paul Eggert + + Suppress unnecessary non-ASCII chatter during build process. + * international/ja-dic-cnv.el (skkdic-collect-okuri-nasi) + (batch-skkdic-convert): Suppress most of the chatter. + It's not needed so much now that machines are faster, + and its non-ASCII component was confusing; see Dmitry Gutov in + . + 2013-03-20 Leo Liu * ido.el (ido-chop): Fix bug#10994. === modified file 'lisp/international/ja-dic-cnv.el' --- lisp/international/ja-dic-cnv.el 2013-03-19 04:41:53 +0000 +++ lisp/international/ja-dic-cnv.el 2013-03-20 05:17:04 +0000 @@ -279,9 +279,9 @@ skkdic-okuri-nasi-entries-count (1+ skkdic-okuri-nasi-entries-count)) (setq ratio (floor (/ (* (point) 100.0) (point-max)))) - (if (/= ratio prev-ratio) + (if (/= (/ prev-ratio 10) (/ ratio 10)) (progn - (message "collected %2d%% %s ..." ratio kana) + (message "collected %2d%% ..." ratio) (setq prev-ratio ratio))) (while candidates (let ((entry (lookup-nested-alist (car candidates) @@ -304,12 +304,12 @@ (while l (let ((kana (car (car l))) (candidates (cdr (car l)))) - (setq ratio (/ (* count 1000) skkdic-okuri-nasi-entries-count) + (setq ratio (/ (* count 100) skkdic-okuri-nasi-entries-count) count (1+ count)) - (if (/= prev-ratio (/ ratio 10)) + (if (/= (/ prev-ratio 10) (/ ratio 10)) (progn - (message "processed %2d%% %s ..." (/ ratio 10) kana) - (setq prev-ratio (/ ratio 10)))) + (message "processed %2d%% ..." ratio) + (setq prev-ratio ratio))) (if (setq candidates (skkdic-reduced-candidates skkbuf kana candidates)) (progn @@ -433,12 +433,7 @@ (setq targetdir (expand-file-name (car command-line-args-left))) (setq command-line-args-left (cdr command-line-args-left)))) (setq filename (expand-file-name (car command-line-args-left))) - (message "Converting %s to %s ..." filename ja-dic-filename) - (message "It takes around 10 minutes even on Sun SS20.") - (skkdic-convert filename targetdir) - (message "Do byte-compile the created file by:") - (message " %% emacs -batch -f batch-byte-compile %s" ja-dic-filename) - )) + (skkdic-convert filename targetdir))) (kill-emacs 0)) ------------------------------------------------------------ revno: 112095 fixes bug: http://debbugs.gnu.org/10994 committer: Leo Liu branch nick: trunk timestamp: Wed 2013-03-20 11:05:34 +0800 message: * ido.el (ido-chop): Fix bug#10994. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-03-19 15:12:40 +0000 +++ lisp/ChangeLog 2013-03-20 03:05:34 +0000 @@ -1,3 +1,7 @@ +2013-03-20 Leo Liu + + * ido.el (ido-chop): Fix bug#10994. + 2013-03-19 Dmitry Gutov * whitespace.el (whitespace-font-lock, whitespace-font-lock-mode): === modified file 'lisp/ido.el' --- lisp/ido.el 2013-03-12 02:08:21 +0000 +++ lisp/ido.el 2013-03-20 03:05:34 +0000 @@ -3150,13 +3150,15 @@ (exit-minibuffer))) (defun ido-chop (items elem) - "Remove all elements before ELEM and put them at the end of ITEMS." + "Remove all elements before ELEM and put them at the end of ITEMS. +Use `eq' for comparison." (let ((ret nil) (next nil) (sofar nil)) (while (not ret) (setq next (car items)) - (if (equal next elem) + ;; Use `eq' to avoid bug http://debbugs.gnu.org/10994 + (if (eq next elem) (setq ret (append items (nreverse sofar))) ;; else (progn ------------------------------------------------------------ revno: 112094 fixes bug: http://debbugs.gnu.org/13817 committer: Dmitry Gutov branch nick: trunk timestamp: Tue 2013-03-19 19:12:40 +0400 message: * lisp/whitespace.el (whitespace-font-lock, whitespace-font-lock-mode): Remove vars. (whitespace-color-on, whitespace-color-off): Use `font-lock-fontify-buffer'. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-03-19 12:47:10 +0000 +++ lisp/ChangeLog 2013-03-19 15:12:40 +0000 @@ -1,3 +1,10 @@ +2013-03-19 Dmitry Gutov + + * whitespace.el (whitespace-font-lock, whitespace-font-lock-mode): + Remove vars. + (whitespace-color-on, whitespace-color-off): Use + `font-lock-fontify-buffer' (Bug#13817). + 2013-03-19 Stefan Monnier * mouse.el (mouse--down-1-maybe-follows-link): Fix follow-link === modified file 'lisp/whitespace.el' --- lisp/whitespace.el 2013-03-19 05:06:49 +0000 +++ lisp/whitespace.el 2013-03-19 15:12:40 +0000 @@ -1861,12 +1861,6 @@ ;;;; Internal functions -(defvar whitespace-font-lock-mode nil - "Used to remember whether a buffer had font lock mode on or not.") - -(defvar whitespace-font-lock nil - "Used to remember whether a buffer initially had font lock on or not.") - (defvar whitespace-font-lock-keywords nil "Used to save the value `whitespace-color-on' adds to `font-lock-keywords'.") @@ -2106,8 +2100,6 @@ ;; prepare local hooks (add-hook 'write-file-functions 'whitespace-write-file-hook nil t) ;; create whitespace local buffer environment - (set (make-local-variable 'whitespace-font-lock-mode) nil) - (set (make-local-variable 'whitespace-font-lock) nil) (set (make-local-variable 'whitespace-font-lock-keywords) nil) (set (make-local-variable 'whitespace-display-table) nil) (set (make-local-variable 'whitespace-display-table-was-local) nil) @@ -2157,8 +2149,6 @@ (defun whitespace-color-on () "Turn on color visualization." (when (whitespace-style-face-p) - (unless whitespace-font-lock - (setq whitespace-font-lock t)) ;; save current point and refontify when necessary (set (make-local-variable 'whitespace-point) (point)) @@ -2172,10 +2162,6 @@ nil) (add-hook 'post-command-hook #'whitespace-post-command-hook nil t) (add-hook 'before-change-functions #'whitespace-buffer-changed nil t) - ;; turn off font lock - (set (make-local-variable 'whitespace-font-lock-mode) - font-lock-mode) - (font-lock-mode 0) ;; Add whitespace-mode color into font lock. (setq whitespace-font-lock-keywords @@ -2257,22 +2243,17 @@ (whitespace-space-after-tab-regexp 'space))) 1 whitespace-space-after-tab t))))) (font-lock-add-keywords nil whitespace-font-lock-keywords t) - ;; Now turn on font lock and highlight blanks. - (font-lock-mode 1))) + (font-lock-fontify-buffer))) (defun whitespace-color-off () "Turn off color visualization." ;; turn off font lock (when (whitespace-style-face-p) - (font-lock-mode 0) (remove-hook 'post-command-hook #'whitespace-post-command-hook t) (remove-hook 'before-change-functions #'whitespace-buffer-changed t) - (when whitespace-font-lock - (setq whitespace-font-lock nil)) (font-lock-remove-keywords nil whitespace-font-lock-keywords) - ;; restore original font lock state - (font-lock-mode whitespace-font-lock-mode))) + (font-lock-fontify-buffer))) (defun whitespace-trailing-regexp (limit) ------------------------------------------------------------ revno: 112093 committer: Dmitry Antipov branch nick: trunk timestamp: Tue 2013-03-19 18:09:05 +0400 message: * print.c (syms_of_print): Initialize debugging output not here... (init_print_once): ...but in a new function here. * lisp.h (init_print_once): Add prototype. * emacs.c (main): Add call to init_print_once. Adjust comments. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-03-19 09:21:31 +0000 +++ src/ChangeLog 2013-03-19 14:09:05 +0000 @@ -4,6 +4,10 @@ Signal error if window is not internal. Adjust docstring. (delete_all_child_windows): Use combination_limit to save the buffer. (Fset_window_configuration): Adjust accordingly. + * print.c (syms_of_print): Initialize debugging output not here... + (init_print_once): ...but in a new function here. + * lisp.h (init_print_once): Add prototype. + * emacs.c (main): Add call to init_print_once. Adjust comments. 2013-03-18 Dmitry Antipov === modified file 'src/emacs.c' --- src/emacs.c 2013-03-13 19:28:50 +0000 +++ src/emacs.c 2013-03-19 14:09:05 +0000 @@ -1080,7 +1080,7 @@ noninteractive1 = noninteractive; -/* Perform basic initializations (not merely interning symbols). */ + /* Perform basic initializations (not merely interning symbols). */ if (!initialized) { @@ -1091,8 +1091,7 @@ init_coding_once (); init_syntax_once (); /* Create standard syntax table. */ init_category_once (); /* Create standard category table. */ - /* Must be done before init_buffer. */ - init_casetab_once (); + init_casetab_once (); /* Must be done before init_buffer_once. */ init_buffer_once (); /* Create buffer table and some buffers. */ init_minibuf_once (); /* Create list of minibuffers. */ /* Must precede init_window_once. */ @@ -1117,6 +1116,8 @@ syms_of_fileio (); /* Before syms_of_coding to initialize Vgc_cons_threshold. */ syms_of_alloc (); + /* May call Ffuncall and so GC, thus the latter should be initialized. */ + init_print_once (); /* Before syms_of_coding because it initializes Qcharsetp. */ syms_of_charset (); /* Before init_window_once, because it sets up the === modified file 'src/lisp.h' --- src/lisp.h 2013-03-15 16:03:54 +0000 +++ src/lisp.h 2013-03-19 14:09:05 +0000 @@ -3163,6 +3163,7 @@ (const char *, Lisp_Object (*) (Lisp_Object), Lisp_Object); enum FLOAT_TO_STRING_BUFSIZE { FLOAT_TO_STRING_BUFSIZE = 350 }; extern int float_to_string (char *, double); +extern void init_print_once (void); extern void syms_of_print (void); /* Defined in doprnt.c. */ === modified file 'src/print.c' --- src/print.c 2013-03-08 02:32:21 +0000 +++ src/print.c 2013-03-19 14:09:05 +0000 @@ -2165,7 +2165,16 @@ print_object (interval->plist, printcharfun, 1); } - +/* Initialize debug_print stuff early to have it working from the very + beginning. */ + +void +init_print_once (void) +{ + DEFSYM (Qexternal_debugging_output, "external-debugging-output"); + defsubr (&Sexternal_debugging_output); +} + void syms_of_print (void) { @@ -2297,12 +2306,10 @@ defsubr (&Sprint); defsubr (&Sterpri); defsubr (&Swrite_char); - defsubr (&Sexternal_debugging_output); #ifdef WITH_REDIRECT_DEBUGGING_OUTPUT defsubr (&Sredirect_debugging_output); #endif - DEFSYM (Qexternal_debugging_output, "external-debugging-output"); DEFSYM (Qprint_escape_newlines, "print-escape-newlines"); DEFSYM (Qprint_escape_multibyte, "print-escape-multibyte"); DEFSYM (Qprint_escape_nonascii, "print-escape-nonascii"); ------------------------------------------------------------ revno: 112092 committer: Stefan Monnier branch nick: trunk timestamp: Tue 2013-03-19 08:47:10 -0400 message: * lisp/mouse.el (mouse--down-1-maybe-follows-link): Fix follow-link remapping in mode-line. (mouse-on-link-p): Also check [mode-line follow-link] bindings. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-03-19 05:06:49 +0000 +++ lisp/ChangeLog 2013-03-19 12:47:10 +0000 @@ -1,3 +1,9 @@ +2013-03-19 Stefan Monnier + + * mouse.el (mouse--down-1-maybe-follows-link): Fix follow-link + remapping in mode-line. + (mouse-on-link-p): Also check [mode-line follow-link] bindings. + 2013-03-19 Dmitry Gutov * whitespace.el (whitespace-color-on): Use `prepend' OVERRIDE === modified file 'lisp/mouse.el' --- lisp/mouse.el 2013-03-18 17:19:24 +0000 +++ lisp/mouse.el 2013-03-19 12:47:10 +0000 @@ -128,7 +128,11 @@ (put newup 'event-kind (get (car event) 'event-kind)) (put newdown 'event-kind (get (car this-event) 'event-kind)) (push (cons newup (cdr event)) unread-command-events) - (vector (cons newdown (cdr this-event)))) + ;; Modify the event in place, so read-key-sequence doesn't + ;; generate a second fake prefix key (see fake_prefixed_keys in + ;; src/keyboard.c). + (setcar this-event newdown) + (vector this-event)) (push event unread-command-events) nil)))))) @@ -760,6 +764,9 @@ mouse-1-click-in-non-selected-windows (eq (selected-window) (posn-window pos))) (or (mouse-posn-property pos 'follow-link) + (let ((area (posn-area pos))) + (when area + (key-binding (vector area 'follow-link) nil t pos))) (key-binding [follow-link] nil t pos))))) (cond ((eq action 'mouse-face) ------------------------------------------------------------ revno: 112091 committer: Dmitry Antipov branch nick: trunk timestamp: Tue 2013-03-19 13:21:31 +0400 message: * window.c (Fwindow_combination_limit, Fset_window_combination_limit): Signal error if window is not internal. Adjust docstring. (delete_all_child_windows): Use combination_limit to save the buffer. (Fset_window_configuration): Adjust accordingly. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-03-18 13:21:12 +0000 +++ src/ChangeLog 2013-03-19 09:21:31 +0000 @@ -1,3 +1,10 @@ +2013-03-19 Dmitry Antipov + + * window.c (Fwindow_combination_limit, Fset_window_combination_limit): + Signal error if window is not internal. Adjust docstring. + (delete_all_child_windows): Use combination_limit to save the buffer. + (Fset_window_configuration): Adjust accordingly. + 2013-03-18 Dmitry Antipov * window.c (window_resize_check, window_resize_apply) === modified file 'src/window.c' --- src/window.c 2013-03-18 13:21:12 +0000 +++ src/window.c 2013-03-19 09:21:31 +0000 @@ -635,30 +635,37 @@ DEFUN ("window-combination-limit", Fwindow_combination_limit, Swindow_combination_limit, 1, 1, 0, doc: /* Return combination limit of window WINDOW. +WINDOW must be a valid window used in horizontal or vertical combination. If the return value is nil, child windows of WINDOW can be recombined with WINDOW's siblings. A return value of t means that child windows of -WINDOW are never \(re-)combined with WINDOW's siblings. - -WINDOW must be a valid window. The return value is meaningful for -internal windows only. */) +WINDOW are never \(re-)combined with WINDOW's siblings. */) (Lisp_Object window) { + struct window *w; + CHECK_VALID_WINDOW (window); + w = XWINDOW (window); + if (!NILP (w->buffer)) + error ("Combination limit is meaningful for internal windows only"); return XWINDOW (window)->combination_limit; } DEFUN ("set-window-combination-limit", Fset_window_combination_limit, Sset_window_combination_limit, 2, 2, 0, doc: /* Set combination limit of window WINDOW to LIMIT; return LIMIT. +WINDOW must be a valid window used in horizontal or vertical combination. If LIMIT is nil, child windows of WINDOW can be recombined with WINDOW's siblings. LIMIT t means that child windows of WINDOW are never \(re-)combined with WINDOW's siblings. Other values are reserved for -future use. - -WINDOW must be a valid window. Setting the combination limit is -meaningful for internal windows only. */) +future use. */) (Lisp_Object window, Lisp_Object limit) { - wset_combination_limit (decode_valid_window (window), limit); + struct window *w; + + CHECK_VALID_WINDOW (window); + w = XWINDOW (window); + if (!NILP (w->buffer)) + error ("Combination limit is meaningful for internal windows only"); + wset_combination_limit (w, limit); return limit; } @@ -5711,10 +5718,9 @@ } } - /* If we squirreled away the buffer in the window's height, - restore it now. */ - if (BUFFERP (w->total_lines)) - wset_buffer (w, w->total_lines); + /* If we squirreled away the buffer, restore it now. */ + if (BUFFERP (w->combination_limit)) + wset_buffer (w, w->combination_limit); wset_left_col (w, p->left_col); wset_top_line (w, p->top_line); wset_total_cols (w, p->total_cols); @@ -5918,9 +5924,6 @@ /* Delete WINDOW's siblings (we traverse postorderly). */ delete_all_child_windows (w->next); - /* See Fset_window_configuration for excuse. */ - wset_total_lines (w, w->buffer); - if (!NILP (w->vchild)) { delete_all_child_windows (w->vchild); @@ -5936,6 +5939,10 @@ unshow_buffer (w); unchain_marker (XMARKER (w->pointm)); unchain_marker (XMARKER (w->start)); + /* Since combination limit makes sense for an internal windows + only, we use this slot to save the buffer for the sake of + possible resurrection in Fset_window_configuration. */ + wset_combination_limit (w, w->buffer); wset_buffer (w, Qnil); } ------------------------------------------------------------ revno: 112090 fixes bug: http://debbugs.gnu.org/13817 committer: Dmitry Gutov branch nick: trunk timestamp: Tue 2013-03-19 09:06:49 +0400 message: * lisp/whitespace.el (whitespace-font-lock-keywords): Change description. (whitespace-color-on): Don't save `font-lock-keywords' value, save the constructed keywords instead. (whitespace-color-off): Use `font-lock-remove-keywords'. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-03-19 04:23:36 +0000 +++ lisp/ChangeLog 2013-03-19 05:06:49 +0000 @@ -2,6 +2,10 @@ * whitespace.el (whitespace-color-on): Use `prepend' OVERRIDE value for `whitespace-line' face (Bug#13875). + (whitespace-font-lock-keywords): Change description. + (whitespace-color-on): Don't save `font-lock-keywords' value, save + the constructed keywords instead. + (whitespace-color-off): Use `font-lock-remove-keywords' (Bug#13817). 2013-03-19 Leo Liu === modified file 'lisp/whitespace.el' --- lisp/whitespace.el 2013-03-19 04:23:36 +0000 +++ lisp/whitespace.el 2013-03-19 05:06:49 +0000 @@ -1868,7 +1868,7 @@ "Used to remember whether a buffer initially had font lock on or not.") (defvar whitespace-font-lock-keywords nil - "Used to save locally `font-lock-keywords' value.") + "Used to save the value `whitespace-color-on' adds to `font-lock-keywords'.") (defconst whitespace-help-text @@ -2158,9 +2158,7 @@ "Turn on color visualization." (when (whitespace-style-face-p) (unless whitespace-font-lock - (setq whitespace-font-lock t - whitespace-font-lock-keywords - (copy-sequence font-lock-keywords))) + (setq whitespace-font-lock t)) ;; save current point and refontify when necessary (set (make-local-variable 'whitespace-point) (point)) @@ -2179,8 +2177,8 @@ font-lock-mode) (font-lock-mode 0) ;; Add whitespace-mode color into font lock. - (font-lock-add-keywords - nil + (setq + whitespace-font-lock-keywords `( ,@(when (memq 'spaces whitespace-active-style) ;; Show SPACEs. @@ -2257,8 +2255,8 @@ ((memq 'space-after-tab::space whitespace-active-style) ;; Show SPACEs after TAB (TABs). (whitespace-space-after-tab-regexp 'space))) - 1 whitespace-space-after-tab t)))) - t) + 1 whitespace-space-after-tab t))))) + (font-lock-add-keywords nil whitespace-font-lock-keywords t) ;; Now turn on font lock and highlight blanks. (font-lock-mode 1))) @@ -2271,8 +2269,8 @@ (remove-hook 'post-command-hook #'whitespace-post-command-hook t) (remove-hook 'before-change-functions #'whitespace-buffer-changed t) (when whitespace-font-lock - (setq whitespace-font-lock nil - font-lock-keywords whitespace-font-lock-keywords)) + (setq whitespace-font-lock nil)) + (font-lock-remove-keywords nil whitespace-font-lock-keywords) ;; restore original font lock state (font-lock-mode whitespace-font-lock-mode)))