• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.10/emacs-93/emacs/lisp/emulation/

Lines Matching +defs:buffer +defs:file +defs:type

9 ;; This file is part of GNU Emacs.
22 ;; along with GNU Emacs; see the file COPYING. If not, write to the
53 (make-variable-buffer-local 'vip-emacs-local-map)
54 (make-variable-buffer-local 'vip-insert-local-map)
60 (make-variable-buffer-local 'vip-insert-point)
66 (make-variable-buffer-local 'vip-com-point)
71 (make-variable-buffer-local 'vip-current-mode)
74 (defvar vip-emacs-mode-line-buffer-identification nil
75 "Value of mode-line-buffer-identification in Emacs mode within vip.")
76 (make-variable-buffer-local 'vip-emacs-mode-line-buffer-identification)
77 (setq-default vip-emacs-mode-line-buffer-identification
82 \(buffer specific\)")
84 (make-variable-buffer-local 'vip-current-major-mode)
97 :type 'integer
102 :type 'boolean
122 :type 'boolean
127 :type 'boolean
138 :type 'boolean
143 :type 'boolean
148 :type 'boolean
154 :type 'boolean
160 (defvar vip-tags-file-name "TAGS")
164 (defvar vip-startup-file (convert-standard-filename "~/.vip")
165 "Filename used as startup file for vip.")
235 (define-key vip-mode-map "K" 'vip-kill-buffer)
243 (define-key vip-mode-map "S" 'vip-switch-to-buffer-other-window)
246 (define-key vip-mode-map "V" 'vip-find-file-other-window)
265 (define-key vip-mode-map "g" 'vip-info-on-file)
277 (define-key vip-mode-map "s" 'vip-switch-to-buffer)
280 (define-key vip-mode-map "v" 'vip-find-file)
308 (define-key ctl-x-map "7" 'vip-buffer-in-two-windows)
360 vip-emacs-mode-line-buffer-identification
361 mode-line-buffer-identification
370 vip-emacs-mode-line-buffer-identification
371 mode-line-buffer-identification
392 "If BEG and END do not belong to the same buffer, it copies empty region."
400 (setq mode-line-buffer-identification
402 vip-emacs-mode-line-buffer-identification
411 (switch-to-buffer "VIP Startup Message")
412 (erase-buffer)
422 This startup message appears whenever you load VIP unless you type `y' now.
428 (set-buffer
429 (find-file-noselect
430 (substitute-in-file-name vip-startup-file)))
433 (save-buffer)
434 (kill-buffer (current-buffer)))
437 (kill-buffer (current-buffer))
668 START and END are buffer positions indicating what to append."
670 (buffer-substring start end))))
1137 of buffer, stop and signal error."
1146 beginning of buffer, stop and signal error."
1316 "Go to ARG's line. Without ARG go to end of buffer."
1465 (string= (buffer-name (current-buffer)) " *Minibuf-1*")
1625 (defun vip-buffer-in-two-windows ()
1626 "Show current buffer in two windows."
1734 (defun vip-switch-to-buffer ()
1735 "Switch to buffer in the current window."
1737 (let (buffer)
1738 (setq buffer
1739 (read-buffer
1740 (format "switch to buffer \(%s\): "
1741 (buffer-name (other-buffer (current-buffer))))))
1742 (switch-to-buffer buffer)
1745 (defun vip-switch-to-buffer-other-window ()
1746 "Switch to buffer in another window."
1748 (let (buffer)
1749 (setq buffer
1750 (read-buffer
1751 (format "Switch to buffer \(%s\): "
1752 (buffer-name (other-buffer (current-buffer))))))
1753 (switch-to-buffer-other-window buffer)
1756 (defun vip-kill-buffer ()
1757 "Kill a buffer."
1759 (let (buffer buffer-name)
1760 (setq buffer-name
1761 (read-buffer
1762 (format "Kill buffer \(%s\): "
1763 (buffer-name (current-buffer)))))
1764 (setq buffer
1765 (if (null buffer-name)
1766 (current-buffer)
1767 (get-buffer buffer-name)))
1768 (if (null buffer) (error "Buffer %s nonexistent" buffer-name))
1769 (if (or (not (buffer-modified-p buffer))
1771 (kill-buffer buffer)
1774 (defun vip-find-file ()
1775 "Visit file in the current window."
1777 (let (file)
1778 (setq file (read-file-name "visit file: "))
1779 (switch-to-buffer (find-file-noselect file))
1782 (defun vip-find-file-other-window ()
1783 "Visit file in another window."
1785 (let (file)
1786 (setq file (read-file-name "Visit file: "))
1787 (switch-to-buffer-other-window (find-file-noselect file))
1790 (defun vip-info-on-file ()
1791 "Give information of the file associated to the current buffer."
1794 (if (buffer-file-name) (buffer-file-name) "")
1908 (vip-read-string (format "%s => " (buffer-substring beg end))))
1950 (defun vip-mark-beginning-of-buffer ()
1955 (message "mark set at the beginning of buffer"))
1957 (defun vip-mark-end-of-buffer ()
1962 (message "mark set at the end of buffer"))
1968 ((= char ?<) (vip-mark-beginning-of-buffer))
1969 ((= char ?>) (vip-mark-end-of-buffer))
1989 (let ((buff (current-buffer)))
1995 (if (equal buff (current-buffer))
2000 (switch-to-buffer buff)
2057 (defvar ex-token-type nil
2058 "type of token. if non-nil, gives type of address. if nil, it
2070 (defvar ex-buffer nil
2071 "name of ex buffer")
2097 (defvar ex-file nil)
2120 (setq ex-token-type "non-command"))))
2126 (setq ex-token-type "command")
2127 (setq ex-token (buffer-substring (point) (mark)))
2133 ((looking-at "[bh]") (setq ex-token-type "non-command"))
2141 ((looking-at "f") (vip-check-sub "file"))
2190 a token has type \(command, address, end-mark\) and value."
2192 (set-buffer " *ex-working-space*")
2195 (setq ex-token-type "command")
2201 (setq ex-token-type "dot"))
2205 (setq ex-token-type
2206 (cond ((string= ex-token-type "plus") "add-number")
2207 ((string= ex-token-type "minus") "sub-number")
2209 (setq ex-token (string-to-number (buffer-substring (point) (mark)))))
2212 (setq ex-token-type "end"))
2215 (setq ex-token-type "whole"))
2221 (setq ex-token-type "plus"))
2224 (setq ex-token-type "plus"))
2232 (setq ex-token-type "minus"))
2235 (setq ex-token-type "minus"))
2248 (setq ex-token (buffer-substring (point) (mark)))
2250 (setq ex-token-type "search-forward"))
2262 (setq ex-token-type "search-backward")
2263 (setq ex-token (buffer-substring (1- (point)) (mark))))
2266 (setq ex-token-type "comma"))
2269 (setq ex-token-type "semi-colon"))
2271 (setq ex-token-type "command")
2275 (setq ex-token-type "goto-mark")
2282 (setq ex-token-type "end-mark")
2296 (set-buffer (get-buffer-create " *ex-working-space*"))
2300 (setq ex-token-type "")
2304 (cond ((or (string= ex-token-type "command")
2305 (string= ex-token-type "end-mark"))
2316 (set-buffer " *ex-working-space*")
2323 ((string= ex-token-type "non-command")
2325 ((string= ex-token-type "whole")
2328 ((string= ex-token-type "comma")
2331 ((string= ex-token-type "semi-colon")
2341 (set-buffer " *ex-working-space*")
2361 (buffer-substring (1- (point)) (mark))))
2368 (set-buffer " *ex-working-space*")
2373 (if (string= ex-token-type "non-command")
2383 (set-buffer " *ex-working-space*")
2397 "compute default addresses. whole-flag means whole buffer."
2414 (cond ((string= ex-token-type "command")
2421 ((string= ex-token-type "end-mark")
2423 ((string= ex-token-type "whole")
2425 ((string= ex-token-type "comma")
2435 (cond ((string= ex-token-type "dot")
2437 ((string= ex-token-type "add-number")
2442 ((string= ex-token-type "sub-number")
2447 ((string= ex-token-type "abs-number")
2453 ((string= ex-token-type "end")
2455 ((string= ex-token-type "plus") t);; do nothing
2456 ((string= ex-token-type "minus") t);; do nothing
2457 ((string= ex-token-type "search-forward")
2461 ((string= ex-token-type "search-backward")
2465 ((string= ex-token-type "goto-mark")
2486 (defun vip-get-ex-buffer ()
2487 "get a buffer name and set ex-count and ex-flag if found"
2488 (setq ex-buffer nil)
2492 (set-buffer " *ex-working-space*")
2496 (setq ex-buffer (following-char))
2503 (setq ex-count (string-to-number (buffer-substring (point) (mark))))
2517 (set-buffer " *ex-working-space*")
2528 (setq ex-count (string-to-number (buffer-substring (point) (mark))))
2537 (defun vip-get-ex-file ()
2538 "get a file name and set ex-variant, ex-append and ex-offset if found"
2539 (setq ex-file nil
2544 (set-buffer " *ex-working-space*")
2563 (setq ex-offset (buffer-substring (point) (mark)))
2569 (setq ex-file (buffer-substring (point) (mark)))))
2577 ((string= ex-token "file") (vip-info-on-file))
2650 (with-output-to-temp-buffer "*copy text*"
2654 (buffer-substring (point) (mark)))))
2658 (save-excursion (kill-buffer "*copy text*")))
2660 (save-excursion (kill-buffer "*copy text*"))
2671 (vip-get-ex-buffer)
2686 (with-output-to-temp-buffer " *delete text*"
2687 (princ (buffer-substring (point) (mark))))
2691 (save-excursion (kill-buffer " *delete text*"))
2693 (save-excursion (kill-buffer " *delete text*")))
2694 (if ex-buffer
2695 (if (and (<= ?A ex-buffer) (<= ex-buffer ?Z))
2697 (+ ex-buffer 32) (point) (mark))
2698 (copy-to-register ex-buffer (point) (mark) nil)))
2703 (vip-get-ex-file)
2704 (if (and (not ex-variant) (buffer-modified-p) buffer-file-name)
2707 (set-buffer
2708 (find-file-noselect (concat default-directory ex-file)))
2714 (set-buffer " *ex-working-space*")
2767 (set-buffer " *ex-working-space*")
2768 (setq com-str (buffer-substring (1+ (point)) (1- (point-max)))))
2796 (with-output-to-temp-buffer " *text*"
2797 (princ (buffer-substring (point) (mark))))
2804 (save-excursion (kill-buffer " *text*")))
2835 (set-buffer " *ex-working-space*")
2855 (set-buffer " *ex-working-space*")
2863 (end-of-buffer))
2865 (setq string (buffer-substring (mark) (point))))
2881 (set-buffer " *ex-working-space*")
2895 (vip-get-ex-buffer)
2896 (setq vip-use-register ex-buffer)
2904 (set-buffer " *ex-working-space*")
2912 (variant nil) command file)
2917 (set-buffer " *ex-working-space*")
2926 (setq command (buffer-substring (mark) (point))))
2930 (setq file (buffer-substring (point) (mark)))))
2934 (insert-file file)))))
3015 (set-buffer " *ex-working-space*")
3019 (setq tag (buffer-substring (mark) (point))))
3035 (vip-get-ex-file)
3036 (if (string= ex-file "")
3038 (if (null buffer-file-name)
3039 (error "No file associated with this buffer"))
3040 (setq ex-file buffer-file-name))
3041 (setq ex-file (expand-file-name ex-file)))
3042 (if (and (not (string= ex-file (buffer-file-name)))
3043 (file-exists-p ex-file)
3045 (error "\"%s\" File exists - use w! to override" ex-file))
3050 (write-region (point) (mark) ex-file ex-append t)))
3051 (if (null buffer-file-name) (setq buffer-file-name ex-file))
3057 (vip-get-ex-buffer)
3071 (if ex-buffer
3072 (copy-to-register ex-buffer (point) (mark) nil))
3079 (set-buffer " *ex-working-space*")
3083 (setq command (buffer-substring (mark) (point))))
3102 (if (file-exists-p vip-startup-file) (load vip-startup-file))