emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/textmodes/bibtex.el


From: Stefan Monnier
Subject: [Emacs-diffs] Changes to emacs/lisp/textmodes/bibtex.el
Date: Thu, 05 May 2005 11:18:05 -0400

Index: emacs/lisp/textmodes/bibtex.el
diff -c emacs/lisp/textmodes/bibtex.el:1.93 emacs/lisp/textmodes/bibtex.el:1.94
*** emacs/lisp/textmodes/bibtex.el:1.93 Sun Apr 10 20:35:00 2005
--- emacs/lisp/textmodes/bibtex.el      Thu May  5 15:18:05 2005
***************
*** 776,783 ****
    :type '(repeat string))
  
  (defcustom bibtex-summary-function 'bibtex-summary
!   "Function to call for generating a one-line summary of a BibTeX entry.
! It takes one argument, the key of the entry.
  Used by `bibtex-complete-crossref-cleanup' and `bibtex-copy-summary-as-kill'."
    :group 'bibtex
    :type '(choice (const :tag "Default" bibtex-summary)
--- 776,783 ----
    :type '(repeat string))
  
  (defcustom bibtex-summary-function 'bibtex-summary
!   "Function to call for generating a summary of current BibTeX entry.
! It takes no arguments.  Point must be at beginning of entry.
  Used by `bibtex-complete-crossref-cleanup' and `bibtex-copy-summary-as-kill'."
    :group 'bibtex
    :type '(choice (const :tag "Default" bibtex-summary)
***************
*** 2550,2574 ****
    (save-excursion
      (if (and (stringp key)
               (bibtex-find-entry key t))
!         (message "Ref: %s" (funcall bibtex-summary-function key)))))
  
  (defun bibtex-copy-summary-as-kill ()
    "Push summery of current BibTeX entry to kill ring.
  Use `bibtex-summary-function' to generate summary."
    (interactive)
!   (let ((key (save-excursion
!                (bibtex-beginning-of-entry)
!                (if (looking-at bibtex-entry-maybe-empty-head)
!                    (bibtex-key-in-head)
!                  (error "No key found")))))
!     (kill-new (message "%s" (funcall bibtex-summary-function key)))))
  
! (defun bibtex-summary (key)
!   "Return summary of BibTeX entry KEY.
  Used as default value of `bibtex-summary-function'."
    ;; It would be neat to customize this function.  How?
    (save-excursion
!     (if (bibtex-find-entry key t)
          (let* ((bibtex-autokey-name-case-convert 'identity)
                 (bibtex-autokey-name-length 'infty)
                 (bibtex-autokey-names 1)
--- 2550,2573 ----
    (save-excursion
      (if (and (stringp key)
               (bibtex-find-entry key t))
!         (message "Ref: %s" (funcall bibtex-summary-function)))))
  
  (defun bibtex-copy-summary-as-kill ()
    "Push summery of current BibTeX entry to kill ring.
  Use `bibtex-summary-function' to generate summary."
    (interactive)
!   (save-excursion
!     (bibtex-beginning-of-entry)
!     (if (looking-at bibtex-entry-maybe-empty-head)
!         (kill-new (message "%s" (funcall bibtex-summary-function)))
!       (error "No entry found"))))
  
! (defun bibtex-summary ()
!   "Return summary of current BibTeX entry.
  Used as default value of `bibtex-summary-function'."
    ;; It would be neat to customize this function.  How?
    (save-excursion
!     (if (looking-at bibtex-entry-maybe-empty-head)
          (let* ((bibtex-autokey-name-case-convert 'identity)
                 (bibtex-autokey-name-length 'infty)
                 (bibtex-autokey-names 1)
***************
*** 2594,2600 ****
                       `((" " . ,names) (" " . ,year) (": " . ,title)
                         (", " . ,journal) (" " . ,volume) (":" . ,pages))
                       ""))
!       (error "Key `%s' not found" key))))
  
  (defun bibtex-pop (arg direction)
    "Fill current field from the ARGth same field's text in DIRECTION.
--- 2593,2599 ----
                       `((" " . ,names) (" " . ,year) (": " . ,title)
                         (", " . ,journal) (" " . ,volume) (":" . ,pages))
                       ""))
!       (error "Entry not found"))))
  
  (defun bibtex-pop (arg direction)
    "Fill current field from the ARGth same field's text in DIRECTION.
***************
*** 2743,2749 ****
  entries.  This is usually the case, if you have created a buffer completely
  with BibTeX mode and finished every new entry with \\[bibtex-clean-entry].
  
! For third party BibTeX files, call the function `bibtex-convert-alien'
  to fully take advantage of all features of BibTeX mode.
  
  
--- 2742,2748 ----
  entries.  This is usually the case, if you have created a buffer completely
  with BibTeX mode and finished every new entry with \\[bibtex-clean-entry].
  
! For third party BibTeX files, call the command \\[bibtex-convert-alien]
  to fully take advantage of all features of BibTeX mode.
  
  
***************
*** 3346,3352 ****
  Move point where the entry KEY should be placed.
  If `bibtex-maintain-sorted-entries' is non-nil, perform a binary
  search to look for place for KEY.  This requires that buffer is sorted,
! see \\[bibtex-validate].)
  Return t if preparation was successful or nil if entry KEY already exists."
    (let ((key (nth 0 index))
          key-exist)
--- 3345,3351 ----
  Move point where the entry KEY should be placed.
  If `bibtex-maintain-sorted-entries' is non-nil, perform a binary
  search to look for place for KEY.  This requires that buffer is sorted,
! see `bibtex-validate'.
  Return t if preparation was successful or nil if entry KEY already exists."
    (let ((key (nth 0 index))
          key-exist)
***************
*** 3770,3776 ****
    "Reinsert the last BibTeX item.
  More precisely, reinsert the field or entry killed or yanked most recently.
  With argument N, reinsert the Nth most recently killed BibTeX item.
! See also the command \\[bibtex-yank-pop]]."
    (interactive "*p")
    (bibtex-insert-kill (1- n))
    (setq this-command 'bibtex-yank))
--- 3769,3775 ----
    "Reinsert the last BibTeX item.
  More precisely, reinsert the field or entry killed or yanked most recently.
  With argument N, reinsert the Nth most recently killed BibTeX item.
! See also the command \\[bibtex-yank-pop]."
    (interactive "*p")
    (bibtex-insert-kill (1- n))
    (setq this-command 'bibtex-yank))




reply via email to

[Prev in Thread] Current Thread [Next in Thread]