Function: allout-graphics-modification-handler

allout-graphics-modification-handler is a byte-compiled function defined in allout-widgets.el.gz.

Signature

(allout-graphics-modification-handler BEG END)

Documentation

Protect against incoherent deletion of decoration graphics.

Deletes allowed only when inhibit-read-only is t.

Source Code

;; Defined in /usr/src/emacs/lisp/allout-widgets.el.gz
;;;_   >X allout-graphics-modification-handler (beg end)
(defun allout-graphics-modification-handler (beg _end)
  "Protect against incoherent deletion of decoration graphics.

Deletes allowed only when `inhibit-read-only' is t."
  (cond
   (undo-in-progress (when (eq (get-text-property beg 'category)
                               'allout-icon-span-category)
                       (save-excursion
                         (goto-char beg)
                         (let* ((item-widget (allout-get-item-widget)))
                           (if item-widget
                               (allout-widgets-exposure-undo-recorder
                                item-widget))))))
   (inhibit-read-only t)
   ((not  (and (boundp 'allout-mode) allout-mode)) t)
   ((equal this-command 'quoted-insert) t)
   ((yes-or-no-p "Unruly edit of outline structure - allow? ")
    (setq allout-widgets-unset-inhibit-read-only (not inhibit-read-only)
          inhibit-read-only t))
   (t (error "%s"
       (substitute-command-keys allout-structure-unruly-deletion-message)))))