>>> One way to fix this bug is to replace the following line in
>>> `shell-filter-ctrl-a-ctrl-b':
>>>       (goto-char (or comint-last-output-start (point-min)))
>>> with
>>>       (goto-char (or (and (marker-position comint-last-output-start)
>>>                       comint-last-output-start)
>>>                  (point-min)))
>>> i.e. to check if there is a buffer position recorded in
>>> comint-last-output-start instead of checking the marker
>>> (always created in `comint-mode') for nil.
>> That sounds like a good thing to do in any case.  Could you install this
>> change?
>
> Shouldn't that be:
>
>       (goto-char (or (and comint-last-output-start
>                         (marker-position comint-last-output-start))
>                    (point-min)))

This will fail when `comint-last-output-start' is not a marker.

Actually, `comint-last-output-start' is never nil and always a
marker in the comint buffer, so both versions will work.

But if we want to be extra safe, then that should be:

      (goto-char (or (and (markerp comint-last-output-start)
                          (marker-position comint-last-output-start))
                     (point-min)))

i.e. to check if `comint-last-output-start' is a marker and has
a position, and to use this position in `goto-char'.

-- 
Juri Linkov
http://www.jurta.org/emacs/



_______________________________________________
emacs-pretest-bug mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug

Reply via email to