Mercurial > dotfiles
comparison .elisp/settings/50.localfuncs.el @ 237:b9f4d059eb69
emacs: function to set window width interactively
author | Augie Fackler <durin42@gmail.com> |
---|---|
date | Wed, 23 Feb 2011 16:32:36 -0600 |
parents | c965d5dbd868 |
children | 3d5c595c229e |
comparison
equal
deleted
inserted
replaced
236:3e1ec121efaf | 237:b9f4d059eb69 |
---|---|
117 ;; Highlight the other end of the sexp, or unhighlight if none. | 117 ;; Highlight the other end of the sexp, or unhighlight if none. |
118 (if (and pos (integerp pos)) | 118 (if (and pos (integerp pos)) |
119 (goto-char pos) | 119 (goto-char pos) |
120 (message "No matching other paren found.") | 120 (message "No matching other paren found.") |
121 ))) | 121 ))) |
122 | |
123 (defun af-set-window-width (&optional columns) | |
124 "Make selected window COLUMNS wide. | |
125 | |
126 Interactively, if no argument is given, make selected window 80 | |
127 columns wide. | |
128 " | |
129 (interactive "p") | |
130 (let* ((cols (if (or (not columns) (> 0 columns)) 80 columns))) | |
131 (shrink-window-horizontally (- (window-width) cols)))) |