/[emacs]/emacs/lisp/textmodes/outline.el
ViewVC logotype

Diff of /emacs/lisp/textmodes/outline.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.50 by monnier, Thu Nov 29 02:15:03 2001 UTC revision 1.51 by monnier, Fri Nov 30 09:23:19 2001 UTC
# Line 363  If prefix argument CHILDREN is given, pr Line 363  If prefix argument CHILDREN is given, pr
363    (outline-back-to-heading)    (outline-back-to-heading)
364    (let* ((head (match-string 0))    (let* ((head (match-string 0))
365           (level (save-match-data (funcall outline-level)))           (level (save-match-data (funcall outline-level)))
366           (up-head (or (cdr (assoc head outline-level-headings))           (up-head (or (cdr (assoc head outline-level-heading))
367                        (cdr (assoc (1- level) outline-level-headings))                        (cdr (assoc (1- level) outline-level-heading))
368                        (save-excursion                        (save-excursion
369                          (save-match-data                          (save-match-data
370                            (outline-up-heading 1 t)                            (outline-up-heading 1 t)
371                            (match-string 0))))))                            (match-string 0))))))
372            
373      (unless (assoc level outline-level-headings)      (unless (assoc level outline-level-heading)
374        (push (cons level head) outline-level-headings))        (push (cons level head) outline-level-heading))
375    
376      (replace-match up-head nil t)      (replace-match up-head nil t)
377      (when children      (when children
# Line 385  If prefix argument CHILDREN is given, de Line 385  If prefix argument CHILDREN is given, de
385    (let* ((head (match-string 0))    (let* ((head (match-string 0))
386           (level (save-match-data (funcall outline-level)))           (level (save-match-data (funcall outline-level)))
387           (down-head           (down-head
388            (or (let ((x (car (rassoc head outline-level-headings))))            (or (let ((x (car (rassoc head outline-level-heading))))
389                  (if (stringp x) x))                  (if (stringp x) x))
390                (cdr (assoc (1+ level) outline-level-headings))                (cdr (assoc (1+ level) outline-level-heading))
391                (save-excursion                (save-excursion
392                  (save-match-data                  (save-match-data
393                    (while (and (not (eobp))                    (while (and (not (eobp))
# Line 412  If prefix argument CHILDREN is given, de Line 412  If prefix argument CHILDREN is given, de
412                      ;; Didn't work: keep it as is so it's still a heading.                      ;; Didn't work: keep it as is so it's still a heading.
413                      head))))))                      head))))))
414    
415      (unless (assoc level outline-level-headings)      (unless (assoc level outline-level-heading)
416        (push (cons level head) outline-level-headings))        (push (cons level head) outline-level-heading))
417            
418      (replace-match down-head nil t)      (replace-match down-head nil t)
419      (when children      (when children

Legend:
Removed from v.1.50  
changed lines
  Added in v.1.51

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26