115 |
("customize" (customize-group "viper")) |
("customize" (customize-group "viper")) |
116 |
("delete" (ex-delete)) |
("delete" (ex-delete)) |
117 |
("edit" (ex-edit)) |
("edit" (ex-edit)) |
118 |
("file" (viper-info-on-file)) |
("file" (ex-set-visited-file-name)) |
119 |
("g" "global") |
("g" "global") |
120 |
("global" (ex-global nil) is-mashed) |
("global" (ex-global nil) is-mashed) |
121 |
("goto" (ex-goto)) |
("goto" (ex-goto)) |
2232 |
(kill-buffer " *viper-info*"))) |
(kill-buffer " *viper-info*"))) |
2233 |
)) |
)) |
2234 |
|
|
2235 |
|
|
2236 |
|
;; Without arguments displays info on file. With an arg, sets the visited file |
2237 |
|
;; name to that arg |
2238 |
|
(defun ex-set-visited-file-name () |
2239 |
|
(viper-get-ex-file) |
2240 |
|
(if (string= ex-file "") |
2241 |
|
(viper-info-on-file) |
2242 |
|
;; If ex-file is a directory, use the file portion of the buffer |
2243 |
|
;; file name (like ex-write). Do this even if ex-file is a |
2244 |
|
;; non-existent directory, since set-visited-file-name signals an |
2245 |
|
;; error on this condition, too. |
2246 |
|
(if (and (string= (file-name-nondirectory ex-file) "") |
2247 |
|
buffer-file-name |
2248 |
|
(not (file-directory-p buffer-file-name))) |
2249 |
|
(setq ex-file (concat (file-name-as-directory ex-file) |
2250 |
|
(file-name-nondirectory buffer-file-name)))) |
2251 |
|
(set-visited-file-name ex-file))) |
2252 |
|
|
2253 |
|
|
2254 |
;; display all variables set through :set |
;; display all variables set through :set |
2255 |
(defun ex-show-vars () |
(defun ex-show-vars () |
2256 |
(with-output-to-temp-buffer " *viper-info*" |
(with-output-to-temp-buffer " *viper-info*" |