aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2000-10-28 17:19:36 +0000
committerEli Zaretskii2000-10-28 17:19:36 +0000
commitf30846b1a8e4d6b2dd673bbc21cc3fb8d2b7420c (patch)
tree0c2ed7f0831721552ccb066e57db667e4bf1f2fe
parentc381f482acd03d13380e91ddf2942d3c2f7aa3e6 (diff)
downloademacs-f30846b1a8e4d6b2dd673bbc21cc3fb8d2b7420c.tar.gz
emacs-f30846b1a8e4d6b2dd673bbc21cc3fb8d2b7420c.zip
(x-long-option-alist, msdos-handle-args): Remove;
startup.el now does that for all character-terminal frames.
-rw-r--r--lisp/term/pc-win.el72
1 files changed, 0 insertions, 72 deletions
diff --git a/lisp/term/pc-win.el b/lisp/term/pc-win.el
index 520fc9cbeef..0c180a49d35 100644
--- a/lisp/term/pc-win.el
+++ b/lisp/term/pc-win.el
@@ -229,78 +229,6 @@ are fixed-pitch."
229(fset 'set-cursor-color 'ignore) ; Hardware determined by char under. 229(fset 'set-cursor-color 'ignore) ; Hardware determined by char under.
230(fset 'set-border-color 'ignore) ; Not useful. 230(fset 'set-border-color 'ignore) ; Not useful.
231 231
232;; From lisp/term/x-win.el:
233(defconst x-long-option-alist
234 '(("--name" . "-name")
235 ("--title" . "-T")
236 ("--reverse-video" . "-reverse")
237 ("--foreground-color" . "-fg")
238 ("--background-color" . "-bg")))
239;; ---------------------------------------------------------------------------
240;; Handle the X-like command line parameters "-fg", "-bg", "-name", etc.
241(defun msdos-handle-args (args)
242 (let ((rest nil))
243 (message "%s" args)
244 (while args
245 (let* ((this (car args))
246 (orig-this this)
247 completion argval)
248 (setq args (cdr args))
249 ;; Check for long options with attached arguments
250 ;; and separate out the attached option argument into argval.
251 (if (string-match "^--[^=]*=" this)
252 (setq argval (substring this (match-end 0))
253 this (substring this 0 (1- (match-end 0)))))
254 (setq completion (try-completion this x-long-option-alist))
255 (if (eq completion t)
256 ;; Exact match for long option.
257 (setq this (cdr (assoc this x-long-option-alist)))
258 (if (stringp completion)
259 (let ((elt (assoc completion x-long-option-alist)))
260 ;; Check for abbreviated long option.
261 (or elt
262 (error "Option `%s' is ambiguous" this))
263 (setq this (cdr elt)))
264 ;; Check for a short option.
265 (setq argval nil this orig-this)))
266 (cond ((or (string= this "-fg") (string= this "-foreground"))
267 (or argval (setq argval (car args) args (cdr args)))
268 (setq default-frame-alist
269 (cons (cons 'foreground-color argval)
270 default-frame-alist)))
271 ((or (string= this "-bg") (string= this "-background"))
272 (or argval (setq argval (car args) args (cdr args)))
273 (setq default-frame-alist
274 (cons (cons 'background-color argval)
275 default-frame-alist)))
276 ((or (string= this "-T") (string= this "-name"))
277 (or argval (setq argval (car args) args (cdr args)))
278 (setq default-frame-alist
279 (cons
280 (cons 'title
281 (if (stringp argval)
282 argval
283 (let ((case-fold-search t)
284 i)
285 (setq argval (invocation-name))
286
287 ;; Change any . or * characters in name to
288 ;; hyphens, so as to emulate behavior on X.
289 (while
290 (setq i (string-match "[.*]" argval))
291 (aset argval i ?-))
292 argval)))
293 default-frame-alist)))
294 ((or (string= this "-r")
295 (string= this "-rv")
296 (string= this "-reverse"))
297 (setq default-frame-alist
298 (cons '(reverse . t)
299 default-frame-alist)))
300 (t (setq rest (cons this rest))))))
301 (nreverse rest)))
302
303(setq command-line-args (msdos-handle-args command-line-args))
304;; --------------------------------------------------------------------------- 232;; ---------------------------------------------------------------------------
305 233
306;;; pc-win.el ends here 234;;; pc-win.el ends here