emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] 269/299: Fix outline promotion/demotion.


From: Stefan Monnier
Subject: [elpa] 269/299: Fix outline promotion/demotion.
Date: Sun, 02 Nov 2014 03:11:54 +0000

monnier pushed a commit to branch externals/auctex
in repository elpa.

commit 0da29134c929c52229bdd8eb43a0f32bbea22e06
Author: Tassilo Horn <address@hidden>
Date:   Fri Jul 25 18:54:47 2014 +0100

    Fix outline promotion/demotion.
    
    * latex.el (LaTeX-largest-level-set): Adapt
    `outline-heading-alist' according to largest level in order to
    make `outline-promote' (and others) work correctly.
---
 ChangeLog |    6 ++++++
 latex.el  |    8 ++++++++
 2 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 40324e7..2be1b61 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2014-07-25  Tassilo Horn  <address@hidden>
+
+       * latex.el (LaTeX-largest-level-set): Adapt
+       `outline-heading-alist' according to largest level in order to
+       make `outline-promote' (and others) work correctly.
+
 2014-07-25  Mos� Giordano  <address@hidden>
 
        * doc/auctex.texi (Adding Macros): Document `TeX-date-format'.
diff --git a/latex.el b/latex.el
index 89be909..c798cda 100644
--- a/latex.el
+++ b/latex.el
@@ -280,6 +280,14 @@ SECTION has to be a string contained in 
`LaTeX-section-list'.
 Additionally the function will invalidate the section submenu in
 order to let the menu filter regenerate it."
   (setq LaTeX-largest-level (LaTeX-section-level section))
+  (let ((offset (LaTeX-outline-offset)))
+    (when (> offset 0)
+      (let (lst)
+       (dolist (tup outline-heading-alist)
+         (setq lst (cons (cons (car tup)
+                               (+ offset (cdr tup)))
+                         lst)))
+       (setq outline-heading-alist (nreverse lst)))))
   (setq LaTeX-section-menu nil))
 
 (defun LaTeX-outline-offset ()



reply via email to

[Prev in Thread] Current Thread [Next in Thread]