bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#59575: 29.0.50; add-log-current-defun-header-regexp matches Windows


From: Dmitry Gutov
Subject: bug#59575: 29.0.50; add-log-current-defun-header-regexp matches Windows drive letter
Date: Sun, 27 Nov 2022 15:04:24 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2

On 27/11/22 13:22, Juanma Barranquero wrote:
On Sun, Nov 27, 2022 at 12:11 PM Juanma Barranquero <lekktu@gmail.com <mailto:lekktu@gmail.com>> wrote:

    That should be changed to

      (cl-ecase xref-file-name-display
          (abs group)
          (nondirectory
    -     (if (string-match-p "\\`~?/" group)
    +     (if (string-match-p "\\`\\(~\\|[A-Za-z]:\\)?/" group)
               (file-name-nondirectory group)
             group))
          (project-relative

    or something similar.


Silly me, that should just use `file-name-absolute-p'.

OK to fix this, regardless of what's decided for the original bug?

Yes, please. The original idea was to avoid costly operations (in case the list of matches is long), but looks like file-name-absolute-p doesn't hit the disk.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]