Mercurial > hg > xemacs-beta
comparison lisp/vm/vm-minibuf.el @ 102:a145efe76779 r20-1b3
Import from CVS: tag r20-1b3
author | cvs |
---|---|
date | Mon, 13 Aug 2007 09:15:49 +0200 |
parents | 4be1180a9e89 |
children | 8619ce7e4c50 |
comparison
equal
deleted
inserted
replaced
101:a0ec055d74dd | 102:a145efe76779 |
---|---|
315 (save-excursion | 315 (save-excursion |
316 (setq input-buffer (get-buffer-create " *password*")) | 316 (setq input-buffer (get-buffer-create " *password*")) |
317 (set-buffer input-buffer) | 317 (set-buffer input-buffer) |
318 (while t | 318 (while t |
319 (erase-buffer) | 319 (erase-buffer) |
320 (vm-unsaved-message "%s%s" prompt | 320 (message "%s%s" prompt |
321 (vm-truncate-string xxx (buffer-size))) | 321 (vm-truncate-string xxx (buffer-size))) |
322 (while (not (memq (setq char (read-char)) '(?\C-m ?\C-j))) | 322 (while (not (memq (setq char (read-char)) '(?\C-m ?\C-j))) |
323 (if (setq form | 323 (if (setq form |
324 (cdr | 324 (cdr |
325 (assq char | 325 (assq char |
331 (?\C-v . (quoted-insert 1)))))) | 331 (?\C-v . (quoted-insert 1)))))) |
332 (condition-case error-data | 332 (condition-case error-data |
333 (eval form) | 333 (eval form) |
334 (error t)) | 334 (error t)) |
335 (insert char)) | 335 (insert char)) |
336 (vm-unsaved-message "%s%s" prompt | 336 (message "%s%s" prompt |
337 (vm-truncate-string xxx (buffer-size)))) | 337 (vm-truncate-string xxx (buffer-size)))) |
338 (cond ((and confirm string) | 338 (cond ((and confirm string) |
339 (cond ((not (string= string (buffer-string))) | 339 (cond ((not (string= string (buffer-string))) |
340 (vm-unsaved-message | 340 (message |
341 (concat prompt | 341 (concat prompt |
342 (vm-truncate-string xxx (buffer-size)) | 342 (vm-truncate-string xxx (buffer-size)) |
343 " [Mismatch... try again.]")) | 343 " [Mismatch... try again.]")) |
344 (ding) | 344 (ding) |
345 (sit-for 2) | 345 (sit-for 2) |
346 (setq string nil)) | 346 (setq string nil)) |
347 (t (throw 'return-value string)))) | 347 (t (throw 'return-value string)))) |
348 (confirm | 348 (confirm |
349 (setq string (buffer-string)) | 349 (setq string (buffer-string)) |
350 (vm-unsaved-message | 350 (message |
351 (concat prompt | 351 (concat prompt |
352 (vm-truncate-string xxx (buffer-size)) | 352 (vm-truncate-string xxx (buffer-size)) |
353 " [Retype to confirm...]")) | 353 " [Retype to confirm...]")) |
354 (sit-for 2)) | 354 (sit-for 2)) |
355 (t | 355 (t |
356 (vm-unsaved-message "") | 356 (message "") |
357 (throw 'return-value (buffer-string)))))) | 357 (throw 'return-value (buffer-string)))))) |
358 (and input-buffer (kill-buffer input-buffer))))))) | 358 (and input-buffer (kill-buffer input-buffer))))))) |
359 | 359 |
360 (defun vm-keyboard-read-file-name (prompt &optional dir default | 360 (defun vm-keyboard-read-file-name (prompt &optional dir default |
361 must-match initial history) | 361 must-match initial history) |