[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/dart-mode 89a2d4e 100/192: Add a special mode for popups
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/dart-mode 89a2d4e 100/192: Add a special mode for popups |
Date: |
Sun, 29 Aug 2021 11:01:58 -0400 (EDT) |
branch: elpa/dart-mode
commit 89a2d4e7c8659b4c4e2cf127998fa5316a042307
Author: Natalie Weizenbaum <nex342@gmail.com>
Commit: Natalie Weizenbaum <nex342@gmail.com>
Add a special mode for popups
---
dart-mode.el | 30 +++++++++++++++++++++++++++---
1 file changed, 27 insertions(+), 3 deletions(-)
diff --git a/dart-mode.el b/dart-mode.el
index 2788163..a3d183e 100644
--- a/dart-mode.el
+++ b/dart-mode.el
@@ -1093,9 +1093,7 @@ minibuffer."
(with-current-buffer-window
"*Dart Analysis*" nil nil
(insert text)
- ;; We should really create our own mode, but this will do
- ;; in a pinch.
- (help-mode))
+ (dart-popup-mode))
(message "%s" text)))))))))))
(defconst dart--highlight-keyword-re
@@ -1268,6 +1266,7 @@ to add a header and otherwise prepare it for displaying
results."
(total-results 0))
(with-current-buffer-window
"*Dart Search*" nil nil
+ (dart-popup-mode)
(setq buffer (current-buffer))
(apply callback nil)
(setq beginning-of-results (point))
@@ -1328,6 +1327,31 @@ to add a header and otherwise prepare it for displaying
results."
(goto-char (+ 1 offset))
(dart--flash-highlight offset length)))
+
+;;; Popup Mode
+
+(define-derived-mode dart-popup-mode fundamental-mode "DartPopup"
+ "Major mode for popups."
+ :mode 'dart-popup
+ (use-local-map dart-popup-mode-map))
+
+(put 'dart-popup-mode 'mode-class 'special)
+
+(defvar dart-popup-mode-map (make-sparse-keymap)
+ "Keymap used in Dart popup buffers.")
+(set-keymap-parent dart-popup-mode-map help-mode-map)
+
+;; Unbind help-specific keys.
+(define-key dart-popup-mode-map (kbd "RET") nil)
+(define-key dart-popup-mode-map (kbd "l") nil)
+(define-key dart-popup-mode-map (kbd "r") nil)
+(define-key dart-popup-mode-map (kbd "<XF86Back>") nil)
+(define-key dart-popup-mode-map (kbd "<XF86Forward>") nil)
+(define-key dart-popup-mode-map (kbd "<mouse-2>") nil)
+(define-key dart-popup-mode-map (kbd "C-c C-b") nil)
+(define-key dart-popup-mode-map (kbd "C-c C-c") nil)
+(define-key dart-popup-mode-map (kbd "C-c C-f") nil)
+
;;; Formatting
(defcustom dartfmt-command "dartfmt"
- [nongnu] elpa/dart-mode 0c3d6d7 074/192: Fix an off-by-one bug in offset calculation., (continued)
- [nongnu] elpa/dart-mode 0c3d6d7 074/192: Fix an off-by-one bug in offset calculation., ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode be9e422 077/192: Fix a bunch of byte-compilation warnings., ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode e6635b3 084/192: Bump version to 0.15. (#38), ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode b380818 085/192: Adapt the gofmt-related code in go-mode.el for dartfmt. (#39), ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode f5962c3 080/192: Make version check work in Emacs 25., ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode 93efb54 089/192: Update the version and URL and flesh out the README, ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode ecf3191 091/192: Add a command to show hover information, ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode 0cf32d5 092/192: Highlight hover descriptions, ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode c4a5045 096/192: Add support for navigation, ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode a1f36f4 094/192: Allow dart-show-hover to display in a new buffer, ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode 89a2d4e 100/192: Add a special mode for popups,
ELPA Syncer <=
- [nongnu] elpa/dart-mode eca3f15 105/192: Add the ability to autocomplete parameters, ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode d333a73 102/192: Add an analyzer-based auto-complete, ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode d507fa1 101/192: Add a binding to re-run searches, ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode a2ab55b 114/192: Make more thorough use of dash, ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode c11d02a 137/192: Remedy invalid file path format, ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode 8f972c0 097/192: Add support for finding references, ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode 848f983 104/192: Show docs for expansions, ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode 6bc08f7 136/192: Adds failing test against dart dev, ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode 9c9a63e 130/192: Fix dart-format, ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode 1f27d03 119/192: Properly set up font-lock variables, ELPA Syncer, 2021/08/29