Function: decipher-undo

decipher-undo is an interactive and byte-compiled function defined in decipher.el.gz.

Signature

(decipher-undo)

Documentation

Undo a change in Decipher mode.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/play/decipher.el.gz
;;--------------------------------------------------------------------
;; Undo:
;;--------------------------------------------------------------------

(defun decipher-undo ()
  "Undo a change in Decipher mode."
  (interactive nil decipher-mode)
  ;; If we don't get all the way thru, make last-command indicate that
  ;; for the following command.
  (setq this-command t)
  (or (eq major-mode 'decipher-mode)
      (error "This buffer is not in Decipher mode"))
  (or (eq last-command 'decipher-undo)
      (setq decipher-pending-undo-list decipher-undo-list))
  (or decipher-pending-undo-list
      (error "No further undo information"))
  (let ((undo-rec (pop decipher-pending-undo-list))
        buffer-read-only                ;Make buffer writable
        redo-map redo-rec undo-map)
    (or (consp (car undo-rec))
        (setq undo-rec (list undo-rec)))
    (while (setq undo-map (pop undo-rec))
      (setq redo-map (decipher-get-undo (cdr undo-map) (car undo-map)))
      (if redo-map
          (setq redo-rec
                (if (consp (car redo-map))
                    (append redo-map redo-rec)
                  (cons redo-map redo-rec))))
      (decipher-set-map (cdr undo-map) (car undo-map) t))
    (decipher-add-undo redo-rec))
  (setq this-command 'decipher-undo)
  (message "Undo!"))