JohnT <
jo...@example.com> wrote:
> On Wed, 17 Oct 2012 14:40:01 +0000, JohnT wrote:
>
>> On Wed, 17 Oct 2012 12:12:24 +0100, Dave Gibson wrote:
>>
>>> JohnT <
jo...@example.com> wrote:
>>
>>>> I've been using emacs for long enough to know all about the indenting
>>>> issues, so I don't need this warning and emacs keeps replacing on of
>>>> my frames with the warning, which is very irritating. So, how do I get
>>>> rid of it ?
>>>
>>> Edit php-mode.el. Look for (defvar php-warned-bad-indent nil).
>>> Replace nil with t.
>>>
>>>
>> That seems to have done the job - thanks. Been quite a few years since
>> I've dirtied my hands with elisp!
>>
>
> Nope - sorry - didn't test it enough.
Uggreb.
> Still get the irritating error sometimes. Seems to be when I open a new
> <?php tag
>
> I'll see if I can rip the message out completely.
It should be possible to side-step the entire check -- both the php-indent
functions drop through to the c-indent equivalents so replace (somewhere
near line 379)
(setq indent-line-function 'php-cautious-indent-line)
(setq indent-region-function 'php-cautious-indent-region)
with
(setq indent-line-function 'c-indent-line)
(setq indent-region-function 'c-indent-region)