1 |
;;; novice.el --- handling of disabled commands ("novice mode") for Emacs |
;;; novice.el --- handling of disabled commands ("novice mode") for Emacs |
2 |
|
|
3 |
;; Copyright (C) 1985, 1986, 1987, 1994, 2002, 2004 |
;; Copyright (C) 1985, 1986, 1987, 1994, 2002, 2004, 2005 |
4 |
;; Free Software Foundation, Inc. |
;; Free Software Foundation, Inc. |
5 |
|
|
6 |
;; Maintainer: FSF |
;; Maintainer: FSF |
182 |
(if (search-forward (concat "(put '" (symbol-name command) " ") nil t) |
(if (search-forward (concat "(put '" (symbol-name command) " ") nil t) |
183 |
(delete-region |
(delete-region |
184 |
(progn (beginning-of-line) (point)) |
(progn (beginning-of-line) (point)) |
185 |
(progn (forward-line 1) (point)))) |
(progn (forward-line 1) (point))) |
186 |
(goto-char (point-max)) |
(goto-char (point-max)) |
187 |
(insert "\n(put '" (symbol-name command) " 'disabled t)\n") |
(insert ?\n)) |
188 |
|
(insert "(put '" (symbol-name command) " 'disabled t)\n") |
189 |
(save-buffer)))) |
(save-buffer)))) |
190 |
|
|
191 |
(provide 'novice) |
(provide 'novice) |