diff options
| author | Christophe Raffalli | 2000-11-13 10:30:57 +0000 |
|---|---|---|
| committer | Christophe Raffalli | 2000-11-13 10:30:57 +0000 |
| commit | b1f847966dc77d5b1c84ba779c95fdada5055073 (patch) | |
| tree | ebc2e23c8a1eeb3d6c53d2f6ba1a18496cfd3943 /af2 | |
| parent | bebf19e9d69866a9f403700282e213e69877d721 (diff) | |
*** empty log message ***
Diffstat (limited to 'af2')
| -rw-r--r-- | af2/sym-lock.el | 31 |
1 files changed, 18 insertions, 13 deletions
diff --git a/af2/sym-lock.el b/af2/sym-lock.el index 3f9807e6..085ef268 100644 --- a/af2/sym-lock.el +++ b/af2/sym-lock.el @@ -107,27 +107,32 @@ (let ((num (if (fboundp 'face-height) (face-height 'default) (let ((str (face-font 'default))) - (string-match "-[^-]*-[^-]*-[^-]*-[^-]*-[^-]*-[^-]*-\\([^-]*\\)-.*" str) - (string-to-number (substring str (match-beginning 1) - (match-end 1)))))) + (if + (string-match "-[^-]*-[^-]*-[^-]*-[^-]*-[^-]*-[^-]*-\\([^-]*\\)-.*" str) + (string-to-number (substring str (match-beginning 1) + (match-end 1))))))) (maxsize 100) (size) (oldsize) (lf (list-fonts "-adobe-symbol-medium-r-normal--*"))) (while (and lf maxsize) - (string-match "-[^-]*-[^-]*-[^-]*-[^-]*-[^-]*-[^-]*-\\([^-]*\\)-.*" + (if + (string-match "-[^-]*-[^-]*-[^-]*-[^-]*-[^-]*-[^-]*-\\([^-]*\\)-.*" (car lf)) - (setq size (string-to-number (substring (car lf) (match-beginning 1) - (match-end 1)))) - (if (and (> size num) (< size maxsize)) - (setq maxsize nil) - (setq oldsize size)) + (progn + (setq size (string-to-number (substring (car lf) (match-beginning 1) + (match-end 1)))) + (if (and (> size num) (< size maxsize)) + (setq maxsize nil) + (setq oldsize size)))) (setq lf (cdr lf))) (number-to-string (if (and oldsize (< oldsize 100)) oldsize num)))) (defvar sym-lock-font-name - (concat "-adobe-symbol-medium-r-normal--" - (if sym-lock-font-size sym-lock-font-size - (sym-lock-compute-font-size)) - "-*-*-*-p-*-adobe-fontspecific") + (if window-system + (concat "-adobe-symbol-medium-r-normal--" + (if sym-lock-font-size sym-lock-font-size + (sym-lock-compute-font-size)) + "-*-*-*-p-*-adobe-fontspecific") + "") "Name of the font used by Sym-Lock.") (make-variable-buffer-local 'sym-lock-font-name) (put 'sym-lock-font-name 'permanent-local t) |
