help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to quote a list of functions?


From: Emanuel Berg
Subject: Re: How to quote a list of functions?
Date: Mon, 24 Aug 2015 00:16:09 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux)

Two other interesting cases. With `sort-subr', we are
helped by the help saying they are -FUNctions.
With `substitute-key-definition', it doesn't say.

;; http://user.it.uu.se/~embe8573/conf/emacs-init/sort-my.el

(defun sort-lines-random (beg end)
  (interactive "r")
  (save-excursion
    (save-restriction
      (narrow-to-region beg end)
      (goto-char (point-min))
      (sort-subr nil
                 #'forward-line #'end-of-line ; NEXTRECFUN ENDRECFUN
                 nil nil
                 (lambda (a b) (zerop (random 2)) )))))

;; http://user.it.uu.se/~embe8573/conf/emacs-init/caps-back.el

(defvar caps-mode-map
  (let ((map (make-keymap)))
    (substitute-key-definition 'newline-and-indent
                               'newline-and-indent-and-reset-caps
                               map global-map) ; more here (e.g., point move 
cmds)
    (substitute-key-definition 'self-insert-command
                               'caps-mode-self-insert-command
                               map global-map)
    map) )

-- 
underground experts united
http://user.it.uu.se/~embe8573




reply via email to

[Prev in Thread] Current Thread [Next in Thread]