all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Re: [Emacs-diffs] emacs-26 f5d0360: Escape column-zero doc parens
       [not found] ` <20171213071844.C2F26206A7@vcs0.savannah.gnu.org>
@ 2017-12-13 13:24   ` Stefan Monnier
  2017-12-13 13:31     ` Noam Postavsky
  2017-12-13 15:57     ` Eli Zaretskii
  0 siblings, 2 replies; 5+ messages in thread
From: Stefan Monnier @ 2017-12-13 13:24 UTC (permalink / raw)
  To: emacs-devel; +Cc: Glenn Morris

>     Escape column-zero doc parens.  A shame bug#21871 remains unfixed.

Arguably the "open-paren in column 0" convention is not needed any more
(tho even with the patch below, "open-paren in column 0" is still used
in some places such as for the outline-regexp in elisp-mode).
Any objection to the patch below?


        Stefan


diff --git a/lisp/emacs-lisp/lisp.el b/lisp/emacs-lisp/lisp.el
index 6952ef4cf4..3211b54e2c 100644
--- a/lisp/emacs-lisp/lisp.el
+++ b/lisp/emacs-lisp/lisp.el
@@ -339,12 +339,17 @@ beginning-of-defun-raw
 
    ((or defun-prompt-regexp open-paren-in-column-0-is-defun-start)
     (and (< arg 0) (not (eobp)) (forward-char 1))
-    (and (re-search-backward (if defun-prompt-regexp
-				 (concat (if open-paren-in-column-0-is-defun-start
-					     "^\\s(\\|" "")
-					 "\\(?:" defun-prompt-regexp "\\)\\s(")
-			       "^\\s(")
-			     nil 'move arg)
+    (and (let (found)
+           (while
+               (and (set found
+                         (re-search-backward (if defun-prompt-regexp
+				                 (concat (if open-paren-in-column-0-is-defun-start
+					                     "^\\s(\\|" "")
+					                 "\\(?:" defun-prompt-regexp "\\)\\s(")
+			                       "^\\s(")
+			                     nil 'move arg))
+                    (nth 8 (syntax-ppss))))
+           found)
 	 (progn (goto-char (1- (match-end 0)))
                 t)))
 



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

* Re: [Emacs-diffs] emacs-26 f5d0360: Escape column-zero doc parens
  2017-12-13 13:24   ` [Emacs-diffs] emacs-26 f5d0360: Escape column-zero doc parens Stefan Monnier
@ 2017-12-13 13:31     ` Noam Postavsky
  2017-12-13 15:57     ` Eli Zaretskii
  1 sibling, 0 replies; 5+ messages in thread
From: Noam Postavsky @ 2017-12-13 13:31 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: Glenn Morris, Emacs developers

On Wed, Dec 13, 2017 at 8:24 AM, Stefan Monnier
<monnier@iro.umontreal.ca> wrote:
> +    (and (let (found)
> +           (while
> +               (and (set found
                        ^^^

setq



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

* Re: [Emacs-diffs] emacs-26 f5d0360: Escape column-zero doc parens
  2017-12-13 13:24   ` [Emacs-diffs] emacs-26 f5d0360: Escape column-zero doc parens Stefan Monnier
  2017-12-13 13:31     ` Noam Postavsky
@ 2017-12-13 15:57     ` Eli Zaretskii
  2017-12-13 16:32       ` Stefan Monnier
  1 sibling, 1 reply; 5+ messages in thread
From: Eli Zaretskii @ 2017-12-13 15:57 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: rgm, emacs-devel

> From: Stefan Monnier <monnier@iro.umontreal.ca>
> Date: Wed, 13 Dec 2017 08:24:40 -0500
> Cc: Glenn Morris <rgm@gnu.org>
> 
> >     Escape column-zero doc parens.  A shame bug#21871 remains unfixed.
> 
> Arguably the "open-paren in column 0" convention is not needed any more

It isn't?  I don't get an impression of a consensus from re-reading
the bug discussions.

> Any objection to the patch below?

On what branch?

Thanks.



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

* Re: [Emacs-diffs] emacs-26 f5d0360: Escape column-zero doc parens
  2017-12-13 15:57     ` Eli Zaretskii
@ 2017-12-13 16:32       ` Stefan Monnier
  2017-12-13 18:36         ` Eli Zaretskii
  0 siblings, 1 reply; 5+ messages in thread
From: Stefan Monnier @ 2017-12-13 16:32 UTC (permalink / raw)
  To: emacs-devel

>> Any objection to the patch below?
> On what branch?

master, of course,


        Stefan




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

* Re: [Emacs-diffs] emacs-26 f5d0360: Escape column-zero doc parens
  2017-12-13 16:32       ` Stefan Monnier
@ 2017-12-13 18:36         ` Eli Zaretskii
  0 siblings, 0 replies; 5+ messages in thread
From: Eli Zaretskii @ 2017-12-13 18:36 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

> From: Stefan Monnier <monnier@iro.umontreal.ca>
> Date: Wed, 13 Dec 2017 11:32:08 -0500
> 
> >> Any objection to the patch below?
> > On what branch?
> 
> master, of course,

Fine with me, thanks.



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

end of thread, other threads:[~2017-12-13 18:36 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20171213071843.30004.40623@vcs0.savannah.gnu.org>
     [not found] ` <20171213071844.C2F26206A7@vcs0.savannah.gnu.org>
2017-12-13 13:24   ` [Emacs-diffs] emacs-26 f5d0360: Escape column-zero doc parens Stefan Monnier
2017-12-13 13:31     ` Noam Postavsky
2017-12-13 15:57     ` Eli Zaretskii
2017-12-13 16:32       ` Stefan Monnier
2017-12-13 18:36         ` Eli Zaretskii

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.