unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* small allout patch
@ 2006-10-09 16:20 Ken Manheimer
  2006-10-09 21:42 ` Richard Stallman
  0 siblings, 1 reply; 3+ messages in thread
From: Ken Manheimer @ 2006-10-09 16:20 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 383 bytes --]

this catches a loose end in dealing with aberrant topics, clarifying
the api layering.  allout continues to appear to be settling into
stability.
--
ken
ken.manheimer@gmail.com
http://myriadicity.net

2006-10-09  Ken Manheimer  <ken.manheimer@gmail.com>

	* allout.el (allout-back-to-current-heading): Base on lower-level
	routines to get proper disqualification of aberrant topics.

[-- Attachment #2: allout-patch.txt --]
[-- Type: text/plain, Size: 1847 bytes --]

Index: allout.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/allout.el,v
retrieving revision 1.85
diff -u -u -r1.85 allout.el
--- allout.el	1 Oct 2006 16:48:11 -0000	1.85
+++ allout.el	9 Oct 2006 05:05:57 -0000
@@ -2736,24 +2736,22 @@
     (1- allout-recent-prefix-end)))
 ;;;_   > allout-back-to-current-heading ()
 (defun allout-back-to-current-heading ()
-  "Move to heading line of current topic, or beginning if already on the line.
+  "Move to heading line of current topic, or beginning if not in a topic.
 
-Return value of point, unless we started outside of (before any) topics,
-in which case we return nil."
+If interactive, we position at the end of the prefix.
+
+Return value of resulting point, unless we started outside
+of (before any) topics, in which case we return nil."
 
   (allout-beginning-of-current-line)
-  (if (or (allout-on-current-heading-p)
-          (and (re-search-backward (concat "^\\(" allout-regexp "\\)")
-                                   nil 'move)
-               (progn (while (allout-hidden-p)
-                        (allout-beginning-of-current-line)
-                        (if (not (looking-at allout-regexp))
-                            (re-search-backward allout-regexp
-                                                nil 'move)))
-                      (allout-prefix-data))))
-      (if (interactive-p)
-          (allout-end-of-prefix)
-        (point))))
+  (let ((bol-point (point)))
+    (allout-goto-prefix-doublechecked)
+    (if (<= (point) bol-point)
+        (if (interactive-p)
+            (allout-end-of-prefix)
+          (point))
+      (goto-char (point-min))
+      nil)))
 ;;;_   > allout-back-to-heading ()
 (defalias 'allout-back-to-heading 'allout-back-to-current-heading)
 ;;;_   > allout-pre-next-prefix ()

[-- Attachment #3: ChangeLog-entry.txt --]
[-- Type: text/plain, Size: 182 bytes --]

2006-10-09  Ken Manheimer  <ken.manheimer@gmail.com>

	* allout.el (allout-back-to-current-heading): Base on lower-level
	routines to get proper disqualification of aberrant topics.

[-- Attachment #4: Type: text/plain, Size: 142 bytes --]

_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: small allout patch
  2006-10-09 16:20 small allout patch Ken Manheimer
@ 2006-10-09 21:42 ` Richard Stallman
  2006-10-09 23:34   ` Chong Yidong
  0 siblings, 1 reply; 3+ messages in thread
From: Richard Stallman @ 2006-10-09 21:42 UTC (permalink / raw)
  Cc: emacs-devel

Would someone please install Ken's patch?

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: small allout patch
  2006-10-09 21:42 ` Richard Stallman
@ 2006-10-09 23:34   ` Chong Yidong
  0 siblings, 0 replies; 3+ messages in thread
From: Chong Yidong @ 2006-10-09 23:34 UTC (permalink / raw)
  Cc: Ken Manheimer, emacs-devel

Richard Stallman <rms@gnu.org> writes:

> Would someone please install Ken's patch?

Done.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-10-09 23:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-10-09 16:20 small allout patch Ken Manheimer
2006-10-09 21:42 ` Richard Stallman
2006-10-09 23:34   ` Chong Yidong

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).