[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#22819: 25.0.91; Don't try to indent region if the buffer is read-onl
From: |
npostavs |
Subject: |
bug#22819: 25.0.91; Don't try to indent region if the buffer is read-only |
Date: |
Tue, 08 Aug 2017 09:15:34 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.2.50 (gnu/linux) |
Kaushal Modi <kaushal.modi@gmail.com> writes:
> The advice gets tricky because I want to add barf-if-buffer-read-only
> only if the original fn's interactive form had "*".
>
> I am using the same advice fn for eval-region and indent-region.. so I
> don't need the barf fn call for eval-region.
Possibly you could do something with `interactive-form' and
`advice-eval-interactive-spec', but yes it's a bit tricky.
> @Eli: Based on the discussion[1] on emacs-devel, there isn't any
> opposition to doing what's proposed in this bug thread. So if it's
> alright by you, and if there is no strong reason to use the more
> concise alternative i.e. if both barf-if-buffer-read-only and
> interactive "*.." are equally correct, can the former approach be
> committed?
The choice is not between "*.." and `barf-if-buffer-read-only' as such,
"*.." is merely the string version of `barf-if-buffer-read-only'. The
choice is between calling `barf-if-buffer-read-only' inside the
`interactive' form or inside the function itself.
- bug#22819: 25.0.91; Don't try to indent region if the buffer is read-only, (continued)
- bug#22819: 25.0.91; Don't try to indent region if the buffer is read-only, npostavs, 2017/08/05
- bug#22819: 25.0.91; Don't try to indent region if the buffer is read-only, Eli Zaretskii, 2017/08/05
- bug#22819: 25.0.91; Don't try to indent region if the buffer is read-only, Kaushal Modi, 2017/08/07
- bug#22819: 25.0.91; Don't try to indent region if the buffer is read-only, Noam Postavsky, 2017/08/07
- bug#22819: 25.0.91; Don't try to indent region if the buffer is read-only, Kaushal Modi, 2017/08/07
- bug#22819: 25.0.91; Don't try to indent region if the buffer is read-only, Noam Postavsky, 2017/08/07
- bug#22819: 25.0.91; Don't try to indent region if the buffer is read-only, Kaushal Modi, 2017/08/08
- bug#22819: 25.0.91; Don't try to indent region if the buffer is read-only,
npostavs <=
- bug#22819: 25.0.91; Don't try to indent region if the buffer is read-only, Eli Zaretskii, 2017/08/08
- bug#22819: 25.0.91; Don't try to indent region if the buffer is read-only, Kaushal Modi, 2017/08/08
- bug#22819: 25.0.91; Don't try to indent region if the buffer is read-only, John Wiegley, 2017/08/08
- bug#22819: 25.0.91; Don't try to indent region if the buffer is read-only, Kaushal Modi, 2017/08/09
- bug#22819: 25.0.91; Don't try to indent region if the buffer is read-only, John Wiegley, 2017/08/09