Function: eudc-save-options
eudc-save-options is an interactive and byte-compiled function defined
in eudc.el.gz.
Signature
(eudc-save-options)
Documentation
Save options to eudc-options-file.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/net/eudc.el.gz
(defun eudc-save-options ()
"Save options to `eudc-options-file'."
(interactive)
(when eudc-ignore-options-file
(error "EUDC is configured to ignore the deprecated options file;\
see `eudc-ignore-options-file'"))
(with-current-buffer (find-file-noselect eudc-options-file t)
(goto-char (point-min))
;; delete the previous setq
(let ((standard-output (current-buffer))
provide-p
set-hotlist-p
set-server-p)
(catch 'found
(while t
(let ((sexp (condition-case nil
(read (current-buffer))
(end-of-file (throw 'found nil)))))
(if (listp sexp)
(cond
((eq (car sexp) 'eudc-set-server)
(delete-region (save-excursion
(backward-sexp)
(point))
(point))
(setq set-server-p t))
((and (eq (car sexp) 'setq)
(eq (cadr sexp) 'eudc-server-hotlist))
(delete-region (save-excursion
(backward-sexp)
(point))
(point))
(setq set-hotlist-p t))
((and (eq (car sexp) 'provide)
(equal (cadr sexp) '(quote eudc-options-file)))
(setq provide-p t)))
(if (and provide-p
set-hotlist-p
set-server-p)
(throw 'found t))))))
(if (eq (point-min) (point-max))
(princ ";; This file was automatically generated by eudc.el.\n\n"))
(or provide-p
(princ "(provide 'eudc-options-file)\n"))
(or (bolp)
(princ "\n"))
(delete-blank-lines)
(princ "(eudc-set-server ")
(prin1 eudc-server)
(princ " '")
(prin1 eudc-protocol)
(princ " t)\n")
(princ "(setq eudc-server-hotlist '")
(prin1 eudc-server-hotlist)
(princ ")\n")
(save-buffer))))