From def61be2348d06f8e43b615aeb4f061dd2b932ef Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Mon, 16 Jun 2008 08:55:56 +0000 Subject: [PATCH] (log-view-per-file-logs): Pacify byte compiler. --- lisp/ChangeLog | 19 +++++++++++-------- lisp/vc-bzr.el | 21 +++++++++++---------- lisp/vc-svn.el | 6 ++++-- 3 files changed, 26 insertions(+), 20 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 16318fa55be..6fcc5e42621 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2008-06-16 Juanma Barranquero + + * vc-bzr.el (log-view-per-file-logs): + * vc-svn.el (log-view-per-file-logs): Pacify byte compiler. + 2008-06-15 Chong Yidong * mouse.el (mouse-appearance-menu-map): New var. @@ -44,17 +49,16 @@ 2008-06-15 Michael Albinus - * net/tramp.el (tramp-handle-start-file-process): Clear - modification time of the connection buffer. - (tramp-sh-file-name-handler): Reset `tramp-locked' in case of - error. + * net/tramp.el (tramp-handle-start-file-process): + Clear modification time of the connection buffer. + (tramp-sh-file-name-handler): Reset `tramp-locked' in case of error. (tramp-open-connection-setup-interactive-shell): Flush cache, and restart `tramp-maybe-open-connection' when the remote system has been changed. Throw 'uname-changed event. (tramp-maybe-open-connection): Catch it. - * net/tramp-cmds.el (tramp-cleanup-all-connections): Reset - `tramp-locked'. + * net/tramp-cmds.el (tramp-cleanup-all-connections): + Reset `tramp-locked'. 2008-06-15 Ulf Jasper @@ -66,8 +70,7 @@ Remove window dedication. (newsticker--group-manage-orphan-feeds): Handle ill-valued newsticker-groups. - (newsticker--treeview-tree-expand): Don't manage orphan feeds - here. + (newsticker--treeview-tree-expand): Don't manage orphan feeds here. 2008-06-15 Andreas Schwab diff --git a/lisp/vc-bzr.el b/lisp/vc-bzr.el index 77593f0a2d3..bcf86a4b169 100644 --- a/lisp/vc-bzr.el +++ b/lisp/vc-bzr.el @@ -213,7 +213,7 @@ Invoke the bzr command adding `BZR_PROGRESS_BAR=none' and (lexical-let* ((filename* (expand-file-name filename)) (rootdir (vc-bzr-root filename*))) - (when rootdir + (when rootdir (file-relative-name filename* rootdir)))) (defun vc-bzr-status (file) @@ -325,18 +325,18 @@ If any error occurred in running `bzr status', then return nil." ;; May break if they change their format. (if (file-exists-p branch-format-file) (with-temp-buffer - (insert-file-contents branch-format-file) + (insert-file-contents branch-format-file) (goto-char (point-min)) (cond ((or (looking-at "Bazaar-NG branch, format 0.0.4") (looking-at "Bazaar-NG branch format 5")) ;; count lines in .bzr/branch/revision-history - (insert-file-contents revhistory-file) + (insert-file-contents revhistory-file) (number-to-string (count-lines (line-end-position) (point-max)))) ((looking-at "Bazaar Branch Format 6 (bzr 0.15)") ;; revno is the first number in .bzr/branch/last-revision - (insert-file-contents lastrev-file) + (insert-file-contents lastrev-file) (if (re-search-forward "[0-9]+" nil t) (buffer-substring (match-beginning 0) (match-end 0)))))) ;; fallback to calling "bzr revno" @@ -423,6 +423,7 @@ REV non-nil gets an error." (defvar log-view-file-re) (defvar log-view-font-lock-keywords) (defvar log-view-current-tag-function) +(defvar log-view-per-file-logs) (define-derived-mode vc-bzr-log-view-mode log-view-mode "Bzr-Log-View" (remove-hook 'log-view-mode-hook 'vc-bzr-log-view-mode) ;Deactivate the hack. @@ -469,7 +470,7 @@ REV non-nil gets an error." (let (case-fold-search) (if (re-search-forward ;; "revno:" can appear either at the beginning of a line, or indented. - (concat "^[ ]*-+\n[ ]*revno: " + (concat "^[ ]*-+\n[ ]*revno: " ;; The revision can contain ".", quote it so that it ;; does not interfere with regexp matching. (regexp-quote revision) "$") nil t) @@ -480,14 +481,14 @@ REV non-nil gets an error." "VC bzr backend for diff." ;; `bzr diff' exits with code 1 if diff is non-empty. (apply #'vc-bzr-command "diff" (or buffer "*vc-diff*") 'async files - "--diff-options" (mapconcat 'identity + "--diff-options" (mapconcat 'identity (vc-diff-switches-list bzr) " ") ;; This `when' is just an optimization because bzr-1.2 is *much* ;; faster when the revision argument is not given. (when (or rev1 rev2) (list "-r" (format "%s..%s" - (or rev1 "revno:-1") + (or rev1 "revno:-1") (or rev2 "")))))) @@ -568,12 +569,12 @@ stream. Standard error output is discarded." (defun vc-bzr-prettify-state-info (file) "Bzr-specific version of `vc-prettify-state-info'." (if (eq 'edited (vc-state file)) - (concat "(" (symbol-name (or (vc-file-getprop file 'vc-bzr-state) + (concat "(" (symbol-name (or (vc-file-getprop file 'vc-bzr-state) 'edited)) ")") ;; else fall back to default vc.el representation (vc-default-prettify-state-info 'Bzr file))) -;; XXX: this needs testing, it's probably incomplete. +;; XXX: this needs testing, it's probably incomplete. (defun vc-bzr-after-dir-status (update-function) (let ((status-str nil) (translation '(("+N" . added) @@ -608,7 +609,7 @@ stream. Standard error output is discarded." (setf (nth 1 entry) 'conflict))) (push (list (buffer-substring-no-properties (+ (point) 4) - (line-end-position)) + (line-end-position)) translated) result)) (forward-line)) (funcall update-function result))) diff --git a/lisp/vc-svn.el b/lisp/vc-svn.el index 9f116a3c964..a311c5e1cae 100644 --- a/lisp/vc-svn.el +++ b/lisp/vc-svn.el @@ -177,7 +177,7 @@ RESULT is a list of conses (FILE . STATE) for directory DIR." "Generate extra status headers for a Subversion working copy." (vc-svn-command "*vc*" 0 nil "info") (let ((repo - (save-excursion + (save-excursion (and (progn (set-buffer "*vc*") (goto-char (point-min)) @@ -407,7 +407,7 @@ or svn+ssh://." (progn (unless (vc-do-command "*vc*" 0 "svnadmin" nil - "setlog" "--bypass-hooks" directory + "setlog" "--bypass-hooks" directory "-r" rev (format "%s" tempfile)) (error "Log edit failed")) (delete-file tempfile)) @@ -425,6 +425,8 @@ or svn+ssh://." ;;; History functions ;;; +(defvar log-view-per-file-logs) + (define-derived-mode vc-svn-log-view-mode log-view-mode "SVN-Log-View" (require 'add-log) (set (make-local-variable 'log-view-per-file-logs) nil))