comparison lisp/term/x-win.el @ 16835:7584a510ad85

(x-handle-args): Stop arg processing if we encounter "--", and preserve all remaining args.
author Richard M. Stallman <rms@gnu.org>
date Mon, 06 Jan 1997 06:51:12 +0000
parents 65dd474f666e
children 828cf55629fc
comparison
equal deleted inserted replaced
16834:ec390b34ddc0 16835:7584a510ad85
163 \(e.g., \"black\") in the option handler code (e.g., x-handle-switch). 163 \(e.g., \"black\") in the option handler code (e.g., x-handle-switch).
164 This function returns ARGS minus the arguments that have been processed." 164 This function returns ARGS minus the arguments that have been processed."
165 ;; We use ARGS to accumulate the args that we don't handle here, to return. 165 ;; We use ARGS to accumulate the args that we don't handle here, to return.
166 (setq x-invocation-args args 166 (setq x-invocation-args args
167 args nil) 167 args nil)
168 (while x-invocation-args 168 (while (and x-invocation-args
169 (not (equal (car x-invocation-args) "--")))
169 (let* ((this-switch (car x-invocation-args)) 170 (let* ((this-switch (car x-invocation-args))
170 (orig-this-switch this-switch) 171 (orig-this-switch this-switch)
171 completion argval aelt handler) 172 completion argval aelt handler)
172 (setq x-invocation-args (cdr x-invocation-args)) 173 (setq x-invocation-args (cdr x-invocation-args))
173 ;; Check for long options with attached arguments 174 ;; Check for long options with attached arguments
195 (let ((x-invocation-args 196 (let ((x-invocation-args
196 (cons argval x-invocation-args))) 197 (cons argval x-invocation-args)))
197 (funcall handler this-switch)) 198 (funcall handler this-switch))
198 (funcall handler this-switch)) 199 (funcall handler this-switch))
199 (setq args (cons orig-this-switch args))))) 200 (setq args (cons orig-this-switch args)))))
200 (nreverse args)) 201 (nconc (nreverse args) x-invocation-args))
201 202
202 ;; 203 ;;
203 ;; Standard X cursor shapes, courtesy of Mr. Fox, who wanted ALL of them. 204 ;; Standard X cursor shapes, courtesy of Mr. Fox, who wanted ALL of them.
204 ;; 205 ;;
205 206