Function: bib-display-this-ref

bib-display-this-ref is a byte-compiled function defined in bib-cite.el.

Signature

(bib-display-this-ref)

Documentation

Display a few lines around current point.

Source Code

;; Defined in ~/.emacs.d/elpa/auctex-14.1.2/bib-cite.el
(defun bib-display-this-ref ()
  "Display a few lines around current point."
  (cond
   ((bib-Is-hidden)
    (with-output-to-temp-buffer "*BiBTemp*"
      (princ
       (buffer-substring
        (save-excursion
          (let ((i 3))
            (while (and (> i 0)
                        (re-search-backward "[\n\^M]" nil t)
                        (setq i (1- i)))))
          (point))
        (save-excursion
          (let ((i 3))
            (while (and (> i 0)
                        (re-search-forward "[\n\^M]" nil t)
                        (setq i (1- i)))))
          (point)))))
    (set-buffer "*BiBTemp*")
    (while (search-forward "\^M" nil t)
      (replace-match "\n" nil t))
    (goto-char 1)
    (if (looking-at "\n")  ;Remove first empty line...
        (delete-char 1))
    (with-output-to-temp-buffer "*Help*"
      (princ (buffer-substring (point-min) (point-max))))
    (bib-cite-fontify-help-as-latex)
    (kill-buffer "*BiBTemp*"))
   (t
    (with-output-to-temp-buffer ;     display the ref's context
        "*Help*"
      (princ
       (buffer-substring (save-excursion (forward-line -2)(point))
                         (save-excursion (forward-line 3)(point)))))
    (bib-cite-fontify-help-as-latex))))