[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#32034: 26.1; [PACTH] better xref-location-marker for imperfect file
From: |
Robert Pluim |
Subject: |
bug#32034: 26.1; [PACTH] better xref-location-marker for imperfect file locations |
Date: |
Mon, 02 Jul 2018 16:35:20 +0200 |
joaotavora@gmail.com (João Távora) writes:
>
> diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el
> index b0bdd62ae9..d38328cccd 100644ppp
> --- a/lisp/progmodes/xref.el
> +++ b/lisp/progmodes/xref.el
> @@ -119,13 +119,19 @@ xref-make-file-location
> (with-current-buffer
> (or (get-file-buffer file)
> (let ((find-file-suppress-same-file-warnings t))
> + (unless (file-exists-p file)
> + (error "File %s doesn't exist!" file))
> (find-file-noselect file)))
> (save-restriction
> (widen)
> (save-excursion
> (goto-char (point-min))
> (beginning-of-line line)
> - (forward-char column)
> + (ignore-errors (forward-char column))
> + (unless (and (= (1+ (current-line)) line)
> + (= (current-column) column))
> + (message "Intended xref location was line=%d, column=%d"
> + line column))
> (point-marker))))))
I think the message could be clearer, the current one doesnʼt express
that something unexpected happened. How about
"Xref intended location line=%d, column=%d is out of range"
or similar.
Regards
Robert
- bug#32034: 26.1; [PACTH] better xref-location-marker for imperfect file locations, João Távora, 2018/07/02
- bug#32034: 26.1; [PACTH] better xref-location-marker for imperfect file locations,
Robert Pluim <=
- bug#32034: 26.1; [PACTH] better xref-location-marker for imperfect file locations, Eli Zaretskii, 2018/07/02
- bug#32034: 26.1; [PACTH] better xref-location-marker for imperfect file locations, João Távora, 2018/07/02
- bug#32034: 26.1; [PACTH] better xref-location-marker for imperfect file locations, Eli Zaretskii, 2018/07/02
- bug#32034: 26.1; [PACTH] better xref-location-marker for imperfect file locations, João Távora, 2018/07/02
- bug#32034: 26.1; [PACTH] better xref-location-marker for imperfect file locations, Eli Zaretskii, 2018/07/02
- bug#32034: 26.1; [PACTH] better xref-location-marker for imperfect file locations, João Távora, 2018/07/02
- bug#32034: 26.1; [PACTH] better xref-location-marker for imperfect file locations, Eli Zaretskii, 2018/07/02
bug#32034: 26.1; [PACTH] better xref-location-marker for imperfect file locations, Dmitry Gutov, 2018/07/03