X-Git-Url: http://cgit.sxemacs.org/?p=gnus;a=blobdiff_plain;f=lisp%2Fassistant.el;h=93d72193f4199efe7ddefc0e43acb6838ca013d1;hp=575b499efd0d72c2a9f3a1f829f07c78c97f28ba;hb=b52037f4a9c6bee1ff556c22750e158da1208d4b;hpb=c9a393eeb329a99695566342a9f03b8a30000898 diff --git a/lisp/assistant.el b/lisp/assistant.el index 575b499ef..93d72193f 100644 --- a/lisp/assistant.el +++ b/lisp/assistant.el @@ -17,9 +17,7 @@ ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License -;; along with GNU Emacs; see the file COPYING. If not, write to the -;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -;; Boston, MA 02110-1301, USA. +;; along with GNU Emacs. If not, see . ;;; Commentary: @@ -210,7 +208,7 @@ (setq result (if raw (nth 3 elem) (format "%s" (nth 3 elem))))))) result)) - + (defun assistant-set-variable (node variable value) (let ((variables (assistant-get-list node "variable")) elem) @@ -218,11 +216,11 @@ (setq elem (cadr elem)) (when (eq (intern variable) (car elem)) (setcar (nthcdr 3 elem) value))))) - + (defun assistant-render-text (text node) (unless (and text node) - (gnus-error - 5 + (gnus-error + 5 "The assistant was asked to render invalid text or node data")) (dolist (elem text) (if (stringp elem) @@ -272,7 +270,7 @@ (cadr type)) assistant-widgets)) (t - (push + (push (widget-create 'editable-field :value-face 'assistant-field @@ -362,7 +360,7 @@ (setq variable (cadr variable)) (let ((type (nth 1 variable)) (value (nth 3 variable))) - (when + (when (cond ((eq type :number) (string-match "[^0-9]" value)) @@ -412,7 +410,7 @@ (setq applicable (cons elem applicable)))) ;; return the first thing we can - + (while (setq elem (pop applicable)) (push (cadr (cadr elem)) return)) @@ -425,12 +423,12 @@ (append (assistant-get-list node "variable") variables))) variables)) - + (defun assistant-eval (form) (let ((bindings nil)) (dolist (variable (assistant-get-all-variables)) (setq variable (cadr variable)) - (push (list (car variable) + (push (list (car variable) (if (eq (nth 3 variable) 'default) nil (if (listp (nth 3 variable))