Преглед на файлове

org.el (org-edit-special): Don't allow to edit when buffer is read only

* org.el (org-edit-special): Don't allow to edit when buffer
is read only.

Thanks to Greg Minshall for reporting this.
Bastien Guerry преди 12 години
родител
ревизия
7963c0b69c
променени са 1 файла, в които са добавени 2 реда и са изтрити 0 реда
  1. 2 0
      lisp/org.el

+ 2 - 0
lisp/org.el

@@ -19521,6 +19521,8 @@ On a link, call `ffap' to visit the link at point.
 Otherwise, return a user error."
   (interactive)
   (let ((element (org-element-at-point)))
+    (assert (not buffer-read-only) nil
+	    "Buffer is read-only: %s" (buffer-name))
     (case (org-element-type element)
       (src-block
        (if (not arg) (org-edit-src-code)