[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[AUCTeX-devel] Re: tex-symb repository at Google Code Hosting
From: |
Leo |
Subject: |
[AUCTeX-devel] Re: tex-symb repository at Google Code Hosting |
Date: |
Sat, 24 Jan 2009 22:17:17 +0800 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (windows-nt) |
Hi Masayuki,
I came across this thread and found it interesting. But I can not find
anything to download on the google code page and the discussion seems
finished prematurely.
What's going on with this project?
Regards,
Leo
On 2007-02-13 21:18 +0800, Masayuki Ataka wrote:
> From: Ralf Angeli <address@hidden>
> Subject: Re: [AUCTeX-devel] tex-symb repository at Google Code Hosting
> Date: Sat, 10 Feb 2007 18:04:43 +0100
>
>> * Ralf Angeli (2007-02-10) writes:
>>
>> > (lambda ()
>> > (save-excursion
>> > (backward-char)
>> > (or (TeX-fold-macro) (TeX-fold-math))))
>>
>> Uh, better use the internal function providing proper return values.
>> With a test for the value of the variable controlling activation of
>> the feature and with support for environments it could like this:
>>
>> (lambda ()
>> (when TeX-fold-auto
>> (save-excursion
>> (backward-char)
>> (or (TeX-fold-item 'macro)
>> (TeX-fold-item 'math)
>> (TeX-fold-item 'env)))))
>
> We should check that the minor-mode TeX-fold-mode is on, too ;)
>
> (lambda ()
> (when (and TeX-fold-mode TeX-fold-auto)
> (save-excursion
> ...
>
> This is a patch for hook version.
> If ok, I'll commit this.
>
> Index: tex-fold.el
> ===================================================================
> RCS file: /sources/auctex/auctex/tex-fold.el,v
> retrieving revision 1.57
> diff -u -r1.57 tex-fold.el
> --- tex-fold.el 10 Feb 2007 15:59:19 -0000 1.57
> +++ tex-fold.el 13 Feb 2007 13:03:44 -0000
> @@ -175,6 +175,12 @@
> :group 'TeX-fold
> :type 'boolean)
>
> +(defcustom TeX-fold-auto t
> + "If non-nil, fold macros automatically after `TeX-insert-macro'."
> + :group 'TeX-fold
> + :type 'boolean)
> +
> +
> (defface TeX-fold-folded-face
> '((((class color) (background light))
> (:foreground "SlateBlue"))
> @@ -843,6 +849,13 @@
> (set (make-local-variable 'search-invisible) t)
> (add-hook 'post-command-hook 'TeX-fold-post-command nil t)
> (add-hook 'LaTeX-fill-newline-hook 'TeX-fold-update-at-point nil t)
> + (add-hook 'TeX-after-insert-macro-hook (lambda ()
> + (when (and TeX-fold-mode
> TeX-fold-auto)
> + (save-excursion
> + (backward-char)
> + (or (TeX-fold-item 'macro)
> + (TeX-fold-item 'math)
> + (TeX-fold-item
> 'env))))))
> ;; Update the `TeX-fold-*-spec-list-internal' variables.
> (dolist (elt '("macro" "env" "math"))
> (set (intern (format "TeX-fold-%s-spec-list-internal" elt))
> Index: tex.el
> ===================================================================
> RCS file: /sources/auctex/auctex/tex.el,v
> retrieving revision 5.601
> diff -u -r5.601 tex.el
> --- tex.el 10 Feb 2007 15:59:11 -0000 5.601
> +++ tex.el 13 Feb 2007 13:03:44 -0000
> @@ -2019,6 +2019,9 @@
> "String used as a closing brace for argument insertion.
> The variable will be temporarily let-bound with the necessary value.")
>
> +(defvar TeX-after-insert-macro-hook nil
> + "A hook run after `TeX-insert-macro'.")
> +
> (defvar TeX-macro-history nil)
>
> (defun TeX-insert-macro (symbol)
> @@ -2042,7 +2045,8 @@
> (setq symbol TeX-default-macro))
> ((interactive-p)
> (setq TeX-default-macro symbol)))
> - (TeX-parse-macro symbol (cdr-safe (assoc symbol (TeX-symbol-list)))))
> + (TeX-parse-macro symbol (cdr-safe (assoc symbol (TeX-symbol-list))))
> + (run-hooks 'TeX-after-insert-macro-hook))
>
> (defvar TeX-electric-macro-map
> (let ((map (make-sparse-keymap)))
>
> ---
> email: address@hidden
> Name:: Masayuki Ataka // (Japan)
- [AUCTeX-devel] Re: tex-symb repository at Google Code Hosting,
Leo <=