comparison lisp/emulation/viper-ex.el @ 14350:654081a41047

(ex-pwd, vip-info-on-file): Pass proper format string to message. (ex-set): Delete format call inside message.
author Karl Heuer <kwzh@gnu.org>
date Thu, 25 Jan 1996 01:17:24 +0000
parents 396316e5fbe6
children 854325337547
comparison
equal deleted inserted replaced
14349:96692e2ba103 14350:654081a41047
1410 (goto-char point) 1410 (goto-char point)
1411 (if (bobp) (vip-Put-back 1) (vip-put-back 1)))) 1411 (if (bobp) (vip-Put-back 1) (vip-put-back 1))))
1412 1412
1413 ;; Ex print working directory 1413 ;; Ex print working directory
1414 (defun ex-pwd () 1414 (defun ex-pwd ()
1415 (message default-directory)) 1415 (message "%s" default-directory))
1416 1416
1417 ;; Ex quit command 1417 ;; Ex quit command
1418 (defun ex-quit () 1418 (defun ex-quit ()
1419 ;; skip "!", if it is q!. In Viper q!, w!, etc., behave as q, w, etc. 1419 ;; skip "!", if it is q!. In Viper q!, w!, etc., behave as q, w, etc.
1420 (save-excursion 1420 (save-excursion
1558 ((member var '("nows" "nowrapscan")) 1558 ((member var '("nows" "nowrapscan"))
1559 (setq var "vip-search-wrap-around-t" 1559 (setq var "vip-search-wrap-around-t"
1560 val "nil"))) 1560 val "nil")))
1561 (if (eq val 0) ; value must be set by the user 1561 (if (eq val 0) ; value must be set by the user
1562 (let ((cursor-in-echo-area t)) 1562 (let ((cursor-in-echo-area t))
1563 (message (format ":set %s = <Value>" var)) 1563 (message ":set %s = <Value>" var)
1564 ;; if there are unread events, don't wait 1564 ;; if there are unread events, don't wait
1565 (or (vip-set-unread-command-events "") (sit-for 2)) 1565 (or (vip-set-unread-command-events "") (sit-for 2))
1566 (setq val (read-string (format ":set %s = " var))) 1566 (setq val (read-string (format ":set %s = " var)))
1567 (ex-fixup-history "set" orig-var val) 1567 (ex-fixup-history "set" orig-var val)
1568 1568
1630 ;; del pattern 1630 ;; del pattern
1631 lisp-cmd-del-pattern) 1631 lisp-cmd-del-pattern)
1632 )) 1632 ))
1633 )) 1633 ))
1634 1634
1635 (message (format "%s %s %s" set-cmd var (if (string-match "^[ \t]*$" val) 1635 (message "%s %s %s" set-cmd var (if (string-match "^[ \t]*$" val)
1636 (format "%S" val) 1636 (format "%S" val)
1637 val))) 1637 val))
1638 (eval (car (read-from-string actual-lisp-cmd))) 1638 (eval (car (read-from-string actual-lisp-cmd)))
1639 (if (string= var "fill-column") 1639 (if (string= var "fill-column")
1640 (if (> val2 0) 1640 (if (> val2 0)
1641 (auto-fill-mode 1) 1641 (auto-fill-mode 1)
1642 (auto-fill-mode -1))) 1642 (auto-fill-mode -1)))
1960 (point) (1- (point-max)) 1960 (point) (1- (point-max))
1961 (1+ (current-column)) 1961 (1+ (current-column))
1962 (if (buffer-modified-p) "[Modified]" "[Unchanged]"))) 1962 (if (buffer-modified-p) "[Modified]" "[Unchanged]")))
1963 (if (< (+ 1 (length info) (length file)) 1963 (if (< (+ 1 (length info) (length file))
1964 (window-width (minibuffer-window))) 1964 (window-width (minibuffer-window)))
1965 (message (concat file " " info)) 1965 (message "%s %s" file info)
1966 (save-window-excursion 1966 (save-window-excursion
1967 (with-output-to-temp-buffer " *vip-info*" 1967 (with-output-to-temp-buffer " *vip-info*"
1968 (princ (concat "\n" 1968 (princ (concat "\n"
1969 file "\n\n\t" info 1969 file "\n\n\t" info
1970 "\n\n\nPress any key to continue...\n\n"))) 1970 "\n\n\nPress any key to continue...\n\n")))