Commit acb323a9 authored by David Byers's avatar David Byers
Browse files

Prefix key to toggle cache use by review commands.

Detailed changes:
> 2005-01-12  David Byers  <byers@lysator.liu.se>
>
> 	* swedish-strings.el (lyskom-sv-mode-map): Added M-c for
> 	kom-toggle-cache-prefix.
>
> 	* english-strings.el (lyskom-en-mode-map): Same.
>
> 	* review.el (kom-toggle-cache-prefix): New function. M-c will
> 	toggle whether review uses the cache or not (like M-m toggles if
> 	review marks as read).
>
parent 7c3fb478
2005-01-12 David Byers <byers@lysator.liu.se>
* swedish-strings.el (lyskom-sv-mode-map): Added M-c for
kom-toggle-cache-prefix.
* english-strings.el (lyskom-en-mode-map): Same.
* review.el (kom-toggle-cache-prefix): New function. M-c will
toggle whether review uses the cache or not (like M-m toggles if
review marks as read).
2005-01-12 Pontus Freyhult <pont@soua.net> 2005-01-12 Pontus Freyhult <pont@soua.net>
Fix bug 1402: Fix bug 1402:
......
...@@ -1931,6 +1931,9 @@ Unknown variables may be the result of saving your settings in version ...@@ -1931,6 +1931,9 @@ Unknown variables may be the result of saving your settings in version
(review-marking-as-read . "Review marks as read") (review-marking-as-read . "Review marks as read")
(review-not-marking-as-read . "Review does not mark as read") (review-not-marking-as-read . "Review does not mark as read")
(review-using-cache . "Review uses cache")
(review-not-using-cache . "Review doesn't use cache")
(using-ssh-connection . "Using ssh connection to %#1s...") (using-ssh-connection . "Using ssh connection to %#1s...")
(opening-ssh-connection . "Opening ssh connection to %#1s...") (opening-ssh-connection . "Opening ssh connection to %#1s...")
(ssh-cant-connect . "Unable to open ssh connection: %s") (ssh-cant-connect . "Unable to open ssh connection: %s")
...@@ -2658,6 +2661,7 @@ Change privileges for %#1P (%#1p)...") ...@@ -2658,6 +2661,7 @@ Change privileges for %#1P (%#1p)...")
(define-key lyskom-en-mode-map (kbd "u") 'lyskom-en-unread-prefix) (define-key lyskom-en-mode-map (kbd "u") 'lyskom-en-unread-prefix)
(define-key lyskom-en-mode-map (kbd "M-m") 'kom-toggle-mark-as-read-prefix) (define-key lyskom-en-mode-map (kbd "M-m") 'kom-toggle-mark-as-read-prefix)
(define-key lyskom-sv-mode-map (kbd "M-c") 'kom-toggle-cache-prefix)
(define-key lyskom-en-mode-map (kbd (lyskom-keys 'button2)) 'kom-button-click) (define-key lyskom-en-mode-map (kbd (lyskom-keys 'button2)) 'kom-button-click)
(define-key lyskom-en-mode-map (kbd (lyskom-keys 'button3)) 'kom-popup-menu) (define-key lyskom-en-mode-map (kbd (lyskom-keys 'button3)) 'kom-popup-menu)
......
...@@ -104,6 +104,21 @@ kom-review-marks-texts-as-read toggled." ...@@ -104,6 +104,21 @@ kom-review-marks-texts-as-read toggled."
(when (commandp command) (when (commandp command)
(call-interactively command)))) (call-interactively command))))
(defun kom-toggle-cache-prefix ()
"Read one key sequence and run one command with state of
kom-review-marks-texts-as-read toggled."
(interactive)
(let* ((kom-review-uses-cache (not kom-review-uses-cache))
(sequence (read-key-sequence
(format "%s: "
(lyskom-get-string
(if kom-review-uses-cache
'review-using-cache
'review-not-using-cache)))))
(command (lookup-key (current-local-map) sequence)))
(when (commandp command)
(call-interactively command))))
;;; ================================================================ ;;; ================================================================
;;; ]terse av, till - Review by X to Conference Y. ;;; ]terse av, till - Review by X to Conference Y.
......
...@@ -1973,6 +1973,9 @@ version %#3s av elispklienten, medan detta ...@@ -1973,6 +1973,9 @@ version %#3s av elispklienten, medan detta
(review-marking-as-read . "terse lsmarkerar") (review-marking-as-read . "terse lsmarkerar")
(review-not-marking-as-read . "terse lsmarkerar inte") (review-not-marking-as-read . "terse lsmarkerar inte")
(review-using-cache . "terse anvnder cache")
(review-not-using-cache . "terse anvnder inte cache")
(using-ssh-connection . "Anvnder ssh-uppkoppling till %#1s...") (using-ssh-connection . "Anvnder ssh-uppkoppling till %#1s...")
(opening-ssh-connection . "ppnar ssh-uppkoppling till %#1s...") (opening-ssh-connection . "ppnar ssh-uppkoppling till %#1s...")
(ssh-cant-connect . "Kan inte gra ssh-uppkopplingen: %s") (ssh-cant-connect . "Kan inte gra ssh-uppkopplingen: %s")
...@@ -2724,6 +2727,7 @@ Nuvarande r ...@@ -2724,6 +2727,7 @@ Nuvarande r
(lyskom-try-define-key lyskom-sv-mode-map [3941] 'lyskom-sv-review-prefix) (lyskom-try-define-key lyskom-sv-mode-map [3941] 'lyskom-sv-review-prefix)
(define-key lyskom-sv-mode-map (kbd "M-m") 'kom-toggle-mark-as-read-prefix) (define-key lyskom-sv-mode-map (kbd "M-m") 'kom-toggle-mark-as-read-prefix)
(define-key lyskom-sv-mode-map (kbd "M-c") 'kom-toggle-cache-prefix)
(define-key lyskom-sv-mode-map (kbd (lyskom-keys 'button2)) 'kom-button-click) (define-key lyskom-sv-mode-map (kbd (lyskom-keys 'button2)) 'kom-button-click)
(define-key lyskom-sv-mode-map (kbd (lyskom-keys 'button3)) 'kom-popup-menu) (define-key lyskom-sv-mode-map (kbd (lyskom-keys 'button3)) 'kom-popup-menu)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment