Changeset 3928

Show
Ignore:
Timestamp:
10/23/05 12:09:52 (3 years ago)
Author:
fujii
Message:

Use a built-in version of x-parse-geometry() instead of lisp version.

* international/meadow.el (x-parse-geometry): Removed. Built-in
function is used instead.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/lisp/ChangeLog.Meadow

    r3926 r3928  
     12005-10-23  Masayuki FUJII  <boochang@m4.kcn.ne.jp> 
     2 
     3        * international/meadow.el (x-parse-geometry): Removed. Built-in 
     4        function is used instead. 
     5 
    162005-10-21  Masayuki FUJII  <boochang@m4.kcn.ne.jp> 
    27 
  • trunk/lisp/international/meadow.el

    r3926 r3928  
    214214 
    215215(defalias 'x-list-fonts 'w32-list-fonts) 
    216  
    217 ;; 
    218 ;; Section: X geometry (-g option) 
    219 ;; 
    220  
    221 (defun x-parse-geometry (str) 
    222   (let* ((size-regexp "\\([0-9]+\\)?\\(?:[xX]\\([0-9]+\\)\\)?") 
    223          (location-regexp "\\([+\\-][+\\-]?[0-9]+\\)") 
    224          (func (lambda (x) 
    225                  (cond ((null x) nil) 
    226                        ((= (aref x 0) ?+) 
    227                         (list '+ (string-to-number 
    228                                   (substring x 1)))) 
    229                        ((= (aref x 0) ?-) 
    230                         (list '- (string-to-number 
    231                                   (substring x 1)))) 
    232                        (t nil)))) 
    233          location-x location-y size-x size-y result) 
    234     (if (string-match "^=?" str) 
    235         (setq str (substring str (match-end 0)))) 
    236     (if (string-match 
    237          (concat "^" size-regexp) 
    238          str) 
    239         (setq size-x (and (match-string 1 str) 
    240                           (string-to-number (match-string 1 str))) 
    241               size-y (and (match-string 2 str) 
    242                           (string-to-number (match-string 2 str))) 
    243               str (substring str (match-end 0)))) 
    244     (if (string-match 
    245          (concat "^" location-regexp "\\(" location-regexp "\\)?") 
    246          str) 
    247         (setq location-x (match-string 1 str) 
    248               location-y (match-string 2 str) 
    249               location-x (funcall func location-x) 
    250               location-y (funcall func location-y))) 
    251     (if location-x 
    252         (setq result (cons (cons 'left location-x) result))) 
    253     (if location-y 
    254         (setq result (cons (cons 'top location-y) result))) 
    255     (if size-x 
    256         (setq result (cons (cons 'width size-x) result))) 
    257     (if size-y 
    258         (setq result (cons (cons 'height size-y) result))) 
    259     result)) 
    260216 
    261217;;