[Emacs-ada-mode] (for info) ada-mode bug sent via emacs bug report

Stephen Leake stephen_leake at stephe-leake.org
Sat Aug 11 03:22:44 PDT 2007


"WAROQUIERS Philippe" <philippe.waroquiers at eurocontrol.int> writes:

> We have encountered a small problem with the ada-mode and emacs 22.
> When an Ada file is visited in emacs (in this case, I find this file
> with M-x find-tag) and this Ada file is a read-only file,
> we see an error message appearing in the mini-buffer/*Messages*:
> File mode specification error: (buffer-read-only #<buffer
> flight.adb>)

I can't reproduce this, with plain released emacs 22.1 on Windows. On
opening a file that is read-only on the disk, I get only the message
"Note: file is write protected". 

stephe at LM000850872$ ls -l hello.adb
---x------+ 1 stephe None 181 Apr 17 19:37 hello.adb
stephe at LM000850872$ c:/Gnu/Emacs/emacs-22.1/bin/emacs.exe -Q  hello.adb 

That gives this content in *Messages*:

----------------
("c:\\Gnu\\Emacs\\emacs-22.1\\bin\\emacs.exe" "-Q" "hello.adb")
Loading encoded-kb...done
For information about the GNU Project and its goals, type C-h C-p.
Note: file is write protected
Loading ada-mode...
Loading easymenu...done
Loading advice...done
Loading ada-mode...done
 ----------------

I confirmed with `debug-on-entry' that ada-initialize-properties is
being called, and that buffer-read-only is t at that point.

So it appears that `add-text-property' on my system doesn't throw an
error if buffer-read-only is t.

Can you confirm that you get this problem with emacs -Q?

If so, I'll raise this on the emacs-devel list; it's a puzzle.

> In GNU Emacs 22.1.1 (hppa1.1-hp-hpux11.11, Motif Version 2.1.0)
>  of 2007-08-04 on bobcat

That's a very recent build; is that from Emacs 22 release, or from
Emacs CVS HEAD?

I have not updated Emacs CVS since January; I'll give that a try.

-- 
-- Stephe




More information about the Emacs-ada-mode mailing list