>>> "PDN" == Paul D Nelson <ultr...@gmail.com> writes:

   > Hi Uwe, could you try this and let me know what shows up in *Messages*?
   > (defun my-after-insert-environment-hook (new-env beg end)
   >   "Hook to run after a LaTeX environment is modified."
   >   (message "Test: %s" (symbol-name last-command))
   >   (unless (equal last-command 'LaTeX-environment)
   >     (when (equal new-env "equation")
   >       (unless (save-excursion (goto-char beg)
   >                               (search-forward "\\label{" end t))
   >         (save-excursion
   >           (goto-char beg)
   >           (forward-line 1)
   >           (open-line 1)
   >           (reftex-label)
   >           (LaTeX-indent-line))))
   >     (when (equal (substring new-env -1) "*")
   >       (save-restriction
   >         (narrow-to-region beg end)
   >         (save-excursion
   >           (goto-char (point-min))
   >           (LaTeX--strip-labels))))))


Thanks for taking care of this, here is the output
--8<---------------cut here---------------start------------->8---
my-after-insert-environment-hook
(my-after-insert-environment-hook)
Now reftex-label-alist is set to 6 [2 times]
Applying style hooks...
Loading /home/oub/auto/test.el (source)...done
Sorting LaTeX-url-DeclareUrlCommand...done
Removing duplicates...done
Compiling label environment definitions...done
Sorting LaTeX-amsthm-newtheorem...done
Removing duplicates...done
Applying style hooks...done
Saving file /home/oub/test.tex...
Wrote /home/oub/test.tex
Sorting LaTeX-environment...done
Removing duplicates...done
Test: completion-at-point
Saving file /home/oub/test.tex...
Wrote /home/oub/test.tex
Updating buffer list...done
Commands: m, u, t, RET, g, k, S, D, Q; q to quit; h for help
Mark set
--8<---------------cut here---------------end--------------->8---

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to