Function: erc-list-menu-sort-by-column

erc-list-menu-sort-by-column is an interactive and byte-compiled function defined in erc-list.el.gz.

Signature

(erc-list-menu-sort-by-column &optional E)

Documentation

Sort the channel list by the column clicked on.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/erc/erc-list.el.gz
(defun erc-list-menu-sort-by-column (&optional e)
  "Sort the channel list by the column clicked on."
  (interactive (list last-input-event))
  (if e (mouse-select-window e))
  (let* ((pos (event-start e))
	 (obj (posn-object pos))
	 (col (if obj
		  (get-text-property (cdr obj) 'column-number (car obj))
		(get-text-property (posn-point pos) 'column-number))))
    (let ((buffer-read-only nil))
      (if (= col 1)
	  (sort-fields col (point-min) (point-max))
	(sort-numeric-fields col (point-min) (point-max))))))