[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Possible problem with compile
From: |
Philip Kaludercic |
Subject: |
Re: Possible problem with compile |
Date: |
Thu, 21 Apr 2022 10:41:07 +0000 |
Immanuel Litzroth <immanuel.litzroth@gmail.com> writes:
> This triggers a problem
> (compile '(error "you have a problem"))
> ;; here compile-command is (error "you have a problem")
> ;; and the next compilation(s) will eval that so they fail
> (compile "ls")
>
> This is the relevant code from compile.el:
>
> (unless (equal command (eval compile-command))
> (setq compile-command command))
>
> I don't quite understand why the compile-command is evalled before setting
> in this context. Documentation seems to suggest it should be a string whether
> whether it is set via (compile something) or (setq compile-command something)
This seems to have been added in 5b6858da26e, but the commit message
doesn't help me understand why eval was added:
--8<---------------cut here---------------start------------->8---
commit 5b6858da26e4e6671ee93b67b921a86309b3d6a2
Author: Stefan Monnier <monnier@iro.umontreal.ca>
Date: Thu Jul 19 21:46:37 2001 +0000
(compilation-parse-errors): `linenum' might return a this-error using
the alternative format (a pair of markers).
--8<---------------cut here---------------end--------------->8---
I would guess the issue now is that with this been a 20+ year old
feature, there are enough people who depend on the behaviour, making it
difficult to remove.
> Immanuel
--
Philip Kaludercic