summaryrefslogtreecommitdiff
path: root/common.el
diff options
context:
space:
mode:
authorJSDurand <mmemmew@gmail.com>2021-12-26 14:47:32 +0800
committerJSDurand <mmemmew@gmail.com>2021-12-26 14:47:32 +0800
commit20f73b0beebc71466b7be0dea537ab05e8f7be5c (patch)
tree65145eaf9035ad19a40230a8bf200891ce0b1fd6 /common.el
parentdb862fd1f045f3424a9b30990159abf7d3253e53 (diff)
Use defalias rather than fset
* common.el (durand-display-in-one-window) (durand-completion-scroll-up-or-go-to-minibuffer) (intentionally-disabled-bind): * completion-conf.el (durand-completion-toggle-display): * eww-conf.el (global-map): defalias has the advantage that one can find the file of the definition from the help buffer while fset cannot.
Diffstat (limited to 'common.el')
-rw-r--r--common.el46
1 files changed, 23 insertions, 23 deletions
diff --git a/common.el b/common.el
index 0b3df31..35e16f2 100644
--- a/common.el
+++ b/common.el
@@ -159,14 +159,14 @@ ARG means do this command ARG times."
;; This can be optimized by not duplicating an element on the stack.
;;;###autoload
-(fset 'durand-display-in-one-window
- (make-byte-code
- #x202
- (unibyte-string 192 193 194 32 33 33 195 1 4 34 136 196 1 33 136 197 32 136 135)
- (vector 'split-window 'frame-root-window 'selected-frame
- 'set-window-buffer 'select-window 'delete-other-windows)
- 9
- "Display BUFFER in one window.
+(defalias 'durand-display-in-one-window
+ (make-byte-code
+ #x202
+ (unibyte-string 192 193 194 32 33 33 195 1 4 34 136 196 1 33 136 197 32 136 135)
+ (vector 'split-window 'frame-root-window 'selected-frame
+ 'set-window-buffer 'select-window 'delete-other-windows)
+ 9
+ "Display BUFFER in one window.
ALIST is an association list of action symbols and values. See
Info node `(elisp) Buffer Display Action Alists' for details of
such alists.
@@ -209,15 +209,15 @@ the window to the function with max-height equal to
;; This short function is a suitable function for byte codes.
;;;###autoload
-(fset 'durand-completion-scroll-up-or-go-to-minibuffer
- (make-byte-code
- #x100
- (unibyte-string 137 132 7 0 192 178 1 193 1 91 33 135)
- (vector 1 #'durand-completion-scroll-down-or-go-to-minibuffer)
- 5
- "Scroll up; if this is not feasible, go to the mini-buffer.
+(defalias 'durand-completion-scroll-up-or-go-to-minibuffer
+ (make-byte-code
+ #x100
+ (unibyte-string 137 132 7 0 192 178 1 193 1 91 33 135)
+ (vector 1 #'durand-completion-scroll-down-or-go-to-minibuffer)
+ 5
+ "Scroll up; if this is not feasible, go to the mini-buffer.
ARG means do this command ARG times."
- "p"))
+ "p"))
;; (defun durand-completion-scroll-up-or-go-to-minibuffer (&optional arg)
;; "Scroll up; if this is not feasible, go to the mini-buffer.
@@ -298,13 +298,13 @@ mark at the end for the first yank."
;; Using byte-code is fun.
;;;###autoload
-(fset 'intentionally-disabled-bind
- (make-byte-code
- 0 (unibyte-string 194 195 193 192 32 33 34 135)
- (vector 'this-command-keys-vector 'key-description 'user-error
- "You pressend an intentionally disabled key-binding: %s")
- 4 "Warn the user that this key-binding is intentionally disabled."
- nil))
+(defalias 'intentionally-disabled-bind
+ (make-byte-code
+ 0 (unibyte-string 194 195 193 192 32 33 34 135)
+ (vector 'this-command-keys-vector 'key-description 'user-error
+ "You pressend an intentionally disabled key-binding: %s")
+ 4 "Warn the user that this key-binding is intentionally disabled."
+ nil))
;; (defun intentionally-disabled-bind (arg)
;; "Warn the user that this key-binding is intentionally disabled."