Subject: Re: bug#30182: Update

From: Sujith <[email-masked]>
Date: Sun, 21 Jan 2018 07:45:43 +0530

martin rudalics <[email-masked]> writes:
> Is running w3m absolutely necessary for reproducing the crash?  Do you
> have any idea whether w3m does strange things with the mode line?

I am not familiar with w3m internals, sorry.
But, without starting w3m, the crash doesn't happen.

I think w3m updates the mode-line based on the title of the
HTML page that is displayed.

> Anyway, if you evaluate the function below before moving the mouse to
> the mode line does the crash go away?
>
> martin
>
>
> (defun mode-line-default-help-echo (window)
>    "Return default help echo text for WINDOW's mode-line."
>    (condition-case nil
>        (let* ((frame (window-frame window))
>               (line-1a
>                ;; Show text to select window only if the window is not
>                ;; selected.
>                (not (eq window (frame-selected-window frame))))
>               (line-1b
>                ;; Show text to drag modeline if and only if it can be done.
>                (or (window-in-direction 'below window)
>                    (let ((mini-window (minibuffer-window frame)))
>                      (and (eq frame (window-frame mini-window))
>                           (or (minibuffer-window-active-p mini-window)
>                               (not resize-mini-windows))))))
>               (line-2
>                ;; Show text make window occupy the whole frame
>                ;; only if it doesn't already do that.
>                (not (eq window (frame-root-window frame))))
>               (line-3
>                ;; Show text to delete window only if that's possible.
>                (not (eq window (frame-root-window frame)))))
>          (if (or line-1a line-1b line-2 line-3)
>              (concat
>               (when (or line-1a line-1b)
>                 (concat
> 		"mouse-1: "
> 		(when line-1a "Select window")
> 		(when line-1b
>                    (if line-1a " (drag to resize)" "Drag to resize"))
> 		(when (or line-2 line-3) "\n")))
>               (when line-2
>                 (concat
> 		"mouse-2: Make window occupy whole frame"
> 		(when line-3 "\n")))
>               (when line-3
>                 "mouse-3: Remove window from frame"))
> 	  ""))
>      (error "")))

The crash still happens after evaluating this code.