emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

New text property: `inhibit-read-only'


From: Lars Magne Ingebrigtsen
Subject: New text property: `inhibit-read-only'
Date: Sun, 16 Nov 2014 23:45:30 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

As previously discussed (like a year or two ago), we have certain modes
that basically have read-only buffers, but that need certain bits to be
writable.

eww is one of them -- we need to write things into search fields and the
like.

So I've just implemented an `inhibit-read-only' text property and pushed
it.  I'm sure there are cases that I haven't covered yet, so please give
it a whirl and let me know where I forgot to add checks.

This is a test snippet:

(progn
  (pop-to-buffer "*test*")
  (insert "This is a test This is a test\nThis is a test This is a test")
  (put-text-property 10 20 'inhibit-read-only t)
  (put-text-property 10 20 'face '(:background "red"))
  (setq buffer-read-only t))

The red text should be editable.

Commands like `C-k' and stuff don't really work in this particular
scenario, but I don't things that's necessarily a bug.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





reply via email to

[Prev in Thread] Current Thread [Next in Thread]