Add a new HTML skeleton for relative (file) URLs
* lisp/textmodes/sgml-mode.el (html-href-anchor-file): New skeleton and keystroke (bug#37644).
This commit is contained in:
parent
b5ea24cb44
commit
51d063e484
2 changed files with 16 additions and 1 deletions
7
etc/NEWS
7
etc/NEWS
|
@ -659,6 +659,13 @@ custom rules, see the variables 'bug-reference-setup-from-vc-alist',
|
|||
'bug-reference-setup-from-mail-alist', and
|
||||
'bug-reference-setup-from-irc-alist'.
|
||||
|
||||
** HTML Mode
|
||||
|
||||
---
|
||||
*** A new skeleton for adding relative URLs has been added.
|
||||
It's bound to the 'C-c C-c f' keystroke, and prompts for a local file
|
||||
name.
|
||||
|
||||
|
||||
* New Modes and Packages in Emacs 28.1
|
||||
|
||||
|
|
|
@ -1806,6 +1806,7 @@ This takes effect when first loading the library.")
|
|||
(define-key map "\C-c\C-cc" 'html-checkboxes)
|
||||
(define-key map "\C-c\C-cl" 'html-list-item)
|
||||
(define-key map "\C-c\C-ch" 'html-href-anchor)
|
||||
(define-key map "\C-c\C-cf" 'html-href-anchor-file)
|
||||
(define-key map "\C-c\C-cn" 'html-name-anchor)
|
||||
(define-key map "\C-c\C-c#" 'html-id-anchor)
|
||||
(define-key map "\C-c\C-ci" 'html-image)
|
||||
|
@ -1818,6 +1819,7 @@ This takes effect when first loading the library.")
|
|||
(define-key map "\C-cc" 'html-checkboxes)
|
||||
(define-key map "\C-cl" 'html-list-item)
|
||||
(define-key map "\C-ch" 'html-href-anchor)
|
||||
(define-key map "\C-cf" 'html-href-anchor-file)
|
||||
(define-key map "\C-cn" 'html-name-anchor)
|
||||
(define-key map "\C-c#" 'html-id-anchor)
|
||||
(define-key map "\C-ci" 'html-image)
|
||||
|
@ -1845,7 +1847,8 @@ This takes effect when first loading the library.")
|
|||
(define-key menu-map "\n" '("Line Break" . html-line))
|
||||
(define-key menu-map "\r" '("Paragraph" . html-paragraph))
|
||||
(define-key menu-map "i" '("Image" . html-image))
|
||||
(define-key menu-map "h" '("Href Anchor" . html-href-anchor))
|
||||
(define-key menu-map "h" '("Href Anchor URL" . html-href-anchor))
|
||||
(define-key menu-map "f" '("Href Anchor File" . html-href-anchor-file))
|
||||
(define-key menu-map "n" '("Name Anchor" . html-name-anchor))
|
||||
(define-key menu-map "#" '("ID Anchor" . html-id-anchor))
|
||||
map)
|
||||
|
@ -2453,6 +2456,11 @@ HTML Autoview mode is a buffer-local minor mode for use with
|
|||
;; '(setq input "http:")
|
||||
"<a href=\"" str "\">" _ "</a>")
|
||||
|
||||
(define-skeleton html-href-anchor-file
|
||||
"HTML anchor tag with href attribute (from a local file)."
|
||||
(file-relative-name (read-file-name "File name: ") default-directory)
|
||||
"<a href=\"" str "\">" _ "</a>")
|
||||
|
||||
(define-skeleton html-name-anchor
|
||||
"HTML anchor tag with name attribute."
|
||||
"Name: "
|
||||
|
|
Loading…
Add table
Reference in a new issue