Mercurial > emacs
comparison lisp/woman.el @ 111407:672ffe880560
Quiet, woman. (Sorry...).
* lisp/woman.el (woman0-roff-buffer, woman1-roff-buffer)
(woman2-roff-buffer): Give local variable `request' a prefix.
(woman0-macro): Rename argument `request' in the same way.
(woman-request): New name for `request' dynamic variable.
(woman-unquote, woman-forward-arg): Update for above name change.
(woman1-roff-buffer): Give local variable `unquote' a prefix.
(woman1-unquote): New name for `unquote' dynamic variable.
(woman1-B-or-I, woman1-alt-fonts): Update for above name change.
(woman-translations): Rename from `translations'. No longer global.
(woman2-tr, woman-translate): Update for above name change.
(woman-translate): Check for bound variable.
(woman2-roff-buffer): Give local variable `translations' a prefix.
author | Glenn Morris <rgm@gnu.org> |
---|---|
date | Fri, 05 Nov 2010 01:16:55 -0700 |
parents | bf6806de6892 |
children | 249a1455856a |
comparison
equal
deleted
inserted
replaced
111406:86b26e5fe3fc | 111407:672ffe880560 |
---|---|
2473 (defun woman0-roff-buffer (from) | 2473 (defun woman0-roff-buffer (from) |
2474 "Process conditional-type requests and user-defined macros. | 2474 "Process conditional-type requests and user-defined macros. |
2475 Start at FROM and re-scan new text as appropriate." | 2475 Start at FROM and re-scan new text as appropriate." |
2476 (goto-char from) | 2476 (goto-char from) |
2477 (let ((woman0-if-to (make-marker)) | 2477 (let ((woman0-if-to (make-marker)) |
2478 request woman0-macro-alist | 2478 woman-request woman0-macro-alist |
2479 (woman0-search-regex-start woman0-search-regex-start) | 2479 (woman0-search-regex-start woman0-search-regex-start) |
2480 (woman0-search-regex | 2480 (woman0-search-regex |
2481 (concat woman0-search-regex-start woman0-search-regex-end)) | 2481 (concat woman0-search-regex-start woman0-search-regex-end)) |
2482 woman0-rename-alist) | 2482 woman0-rename-alist) |
2483 (set-marker-insertion-type woman0-if-to t) | 2483 (set-marker-insertion-type woman0-if-to t) |
2484 (while (re-search-forward woman0-search-regex nil t) | 2484 (while (re-search-forward woman0-search-regex nil t) |
2485 (setq request (match-string 1)) | 2485 (setq woman-request (match-string 1)) |
2486 (cond ((string= request "ig") (woman0-ig)) | 2486 (cond ((string= woman-request "ig") (woman0-ig)) |
2487 ((string= request "if") (woman0-if "if")) | 2487 ((string= woman-request "if") (woman0-if "if")) |
2488 ((string= request "ie") (woman0-if "ie")) | 2488 ((string= woman-request "ie") (woman0-if "ie")) |
2489 ((string= request "el") (woman0-el)) | 2489 ((string= woman-request "el") (woman0-el)) |
2490 ((string= request "so") (woman0-so)) | 2490 ((string= woman-request "so") (woman0-so)) |
2491 ((string= request "rn") (woman0-rn)) | 2491 ((string= woman-request "rn") (woman0-rn)) |
2492 ((string= request "de") (woman0-de)) | 2492 ((string= woman-request "de") (woman0-de)) |
2493 ((string= request "am") (woman0-de 'append)) | 2493 ((string= woman-request "am") (woman0-de 'append)) |
2494 (t (woman0-macro request)))) | 2494 (t (woman0-macro woman-request)))) |
2495 (set-marker woman0-if-to nil) | 2495 (set-marker woman0-if-to nil) |
2496 (woman0-rename) | 2496 (woman0-rename) |
2497 ;; Should now re-run `woman0-roff-buffer' if any renaming was | 2497 ;; Should now re-run `woman0-roff-buffer' if any renaming was |
2498 ;; done, but let's just hope this is not necessary for now! | 2498 ;; done, but let's just hope this is not necessary for now! |
2499 )) | 2499 )) |
2520 (while (re-search-forward "\\\\f\\(\\[[^]]+\\]\\|(..\\|.\\)" to t) | 2520 (while (re-search-forward "\\\\f\\(\\[[^]]+\\]\\|(..\\|.\\)" to t) |
2521 (woman-delete-match 0)) | 2521 (woman-delete-match 0)) |
2522 (goto-char from) ; necessary! | 2522 (goto-char from) ; necessary! |
2523 (woman2-process-escapes to 'numeric)) | 2523 (woman2-process-escapes to 'numeric)) |
2524 | 2524 |
2525 ;; request does not appear to be used dynamically by any callees. | |
2525 (defun woman0-if (request) | 2526 (defun woman0-if (request) |
2526 ".if/ie c anything -- Discard unless c evaluates to true. | 2527 ".if/ie c anything -- Discard unless c evaluates to true. |
2527 Remember condition for use by a subsequent `.el'. | 2528 Remember condition for use by a subsequent `.el'. |
2528 REQUEST is the invoking directive without the leading dot." | 2529 REQUEST is the invoking directive without the leading dot." |
2529 ;; c evaluates to a one-character built-in condition name or | 2530 ;; c evaluates to a one-character built-in condition name or |
2571 (goto-char from))) | 2572 (goto-char from))) |
2572 (if (eq c 0) | 2573 (if (eq c 0) |
2573 (woman-if-ignore woman0-if-to request) ; ERROR! | 2574 (woman-if-ignore woman0-if-to request) ; ERROR! |
2574 (woman-if-body request woman0-if-to (eq c negated))))) | 2575 (woman-if-body request woman0-if-to (eq c negated))))) |
2575 | 2576 |
2577 ;; request is not used dynamically by any callees. | |
2576 (defun woman-if-body (request to delete) ; should be reversed as `accept'? | 2578 (defun woman-if-body (request to delete) ; should be reversed as `accept'? |
2577 "Process if-body, including \\{ ... \\}. | 2579 "Process if-body, including \\{ ... \\}. |
2578 REQUEST is the invoking directive without the leading dot. | 2580 REQUEST is the invoking directive without the leading dot. |
2579 If TO is non-nil then delete the if-body. | 2581 If TO is non-nil then delete the if-body. |
2580 If DELETE is non-nil then delete from point." | 2582 If DELETE is non-nil then delete from point." |
2627 ;; This does not work too well, but it's only for debugging! | 2629 ;; This does not work too well, but it's only for debugging! |
2628 (skip-chars-forward "^ \t") | 2630 (skip-chars-forward "^ \t") |
2629 (if (looking-at "[ \t]*\\{") (search-forward "\\}")) | 2631 (if (looking-at "[ \t]*\\{") (search-forward "\\}")) |
2630 (forward-line 1)))) | 2632 (forward-line 1)))) |
2631 | 2633 |
2634 ;; request is not used dynamically by any callees. | |
2632 (defun woman-if-ignore (to request) | 2635 (defun woman-if-ignore (to request) |
2633 "Ignore but warn about an if request ending at TO, named REQUEST." | 2636 "Ignore but warn about an if request ending at TO, named REQUEST." |
2634 (WoMan-warn-ignored request "ignored -- condition not handled!") | 2637 (WoMan-warn-ignored request "ignored -- condition not handled!") |
2635 (if woman-ignore | 2638 (if woman-ignore |
2636 (woman-if-body request to t) | 2639 (woman-if-body request to t) |
2758 (delete-region from (point)) | 2761 (delete-region from (point)) |
2759 (backward-char))) ; return to end of .de/am line | 2762 (backward-char))) ; return to end of .de/am line |
2760 (beginning-of-line) ; delete .de/am line | 2763 (beginning-of-line) ; delete .de/am line |
2761 (woman-delete-line 1)) | 2764 (woman-delete-line 1)) |
2762 | 2765 |
2763 (defun woman0-macro (request) | 2766 ;; request may be used dynamically (woman-interpolate-macro calls |
2764 "Process the macro call named REQUEST." | 2767 ;; woman-forward-arg). |
2768 (defun woman0-macro (woman-request) | |
2769 "Process the macro call named WOMAN-REQUEST." | |
2765 ;; Leaves point at start of new text. | 2770 ;; Leaves point at start of new text. |
2766 (let ((macro (assoc request woman0-macro-alist))) | 2771 (let ((macro (assoc woman-request woman0-macro-alist))) |
2767 (if macro | 2772 (if macro |
2768 (woman-interpolate-macro (cdr macro)) | 2773 (woman-interpolate-macro (cdr macro)) |
2769 ;; SHOULD DELETE THE UNINTERPRETED REQUEST!!!!! | 2774 ;; SHOULD DELETE THE UNINTERPRETED REQUEST!!!!! |
2770 ;; Output this message once only per call (cf. strings)? | 2775 ;; Output this message once only per call (cf. strings)? |
2771 (WoMan-warn "Undefined macro %s not interpolated!" request)))) | 2776 (WoMan-warn "Undefined macro %s not interpolated!" woman-request)))) |
2772 | 2777 |
2773 (defun woman-interpolate-macro (macro) | 2778 (defun woman-interpolate-macro (macro) |
2774 "Interpolate (.de) or append (.am) expansion of MACRO into the buffer." | 2779 "Interpolate (.de) or append (.am) expansion of MACRO into the buffer." |
2775 ;; Could make this more efficient by checking which arguments are | 2780 ;; Could make this more efficient by checking which arguments are |
2776 ;; actually used in the expansion! | 2781 ;; actually used in the expansion! |
2983 (help-print-return-message))) | 2988 (help-print-return-message))) |
2984 | 2989 |
2985 | 2990 |
2986 ;;; Formatting macros that do not cause a break: | 2991 ;;; Formatting macros that do not cause a break: |
2987 | 2992 |
2988 (defvar request) ; Bound locally by woman1-roff-buffer | 2993 ;; Bound locally by woman[012]-roff-buffer, and also, annoyingly and |
2989 (defvar unquote) ; Bound locally by woman1-roff-buffer | 2994 ;; confusingly, as a function argument. Use dynamically in |
2995 ;; woman-unquote and woman-forward-arg. | |
2996 (defvar woman-request) | |
2990 | 2997 |
2991 (defun woman-unquote (to) | 2998 (defun woman-unquote (to) |
2992 "Delete any double-quote characters between point and TO. | 2999 "Delete any double-quote characters between point and TO. |
2993 Leave point at TO (which should be a marker)." | 3000 Leave point at TO (which should be a marker)." |
2994 (let (in-quote) | 3001 (let (in-quote) |
2999 (if (or in-quote (looking-at ".*\"")) ; paired | 3006 (if (or in-quote (looking-at ".*\"")) ; paired |
3000 (delete-char -1)) | 3007 (delete-char -1)) |
3001 (setq in-quote (not in-quote)) | 3008 (setq in-quote (not in-quote)) |
3002 )) | 3009 )) |
3003 (if in-quote | 3010 (if in-quote |
3004 (WoMan-warn "Unpaired \" in .%s arguments." request)))) | 3011 (WoMan-warn "Unpaired \" in .%s arguments." woman-request)))) |
3005 | 3012 |
3006 (defsubst woman-unquote-args () | 3013 (defsubst woman-unquote-args () |
3007 "Delete any double-quote characters up to the end of the line." | 3014 "Delete any double-quote characters up to the end of the line." |
3008 (woman-unquote (save-excursion (end-of-line) (point-marker)))) | 3015 (woman-unquote (save-excursion (end-of-line) (point-marker)))) |
3009 | 3016 |
3010 (defun woman1-roff-buffer () | 3017 (defun woman1-roff-buffer () |
3011 "Process non-breaking requests." | 3018 "Process non-breaking requests." |
3012 (let ((case-fold-search t) | 3019 (let ((case-fold-search t) |
3013 request fn unquote) | 3020 woman-request fn woman1-unquote) |
3014 (while | 3021 (while |
3015 ;; Find next control line: | 3022 ;; Find next control line: |
3016 (re-search-forward woman-request-regexp nil t) | 3023 (re-search-forward woman-request-regexp nil t) |
3017 (cond | 3024 (cond |
3018 ;; Construct woman function to call: | 3025 ;; Construct woman function to call: |
3019 ((setq fn (intern-soft | 3026 ((setq fn (intern-soft |
3020 (concat "woman1-" | 3027 (concat "woman1-" |
3021 (setq request (match-string 1))))) | 3028 (setq woman-request (match-string 1))))) |
3022 (if (get fn 'notfont) ; not a font-change request | 3029 (if (get fn 'notfont) ; not a font-change request |
3023 (funcall fn) | 3030 (funcall fn) |
3024 ;; Delete request or macro name: | 3031 ;; Delete request or macro name: |
3025 (woman-delete-match 0) | 3032 (woman-delete-match 0) |
3026 ;; If no args then apply to next line else unquote args | 3033 ;; If no args then apply to next line else unquote args |
3027 ;; (unquote is used by called function): | 3034 ;; (woman1-unquote is used by called function): |
3028 (setq unquote (not (eolp))) | 3035 (setq woman1-unquote (not (eolp))) |
3029 (if (eolp) (delete-char 1)) | 3036 (if (eolp) (delete-char 1)) |
3030 ; ;; Hide leading control character in unquoted argument: | 3037 ; ;; Hide leading control character in unquoted argument: |
3031 ; (cond ((memq (following-char) '(?. ?')) | 3038 ; (cond ((memq (following-char) '(?. ?')) |
3032 ; (insert "\\&") | 3039 ; (insert "\\&") |
3033 ; (beginning-of-line))) | 3040 ; (beginning-of-line))) |
3034 ;; Call the appropriate function: | 3041 ;; Call the appropriate function: |
3035 (funcall fn) | 3042 (funcall fn) |
3036 ;; Hide leading control character in quoted argument (only): | 3043 ;; Hide leading control character in quoted argument (only): |
3037 (if (and unquote (memq (following-char) '(?. ?'))) | 3044 (if (and woman1-unquote (memq (following-char) '(?. ?'))) |
3038 (insert "\\&")))))))) | 3045 (insert "\\&")))))))) |
3039 | 3046 |
3040 ;;; Font-changing macros: | 3047 ;;; Font-changing macros: |
3041 | 3048 |
3042 (defun woman1-B () | 3049 (defun woman1-B () |
3044 (woman1-B-or-I ".ft B\n")) | 3051 (woman1-B-or-I ".ft B\n")) |
3045 | 3052 |
3046 (defun woman1-I () | 3053 (defun woman1-I () |
3047 ".I -- Set words of current line in italic font." | 3054 ".I -- Set words of current line in italic font." |
3048 (woman1-B-or-I ".ft I\n")) | 3055 (woman1-B-or-I ".ft I\n")) |
3056 | |
3057 (defvar woman1-unquote) ; bound locally by woman1-roff-buffer | |
3049 | 3058 |
3050 (defun woman1-B-or-I (B-or-I) | 3059 (defun woman1-B-or-I (B-or-I) |
3051 ".B/I -- Set words of current line in bold/italic font. | 3060 ".B/I -- Set words of current line in bold/italic font. |
3052 B-OR-I is the appropriate complete control line." | 3061 B-OR-I is the appropriate complete control line." |
3053 ;; Should NOT concatenate the arguments! | 3062 ;; Should NOT concatenate the arguments! |
3054 (insert B-or-I) ; because it might be a control line | 3063 (insert B-or-I) ; because it might be a control line |
3055 ;; Return to bol to process .SM/.B, .B/.if etc. | 3064 ;; Return to bol to process .SM/.B, .B/.if etc. |
3056 ;; or start of first arg to hide leading control char. | 3065 ;; or start of first arg to hide leading control char. |
3057 (save-excursion | 3066 (save-excursion |
3058 (if unquote | 3067 (if woman1-unquote |
3059 (woman-unquote-args) | 3068 (woman-unquote-args) |
3060 (while (looking-at "^[.']") (forward-line)) | 3069 (while (looking-at "^[.']") (forward-line)) |
3061 (end-of-line) | 3070 (end-of-line) |
3062 (delete-horizontal-space)) | 3071 (delete-horizontal-space)) |
3063 (insert "\\fR"))) | 3072 (insert "\\fR"))) |
3100 (nconc fonts fonts) ; circular list! | 3109 (nconc fonts fonts) ; circular list! |
3101 (insert (car fonts)) | 3110 (insert (car fonts)) |
3102 ;; Return to start of first arg to hide leading control char: | 3111 ;; Return to start of first arg to hide leading control char: |
3103 (save-excursion | 3112 (save-excursion |
3104 (setq fonts (cdr fonts)) | 3113 (setq fonts (cdr fonts)) |
3105 (woman-forward-arg unquote 'concat) ; unquote is bound above | 3114 ;; woman1-unquote is bound in woman1-roff-buffer. |
3115 (woman-forward-arg woman1-unquote 'concat) | |
3106 (while (not (eolp)) | 3116 (while (not (eolp)) |
3107 (insert (car fonts)) | 3117 (insert (car fonts)) |
3108 (setq fonts (cdr fonts)) | 3118 (setq fonts (cdr fonts)) |
3109 (woman-forward-arg unquote 'concat)) ; unquote is bound above | 3119 (woman-forward-arg woman1-unquote 'concat)) |
3110 (insert "\\fR"))) | 3120 (insert "\\fR"))) |
3111 | 3121 |
3112 (defun woman-forward-arg (&optional unquote concat) | 3122 (defun woman-forward-arg (&optional unquote concat) |
3113 "Move forward over one ?roff argument, optionally unquoting and/or joining. | 3123 "Move forward over one ?roff argument, optionally unquoting and/or joining. |
3114 If optional arg UNQUOTE is non-nil then delete any argument quotes. | 3124 If optional arg UNQUOTE is non-nil then delete any argument quotes. |
3121 (while (eq (following-char) ?\") ; paired | 3131 (while (eq (following-char) ?\") ; paired |
3122 (if unquote (delete-char 1) (forward-char)) | 3132 (if unquote (delete-char 1) (forward-char)) |
3123 (re-search-forward "\"\\|$")) | 3133 (re-search-forward "\"\\|$")) |
3124 (if (eq (preceding-char) ?\") | 3134 (if (eq (preceding-char) ?\") |
3125 (if unquote (delete-char -1)) | 3135 (if unquote (delete-char -1)) |
3126 (WoMan-warn "Unpaired \" in .%s arguments." request))) | 3136 (WoMan-warn "Unpaired \" in .%s arguments." woman-request))) |
3127 ;; (re-search-forward "[^\\\n] \\|$") ; inconsistent | 3137 ;; (re-search-forward "[^\\\n] \\|$") ; inconsistent |
3128 (skip-syntax-forward "^ ")) | 3138 (skip-syntax-forward "^ ")) |
3129 (cond ((null concat) (skip-chars-forward " \t")) ; don't skip eol! | 3139 (cond ((null concat) (skip-chars-forward " \t")) ; don't skip eol! |
3130 ((eq concat 'noskip)) ; do not skip following whitespace | 3140 ((eq concat 'noskip)) ; do not skip following whitespace |
3131 (t (woman-delete-following-space)))) | 3141 (t (woman-delete-following-space)))) |
3336 (put-text-property from to 'face face)))) | 3346 (put-text-property from to 'face face)))) |
3337 | 3347 |
3338 | 3348 |
3339 ;;; Output translation: | 3349 ;;; Output translation: |
3340 | 3350 |
3341 (defvar translations nil) ; Also bound locally by woman2-roff-buffer | 3351 ;; This is only set by woman2-tr. It is bound locally in woman2-roff-buffer. |
3352 ;; It is also used by woman-translate. woman-translate may be called | |
3353 ;; outside the scope of woman2-roff-buffer (by experiment). Therefore | |
3354 ;; this used to be globally bound to nil, to avoid an error. Instead | |
3355 ;; we can use bound-and-true-p in woman-translate. | |
3356 (defvar woman-translations) | |
3342 ;; A list of the form (\"[ace]\" (a . b) (c . d) (e . ?\ )) or nil. | 3357 ;; A list of the form (\"[ace]\" (a . b) (c . d) (e . ?\ )) or nil. |
3343 | 3358 |
3344 (defun woman-get-next-char () | 3359 (defun woman-get-next-char () |
3345 "Return and delete next char in buffer, including special chars." | 3360 "Return and delete next char in buffer, including special chars." |
3346 (if ;;(looking-at "\\\\(\\(..\\)") | 3361 (if ;;(looking-at "\\\\(\\(..\\)") |
3356 Format paragraphs upto TO. Supports special chars. | 3371 Format paragraphs upto TO. Supports special chars. |
3357 \(Breaks, but should not.)" | 3372 \(Breaks, but should not.)" |
3358 ;; This should be an update, but consing onto the front of the alist | 3373 ;; This should be an update, but consing onto the front of the alist |
3359 ;; has the same effect and match duplicates should not matter. | 3374 ;; has the same effect and match duplicates should not matter. |
3360 ;; Initialize translation data structures: | 3375 ;; Initialize translation data structures: |
3361 (let ((matches (car translations)) | 3376 (let ((matches (car woman-translations)) |
3362 (alist (cdr translations)) | 3377 (alist (cdr woman-translations)) |
3363 a b) | 3378 a b) |
3364 ;; `matches' must be a string: | 3379 ;; `matches' must be a string: |
3365 (setq matches | 3380 (setq matches |
3366 (concat (if matches (substring matches 1 -1)) "]")) | 3381 (concat (if matches (substring matches 1 -1)) "]")) |
3367 ;; Process .tr arguments: | 3382 ;; Process .tr arguments: |
3379 ;; Rebuild translations list: | 3394 ;; Rebuild translations list: |
3380 (setq matches | 3395 (setq matches |
3381 (if (= (string-to-char matches) ?\]) | 3396 (if (= (string-to-char matches) ?\]) |
3382 (substring matches 3) | 3397 (substring matches 3) |
3383 (concat "[" matches)) | 3398 (concat "[" matches)) |
3384 translations (cons matches alist)) | 3399 woman-translations (cons matches alist)) |
3385 ;; Format any following text: | 3400 ;; Format any following text: |
3386 (woman2-format-paragraphs to))) | 3401 (woman2-format-paragraphs to))) |
3387 | 3402 |
3388 (defsubst woman-translate (to) | 3403 (defsubst woman-translate (to) |
3389 "Translate up to marker TO. Do this last of all transformations." | 3404 "Translate up to marker TO. Do this last of all transformations." |
3390 (if translations | 3405 (if (bound-and-true-p woman-translations) |
3391 (let ((matches (car translations)) | 3406 (let ((matches (car woman-translations)) |
3392 (alist (cdr translations)) | 3407 (alist (cdr woman-translations)) |
3393 ;; Translations are case-sensitive, eg ".tr ab" does not | 3408 ;; Translations are case-sensitive, eg ".tr ab" does not |
3394 ;; affect "A" (bug#6849). | 3409 ;; affect "A" (bug#6849). |
3395 (case-fold-search nil)) | 3410 (case-fold-search nil)) |
3396 (while (re-search-forward matches to t) | 3411 (while (re-search-forward matches to t) |
3397 ;; Done like this to retain text properties and | 3412 ;; Done like this to retain text properties and |
3631 (canonically-space-region | 3646 (canonically-space-region |
3632 (symbol-function 'canonically-space-region)) | 3647 (symbol-function 'canonically-space-region)) |
3633 (insert-and-inherit (symbol-function 'insert-and-inherit)) | 3648 (insert-and-inherit (symbol-function 'insert-and-inherit)) |
3634 (set-text-properties (symbol-function 'set-text-properties)) | 3649 (set-text-properties (symbol-function 'set-text-properties)) |
3635 (woman-registers woman-registers) | 3650 (woman-registers woman-registers) |
3636 fn request translations | 3651 fn woman-request woman-translations |
3637 tab-stop-list) | 3652 tab-stop-list) |
3638 (set-marker-insertion-type to t) | 3653 (set-marker-insertion-type to t) |
3639 ;; ?roff does not squeeze multiple spaces, but does fill, so... | 3654 ;; ?roff does not squeeze multiple spaces, but does fill, so... |
3640 (fset 'canonically-space-region 'ignore) | 3655 (fset 'canonically-space-region 'ignore) |
3641 ;; Try to avoid spaces inheriting underlines from preceding text! | 3656 ;; Try to avoid spaces inheriting underlines from preceding text! |
3647 (re-search-forward woman-request-regexp nil t) | 3662 (re-search-forward woman-request-regexp nil t) |
3648 (cond | 3663 (cond |
3649 ;; Construct woman function to call: | 3664 ;; Construct woman function to call: |
3650 ((setq fn (intern-soft | 3665 ((setq fn (intern-soft |
3651 (concat "woman2-" | 3666 (concat "woman2-" |
3652 (setq request (match-string 1))))) | 3667 (setq woman-request (match-string 1))))) |
3653 ;; Delete request or macro name: | 3668 ;; Delete request or macro name: |
3654 (woman-delete-match 0)) | 3669 (woman-delete-match 0)) |
3655 ;; Unrecognised request: | 3670 ;; Unrecognised request: |
3656 ((prog1 nil | 3671 ((prog1 nil |
3657 ;; (WoMan-warn ".%s request ignored!" request) | 3672 ;; (WoMan-warn ".%s request ignored!" woman-request) |
3658 (WoMan-warn-ignored request "ignored!") | 3673 (WoMan-warn-ignored woman-request "ignored!") |
3659 ;; (setq fn 'woman2-LP) | 3674 ;; (setq fn 'woman2-LP) |
3660 ;; AVOID LEAVING A BLANK LINE! | 3675 ;; AVOID LEAVING A BLANK LINE! |
3661 ;; (setq fn 'woman2-format-paragraphs) | 3676 ;; (setq fn 'woman2-format-paragraphs) |
3662 )) | 3677 )) |
3663 ;; .LP assumes it is at eol and leaves a (blank) line, | 3678 ;; .LP assumes it is at eol and leaves a (blank) line, |
4484 (defun WoMan-warn (format &rest args) | 4499 (defun WoMan-warn (format &rest args) |
4485 "Log a warning message out of FORMAT control string and optional ARGS." | 4500 "Log a warning message out of FORMAT control string and optional ARGS." |
4486 (setq format (apply 'format format args)) | 4501 (setq format (apply 'format format args)) |
4487 (WoMan-log-1 (concat "** " format))) | 4502 (WoMan-log-1 (concat "** " format))) |
4488 | 4503 |
4504 ;; request is not used dynamically by any callees. | |
4489 (defun WoMan-warn-ignored (request ignored) | 4505 (defun WoMan-warn-ignored (request ignored) |
4490 "Log a warning message about ignored directive REQUEST. | 4506 "Log a warning message about ignored directive REQUEST. |
4491 IGNORED is a string appended to the log message." | 4507 IGNORED is a string appended to the log message." |
4492 (let ((tail | 4508 (let ((tail |
4493 (buffer-substring (point) | 4509 (buffer-substring (point) |
4555 (bookmark-default-handler | 4571 (bookmark-default-handler |
4556 `("" (buffer . ,buf) . ,(bookmark-get-bookmark-record bookmark))))) | 4572 `("" (buffer . ,buf) . ,(bookmark-get-bookmark-record bookmark))))) |
4557 | 4573 |
4558 (provide 'woman) | 4574 (provide 'woman) |
4559 | 4575 |
4560 ;; arch-tag: eea35e90-552f-4712-a94b-d9ffd3db7651 | |
4561 ;;; woman.el ends here | 4576 ;;; woman.el ends here |