Mercurial > hg > xemacs-beta
comparison lisp/prim/novice.el @ 4:b82b59fe008d r19-15b3
Import from CVS: tag r19-15b3
author | cvs |
---|---|
date | Mon, 13 Aug 2007 08:46:56 +0200 |
parents | 376386a54a3c |
children | 131b0175ea99 |
comparison
equal
deleted
inserted
replaced
3:30df88044ec6 | 4:b82b59fe008d |
---|---|
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 Free | 22 ;; along with XEmacs; see the file COPYING. If not, write to the Free |
23 ;; Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. | 23 ;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA |
24 ;; 02111-1307, USA. | |
24 | 25 |
25 ;;; Synched up with: FSF 19.30. | 26 ;;; Synched up with: FSF 19.34. |
26 | 27 |
27 ;;; Commentary: | 28 ;;; Commentary: |
28 | 29 |
29 ;; 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 |
30 ;; putatively dangerous commands in a (probably futile) attempt to | 31 ;; putatively dangerous commands in a (probably futile) attempt to |
76 N to do nothing (command remains disabled).") | 77 N to do nothing (command remains disabled).") |
77 (save-excursion | 78 (save-excursion |
78 (set-buffer standard-output) | 79 (set-buffer standard-output) |
79 (help-mode))) | 80 (help-mode))) |
80 (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 | |
81 (let ((cursor-in-echo-area t) | 88 (let ((cursor-in-echo-area t) |
82 (inhibit-quit t) | 89 (inhibit-quit t) |
83 event) | 90 event) |
84 (while (null char) | 91 (while (null char) |
85 (if (progn | 92 (if (progn |
107 (if (= char ?y) | 114 (if (= char ?y) |
108 (if (and user-init-file | 115 (if (and user-init-file |
109 (not (string= "" user-init-file)) | 116 (not (string= "" user-init-file)) |
110 (y-or-n-p "Enable command for future editing sessions also? ")) | 117 (y-or-n-p "Enable command for future editing sessions also? ")) |
111 (enable-command this-command) | 118 (enable-command this-command) |
112 (put this-command 'disabled nil))) | 119 (put this-command 'disabled nil))) |
113 (if (/= char ?n) | 120 (if (/= char ?n) |
114 (call-interactively this-command)))) | 121 (call-interactively this-command)))) |
115 | 122 |
116 ;;;###autoload | 123 ;;;###autoload |
117 (defun enable-command (command) | 124 (defun enable-command (command) |