[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/bluetooth 83344c8 20/57: cleans up display code
From: |
Stefan Monnier |
Subject: |
[elpa] externals/bluetooth 83344c8 20/57: cleans up display code |
Date: |
Thu, 7 Nov 2019 23:28:51 -0500 (EST) |
branch: externals/bluetooth
commit 83344c825340388a462d1b18e68cf4a0674deb99
Author: Raffael Stocker <address@hidden>
Commit: Raffael Stocker <address@hidden>
cleans up display code
`bluetooth--update-list' is used instead of a direct call to
`tabulated-list-print' to avoid updating the wrong buffer.
mode line code now correctly uses local variable
---
bluetooth.el | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/bluetooth.el b/bluetooth.el
index 30d4a76..5e5347a 100644
--- a/bluetooth.el
+++ b/bluetooth.el
@@ -179,7 +179,7 @@
;;; This function provides the list entries for the tabulated-list
;;; view. It is called from `tabulated-list-print'.
-(defun bluetooth--list-entry-fcn ()
+(defun bluetooth--list-entries ()
"Provide the list entries for the tabulated view."
(setq bluetooth--device-info
(bluetooth--get-device-info (bluetooth--get-devices)))
@@ -205,7 +205,7 @@
This mode allows pairing with and connecting to Bluetooth
devices, as well as setting properties."
(setq tabulated-list-format bluetooth--list-format
- tabulated-list-entries #'bluetooth--list-entry-fcn
+ tabulated-list-entries #'bluetooth--list-entries
tabulated-list-padding 1)
(bluetooth--make-commands)
(tabulated-list-init-header))
@@ -300,7 +300,7 @@ devices, as well as setting properties."
"Invoke METHOD on D-Bus API with ARGS."
(apply #'bluetooth--call-method (tabulated-list-get-id) api
#'dbus-call-method-asynchronously method
- (lambda () (tabulated-list-print t)) :timeout bluetooth--timeout args))
+ #'bluetooth--update-list :timeout bluetooth--timeout args))
;;; Toggle a property.
(defun bluetooth--dbus-toggle (property api)
@@ -309,14 +309,14 @@ devices, as well as setting properties."
(value (bluetooth--call-method dev-id api
#'dbus-get-property property)))
(bluetooth--call-method dev-id api #'dbus-set-property property (not
value))
- (tabulated-list-print t)))
+ (bluetooth--update-list)))
;;; Set a property.
(defun bluetooth--dbus-set (property arg api)
"Set PROPERTY to ARG on D-Bus API."
(bluetooth--call-method (tabulated-list-get-id)
api #'dbus-set-property property arg)
- (tabulated-list-print t))
+ (bluetooth--update-list))
;;; end of worker function definitions
@@ -384,8 +384,8 @@ This function only uses the first adapter reported by
Bluez."
(bluetooth-mode)
(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))
+ (make-local-variable '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 t))))
- [elpa] externals/bluetooth 42a9487 35/57: moves `hl-line-mode' to end of init so hl is shown at startup, (continued)
- [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
- [elpa] externals/bluetooth f0e5047 18/57: removes unnecessary quotes before lambdas and corrects indentation, Stefan Monnier, 2019/11/07
- [elpa] externals/bluetooth 738347b 19/57: adds TAGS to .gitignore, Stefan Monnier, 2019/11/07
- [elpa] externals/bluetooth 28e9eb2 21/57: wraps @body in progn in bluetooth--maybe-cancel-reject, Stefan Monnier, 2019/11/07
- [elpa] externals/bluetooth 4133a10 13/57: makes mode idempotent, Stefan Monnier, 2019/11/07
- [elpa] externals/bluetooth 3c25a8c 23/57: adds basic service class UUID parsing, Stefan Monnier, 2019/11/07
- [elpa] externals/bluetooth 5219f05 31/57: fixes a compile error and adds customization, Stefan Monnier, 2019/11/07
- [elpa] externals/bluetooth 0108cbd 32/57: uses `read-from-minibuffer' instead of `read-passwd', Stefan Monnier, 2019/11/07
- [elpa] externals/bluetooth 1ec2997 22/57: uses the correct bus (:system) for the callback methods, Stefan Monnier, 2019/11/07
- [elpa] externals/bluetooth 83344c8 20/57: cleans up display code,
Stefan Monnier <=
- [elpa] externals/bluetooth fe926e9 28/57: puts functions before the long uuid defconsts for readability, Stefan Monnier, 2019/11/07
- [elpa] externals/bluetooth c473128 40/57: adds repository URL to mode (entry) command docstring, Stefan Monnier, 2019/11/07
- [elpa] externals/bluetooth eb1d4ea 25/57: adds UUID and service/device class parsing and display, Stefan Monnier, 2019/11/07
- [elpa] externals/bluetooth f9bfd26 39/57: fixes a grammatical mistake in Readme.org, Stefan Monnier, 2019/11/07
- [elpa] externals/bluetooth 565cfec 38/57: adds more elaborate usage information, Stefan Monnier, 2019/11/07
- [elpa] externals/bluetooth 7714f6b 45/57: updates Readme, Stefan Monnier, 2019/11/07
- [elpa] externals/bluetooth 1f3b244 47/57: makes checkdoc and package-lint happy, Stefan Monnier, 2019/11/07
- [elpa] externals/bluetooth 9d79f61 46/57: puts the key bindings in their own defvar (as is usual), Stefan Monnier, 2019/11/07
- [elpa] externals/bluetooth fd39a17 50/57: cleans up movement to beginning/end of list, Stefan Monnier, 2019/11/07
- [elpa] externals/bluetooth 5387639 52/57: adds path loss to device info, Stefan Monnier, 2019/11/07