[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/adoc-mode a61e7cd749 063/199: added AsciiDoc menu & key ma
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/adoc-mode a61e7cd749 063/199: added AsciiDoc menu & key map |
Date: |
Sun, 3 Sep 2023 06:59:34 -0400 (EDT) |
branch: elpa/adoc-mode
commit a61e7cd7497d7f8a619c0ae5963f8826515bbc36
Author: Florian Kaufmann <sensorflo@gmail.com>
Commit: Florian Kaufmann <sensorflo@gmail.com>
added AsciiDoc menu & key map
---
adoc-mode.el | 26 +++++++++++++++++++++++++-
1 file changed, 25 insertions(+), 1 deletion(-)
diff --git a/adoc-mode.el b/adoc-mode.el
index ab56976e83..e5a4363139 100644
--- a/adoc-mode.el
+++ b/adoc-mode.el
@@ -79,7 +79,6 @@
;; make them configurable in a way similar to that configuration file
;; - respect font-lock-maximum-decoration
;; - Other common emacs functionality/features
-;; - create a menu entry and keybindings for the commands
;; - indent functions
;; - imenu / outline / hideshow
;; - tags tables for anchors, indixes, bibliography items, titles, ...
@@ -388,9 +387,32 @@ To become a customizable variable when regexps for list
items become customizabl
(define-abbrev-table 'adoc-mode-abbrev-table ())
+(defvar adoc-mode-map
+ (let ((map (make-sparse-keymap)))
+ (define-key map "\C-c\C-d" 'adoc-denote)
+ (define-key map "\C-c\C-p" 'adoc-promote)
+ (define-key map "\C-c\C-t" 'adoc-toggle-title-type)
+ (define-key map "\C-c\C-g" 'adoc-goto-ref-label)
+ map)
+ "Keymap used in adoc mode.")
+
;;; Code:
+(defvar adoc-menu)
+(condition-case nil
+ (progn
+ (require 'easymenu)
+ (easy-menu-define
+ adoc-menu adoc-mode-map "Menu for adoc mode"
+ '("AsciiDoc"
+ ["Promote" adoc-promote t]
+ ["Denote" adoc-denote t]
+ ["Toggle title type" adoc-toggle-title-type t]
+ ["Adjust title underline" adoc-adjust-title-del t]
+ ["Goto anchor" adoc-goto-ref-label t])))
+ (error nil))
+
;; from asciidoc.conf:
;; ^:(?P<attrname>\w[^.]*?)(\.(?P<attrname2>.*?))?:(\s+(?P<attrvalue>.*))?$
;;;; regexps
@@ -2139,6 +2161,8 @@ Turning on Adoc mode runs the normal hook
`adoc-mode-hook'."
(make-local-variable 'compilation-error-regexp-alist)
(add-to-list 'compilation-error-regexp-alist 'asciidoc))
+ (if (featurep 'easymenu)
+ (easy-menu-add cperl-menu)) ; A NOP in Emacs.
(run-hooks 'adoc-mode-hook))
- [nongnu] elpa/adoc-mode c3d738dd7d 169/199: Fix a typo, (continued)
- [nongnu] elpa/adoc-mode c3d738dd7d 169/199: Fix a typo, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode 109bdc5d13 180/199: Fix a typo and some whitespace issues, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode 9e7af55e7e 183/199: Fix a typo, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode b0702bdeb8 187/199: [Fix #33] Address noticeable lag when typing in larger code blocks (#35), ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode 526e058665 029/199: added another list item test, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode a0ddf0f02d 034/199: added tests for images, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode 1a4e93ec7c 035/199: enhanded general block macro incl. tests, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode fcabdc3a7e 037/199: added general inline macro, began reworking anchors, touched image, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode 656e7670c5 099/199: fixed type: denote -> demote, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode 2cfd433622 030/199: extended quotes tests, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode a61e7cd749 063/199: added AsciiDoc menu & key map,
ELPA Syncer <=
- [nongnu] elpa/adoc-mode 22bd99a194 075/199: test: Use with-temp-buffer instead home-brewed solution, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode a3d77b0c15 082/199: bumped copyright year, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode a8142043e5 094/199: adoc customization group comment puts more emphasis on that most faces belong to markup-faces, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode 1206fe7409 103/199: adoc-re-inline-macro can now also match in the middle of a word, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode 0ac95247d4 116/199: refactoring so regexp's for one- and two line titles have group 2 for title's text, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode 411eb48ce9 120/199: Sensorflo/pr35 (#3), ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode 69569ee920 105/199: improved fontifying for footnoteref, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode 6dc82593f0 162/199: Document the mode's history, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode 4415af4a53 036/199: fixed typo in identifier, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode fdc42c818a 044/199: removed TAGS file, ELPA Syncer, 2023/09/03