[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#53764: 27.1; shouldn't ~/diary be in diary-mode?
From: |
Andreas Schwab |
Subject: |
bug#53764: 27.1; shouldn't ~/diary be in diary-mode? |
Date: |
Wed, 09 Feb 2022 22:26:37 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.91 (gnu/linux) |
On Feb 09 2022, Francesco Potortì wrote:
> Francesco Potortì <pot@gnu.org> writes:
>>>>Do we have a convenience function that says whether we have a match in
>>>>auto-mode-alist? `set-auto-mode--apply-alist' seems to be the closest I
>>>>can find, and... it's not that close. :-/ But I guess it could be
>>>>refactored out of there.
>>>
>>> This one seems to do the job:
>>> (add-to-list 'auto-mode-alist
>>> (cons diary-file 'diary-mode)
>>> (lambda (a b) (equal (car a) (car b))))
>>
>>The user may have used a regexp like "diary$", "diary\\'", etc, so that
>>doesn't work.
>
> Sorry, I don't get it. I am suggeting to add the name of the actual file
> (the one in diary-file) to the mode alist. Looking for possible matches is a
> (small) optimisation. Why do we need a completely reliable matching code?
If you put it at the end, it won't hide any preexisting match.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1
"And now for something completely different."
- bug#53764: 27.1; shouldn't ~/diary be in diary-mode?, (continued)
- bug#53764: 27.1; shouldn't ~/diary be in diary-mode?, Michael Heerdegen, 2022/02/07
- bug#53764: 27.1; shouldn't ~/diary be in diary-mode?, Francesco Potortì, 2022/02/09
- bug#53764: 27.1; shouldn't ~/diary be in diary-mode?, Juri Linkov, 2022/02/07
- bug#53764: 27.1; shouldn't ~/diary be in diary-mode?, Lars Ingebrigtsen, 2022/02/08
- bug#53870: calendar-exit doesn't kill calendar buffers, Juri Linkov, 2022/02/08
- bug#53870: calendar-exit doesn't kill calendar buffers, Lars Ingebrigtsen, 2022/02/09
- bug#53764: 27.1; shouldn't ~/diary be in diary-mode?, Phil Sainty, 2022/02/07
- bug#53764: 27.1; shouldn't ~/diary be in diary-mode?, Francesco Potortì, 2022/02/07
- bug#53764: 27.1; shouldn't ~/diary be in diary-mode?, Lars Ingebrigtsen, 2022/02/07
- bug#53764: 27.1; shouldn't ~/diary be in diary-mode?, Francesco Potortì, 2022/02/09
- bug#53764: 27.1; shouldn't ~/diary be in diary-mode?,
Andreas Schwab <=
- bug#53764: 27.1; shouldn't ~/diary be in diary-mode?, Francesco Potortì, 2022/02/09
- bug#53764: 27.1; shouldn't ~/diary be in diary-mode?, Michael Heerdegen, 2022/02/05
- bug#53764: 27.1; shouldn't ~/diary be in diary-mode?, Richard Stallman, 2022/02/07