Mercurial > hg > xemacs-beta
comparison lisp/modes/xpm-mode.el @ 4:b82b59fe008d r19-15b3
Import from CVS: tag r19-15b3
author | cvs |
---|---|
date | Mon, 13 Aug 2007 08:46:56 +0200 |
parents | ac2d302a0011 |
children | 0293115a14e9 |
comparison
equal
deleted
inserted
replaced
3:30df88044ec6 | 4:b82b59fe008d |
---|---|
107 (while (not (looking-at "\\s-*\"")) | 107 (while (not (looking-at "\\s-*\"")) |
108 (next-line 1)) | 108 (next-line 1)) |
109 (next-line 1) | 109 (next-line 1) |
110 (while (not (looking-at "\\s-*\"")) | 110 (while (not (looking-at "\\s-*\"")) |
111 (next-line 1)) | 111 (next-line 1)) |
112 | |
113 (save-excursion | |
114 (goto-char (point-min)) | |
115 (if (re-search-forward | |
116 "\"\\s-*\\([0-9]+\\)\\s-+\\([0-9]+\\)\\s-+\\([0-9]+\\)\\s-+\\([0-9]+\\)\\s-*" | |
117 (point-max) t) | |
118 (setq xpm-chars-per-pixel (string-to-int (match-string 4))))) | |
119 | |
112 (let ((co 0)) | 120 (let ((co 0)) |
113 (while (< co (xpm-num-colors)) | 121 (while (< co (xpm-num-colors)) |
114 (progn | 122 (progn |
115 (xpm-parse-color) | 123 (xpm-parse-color) |
116 (setq co (1+ co)) | 124 (setq co (1+ co)) |
142 (save-excursion | 150 (save-excursion |
143 (xpm-goto-body-line 0) | 151 (xpm-goto-body-line 0) |
144 (let (ext | 152 (let (ext |
145 pixel-chars | 153 pixel-chars |
146 pixel-color) | 154 pixel-color) |
147 (while (< (point) (point-max)) | 155 (while (and (< (point) (point-max)) |
156 (< (+ (point) xpm-chars-per-pixel) (point-max))) | |
148 (setq pixel-chars | 157 (setq pixel-chars |
149 (buffer-substring (point) (+ (point) xpm-chars-per-pixel)) | 158 (buffer-substring (point) (+ (point) xpm-chars-per-pixel)) |
150 pixel-color (assoc pixel-chars xpm-pixel-values) | 159 pixel-color (assoc pixel-chars xpm-pixel-values) |
151 ext (make-extent (point) (+ (point) xpm-chars-per-pixel))) | 160 ext (make-extent (point) (+ (point) xpm-chars-per-pixel))) |
152 (if pixel-color | 161 (if pixel-color |