X-Git-Url: https://git.hcoop.net/bpt/emacs.git/blobdiff_plain/ecae6af979abcbb5b45c33ee05ceb297678ec9a0..6431f2e619d1ce4cff097a3837f6b9e931f1f61a:/lisp/ps-bdf.el diff --git a/lisp/ps-bdf.el b/lisp/ps-bdf.el index c5b394a721..65ec4bf101 100644 --- a/lisp/ps-bdf.el +++ b/lisp/ps-bdf.el @@ -1,9 +1,10 @@ ;;; ps-bdf.el --- BDF font file handler for ps-print -;; Copyright (C) 1998, 1999, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 +;; Copyright (C) 1998, 1999, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, +;; 2009, 2010 ;; Free Software Foundation, Inc. ;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, -;; 2008 +;; 2008, 2009, 2010 ;; National Institute of Advanced Industrial Science and Technology (AIST) ;; Registration Number H14PRO021 @@ -11,8 +12,9 @@ ;; National Institute of Advanced Industrial Science and Technology (AIST) ;; Registration Number H13PRO009 +;; Author: Kenichi Handa +;; (according to ack.texi) ;; Keywords: wp, BDF, font, PostScript -;; Maintainer: Kenichi Handa ;; This file is part of GNU Emacs. @@ -40,12 +42,15 @@ (require 'ps-mule)) ;;;###autoload -(defvar bdf-directory-list +(defcustom bdf-directory-list (if (memq system-type '(ms-dos windows-nt)) (list (expand-file-name "fonts/bdf" installation-directory)) '("/usr/local/share/emacs/fonts/bdf")) - "*List of directories to search for `BDF' font files. -The default value is '(\"/usr/local/share/emacs/fonts/bdf\").") + "List of directories to search for `BDF' font files. +The default value is '(\"/usr/local/share/emacs/fonts/bdf\")." + :type '(repeat :tag "BDF font directory list" + (directory :tag "BDF font directory")) + :group 'ps-print-miscellany) ;; MS-DOS and MS-Windows users like to move the binary around after ;; it's built, but the value above is computed at load-up time. @@ -90,8 +95,7 @@ If BDFNAME doesn't exist, return nil." (and (file-readable-p bdfname) (let ((buf (generate-new-buffer " *bdf-work*")) (coding-system-for-read 'no-conversion)) - (save-excursion - (set-buffer buf) + (with-current-buffer buf (insert-file-contents bdfname) buf)))) @@ -220,8 +224,7 @@ CODE, where N and CODE are in the following relation: (message "Reading %s..." bdfname) (error "BDF file %s doesn't exist" bdfname)) (unwind-protect - (save-excursion - (set-buffer buf) + (with-current-buffer buf (goto-char (point-min)) (search-forward "\nFONTBOUNDINGBOX") (setq font-bounding-box