Thien-Thi Nguyen wrote: > Greetings earthlings, > > I've taken a fancy to the Unicode > > #x2018 -- LEFT SINGLE QUOTATION MARK > #x2019 -- RIGHT SINGLE QUOTATION MARK > > for quoting sexps in various non-user-message text (comments, > ChangeLog, NEWS, etc). Please find below a simple command that > inserts these, as well as my preferred keybinding. Example usage: > > Originally > // Use super-foo > > Type C-' > // Use super-‘foo’ > > Some seconds later, after more typing > // Use super-‘foo’ to bar LAX (laughter) > > Type C-u 2 C-' > // Use super-‘foo’ to bar ‘LAX (laughter)’ > > (The fragments are from a buffer in C mode, w/ point always at eol.) > > thi > > _______________________________________________________________________ > ;; Copyright (C) 2010 Thien-Thi Nguyen > ;; This program is provided under GNU GPLv3+. > > (defun nice-single-quote (&optional n) > "Insert ‘ and ’ around the last N sexps; leave point at end. > N defaults to 1." > (interactive "p") > (save-excursion > (backward-sexp (or n 1)) > (insert "‘")) > (insert "’")) > > (global-set-key [(control ?')] 'nice-single-quote) > > > _______________________________________________ > gnu-emacs-sources mailing list > [email protected] > http://lists.gnu.org/mailman/listinfo/gnu-emacs-sources >
Hi Thien, thanks. Have a question: What about "'" Is there a way to discriminate it verbally from your chars? Maybe have look for example at ar-singlequote-alnum-atpt, from https://code.launchpad.net/~a-roehler/s-x-emacs-werkstatt/thing-at-point-utils.el Should I rename it? Thanks again Andreas _______________________________________________ gnu-emacs-sources mailing list [email protected] http://lists.gnu.org/mailman/listinfo/gnu-emacs-sources
