Mercurial > dotfiles
changeset 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 | 3e1ec121efaf |
children | 3d5c595c229e |
files | .elisp/settings/50.localfuncs.el |
diffstat | 1 files changed, 10 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/.elisp/settings/50.localfuncs.el +++ b/.elisp/settings/50.localfuncs.el @@ -119,3 +119,13 @@ Delimiters are paired characters: ()[]<>«»“”‘’「」, including \"\"." (goto-char pos) (message "No matching other paren found.") ))) + +(defun af-set-window-width (&optional columns) + "Make selected window COLUMNS wide. + +Interactively, if no argument is given, make selected window 80 +columns wide. +" + (interactive "p") + (let* ((cols (if (or (not columns) (> 0 columns)) 80 columns))) + (shrink-window-horizontally (- (window-width) cols))))