Hot answers tagged

3

You need to remove the parenthesis from your custom function. It's calling for hook function name there, not its evaluation. (define-abbrev-table 'global-abbrev-table '(("td" "" insert-current-iso-date))) Anyway, to my understanding, you should define your abbrevs the way it's intended which is using define-abbrev, whose syntax is easier to follow, and ...


2

Curious. add-abbrev scans backward by words using forward-word to find out what abbrev to define. I'm not entirely sure why, but even though both "y" and "α" are defined as word characters in the syntax table (at least in the modes I tried it in, ymmv), it still considers there to be a word boundary between them. You can see this if you skip backwards and ...


1

This can be done using abbrev mode: ;; Hook to go back N chars after completion. (defun my-abbrev-back-4-no-self-insert () (progn (forward-char -4) t)) (put 'my-abbrev-back-4-no-self-insert 'no-self-insert t) (define-abbrev-table 'global-abbrev-table (list (list "$" "<m></m>" 'my-abbrev-back-4-no-self-insert ...


1

Since you don't need actual abbreviations, just call completing-read with your list of sentences. This will let you define the list of sentences however you want. Here's the simplest possible implementation: (defun db48x/insert-canned-response () (interactive) (let ((lines (with-temp-buffer (insert-file-contents "~/temp/sentences.txt") ...


1

From the documentation: M-x abbrev-mode toggles Abbrev mode. Either, you want Abbrev mode always on, everytime/everywhere, then you put the following in your ~/.emacs file: (setq-default abbrev-mode t) Either you want Abbrev mode on, but only for the some modes, for example: erc-mode, emacs-lisp-mode, text-mode, in this case, you can put in your ~/.emacs ...


1

skeleton-read will read from the minibuffer, which is a separate buffer that's not using latex-mode, which is why your abbrev isn't working there. You could put your abbrev in global-abbrev-table so it's also available in the minibuffers, you could do: (define-skeleton myfunc "" "" (setq v1 (minibuffer-with-setup-hook (lambda () (setq ...


Only top voted, non community-wiki answers of a minimum length are eligible