[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
feature/integration-of-dictionary-el a557a10 08/17: * lisp/net/dictionar
From: |
Torsten Hilbrich |
Subject: |
feature/integration-of-dictionary-el a557a10 08/17: * lisp/net/dictionary-connection.el: Prefer defsubst |
Date: |
Mon, 14 Dec 2020 05:46:38 -0500 (EST) |
branch: feature/integration-of-dictionary-el
commit a557a103cc576c97a82346760a84947fe296000c
Author: Torsten Hilbrich <torsten.hilbrich@gmx.net>
Commit: Torsten Hilbrich <torsten.hilbrich@gmx.net>
* lisp/net/dictionary-connection.el: Prefer defsubst
Use defsubst instead of defmacro here. It was suggested by Stefan
Kangas to replace the defmacro here and, looking at the lispref,
defsubst seems to be a suitable replacement providing the same
benefit of inlining functionality as the defmacro.
---
lisp/net/dictionary-connection.el | 28 ++++++++++++++--------------
1 file changed, 14 insertions(+), 14 deletions(-)
diff --git a/lisp/net/dictionary-connection.el
b/lisp/net/dictionary-connection.el
index f8a6679..c762b35 100644
--- a/lisp/net/dictionary-connection.el
+++ b/lisp/net/dictionary-connection.el
@@ -27,33 +27,33 @@
;;; Code:
-(defmacro dictionary-connection-p (connection)
+(defsubst dictionary-connection-p (connection)
"Returns non-nil if `connection' is a connection object"
- (list 'get connection ''connection))
+ (get connection 'connection))
-(defmacro dictionary-connection-read-point (connection)
+(defsubst dictionary-connection-read-point (connection)
"Return the read point of the connection object."
- (list 'get connection ''dictionary-connection-read-point))
+ (get connection 'dictionary-connection-read-point))
-(defmacro dictionary-connection-process (connection)
+(defsubst dictionary-connection-process (connection)
"Return the process of the connection object."
- (list 'get connection ''dictionary-connection-process))
+ (get connection 'dictionary-connection-process))
-(defmacro dictionary-connection-buffer (connection)
+(defsubst dictionary-connection-buffer (connection)
"Return the buffer of the connection object."
- (list 'get connection ''dictionary-connection-buffer))
+ (get connection 'dictionary-connection-buffer))
-(defmacro dictionary-connection-set-read-point (connection point)
+(defsubst dictionary-connection-set-read-point (connection point)
"Set the read-point for `connection' to `point'."
- (list 'put connection ''dictionary-connection-read-point point))
+ (put connection 'dictionary-connection-read-point point))
-(defmacro dictionary-connection-set-process (connection process)
+(defsubst dictionary-connection-set-process (connection process)
"Set the process for `connection' to `process'."
- (list 'put connection ''dictionary-connection-process process))
+ (put connection 'dictionary-connection-process process))
-(defmacro dictionary-connection-set-buffer (connection buffer)
+(defsubst dictionary-connection-set-buffer (connection buffer)
"Set the buffer for `connection' to `buffer'."
- (list 'put connection ''dictionary-connection-buffer buffer))
+ (put connection 'dictionary-connection-buffer buffer))
(defun dictionary-connection-create-data (buffer process point)
"Create a new connection data based on `buffer', `process', and `point'."
- feature/integration-of-dictionary-el updated (7ca331a -> 62d14e1), Torsten Hilbrich, 2020/12/14
- feature/integration-of-dictionary-el a25a12d 12/17: Use when where else case returns nil, Torsten Hilbrich, 2020/12/14
- feature/integration-of-dictionary-el ffa7d66 09/17: * lisp/net/dictionary.el: Prefer defsubst over defmacro, Torsten Hilbrich, 2020/12/14
- feature/integration-of-dictionary-el a557a10 08/17: * lisp/net/dictionary-connection.el: Prefer defsubst,
Torsten Hilbrich <=
- feature/integration-of-dictionary-el f584437 06/17: * lisp/net/dictionary-connection.el: Remove obsolete Version, Torsten Hilbrich, 2020/12/14
- feature/integration-of-dictionary-el 54a3964 07/17: Update GPL version, Torsten Hilbrich, 2020/12/14
- feature/integration-of-dictionary-el d5a4da2 01/17: * lisp/net/dictionary.el: Remove remnants of package, Torsten Hilbrich, 2020/12/14
- feature/integration-of-dictionary-el cc5f280 02/17: * lisp/net/dictionary.el: Add lexical-binding:t, Torsten Hilbrich, 2020/12/14
- feature/integration-of-dictionary-el 81ebe86 04/17: Show error message when asking to match for nothing, Torsten Hilbrich, 2020/12/14
- feature/integration-of-dictionary-el 09952ce 03/17: Removed useless check for popup-menu, Torsten Hilbrich, 2020/12/14
- feature/integration-of-dictionary-el 4deb861 10/17: * lisp/net/dictionary.el (dictionary-mode): Use setq-local, Torsten Hilbrich, 2020/12/14
- feature/integration-of-dictionary-el 0044a2e 05/17: * lisp/net/dictionary-connection.el: Add lexical-binding:t, Torsten Hilbrich, 2020/12/14
- feature/integration-of-dictionary-el ca0de4d 16/17: * etc/NEWS: Add entry for dictionary.el, Torsten Hilbrich, 2020/12/14
- feature/integration-of-dictionary-el 62d14e1 17/17: * lisp/net/dictionary.el (dictionary-pre-buffer): Unify casing, Torsten Hilbrich, 2020/12/14