Emacs: Define skeleton-previous-position instead of using lambda
parent
2f1ad8a349
commit
b1e8a03b17
|
@ -295,6 +295,11 @@ Hook function for skeletons."
|
||||||
(defvar skeleton-markers nil
|
(defvar skeleton-markers nil
|
||||||
"Markers for locations saved in `skeleton-positions'.")
|
"Markers for locations saved in `skeleton-positions'.")
|
||||||
|
|
||||||
|
(defun skeleton-previous-position ()
|
||||||
|
"Move to previous skeleton placeholder.
|
||||||
|
See `skeleton-next-position'."
|
||||||
|
(skeleton-next-position t))
|
||||||
|
|
||||||
(defun skeleton-next-position (&optional reverse)
|
(defun skeleton-next-position (&optional reverse)
|
||||||
"Move to next skeleton placeholder.
|
"Move to next skeleton placeholder.
|
||||||
If REVERSE it t, move to previous placeholder."
|
If REVERSE it t, move to previous placeholder."
|
||||||
|
|
|
@ -213,7 +213,7 @@ See `eshell-prompt-regexp'."
|
||||||
;; cannonical file names (i.e. withou '~') while fish preserves
|
;; cannonical file names (i.e. withou '~') while fish preserves
|
||||||
;; non-cannonical results. If the result contains a directory,
|
;; non-cannonical results. If the result contains a directory,
|
||||||
;; expand it.
|
;; expand it.
|
||||||
(mapcar (lambda (e)(car (split-string e "\t")))
|
(mapcar (lambda (e) (car (split-string e "\t")))
|
||||||
(split-string
|
(split-string
|
||||||
(with-output-to-string
|
(with-output-to-string
|
||||||
(with-current-buffer standard-output
|
(with-current-buffer standard-output
|
||||||
|
|
|
@ -283,7 +283,7 @@
|
||||||
(turn-on-skeleton-markers)
|
(turn-on-skeleton-markers)
|
||||||
(global-set-keys
|
(global-set-keys
|
||||||
"C->" 'skeleton-next-position
|
"C->" 'skeleton-next-position
|
||||||
"C-<" (lambda () (interactive) (skeleton-next-position t)))
|
"C-<" 'skeleton-previous-position)
|
||||||
|
|
||||||
;;; Disable prompt (but leave warning) on git symlink.
|
;;; Disable prompt (but leave warning) on git symlink.
|
||||||
(setq vc-follow-symlinks t)
|
(setq vc-follow-symlinks t)
|
||||||
|
|
Loading…
Reference in New Issue