commit f8ff3937660f4192d72dec2da31fa5c582434d1f (HEAD, refs/remotes/origin/master) Author: Michael Albinus Date: Sun Oct 18 10:29:43 2015 +0200 Minor edits in Tramp * lisp/net/tramp-adb.el (directory-listing-before-filename-regexp): Declare it. * lisp/net/tramp-compat.el (directory-listing-before-filename-regexp): Remove declaration. diff --git a/lisp/net/tramp-adb.el b/lisp/net/tramp-adb.el index 595e0ef..88dea6a 100644 --- a/lisp/net/tramp-adb.el +++ b/lisp/net/tramp-adb.el @@ -36,6 +36,7 @@ (require 'tramp) ;; Pacify byte-compiler. +(defvar directory-listing-before-filename-regexp) (defvar directory-sep-char) ;;;###tramp-autoload diff --git a/lisp/net/tramp-compat.el b/lisp/net/tramp-compat.el index e645195..7157ac2 100644 --- a/lisp/net/tramp-compat.el +++ b/lisp/net/tramp-compat.el @@ -105,12 +105,6 @@ (unless (boundp 'remote-file-name-inhibit-cache) (defvar remote-file-name-inhibit-cache nil)) - ;; `directory-listing-before-filename-regexp' does not exist in - ;; XEmacs. Since we use it only in tramp-adb.el, it doesn't harm to - ;; declare it here. - (unless (boundp 'directory-listing-before-filename-regexp) - (defvar directory-listing-before-filename-regexp nil)) - ;; For not existing functions, or functions with a changed argument ;; list, there are compiler warnings. We want to avoid them in ;; cases we know what we do. commit 59c67f8181e849bea37919c757ac7691b27e1657 Author: Mark Oteiza Date: Sat Oct 17 11:49:36 2015 -0400 * lisp/emacs-lisp/eldoc.el: Add back-to-indentation to the command list diff --git a/lisp/emacs-lisp/eldoc.el b/lisp/emacs-lisp/eldoc.el index 2dae86e..bbc8e15 100644 --- a/lisp/emacs-lisp/eldoc.el +++ b/lisp/emacs-lisp/eldoc.el @@ -410,6 +410,7 @@ return any documentation.") ;; Prime the command list. (eldoc-add-command-completions + "back-to-indentation" "backward-" "beginning-of-" "delete-other-windows" "delete-window" "down-list" "end-of-" "exchange-point-and-mark" "forward-" "goto-" "handle-select-window" "indent-for-tab-command" "left-" "mark-page" commit 1431f667504b610471257802aa2f2f4f0d8443de Author: Eli Zaretskii Date: Sat Oct 17 15:10:58 2015 +0300 Avoid crashes when redisplayng a window changes faces or fonts * src/xdisp.c (redisplay_internal): If redisplaying the selected window or one of the frames turns on the frame's 'redisplay' flag, redisplay again. (Bug#21428) * src/frame.c (x_set_font): Set the frame's 'fonts_changed' flag. diff --git a/src/frame.c b/src/frame.c index 98a7a57..6d596a4 100644 --- a/src/frame.c +++ b/src/frame.c @@ -3651,6 +3651,10 @@ x_set_font (struct frame *f, Lisp_Object arg, Lisp_Object oldval) /* Attempt to hunt down bug#16028. */ SET_FRAME_GARBAGED (f); + /* This is important if we are called by some Lisp as part of + redisplaying the frame, see redisplay_internal. */ + f->fonts_changed = true; + recompute_basic_faces (f); do_pending_window_change (0); diff --git a/src/xdisp.c b/src/xdisp.c index a793157..986e13f 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -13810,6 +13810,7 @@ redisplay_internal (void) bool gcscrollbars /* Only GC scrollbars when we redisplay the whole frame. */ = f->redisplay || !REDISPLAY_SOME_P (); + bool f_redisplay_flag = f->redisplay; /* Mark all the scroll bars to be removed; we'll redeem the ones we want when we redisplay their windows. */ if (gcscrollbars && FRAME_TERMINAL (f)->condemn_scroll_bars_hook) @@ -13853,6 +13854,20 @@ redisplay_internal (void) goto retry_frame; } + /* If the frame's redisplay flag was not set before + we went about redisplaying its windows, but it is + set now, that means we employed some redisplay + optimizations inside redisplay_windows, and + bypassed producing some screen lines. But if + f->redisplay is now set, it might mean the old + faces are no longer valid (e.g., if redisplaying + some window called some Lisp which defined a new + face or redefined an existing face), so trying to + use them in update_frame will segfault. + Therefore, we must redisplay this frame. */ + if (!f_redisplay_flag && f->redisplay) + goto retry_frame; + /* Prevent various kinds of signals during display update. stdio is not robust about handling signals, which can cause an apparent I/O error. */ @@ -13906,8 +13921,10 @@ redisplay_internal (void) /* Compare desired and current matrices, perform output. */ update: - /* If fonts changed, display again. */ - if (sf->fonts_changed) + /* If fonts changed, display again. Likewise if redisplay_window_1 + above caused some change (e.g., a change in faces) that requires + considering the entire frame again. */ + if (sf->fonts_changed || sf->redisplay) goto retry; /* Prevent freeing of realized faces, since desired matrices are commit 57be62f97b8442218f4fa6979cf27b36d5d5f540 Author: Michael Albinus Date: Sat Oct 17 11:20:05 2015 +0200 Solve timimg issues in file-notify-tests.el * test/automated/file-notify-tests.el (file-notify-test02-events): Rectify `attribute-change' tests. There are timing issues with gfilenotify. diff --git a/test/automated/file-notify-tests.el b/test/automated/file-notify-tests.el index c943d91..1763648 100644 --- a/test/automated/file-notify-tests.el +++ b/test/automated/file-notify-tests.el @@ -325,12 +325,24 @@ Don't wait longer than TIMEOUT seconds for the events to be delivered." file-notify--test-tmpfile '(attribute-change) 'file-notify--test-event-handler)) (file-notify--test-with-events - (file-notify--test-timeout) '(attribute-changed attribute-changed) + (file-notify--test-timeout) '(attribute-changed) + (write-region + "any text" nil file-notify--test-tmpfile nil 'no-message) + (set-file-modes file-notify--test-tmpfile 000) + (delete-file file-notify--test-tmpfile)) + (file-notify-rm-watch file-notify--test-desc) + + ;; With gfilenotify, there are timing issues with attribute + ;; changes in a short time period. So we apply 2 tests. + (setq file-notify--test-desc + (file-notify-add-watch + file-notify--test-tmpfile + '(attribute-change) 'file-notify--test-event-handler)) + (file-notify--test-with-events + (file-notify--test-timeout) '(attribute-changed) (write-region "any text" nil file-notify--test-tmpfile nil 'no-message) (set-file-modes file-notify--test-tmpfile 000) - (read-event nil nil 0.1) ; In order to distinguish the events. - (set-file-times file-notify--test-tmpfile '(0 0)) (delete-file file-notify--test-tmpfile)) (file-notify-rm-watch file-notify--test-desc))