1 ;;; assistant.el --- guiding users through Emacs setup
2 ;; Copyright (C) 2004, 2005 Free Software Foundation, Inc.
4 ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
7 ;; This file is part of GNU Emacs.
9 ;; GNU Emacs is free software; you can redistribute it and/or modify
10 ;; it under the terms of the GNU General Public License as published by
11 ;; the Free Software Foundation; either version 3, or (at your option)
14 ;; GNU Emacs is distributed in the hope that it will be useful,
15 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
16 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 ;; GNU General Public License for more details.
19 ;; You should have received a copy of the GNU General Public License
20 ;; along with GNU Emacs; see the file COPYING. If not, write to the
21 ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
22 ;; Boston, MA 02110-1301, USA.
34 (autoload 'gnus-error "gnus-util")
35 (autoload 'netrc-get "netrc")
36 (autoload 'netrc-machine "netrc")
37 (autoload 'netrc-parse "netrc")
39 (defvar assistant-readers
40 '(("variable" assistant-variable-reader)
41 ("validate" assistant-sexp-reader)
42 ("result" assistant-list-reader)
43 ("next" assistant-list-reader)
44 ("text" assistant-text-reader)))
46 (defface assistant-field '((t (:bold t)))
47 "Face used for editable fields."
48 :group 'gnus-article-emphasis)
49 ;; backward-compatibility alias
50 (put 'assistant-field-face 'face-alias 'assistant-field)
52 ;;; Internal variables
54 (defvar assistant-data nil)
55 (defvar assistant-current-node nil)
56 (defvar assistant-previous-nodes nil)
57 (defvar assistant-widgets nil)
59 (defun assistant-parse-buffer ()
60 (let (results command value)
61 (goto-char (point-min))