From: Phillip Lord Date: Mon, 8 May 2017 08:23:35 +0000 (+0100) Subject: Make tutorial read-only X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=2a7e4ee2ad43b294c768aaf53f3a02513c8e0242;p=emacs.git Make tutorial read-only --- diff --git a/etc/tutorials-org/tutorial.org b/etc/tutorials-org/tutorial.org index 72533738bba..b179f454db1 100644 --- a/etc/tutorials-org/tutorial.org +++ b/etc/tutorials-org/tutorial.org @@ -184,11 +184,6 @@ In this section, we consider how Emacs allows you to view and to change text within Emacs. This is mostly straight-forward, but Emacs gives you a some extra options useful for changing text rapidly. -** This is a copy! - -If you wish to practice on this tutorial, do not worry, you can change it -freely as it is just a copy. - ** Editing Text Changing text happens in Emacs as with most other applications. A blinking diff --git a/lisp/tutorial-org.el b/lisp/tutorial-org.el index e74e7f57997..bca3e349d57 100644 --- a/lisp/tutorial-org.el +++ b/lisp/tutorial-org.el @@ -31,7 +31,8 @@ (define-derived-mode tutorial-org-mode org-mode "Tutor" "A mode for displaying tutorials." (show-all) - (setq-local org-hide-emphasis-markers t)) + (setq-local org-hide-emphasis-markers t) + (setq buffer-read-only t)) (defun tutorial-org--display-buffer (tutorial-buffer-name) (when-let ((tutorial-buffer