emacs-devel
[Top][All Lists]
Advanced

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

Disabled commands (was: Risky local variable mechanism)


From: Stefan Monnier
Subject: Disabled commands (was: Risky local variable mechanism)
Date: Wed, 08 Feb 2006 07:48:13 -0500
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

> This looks very like the interface for enabling dangerous commands in
> novice.el that after asking a question with multiple choices can save
> in .emacs forms like:

> (put 'narrow-to-region 'disabled nil)
> (put 'narrow-to-defun  'disabled nil)
> (put 'downcase-region  'disabled nil)
> (put 'upcase-region    'disabled nil)

Indeed, that's a much better example.
While on this side-subject, any objection to the patch below?


        Stefan



--- orig/lisp/files.el
+++ mod/lisp/files.el
@@ -3614,6 +3570,7 @@
   (message (if arg "Modification-flag set"
               "Modification-flag cleared"))
   (set-buffer-modified-p arg))
+(put 'not-modified 'disabled t)
 
 (defun toggle-read-only (&optional arg)
   "Change whether this buffer is visiting its file read-only.




reply via email to

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