• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.9.5/emacs-92/emacs/lisp/

Lines Matching +defs:dired +defs:mode +defs:map

47 ;; This mode is fully documented in the Emacs user's manual.
158 ;; - mode-line-string (file)
160 ;; If provided, this function should return the VC-specific mode line
164 ;; - dired-state-info (file)
167 ;; used in a vc-dired buffer. The default implementation deals well
358 ;; Invoked from a buffer in vc-annotate-mode, return the revision
457 (require 'dired) ; for dired-map-over-marks macro
458 (require 'dired-aux)) ; for dired-kill-{line,tree}
460 (if (not (assoc 'vc-parent-buffer minor-mode-alist))
461 (setq minor-mode-alist
463 minor-mode-alist)))
532 (defcustom vc-dired-listing-switches "-al"
533 "Switches passed to `ls' for vc-dired. MUST contain the `l' option."
538 (defcustom vc-dired-recurse t
544 (defcustom vc-dired-terse-display t
594 (defcustom vc-annotate-display-mode 'fullscale
595 "Which mode to color the output of \\[vc-annotate] with by default."
626 (defcustom vc-annotate-color-map
696 "Menu elements for the mode-specific menu of VC-Annotate mode.
701 (defvar vc-annotate-mode-map
711 "Local keymap used for VC-Annotate mode.")
727 '((nroff-mode ".\\\"" ""))
730 and `comment-end' variables. This will only be necessary if the mode language
756 ;; (either a file, or a VC dired buffer).
770 (defvar vc-dired-mode nil)
771 (make-variable-buffer-local 'vc-dired-mode)
894 (if vc-dired-mode
895 (set-buffer (find-file-noselect (dired-get-filename)))
1039 ;; rcs.el mode.
1078 ;; Use mark-marker to avoid confusion in transient-mark-mode.
1081 ;; Make the right thing happen in transient-mark-mode.
1161 ;; t means don't call normal-mode;
1190 (if vc-dired-mode
1214 (if visited (vc-mode-line file))
1319 (vc-mode-line file))
1326 (defvar vc-dired-window-configuration)
1328 (defun vc-next-action-dired (file rev comment)
1331 (let ((dired-buffer (current-buffer)))
1332 (dired-map-over-marks
1333 (let ((file (dired-get-filename)))
1336 (set-buffer dired-buffer)
1337 (set-window-configuration vc-dired-window-configuration)
1340 (dired-move-to-filename))
1348 If you call this from within a VC dired buffer with no files marked,
1351 If you call this from within a VC dired buffer, and one or more
1388 (if vc-dired-mode
1389 (let ((files (dired-get-marked-files)))
1390 (set (make-local-variable 'vc-dired-window-configuration)
1397 (vc-next-action-dired nil nil "dummy")
1400 'vc-next-action-dired))
1519 ;; TODO: Adjusting view mode might no longer be necessary
1524 (and view-mode
1526 (view-mode-exit)))
1527 (and (not view-mode)
1528 (not (eq (get major-mode 'mode-class) 'special))
1529 (view-mode-enter))))
1530 (vc-mode-line buffer-file-name))
1541 (vc-dired-resynch-file file))
1566 (if file (vc-mode-line file))
1647 that the version control system supports this mode of operation.
1686 ;; But not if it is a vc-dired buffer.
1688 (or vc-dired-mode (vc-buffer-sync)))
1717 (if vc-dired-mode
1718 (dired-move-to-filename))
1815 ;; Gnus-5.8.5 sets up an autoload for diff-mode, even if it's
1817 (if (require 'diff-mode nil t) (diff-mode))
1858 ;; CVS would do so diff-mode refers to
1968 (vc-mode-line file))
1998 (let* ((delims (cdr (assq major-mode vc-comment-alist)))
2079 (smerge-mode 1)
2085 ;; The VC directory major mode. Coopt Dired for this.
2088 (defvar vc-dired-switches)
2089 (defvar vc-dired-terse-mode)
2091 (defvar vc-dired-mode-map
2092 (let ((map (make-sparse-keymap))
2094 (define-key map "\C-xv" vmap)
2095 (define-key map "v" vmap)
2096 (set-keymap-parent vmap vc-prefix-map)
2097 (define-key vmap "t" 'vc-dired-toggle-terse-mode)
2098 map))
2100 (define-derived-mode vc-dired-mode dired-mode "Dired under VC"
2101 "The major mode used in VC directory buffers.
2115 ;; define-derived-mode does it for us in Emacs-21, but not in Emacs-20.
2116 ;; We do it here because dired might not be loaded yet
2117 ;; when vc-dired-mode-map is initialized.
2118 (set-keymap-parent vc-dired-mode-map dired-mode-map)
2119 (add-hook 'dired-after-readin-hook 'vc-dired-hook nil t)
2121 ;; because file lines look a bit different in vc-dired-mode
2155 (and (boundp 'vc-dired-switches)
2156 vc-dired-switches
2157 (set (make-local-variable 'dired-actual-switches)
2158 vc-dired-switches))
2159 (set (make-local-variable 'vc-dired-terse-mode) vc-dired-terse-display)
2160 (setq vc-dired-mode t))
2162 (defun vc-dired-toggle-terse-mode ()
2165 (if (not vc-dired-mode)
2167 (setq vc-dired-terse-mode (not vc-dired-terse-mode))
2168 (if vc-dired-terse-mode
2169 (vc-dired-hook)
2172 (defun vc-dired-mark-locked ()
2175 (dired-mark-if (let ((f (dired-get-filename nil t)))
2181 (define-key vc-dired-mode-map "*l" 'vc-dired-mark-locked)
2183 (defun vc-default-dired-state-info (backend file)
2192 (defun vc-dired-reformat-line (vc-info)
2195 This code, like dired, assumes UNIX -l format."
2205 (defun vc-dired-hook ()
2207 Called by dired after any portion of a vc-dired buffer has been read in."
2214 ((setq subdir (dired-get-subdir))
2226 ((setq filename (dired-get-filename nil t))
2234 (dired-kill-tree filename)
2236 (dired-kill-line)))
2237 (vc-dired-terse-mode
2238 ;; Don't show directories in terse mode. Don't use
2239 ;; dired-kill-line to remove it, because in recursive listings,
2244 (dired-kill-line))
2246 (vc-dired-reformat-line nil)
2250 (not (and vc-dired-terse-mode
2252 (vc-dired-reformat-line (vc-call dired-state-info filename))
2255 (dired-kill-line))))
2258 (vc-dired-purge))
2266 (defun vc-dired-purge ()
2269 (while (dired-get-subdir)
2271 (if (dired-get-filename nil t)
2272 (if (not (dired-next-subdir 1 t))
2275 (if (not (string= (dired-current-directory) default-directory))
2276 (dired-do-kill-lines t "")
2281 (if (not (dired-next-subdir 1 t))
2285 (defun vc-dired-buffers-for-dir (dir)
2286 "Return a list of all vc-dired buffers that currently display DIR."
2288 ;; Check whether dired is loaded.
2289 (when (fboundp 'dired-buffers-for-dir)
2292 (if vc-dired-mode
2294 (dired-buffers-for-dir dir)))
2297 (defun vc-dired-resynch-file (file)
2299 (let ((buffers (vc-dired-buffers-for-dir (file-name-directory file))))
2303 (if (dired-goto-file file)
2304 ;; bind vc-dired-terse-mode to nil so that
2306 (let ((vc-dired-terse-mode nil))
2307 (dired-do-redisplay 1)))))
2317 `dired-listing-switches' when generating the listing."
2319 (let ((vc-dired-switches (concat vc-dired-listing-switches
2320 (if vc-dired-recurse "R" ""))))
2324 (setq vc-dired-switches
2326 vc-dired-switches)))
2327 (require 'dired)
2328 (require 'dired-aux)
2330 (dired-internal-noselect (expand-file-name (file-name-as-directory dir))
2331 vc-dired-switches
2332 'vc-dired-mode))))
2453 (log-view-mode)
2666 (vc-mode-line file)
2667 (vc-dired-resynch-file file))
2719 (vc-mode-line file)))
2776 (vc-mode-line file)
2872 (vc-mode-line new)
2971 ;; annotate-mode, which replaces it with the more sensible "span-to
2979 (defvar vc-annotate-parent-display-mode nil)
2985 (define-derived-mode vc-annotate-mode fundamental-mode "Annotate"
2986 "Major mode for output buffers of the `vc-annotate' command.
2988 You can use the mode-specific menu to alter the time-span of the used
2994 (view-mode 1))
2998 The color range is given by `vc-annotate-color-map', scaled by RATIO.
3000 (interactive (progn (kill-local-variable 'vc-annotate-color-map) '(1.0)))
3005 (defun vc-annotate-oldest-in-map (color-map)
3008 (caar (last color-map)))
3011 "Highlight the output of \\[vc-annotate] using an autoscaled color map.
3012 Autoscaling means that the map is scaled from the current time to the
3033 (vc-annotate-oldest-in-map vc-annotate-color-map))
3043 (easy-menu-define vc-annotate-mode-menu vc-annotate-mode-map
3046 ["By Color Map Range" (unless (null vc-annotate-display-mode)
3047 (setq vc-annotate-display-mode nil)
3049 :style toggle :selected (null vc-annotate-display-mode)]
3050 ,@(let ((oldest-in-map (vc-annotate-oldest-in-map vc-annotate-color-map)))
3052 (let ((days (* element oldest-in-map)))
3056 (eql vc-annotate-display-mode ,days) ]))
3063 (unless (eq vc-annotate-display-mode 'scale)
3066 (eq vc-annotate-display-mode 'scale)]
3068 (unless (eq vc-annotate-display-mode 'fullscale)
3071 (eq vc-annotate-display-mode 'fullscale)]
3081 (defun vc-annotate-display-select (&optional buffer mode)
3084 BUFFER. `vc-annotate-display-mode' specifies the highlighting mode to
3087 (if mode (setq vc-annotate-display-mode mode))
3089 (cond ((null vc-annotate-display-mode)
3090 ;; The ratio is global, thus relative to the global color-map.
3091 (kill-local-variable 'vc-annotate-color-map)
3094 ((eq vc-annotate-display-mode 'scale)
3096 ((eq vc-annotate-display-mode 'fullscale)
3098 ((numberp vc-annotate-display-mode) ; A fixed number of days lookback
3100 (/ vc-annotate-display-mode
3101 (vc-annotate-oldest-in-map vc-annotate-color-map))))
3102 (t (error "No such display mode: %s"
3103 vc-annotate-display-mode))))
3106 (defun vc-annotate (file rev &optional display-mode buf)
3128 mode-specific menu. `vc-annotate-color-map' and
3141 vc-annotate-display-mode
3146 (setq vc-annotate-display-mode display-mode) ;Not sure why. --Stef
3163 ;; we must setup the mode first, and then set our local
3167 (if (not (equal major-mode 'vc-annotate-mode))
3168 (vc-annotate-mode))
3172 (set (make-local-variable 'vc-annotate-parent-display-mode)
3173 display-mode)))
3197 (if (not (equal major-mode 'vc-annotate-mode))
3206 ;; This function must be invoked from a buffer in vc-annotate-mode
3212 (if (not (equal major-mode 'vc-annotate-mode))
3224 (if (not (equal major-mode 'vc-annotate-mode))
3237 (if (not (equal major-mode 'vc-annotate-mode))
3247 (if (not (equal major-mode 'vc-annotate-mode))
3270 (if (not (equal major-mode 'vc-annotate-mode))
3299 vc-annotate-parent-display-mode
3341 RATIO, is the expansion that should be applied to `vc-annotate-color-map'.
3344 (set (make-local-variable 'vc-annotate-color-map)
3346 vc-annotate-color-map)))
3348 (font-lock-mode 1))
3354 (let* ((color (or (vc-annotate-compcar difference vc-annotate-color-map)
3401 ;; If FILE is nil, we were called from vc-dired.
3404 (dired-get-marked-files t)))))