Function: sc-eref-show
sc-eref-show is a byte-compiled function defined in supercite.el.gz.
Signature
(sc-eref-show INDEX)
Documentation
Show reference INDEX in sc-rewrite-header-list.
Source Code
;; Defined in /usr/src/emacs/lisp/mail/supercite.el.gz
;; functions for electric reference mode
(defun sc-eref-show (index)
"Show reference INDEX in `sc-rewrite-header-list'."
(let ((msg "No %ing reference headers in list.")
(last (length sc-rewrite-header-list)))
(setq sc-eref-style
(cond
((sc-valid-index-p index) index)
((< index 0)
(if sc-electric-circular-p
(1- last)
(progn (error msg "preced") 0)))
((>= index last)
(if sc-electric-circular-p
0
(progn (error msg "follow") (1- last))))))
(with-current-buffer sc-electric-bufname
(let ((inhibit-read-only t))
(erase-buffer)
(goto-char (point-min))
(sc-eref-insert-selected)
;; now shrink the window to just contain the electric reference
;; header.
(let ((hdrlines (count-lines (point-min) (point-max)))
(winlines (1- (window-height))))
(if (/= hdrlines winlines)
(if (> hdrlines winlines)
;; we have to enlarge the window
(enlarge-window (- hdrlines winlines))
;; we have to shrink the window
(shrink-window (- winlines (max hdrlines
window-min-height))))))))))