[climacs-cvs] CVS climacs
thenriksen
thenriksen at common-lisp.net
Tue May 2 19:59:21 UTC 2006
Update of /project/climacs/cvsroot/climacs
In directory clnet:/tmp/cvs-serv14735
Modified Files:
syntax.lisp misc-commands.lisp
Log Message:
Make Climacs not signal an error when an invalid syntax is input.
--- /project/climacs/cvsroot/climacs/syntax.lisp 2006/04/23 12:11:26 1.62
+++ /project/climacs/cvsroot/climacs/syntax.lisp 2006/05/02 19:59:21 1.63
@@ -258,7 +258,10 @@
:value-key #'syntax-description-class-name))
:partial-completers '(#\Space)
:allow-any-input t)
- (declare (ignore success string))
+ (declare (ignore success))
+ (if (find string *syntaxes* :key #'first :test #'string=)
+ (values object type)
+ (input-not-of-required-type string type))
object))
(defun syntax-from-name (syntax)
--- /project/climacs/cvsroot/climacs/misc-commands.lisp 2006/04/30 15:12:05 1.7
+++ /project/climacs/cvsroot/climacs/misc-commands.lisp 2006/05/02 19:59:21 1.8
@@ -786,7 +786,10 @@
(define-command (com-set-syntax :name t :command-table buffer-table) ()
(let* ((pane (current-window))
(buffer (buffer pane)))
- (set-syntax buffer (accept 'syntax :prompt "Set Syntax"))))
+ (handler-case (set-syntax buffer (accept 'syntax :prompt "Set Syntax"))
+ (input-not-of-required-type
+ (message)
+ (display-message "Invalid syntax: ~A." message)))))
;;;;;;;;;;;;;;;;;;;;
;; Kill ring commands
More information about the Climacs-cvs
mailing list