summaryrefslogtreecommitdiff
path: root/lisp/woman.el
diff options
context:
space:
mode:
authorNoam Postavsky <npostavs@gmail.com>2017-06-29 21:51:04 -0400
committerNoam Postavsky <npostavs@gmail.com>2017-08-16 20:25:18 -0400
commit3f938e1aea7e592de8c3ddb87508bf9d6ed8b3b5 (patch)
tree89269d5d8d00de8439188e29e45e56d1309691bc /lisp/woman.el
parent794c3cd3a2dfcedc829ccb5dc413c99fb670f4a1 (diff)
downloademacs-3f938e1aea7e592de8c3ddb87508bf9d6ed8b3b5.tar.gz
* lisp/woman.el (woman-push, woman-pop): Remove. (Bug#27962)
(woman2-RS): Use plain `push' instead of `woman-push'. (woman2-RE): Conditionally `pop' instead of `woman-pop'.
Diffstat (limited to 'lisp/woman.el')
-rw-r--r--lisp/woman.el21
1 files changed, 6 insertions, 15 deletions
diff --git a/lisp/woman.el b/lisp/woman.el
index aa856c39577..6620ce4a2bb 100644
--- a/lisp/woman.el
+++ b/lisp/woman.el
@@ -4261,22 +4261,11 @@ Delete line from point and eol unless LEAVE-EOL is non-nil."
(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 @@ Set prevailing indent to 5 for nested indents. Format paragraphs upto 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))