From: Dan Nicolaescu Date: Thu, 28 Feb 2008 03:35:22 +0000 (+0000) Subject: * progmodes/hideshow.el (hs-minor-mode-menu): Add some options to X-Git-Tag: emacs-pretest-23.0.90~7606 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=76cdeb7d292113ddc73ab22032864d2b02f8d3ab;p=emacs.git * progmodes/hideshow.el (hs-minor-mode-menu): Add some options to the menu. * vc.el (vc-deduce-fileset, vc-next-action, vc-start-entry) (vc-finish-logentry): Check for vc-status-mode, not only for vc-dired-mode. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index b8adc68d0eb..6985c85107b 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,12 @@ +2008-02-28 Dan Nicolaescu + + * progmodes/hideshow.el (hs-minor-mode-menu): Add some options to + the menu. + + * vc.el (vc-deduce-fileset, vc-next-action, vc-start-entry) + (vc-finish-logentry): Check for vc-status-mode, not only for + vc-dired-mode. + 2008-02-28 Kenichi Handa * isearch.el (isearch-printing-char): Don't check diff --git a/lisp/progmodes/hideshow.el b/lisp/progmodes/hideshow.el index 48a32761c27..2b8e2ec0089 100644 --- a/lisp/progmodes/hideshow.el +++ b/lisp/progmodes/hideshow.el @@ -232,8 +232,6 @@ ;;; Code: -(require 'easymenu) - ;;--------------------------------------------------------------------------- ;; user-configurable variables @@ -368,11 +366,30 @@ Use the command `hs-minor-mode' to toggle or set this variable.") ["Hide All" hs-hide-all :help "Hide all the blocks in the buffer"] ["Show All" hs-show-all - :help "Show all the clocks in the buffer"] + :help "Show all the blocks in the buffer"] ["Hide Level" hs-hide-level :help "Hide all block at levels below the current block"] ["Toggle Hiding" hs-toggle-hiding - :help "Toggle the hiding state of the current block"])) + :help "Toggle the hiding state of the current block"] + "----" + ["Hide comments when hiding all" + (setq hs-hide-comments-when-hiding-all + (not hs-hide-comments-when-hiding-all)) + :help "If t also hide comment blocks when doing `hs-hide-all'" + :style toggle :selected hs-hide-comments-when-hiding-all] + ("Reveal on isearch" + ["Code blocks" (setq hs-isearch-open 'code) + :help "Show hidden code blocks when isearch matches inside them" + :active t :style radio :selected (eq hs-isearch-open 'code)] + ["Comment blocks" (setq hs-isearch-open 'comment) + :help "Show hidden comment blocks when isearch matches inside them" + :active t :style radio :selected (eq hs-isearch-open 'comment)] + ["Code and Comment blocks" (setq hs-isearch-open t) + :help "Show both hidden code and comment blocks when isearch matches inside them" + :active t :style radio :selected (eq hs-isearch-open 'comment)] + ["None" (setq hs-isearch-open nil) + :help "Do not hidden code or comment blocks when isearch matches inside them" + :active t :style radio :selected (eq hs-isearch-open nil)]))) (defvar hs-c-start-regexp nil "Regexp for beginning of comments. diff --git a/lisp/vc.el b/lisp/vc.el index c0ceff58449..8e4ace739c3 100644 --- a/lisp/vc.el +++ b/lisp/vc.el @@ -595,7 +595,10 @@ ;; adjustments. ;; ;; - when changing a file whose directory is shown in the vc-status -;; buffer, it should be added there are "modified". (PCL-CVS does this). +;; buffer, it should be added there as "modified". (PCL-CVS does this). +;; +;; - Update the vc-status buffers after vc operations, implement the +;; equivalent of vc-dired-resynch-file. ;; ;; - vc-status needs a toolbar. ;; @@ -1407,7 +1410,7 @@ Otherwise, throw an error." (list buffer-file-name)) ((and vc-parent-buffer (or (buffer-file-name vc-parent-buffer) (with-current-buffer vc-parent-buffer - vc-dired-mode))) + (or vc-dired-mode (eq major-mode 'vc-status-mode))))) (progn (set-buffer vc-parent-buffer) (vc-deduce-fileset))) @@ -1541,7 +1544,7 @@ merge in the changes into your working copy." (dolist (file files) (let ((visited (get-file-buffer file))) (when visited - (if vc-dired-mode + (if (or vc-dired-mode (eq major-mode 'vc-status-mode)) (switch-to-buffer-other-window visited) (set-buffer visited)) ;; Check relation of buffer and file, and make sure @@ -1811,7 +1814,7 @@ empty comment. Remember the file's buffer in `vc-parent-buffer' \(current one if no file). AFTER-HOOK specifies the local value for `vc-log-after-operation-hook'." (let ((parent - (if (eq major-mode 'vc-dired-mode) + (if (or (eq major-mode 'vc-dired-mode) (eq major-mode 'vc-status-mode)) ;; If we are called from VC dired, the parent buffer is ;; the current buffer. (current-buffer) @@ -1951,7 +1954,7 @@ the buffer contents as a comment." ;; Sync parent buffer in case the user modified it while editing the comment. ;; But not if it is a vc-dired buffer. (with-current-buffer vc-parent-buffer - (or vc-dired-mode (vc-buffer-sync))) + (or vc-dired-mode (eq major-mode 'vc-status-mode) (vc-buffer-sync))) (if (not vc-log-operation) (error "No log operation is pending")) ;; save the parameters held in buffer-local variables @@ -1983,7 +1986,7 @@ the buffer contents as a comment." (mapc (lambda (file) (vc-resynch-buffer file vc-keep-workfiles t)) log-fileset)) - (if vc-dired-mode + (if (or vc-dired-mode (eq major-mode 'vc-status-mode)) (dired-move-to-filename)) (run-hooks after-hook 'vc-finish-logentry-hook)))