Mercurial > hg > xemacs-beta
comparison lisp/prim/novice.el @ 72:b9518feda344 r20-0b31
Import from CVS: tag r20-0b31
author | cvs |
---|---|
date | Mon, 13 Aug 2007 09:03:46 +0200 |
parents | 131b0175ea99 |
children | 0132846995bd |
comparison
equal
deleted
inserted
replaced
71:bae944334fa4 | 72:b9518feda344 |
---|---|
17 ;; WITHOUT ANY WARRANTY; without even the implied warranty of | 17 ;; WITHOUT ANY WARRANTY; without even the implied warranty of |
18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
19 ;; General Public License for more details. | 19 ;; General Public License for more details. |
20 | 20 |
21 ;; You should have received a copy of the GNU General Public License | 21 ;; You should have received a copy of the GNU General Public License |
22 ;; along with XEmacs; see the file COPYING. If not, write to the | 22 ;; along with XEmacs; see the file COPYING. If not, write to the Free |
23 ;; Free Software Foundation, 59 Temple Place - Suite 330, | 23 ;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA |
24 ;; Boston, MA 02111-1307, USA. | 24 ;; 02111-1307, USA. |
25 | 25 |
26 ;;; Synched up with: FSF 19.30. | 26 ;;; Synched up with: FSF 19.34. |
27 | 27 |
28 ;;; Commentary: | 28 ;;; Commentary: |
29 | 29 |
30 ;; This mode provides a hook which is, by default, attached to various | 30 ;; This mode provides a hook which is, by default, attached to various |
31 ;; putatively dangerous commands in a (probably futile) attempt to | 31 ;; putatively dangerous commands in a (probably futile) attempt to |
77 N to do nothing (command remains disabled).") | 77 N to do nothing (command remains disabled).") |
78 (save-excursion | 78 (save-excursion |
79 (set-buffer standard-output) | 79 (set-buffer standard-output) |
80 (help-mode))) | 80 (help-mode))) |
81 (message "Type y, n or Space: ") | 81 (message "Type y, n or Space: ") |
82 ; (let ((cursor-in-echo-area t)) | |
83 ; (while (not (memq (setq char (downcase (read-char))) | |
84 ; '(? ?y ?n))) | |
85 ; (ding) | |
86 ; (message "Please type y, n or Space: ")))) | |
87 ;; XEmacs version | |
82 (let ((cursor-in-echo-area t) | 88 (let ((cursor-in-echo-area t) |
83 (inhibit-quit t) | 89 (inhibit-quit t) |
84 event) | 90 event) |
85 (while (null char) | 91 (while (null char) |
86 (if (progn | 92 (if (progn |
108 (if (= char ?y) | 114 (if (= char ?y) |
109 (if (and user-init-file | 115 (if (and user-init-file |
110 (not (string= "" user-init-file)) | 116 (not (string= "" user-init-file)) |
111 (y-or-n-p "Enable command for future editing sessions also? ")) | 117 (y-or-n-p "Enable command for future editing sessions also? ")) |
112 (enable-command this-command) | 118 (enable-command this-command) |
113 (put this-command 'disabled nil))) | 119 (put this-command 'disabled nil))) |
114 (if (/= char ?n) | 120 (if (/= char ?n) |
115 (call-interactively this-command)))) | 121 (call-interactively this-command)))) |
116 | 122 |
117 ;;;###autoload | 123 ;;;###autoload |
118 (defun enable-command (command) | 124 (defun enable-command (command) |