Function: todo-update-categories-sexp

todo-update-categories-sexp is a byte-compiled function defined in todo-mode.el.gz.

Signature

(todo-update-categories-sexp)

Documentation

Update the todo-categories sexp at the top of the file.

Source Code

;; Defined in /usr/src/emacs/lisp/calendar/todo-mode.el.gz
(defun todo-update-categories-sexp ()
  "Update the `todo-categories' sexp at the top of the file."
  (let ((inhibit-read-only t)
	(print-length nil)
        (print-level nil))
    (save-excursion
      (save-restriction
	(widen)
	(goto-char (point-min))
	(if (looking-at (concat "^" (regexp-quote todo-category-beg)))
	    (progn (newline) (goto-char (point-min)) ; Make space for sexp.
		   (setq todo-categories (todo-make-categories-list t)))
	  (delete-region (line-beginning-position) (line-end-position)))
	(prin1 todo-categories (current-buffer))))))