Function: bookmark-make-record

bookmark-make-record is a byte-compiled function defined in bookmark.el.gz.

Signature

(bookmark-make-record)

Documentation

Return a new bookmark record (NAME . ALIST) for the current location.

Source Code

;; Defined in /usr/src/emacs/lisp/bookmark.el.gz
(defun bookmark-make-record ()
  "Return a new bookmark record (NAME . ALIST) for the current location."
  (let* ((bookmark-search-size
          ;; If we're in a buffer that's visiting an encrypted file,
          ;; don't include any context in the bookmark file, because
          ;; that would leak (possibly secret) data.
          (if (and buffer-file-name
                   (run-hook-with-args-until-success
                    'bookmark-inhibit-context-functions buffer-file-name))
              0
            bookmark-search-size))
         (record (funcall bookmark-make-record-function)))
    ;; Set up default name if the function does not provide one.
    (unless (stringp (car record))
      (if (car record) (push nil record))
      (setcar record (or bookmark-current-bookmark (bookmark-buffer-name))))
    ;; Set up defaults.
    (bookmark-prop-set
     record 'defaults
     (delq nil (delete-dups (append (bookmark-prop-get record 'defaults)
				    (list bookmark-current-bookmark
					  (car record)
                                          (bookmark-buffer-name))))))
    record))