Valkertown Home

2009-02-17-small updates for denting mode

I have just added a small modification to denting-mode:

(defun denting-update-status-from-region (beg end)
  (interactive "r")
  (if (> (- end beg) 140) (setq end (+ beg 140)))
  (if (< (- end beg) -140) (setq beg (+ end 140)))
  (denting-update-status-if-not-blank (buffer-substring beg end)))

This small function will try to post to laconica the region, if the region is over 140 characters it will cut it down to 140 characters left to right.

Now I have setup a couple of keybindings on my .emacs so I can dent stuff from my emacs buffers

(define-key global-map "\C-c\C-d" 'denting-update-status-from-region)
(define-key global-map "\C-c\C-s" 'denting-update-status-interactive)

The updated version it's here:

http://hg.valkertown.org/denting-mode.hg

comments powered by Disqus

© 2008-2012 Carlos A. Perilla deepspawn at valkertown dot org | Based on original design by Andreas Viklund