[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Enclosing text in a box
From: |
Emanuel Berg |
Subject: |
Re: Enclosing text in a box |
Date: |
Wed, 16 Nov 2022 21:55:05 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Eli Zaretskii wrote:
>> Asking users to handle such conditions would be too hard to
>> do repeatedly.
>
> This is not userland, this is Emacs Lisp programming for
> display, and yes, it is quite tricky
(defun sign (label)
(interactive "sLabel: ")
(let*((vertical "|")
(horizontal ?-)
(corner "+")
(mid (format "%s %s %s" vertical label vertical))
(len (length mid))
(top (format "%s%s%s" corner (make-string (- len 2) horizontal) corner))
(sgn (format "%s\n%s\n%s\n" top mid top)) )
(insert sgn) ))
;; M-x sign This is not a bluff RET
;;
;; +---------------------+
;; | This is not a bluff |
;; +---------------------+
https://dataswamp.org/~incal/emacs-init/string.el
--
underground experts united
https://dataswamp.org/~incal
- Re: Enclosing text in a box, (continued)
- Re: Enclosing text in a box, Yuri Khan, 2022/11/16
- Re: Enclosing text in a box, Heime, 2022/11/16
- Re: Enclosing text in a box, Eli Zaretskii, 2022/11/16
- Re: Enclosing text in a box, Heime, 2022/11/16
- Re: Enclosing text in a box, Eli Zaretskii, 2022/11/16
- Re: Enclosing text in a box, Heime, 2022/11/16
- Re: Enclosing text in a box, Heime, 2022/11/16
- Re: Enclosing text in a box, Eli Zaretskii, 2022/11/16
- Re: Enclosing text in a box, Heime, 2022/11/16
- Re: Enclosing text in a box, Eli Zaretskii, 2022/11/16
- Re: Enclosing text in a box,
Emanuel Berg <=
- Re: Enclosing text in a box, Eli Zaretskii, 2022/11/18
- Re: Enclosing text in a box, tomas, 2022/11/18
- Re: Enclosing text in a box, Emanuel Berg, 2022/11/20
- Re: Enclosing text in a box, Emanuel Berg, 2022/11/18
- Re: Enclosing text in a box, Emanuel Berg, 2022/11/16
- Re: Enclosing text in a box, Heime, 2022/11/16
- Re: Enclosing text in a box, Emanuel Berg, 2022/11/16
- Re: Enclosing text in a box, Emanuel Berg, 2022/11/18
- Re: Enclosing text in a box, Yuri Khan, 2022/11/16
- Re: Enclosing text in a box, Yuri Khan, 2022/11/16