[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/bluetooth 2560749 15/57: adds Imenu integration
From: |
Stefan Monnier |
Subject: |
[elpa] externals/bluetooth 2560749 15/57: adds Imenu integration |
Date: |
Thu, 7 Nov 2019 23:28:50 -0500 (EST) |
branch: externals/bluetooth
commit 25607496a057b231857d18bd02e6aff2df3f2afc
Author: Raffael Stocker <address@hidden>
Commit: Raffael Stocker <address@hidden>
adds Imenu integration
---
bluetooth.el | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/bluetooth.el b/bluetooth.el
index 383b2f4..4a93569 100644
--- a/bluetooth.el
+++ b/bluetooth.el
@@ -270,6 +270,16 @@ devices, as well as setting properties."
(mapcar #'car bluetooth--list-format))))
device-info))
+;;; Build up the index for Imenu. This function is used as
+;;; `imenu-create-index-function'.
+(defun bluetooth--create-imenu-index ()
+ "Create the index for Imenu."
+ (goto-char (point-min))
+ (cl-loop for (pos entry) = (list (point) (tabulated-list-get-entry))
+ while entry
+ do (forward-line 1)
+ collect (cons (elt entry 0) pos)))
+
;;; This function calls FUNCTION with ARGS given the device-id DEV-ID and
;;; Bluez API. This is used on D-Bus functions.
(defun bluetooth--call-method (dev-id api function &rest args)
@@ -375,7 +385,8 @@ This function only uses the first adapter reported by
Bluez."
(bluetooth--register-agent)
(add-hook 'kill-buffer-hook #'bluetooth--cleanup nil t)
(setq-local mode-line-misc-info
- (cl-pushnew bluetooth--mode-info mode-line-misc-info)))
+ (cl-pushnew bluetooth--mode-info mode-line-misc-info))
+ (setq imenu-create-index-function #'bluetooth--create-imenu-index))
(tabulated-list-print))))
;;; Bluetooth pairing agent code
- [elpa] externals/bluetooth f16a702 07/57: fixes undefined function problem (first/second/third -> car etc.), (continued)
- [elpa] externals/bluetooth f16a702 07/57: fixes undefined function problem (first/second/third -> car etc.), Stefan Monnier, 2019/11/07
- [elpa] externals/bluetooth 2fbe9e4 04/57: adds URL, Stefan Monnier, 2019/11/07
- [elpa] externals/bluetooth 9d1369a 05/57: adds Readme.org and removes Readme.md, Stefan Monnier, 2019/11/07
- [elpa] externals/bluetooth 5db9e29 08/57: adds bluetooth--release, Stefan Monnier, 2019/11/07
- [elpa] externals/bluetooth a883d60 10/57: fixes spurious error on clean-up, Stefan Monnier, 2019/11/07
- [elpa] externals/bluetooth e6ca72d 06/57: corrects docstrings and Readme.org, Stefan Monnier, 2019/11/07
- [elpa] externals/bluetooth dd28c81 11/57: turns defvar into defconst where possible, Stefan Monnier, 2019/11/07
- [elpa] externals/bluetooth 00497ca 03/57: adds bluetooth.el and .gitignore, Stefan Monnier, 2019/11/07
- [elpa] externals/bluetooth 0cac7d9 09/57: makes status display in mode line buffer-local, Stefan Monnier, 2019/11/07
- [elpa] externals/bluetooth 58dd9f9 12/57: adds 'Maintainer' header and cleans up 'Package-Requires', Stefan Monnier, 2019/11/07
- [elpa] externals/bluetooth 2560749 15/57: adds Imenu integration,
Stefan Monnier <=
- [elpa] externals/bluetooth cc33d79 14/57: corrects project name in LICENSE, Stefan Monnier, 2019/11/07
- [elpa] externals/bluetooth 3743458 17/57: corrects list redisplay when mode is restarted, Stefan Monnier, 2019/11/07
- [elpa] externals/bluetooth 8cac69d 26/57: checks list-id for nil to avoid errors at actions w/o list item, Stefan Monnier, 2019/11/07
- [elpa] externals/bluetooth 4a40ee6 24/57: adds GATT UUIDs and a rudimentary display function, Stefan Monnier, 2019/11/07
- [elpa] externals/bluetooth f33cb12 02/57: Add LICENSE, Stefan Monnier, 2019/11/07
- [elpa] externals/bluetooth ee4e582 30/57: fixes compiler warnings about unused parameters, Stefan Monnier, 2019/11/07
- [elpa] externals/bluetooth 3365413 33/57: corrects the major mode check in `list-bluetooth-devices', Stefan Monnier, 2019/11/07
- [elpa] externals/bluetooth b47bddc 36/57: switches device-info buffer to special mode, Stefan Monnier, 2019/11/07
- [elpa] externals/bluetooth 42a9487 35/57: moves `hl-line-mode' to end of init so hl is shown at startup, Stefan Monnier, 2019/11/07
- [elpa] externals/bluetooth 325febd 16/57: adds Imenu integration to Readme feature list, Stefan Monnier, 2019/11/07