emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] /srv/bzr/emacs/trunk r105690: woman.el fix for bug#9447.


From: Glenn Morris
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r105690: woman.el fix for bug#9447.
Date: Thu, 08 Sep 2011 23:23:47 -0700
User-agent: Bazaar (2.3.1)

------------------------------------------------------------
revno: 105690
committer: Glenn Morris <address@hidden>
branch nick: trunk
timestamp: Thu 2011-09-08 23:23:47 -0700
message:
  woman.el fix for bug#9447.
  
  * lisp/woman.el (woman-if-body): When processing an .el block,
  do not delete the next .el block as well.
modified:
  lisp/ChangeLog
  lisp/woman.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2011-09-09 01:06:52 +0000
+++ b/lisp/ChangeLog    2011-09-09 06:23:47 +0000
@@ -1,3 +1,8 @@
+2011-09-09  Glenn Morris  <address@hidden>
+
+       * woman.el (woman-if-body): When processing an .el block,
+       do not delete the next .el block as well.  (Bug#9447)
+
 2011-09-08  Martin Rudalics  <address@hidden>
 
        * window.el (window-deletable-p): Make sure window is live before

=== modified file 'lisp/woman.el'
--- a/lisp/woman.el     2011-07-01 04:52:27 +0000
+++ b/lisp/woman.el     2011-09-09 06:23:47 +0000
@@ -2621,15 +2621,27 @@
     ;; Process matching .el anything:
     (cond ((string= request "ie")
           ;; Discard unless previous .ie c `evaluated to false'.
+          ;; IIUC, an .ie must be followed by an .el.
+          ;; (An if with no else uses .if rather than .ie.)
+          ;; TODO warn if no .el found?
+          ;; The .el should come immediately after the .ie (modulo
+          ;; comments etc), but this searches to eob.
           (cond ((re-search-forward "^[.'][ \t]*el[ \t]*" nil t)
                  (woman-delete-match 0)
                  (woman-if-body "el" nil (not delete)))))
+;;; FIXME neither the comment nor the code here make sense to me.
+;;; This branch was executed for an else (any else, AFAICS).
+;;; At this point, the else in question has already been processed above.
+;;; The re-search will find the _next_ else, if there is one, and
+;;; delete it.  If there is one, it belongs to another if block.  (Bug#9447)
+;;; woman0-el does not need this bit either.
          ;; Got here after processing a single-line `.ie' as a body
          ;; clause to be discarded:
-         ((string= request "el")
-          (cond ((re-search-forward "^[.'][ \t]*el[ \t]*" nil t)
-                 (woman-delete-match 0)
-                 (woman-if-body "el" nil t)))))
+;;;      ((string= request "el")
+;;;       (cond ((re-search-forward "^[.'][ \t]*el[ \t]*" nil t)
+;;;              (woman-delete-match 0)
+;;;              (woman-if-body "el" nil t)))))
+          )
     (goto-char from)))
 
 (defun woman0-el ()


reply via email to

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