diff options
| author | Torsten Hilbrich | 2020-12-14 09:31:28 +0100 |
|---|---|---|
| committer | Torsten Hilbrich | 2020-12-14 11:45:24 +0100 |
| commit | a557a103cc576c97a82346760a84947fe296000c (patch) | |
| tree | 971df4667cd8c55eff8a265cb4d5c76cb5823f20 | |
| parent | 54a3964e290d277df1e510c8829ede926aac23b2 (diff) | |
| download | emacs-a557a103cc576c97a82346760a84947fe296000c.tar.gz emacs-a557a103cc576c97a82346760a84947fe296000c.zip | |
* 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.
| -rw-r--r-- | lisp/net/dictionary-connection.el | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/lisp/net/dictionary-connection.el b/lisp/net/dictionary-connection.el index f8a667991aa..c762b352b75 100644 --- a/lisp/net/dictionary-connection.el +++ b/lisp/net/dictionary-connection.el | |||
| @@ -27,33 +27,33 @@ | |||
| 27 | 27 | ||
| 28 | ;;; Code: | 28 | ;;; Code: |
| 29 | 29 | ||
| 30 | (defmacro dictionary-connection-p (connection) | 30 | (defsubst dictionary-connection-p (connection) |
| 31 | "Returns non-nil if `connection' is a connection object" | 31 | "Returns non-nil if `connection' is a connection object" |
| 32 | (list 'get connection ''connection)) | 32 | (get connection 'connection)) |
| 33 | 33 | ||
| 34 | (defmacro dictionary-connection-read-point (connection) | 34 | (defsubst dictionary-connection-read-point (connection) |
| 35 | "Return the read point of the connection object." | 35 | "Return the read point of the connection object." |
| 36 | (list 'get connection ''dictionary-connection-read-point)) | 36 | (get connection 'dictionary-connection-read-point)) |
| 37 | 37 | ||
| 38 | (defmacro dictionary-connection-process (connection) | 38 | (defsubst dictionary-connection-process (connection) |
| 39 | "Return the process of the connection object." | 39 | "Return the process of the connection object." |
| 40 | (list 'get connection ''dictionary-connection-process)) | 40 | (get connection 'dictionary-connection-process)) |
| 41 | 41 | ||
| 42 | (defmacro dictionary-connection-buffer (connection) | 42 | (defsubst dictionary-connection-buffer (connection) |
| 43 | "Return the buffer of the connection object." | 43 | "Return the buffer of the connection object." |
| 44 | (list 'get connection ''dictionary-connection-buffer)) | 44 | (get connection 'dictionary-connection-buffer)) |
| 45 | 45 | ||
| 46 | (defmacro dictionary-connection-set-read-point (connection point) | 46 | (defsubst dictionary-connection-set-read-point (connection point) |
| 47 | "Set the read-point for `connection' to `point'." | 47 | "Set the read-point for `connection' to `point'." |
| 48 | (list 'put connection ''dictionary-connection-read-point point)) | 48 | (put connection 'dictionary-connection-read-point point)) |
| 49 | 49 | ||
| 50 | (defmacro dictionary-connection-set-process (connection process) | 50 | (defsubst dictionary-connection-set-process (connection process) |
| 51 | "Set the process for `connection' to `process'." | 51 | "Set the process for `connection' to `process'." |
| 52 | (list 'put connection ''dictionary-connection-process process)) | 52 | (put connection 'dictionary-connection-process process)) |
| 53 | 53 | ||
| 54 | (defmacro dictionary-connection-set-buffer (connection buffer) | 54 | (defsubst dictionary-connection-set-buffer (connection buffer) |
| 55 | "Set the buffer for `connection' to `buffer'." | 55 | "Set the buffer for `connection' to `buffer'." |
| 56 | (list 'put connection ''dictionary-connection-buffer buffer)) | 56 | (put connection 'dictionary-connection-buffer buffer)) |
| 57 | 57 | ||
| 58 | (defun dictionary-connection-create-data (buffer process point) | 58 | (defun dictionary-connection-create-data (buffer process point) |
| 59 | "Create a new connection data based on `buffer', `process', and `point'." | 59 | "Create a new connection data based on `buffer', `process', and `point'." |