help-gnu-emacs
[Top][All Lists]
Advanced

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

Making a read-only buffer writable


From: Heime
Subject: Making a read-only buffer writable
Date: Tue, 12 Sep 2023 09:08:29 +0000

Have been reading the documentation, any time one wants to write (insert) into 
a 
read-only buffer, one has to make it writable.  Doesn't matter when that time 
is. 
If it's read-only you need to make it writable to write into it. 

Then I wonder how it is possible for the following function 
to call  

(insert-button "[1]"

and

(insert " Graphic Organisation")

without calling 

(setq buffer-read-only nil)

first, just after  

(with-help-window (help-buffer)

-------------

(defun maces ()
  "Prints information about frames."
  (interactive)

  (with-help-window (help-buffer)

    (insert-button "[1]" 'action
      (lambda (button)
        (setq buffer-read-only nil)
        (insert "> Graphic Organisation \n\n")
        (setq buffer-read-only t)))
    (insert " Graphic Organisation") ))





reply via email to

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