HCoop
/
bpt
/
emacs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Use define-minor-mode in more cases.
[bpt/emacs.git]
/
lisp
/
ps-bdf.el
diff --git
a/lisp/ps-bdf.el
b/lisp/ps-bdf.el
index
19a776d
..
65ec4bf
100644
(file)
--- a/
lisp/ps-bdf.el
+++ b/
lisp/ps-bdf.el
@@
-1,8
+1,10
@@
;;; ps-bdf.el --- BDF font file handler for ps-print
;;; ps-bdf.el --- BDF font file handler for ps-print
-;; Copyright (C) 1998, 1999, 2001, 2002, 2003, 2004, 2005, 2006, 2007
+;; Copyright (C) 1998, 1999, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
+;; 2009, 2010
;; Free Software Foundation, Inc.
;; Free Software Foundation, Inc.
-;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
+;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
+;; 2008, 2009, 2010
;; National Institute of Advanced Industrial Science and Technology (AIST)
;; Registration Number H14PRO021
;; National Institute of Advanced Industrial Science and Technology (AIST)
;; Registration Number H14PRO021
@@
-10,15
+12,16
@@
;; National Institute of Advanced Industrial Science and Technology (AIST)
;; Registration Number H13PRO009
;; National Institute of Advanced Industrial Science and Technology (AIST)
;; Registration Number H13PRO009
+;; Author: Kenichi Handa <handa@m17n.org>
+;; (according to ack.texi)
;; Keywords: wp, BDF, font, PostScript
;; Keywords: wp, BDF, font, PostScript
-;; Maintainer: Kenichi Handa <handa@m17n.org>
;; This file is part of GNU Emacs.
;; This file is part of GNU Emacs.
-;; GNU Emacs is free software
;
you can redistribute it and/or modify
+;; GNU Emacs is free software
:
you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation
; either version 3, or (at your option)
-;; any later version.
+;; the Free Software Foundation
, either version 3 of the License, or
+;;
(at your option)
any later version.
;; GNU Emacs is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; GNU Emacs is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
@@
-26,9
+29,7
@@
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs; see the file COPYING. If not, write to the
-;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-;; Boston, MA 02110-1301, USA.
+;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
;;; Commentary:
;;; Commentary:
@@
-41,12
+42,15
@@
(require 'ps-mule))
;;;###autoload
(require 'ps-mule))
;;;###autoload
-(def
var
bdf-directory-list
+(def
custom
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"))
(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.
;; 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.
@@
-91,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))
(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))))
(insert-file-contents bdfname)
buf))))
@@
-221,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
(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
(goto-char (point-min))
(search-forward "\nFONTBOUNDINGBOX")
(setq font-bounding-box
@@
-239,10
+241,10
@@
CODE, where N and CODE are in the following relation:
(goto-char (point-min))
(search-forward "\nFONT ")
(if (looking-at "-[^-]*-[^-]*-[^-]*-[^-]*-[^-]*-[^-]*-\\([0-9]+\\)")
(goto-char (point-min))
(search-forward "\nFONT ")
(if (looking-at "-[^-]*-[^-]*-[^-]*-[^-]*-[^-]*-[^-]*-\\([0-9]+\\)")
- (setq size (string-to-
int
(match-string 1)))
+ (setq size (string-to-
number
(match-string 1)))
(search-forward "\nSIZE ")
(setq size (read (current-buffer)))
(search-forward "\nSIZE ")
(setq size (read (current-buffer)))
- ;; The following kludgy code is t avoid bugs of several
+ ;; The following kludgy code is t
o
avoid bugs of several
;; fonts which have wrong SIZE record.
(and (string-match "jiskan" bdfname)
(<= size (/ (aref font-bounding-box 1) 3))
;; fonts which have wrong SIZE record.
(and (string-match "jiskan" bdfname)
(<= size (/ (aref font-bounding-box 1) 3))
@@
-445,5
+447,5
@@
BITMAP-STRING is a string representing bits by hexadecimal digits."
(provide 'ps-bdf)
(provide 'ps-bdf)
-;;
;
arch-tag: 9b875ba8-565a-4ecf-acaa-30cee732c898
+;; arch-tag: 9b875ba8-565a-4ecf-acaa-30cee732c898
;;; ps-bdf.el ends here
;;; ps-bdf.el ends here