Commit b3c891cf authored by Per Cederqvist's avatar Per Cederqvist
Browse files

New command: "View URL".

* commands2.el (kom-view-url-in-text): New command.

* vars.el.in (lyskom-commands): Added kom-view-url-in-text.

* swedish-strings.el (lyskom-command): Add kom-view-url-in-text as
"Visa URL".
(lyskom-sv-mode-map): Bind "vu" to "Visa URL".

* english-strings.el (lyskom-command): Add kom-view-url-in-text as
"View URL".
(lyskom-en-view-prefix): New prefix, bound to "v".
(lyskom-en-mode-map): Bind "vu" to "View URL".
parent d665f054
2007-07-28 Per Cederqvist <ceder@lysator.liu.se>
New command: "View URL".
* commands2.el (kom-view-url-in-text): New command.
* vars.el.in (lyskom-commands): Added kom-view-url-in-text.
* swedish-strings.el (lyskom-command): Add kom-view-url-in-text as
"Visa URL".
(lyskom-sv-mode-map): Bind "vu" to "Visa URL".
* english-strings.el (lyskom-command): Add kom-view-url-in-text as
"View URL".
(lyskom-en-view-prefix): New prefix, bound to "v".
(lyskom-en-mode-map): Bind "vu" to "View URL".
2007-07-20 Hans Eric Svensson <eric+lyskom@lysator.liu.se>
* view-text.el (lyskom-follow-comments): Adjusted to take into
......
......@@ -2716,6 +2716,22 @@ This command accepts text number prefix arguments \(see
;;; ================================================================
;;; Visa URL - Show URL
;;; View an URL in the current browser.
;;; Author: Per Cederqvist
(def-kom-command kom-view-url-in-text (n)
"Display the first URL in the current text of a LysKOM buffer.
With a prefix argument, view the Nth URL in the text."
(interactive "p")
(save-excursion
(let ((end (point)))
(kom-backward-text)
(re-search-forward lyskom-url-protocol-regexp end nil n)
(kom-button-press))))
;;; ================================================================
;;; Skapa aux-item
......
......@@ -2402,6 +2402,8 @@ Change privileges for %#1P (%#1p)...")
(kom-compare-texts . "Compare two texts")
(kom-diff-texts . "View diff")
(kom-view-url-in-text . "View URL")
(kom-become-anonymous . "Become anonymous")
(kom-become-nonanonymous . "Become non-anonymous (come forth into the light)")
......@@ -2713,6 +2715,7 @@ Change privileges for %#1P (%#1p)...")
(lyskom-language-keymap lyskom-mode-map en lyskom-en-mode-map)
(defvar lyskom-en-review-prefix)
(defvar lyskom-en-view-prefix)
(defvar lyskom-en-change-prefix)
(defvar lyskom-en-next-prefix)
(defvar lyskom-en-list-prefix)
......@@ -2737,6 +2740,7 @@ Change privileges for %#1P (%#1p)...")
(define-prefix-command 'lyskom-en-A-prefix)
(define-prefix-command 'lyskom-en-B-prefix)
(define-prefix-command 'lyskom-en-unread-prefix)
(define-prefix-command 'lyskom-en-view-prefix)
(define-key lyskom-en-mode-map (kbd "h") 'lyskom-en-change-prefix)
(define-key lyskom-en-mode-map (kbd "r") 'lyskom-en-review-prefix)
......@@ -2748,6 +2752,7 @@ Change privileges for %#1P (%#1p)...")
(define-key lyskom-en-mode-map (kbd "a") 'lyskom-en-A-prefix)
(define-key lyskom-en-mode-map (kbd "b") 'lyskom-en-B-prefix)
(define-key lyskom-en-mode-map (kbd "u") 'lyskom-en-unread-prefix)
(define-key lyskom-en-mode-map (kbd "v") 'lyskom-en-view-prefix)
(define-key lyskom-en-mode-map (kbd "M-m") 'kom-toggle-mark-as-read-prefix)
(define-key lyskom-en-mode-map (kbd "M-c") 'kom-toggle-cache-prefix)
......@@ -2765,6 +2770,7 @@ Change privileges for %#1P (%#1p)...")
;; These should be first in order to be last in the menu of alternatives.
(define-key lyskom-en-review-prefix (kbd "?") 'lyskom-help)
(define-key lyskom-en-unread-prefix (kbd "?") 'lyskom-help)
(define-key lyskom-en-view-prefix (kbd "?") 'lyskom-help)
(define-key lyskom-en-change-prefix (kbd "?") 'lyskom-help)
(define-key lyskom-en-next-prefix (kbd "?") 'lyskom-help)
(define-key lyskom-en-list-prefix (kbd "?") 'lyskom-help)
......@@ -2870,6 +2876,8 @@ Change privileges for %#1P (%#1p)...")
(define-key lyskom-en-unread-prefix (kbd "a m") 'kom-unread-all-marked-texts)
(define-key lyskom-en-unread-prefix (kbd "a SPC") 'kom-unread-all)
(define-key lyskom-en-view-prefix (kbd "u") 'kom-view-url-in-text)
(define-key lyskom-en-review-prefix (kbd "SPC") 'kom-view)
(define-key lyskom-en-review-prefix (kbd "0") 'kom-initial-digit-view)
(define-key lyskom-en-review-prefix (kbd "1") 'kom-initial-digit-view)
......
......@@ -2444,6 +2444,8 @@ Nuvarande r
(kom-compare-texts . "Jmfr tv texter")
(kom-diff-texts . "Se diff")
(kom-view-url-in-text . "Visa URL")
(kom-become-anonymous . "Bli anonym")
(kom-become-nonanonymous . "Bli icke-anonym (trd fram ur skuggorna)")
......@@ -2966,6 +2968,7 @@ Nuvarande r
(define-key lyskom-sv-who-prefix (kbd "i") 'kom-who-is-on)
(define-key lyskom-sv-who-prefix (kbd "m") 'kom-who-is-on-in-conference)
(define-key lyskom-sv-who-prefix (kbd "n") 'kom-who-is-present-in-conference)
(define-key lyskom-sv-who-prefix (kbd "u") 'kom-view-url-in-text)
(define-key lyskom-sv-who-prefix (kbd "v") 'kom-who-is-on-and-friend)
(define-key lyskom-sv-change-prefix (kbd "p") 'kom-change-presentation)
......
......@@ -3750,6 +3750,8 @@ Users are encouraged to use their best sense of humor."
kom-compare-texts
kom-diff-texts
kom-view-url-in-text
kom-become-anonymous
kom-become-nonanonymous
......
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