[Top][All Lists]

[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.


(defun sort-lines-random (beg end)
  (interactive "r")
      (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)) )))))


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

underground experts united

reply via email to

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