all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#27962: [PATCH] Remove woman-push and woman-pop
@ 2017-08-05  2:26 npostavs
  2017-08-17  0:26 ` npostavs
  0 siblings, 1 reply; 2+ messages in thread
From: npostavs @ 2017-08-05  2:26 UTC (permalink / raw)
  To: 27962

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

Severity: wishlist
Tags: patch

These macros are not pulling their weight.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: patch --]
[-- Type: text/x-diff, Size: 2176 bytes --]

From 7bff7520808aed06adf86360906adb1d1b62f096 Mon Sep 17 00:00:00 2001
From: Noam Postavsky <npostavs@gmail.com>
Date: Thu, 29 Jun 2017 21:51:04 -0400
Subject: [PATCH] * lisp/woman.el (woman-push, woman-pop): Remove.

(woman2-RS): Use plain `push' instead of `woman-push'.
(woman2-RE): Conditionally `pop' instead of `woman-pop'.
---
 lisp/woman.el | 21 ++++++---------------
 1 file changed, 6 insertions(+), 15 deletions(-)

diff --git a/lisp/woman.el b/lisp/woman.el
index aa856c3957..6620ce4a2b 100644
--- a/lisp/woman.el
+++ b/lisp/woman.el
@@ -4261,22 +4261,11 @@ (defun woman2-get-prevailing-indent (&optional leave-eol)
       (if (> i 0) (setq woman-prevailing-indent i))))
   woman-prevailing-indent)
 
-(defmacro woman-push (value stack)
-  "Push VALUE onto STACK."
-  `(setq ,stack (cons ,value ,stack)))
-
-(defmacro woman-pop (variable stack)
-  "Pop into VARIABLE the value at the top of STACK.
-Allow for mismatched requests!"
-  `(if ,stack
-       (setq ,variable (car ,stack)
-	     ,stack (cdr ,stack))))
-
 (defun woman2-RS (to)
   ".RS i -- Start relative indent, move left margin in distance i.
 Set prevailing indent to 5 for nested indents.  Format paragraphs upto TO."
-  (woman-push woman-left-margin woman-RS-left-margin)
-  (woman-push woman-prevailing-indent woman-RS-prevailing-indent)
+  (push woman-left-margin woman-RS-left-margin)
+  (push woman-prevailing-indent woman-RS-prevailing-indent)
   (setq woman-left-margin (+ woman-left-margin
 			     (woman2-get-prevailing-indent))
 	woman-prevailing-indent woman-default-indent)
@@ -4285,8 +4274,10 @@ (defun woman2-RS (to)
 (defun woman2-RE (to)
   ".RE -- End of relative indent.  Format paragraphs upto TO.
 Set prevailing indent to amount of starting .RS."
-  (woman-pop woman-left-margin woman-RS-left-margin)
-  (woman-pop woman-prevailing-indent woman-RS-prevailing-indent)
+  (when woman-RS-left-margin
+    (setq woman-left-margin (pop woman-RS-left-margin)))
+  (when woman-RS-prevailing-indent
+    (setq woman-prevailing-indent (pop woman-RS-prevailing-indent)))
   (woman-delete-line 1)			; ignore any arguments
   (woman2-format-paragraphs to woman-left-margin))
 
-- 
2.11.1


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

* bug#27962: [PATCH] Remove woman-push and woman-pop
  2017-08-05  2:26 bug#27962: [PATCH] Remove woman-push and woman-pop npostavs
@ 2017-08-17  0:26 ` npostavs
  0 siblings, 0 replies; 2+ messages in thread
From: npostavs @ 2017-08-17  0:26 UTC (permalink / raw)
  To: 27962

tags 27962 fixed
close 27962 26.1
quit

npostavs@users.sourceforge.net writes:

> These macros are not pulling their weight.

Pushed to master.

[1: 3f938e1aea]: 2017-08-16 20:25:18 -0400
  * lisp/woman.el (woman-push, woman-pop): Remove.  (Bug#27962)
  http://git.savannah.gnu.org/cgit/emacs.git/commit/?id=3f938e1aea7e592de8c3ddb87508bf9d6ed8b3b5





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

end of thread, other threads:[~2017-08-17  0:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-05  2:26 bug#27962: [PATCH] Remove woman-push and woman-pop npostavs
2017-08-17  0:26 ` npostavs

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.