First connection.
[lurk.git] / murk.el
1 ;;; MURK --- Multiserver Unibuffer iRc Klient -*- lexical-binding:t -*-
2
3 ;; Copyright (C) 2024 plugd
4
5 ;; Author: plugd <plugd@thelambdalab.xyz>
6 ;; Created: 11 May 2024
7 ;; Version: 0.0
8 ;; Keywords: network
9 ;; Homepage: http://thelambdalab.xyz/murk
10 ;; Package-Requires: ((emacs "26"))
11
12 ;; This file is not part of GNU Emacs.
13
14 ;; This program is free software: you can redistribute it and/or modify
15 ;; it under the terms of the GNU General Public License as published by
16 ;; the Free Software Foundation, either version 3 of the License, or
17 ;; (at your option) any later version.
18
19 ;; This program is distributed in the hope that it will be useful,
20 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
21 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
22 ;; GNU General Public License for more details.
23
24 ;; You should have received a copy of the GNU General Public License
25 ;; along with this file.  If not, see <http://www.gnu.org/licenses/>.
26
27 ;;; Commentary:
28
29 ;;; Code:
30
31 (provide 'murk)
32
33
34 ;;; Customizations
35
36 (defgroup murk nil
37   "Multiserver Unibuffer iRc Klient"
38   :group 'network)
39
40 (defcustom murk-nick "plugd"
41   "Default nick.")
42
43 (defcustom murk-default-quit-msg "Bye"
44   "Default quit message when none supplied.")
45
46 (defcustom murk-networks
47   '(("debug" "localhost" 6667 :notls)
48     ("libera" "irc.libera.chat" 6697)
49     ("tilde" "tilde.chat" 6697))
50   "IRC networks.")
51
52 (defcustom murk-display-header t
53   "If non-nil, use buffer header to display information on current host and channel.")
54
55
56 ;;; Faces
57 ;;
58
59 (defface murk-text
60   '((t :inherit default))
61   "Face used for murk text.")
62
63 (defface murk-prompt
64   '((t :inherit font-lock-keyword-face))
65   "Face used for the prompt.")
66
67 (defface murk-context
68   '((t :inherit murk-context))
69   "Face used for the context name in the prompt.")
70
71 (defface murk-faded
72   '((t :inherit shadow))
73   "Face used for faded murk text.")
74
75 (defface murk-timestamp
76   '((t :inherit shadow))
77   "Face used for timestamps.")
78
79 (defface murk-error
80   '((t :inherit error))
81   "Face used for murk error text.")
82
83 (defface murk-notice
84   '((t :inherit warning))
85   "Face used for murk notice text.")
86
87
88 ;;; Global variables
89 ;;
90
91 (defvar murk-version "Murk v0.0"
92   "Value of this string is used in response to CTCP version queries.")
93
94 (defvar murk-notice-prefix "-!-")
95 (defvar murk-error-prefix "!!!")
96 (defvar murk-prompt-string ">")
97
98 (defvar murk-debug nil
99   "If non-nil, enable debug mode.")
100
101 ;;; Utility procedures
102 ;;
103
104 (defun murk--filtered-join (&rest args)
105   (string-join (seq-filter (lambda (el) el) args) " "))
106
107 (defun murk--as-string (obj)
108   (if obj
109       (with-output-to-string (princ obj))
110     nil))
111
112 ;;; Network processes
113 ;;
114
115 (defvar murk-connection-table nil
116   "An alist associating servers to connection information.
117 This includes the process and the response string.")
118
119 (defun murk-connection-process (server)
120   (elt (assoc server murk-connection-table) 1))
121
122 (defun murk-connection-response (server)
123   (elt (assoc server murk-connection-table) 2))
124
125 (defun murk-set-connection-response (server string)
126   (setf (elt (assoc server murk-connection-table) 2) string))
127
128 (defun murk-connection-close (server)
129   (setq murk-connection-table (assoc-delete-all server murk-connection-table)))
130
131 (defun murk-make-server-filter (server)
132   (lambda (proc string)
133     (dolist (line (split-string (concat (murk-connection-response server) string)
134                                 "\n"))
135       (if (string-suffix-p "\r" line)
136           (murk-eval-msg-string server (string-trim line))
137         (murk-set-connection-response server line)))))
138
139 (defun murk-make-server-sentinel (server)
140   (lambda (proc string)
141     (unless (equal "open" (string-trim string))
142       (murk-display-error "Disconnected from server.")
143       (murk-remove-contexts-for-server server)
144       (murk-render-prompt)
145       (murk-connection-close server))))
146
147 (defun murk-start-process (server)
148   (let* ((row (assoc server murk-networks))
149          (host (elt row 1))
150          (port (elt row 2))
151          (flags (seq-drop row 3)))
152     (make-network-process :name (concat "murk-" server)
153                           :host host
154                           :service port
155                           :family nil
156                           :filter (murk-make-server-filter server)
157                           :sentinel (murk-make-server-sentinel server)
158                           :nowait nil
159                           :tls-parameters (if (memq :notls flags)
160                                               nil
161                                             (cons 'gnutls-x509pki
162                                                   (gnutls-boot-parameters
163                                                    :type 'gnutls-x509pki
164                                                    :hostname host)))
165                           :buffer "*murk*")))
166
167 (defvar murk-ping-period 60)
168
169 ;; IDEA: Have a single ping timer which pings all connected hosts
170
171 (defun murk-connect (server)
172   (if (assoc server murk-connection-table)
173       (murk-display-error "Already connected to this network.")
174     (if (not (assoc server murk-networks))
175         (murk-display-error "Network '" server "' is unknown.")
176       (let ((proc (murk-start-process server)))
177         (add-to-list 'murk-connection-table
178                      (list server proc "")))
179       (murk-send-msg server (murk-msg nil nil "USER" murk-nick 0 "*" murk-nick))
180       (murk-send-msg server (murk-msg nil nil "NICK" murk-nick)))))
181
182 (defun murk-send-msg (server msg)
183   (if murk-debug
184       (murk-display-string nil nil (murk-msg->string msg)))
185   (let ((proc (murk-connection-process server)))
186     (if (and proc (eq (process-status proc) 'open))
187         (process-send-string proc (concat (murk-msg->string msg) "\r\n"))
188       (murk-display-error "No server connection established.")
189       (error "No server connection established"))))
190
191 ;;; Server messages
192 ;;
193
194 (defun murk-msg (tags src cmd &rest params)
195   (list (murk--as-string tags)
196         (murk--as-string src)
197         (upcase (murk--as-string cmd))
198         (mapcar #'murk--as-string
199                 (if (and params (listp (elt params 0)))
200                     (elt params 0)
201                   params))))
202
203 (defun murk-msg-tags (msg) (elt msg 0))
204 (defun murk-msg-src (msg) (elt msg 1))
205 (defun murk-msg-cmd (msg) (elt msg 2))
206 (defun murk-msg-params (msg) (elt msg 3))
207 (defun murk-msg-trail (msg)
208   (let ((params (murk-msg-params msg)))
209     (if params
210         (elt params (- (length params) 1)))))
211
212 (defvar murk-msg-regex
213   (rx
214    (opt (: "@" (group (* (not (or "\n" "\r" ";" " ")))))
215         (* whitespace))
216    (opt (: ":" (: (group (* (not (any space "!" "@"))))
217                   (* (not (any space)))))
218         (* whitespace))
219    (group (: (* (not whitespace))))
220    (* whitespace)
221    (opt (group (+ not-newline))))
222   "Regex used to parse IRC messages.
223 Note that this regex is incomplete.  Noteably, we discard the non-nick
224 portion of the source component of the message, as mURK doesn't use this.")
225
226 (defun murk-string->msg (string)
227   (if (string-match murk-msg-regex string)
228       (let* ((tags (match-string 1 string))
229              (src (match-string 2 string))
230              (cmd (upcase (match-string 3 string)))
231              (params-str (match-string 4 string))
232              (params
233               (if params-str
234                   (let* ((idx (cl-search ":" params-str))
235                          (l (split-string (string-trim (substring params-str 0 idx))))
236                          (r (if idx (list (substring params-str (+ 1 idx))) nil)))
237                     (append l r))
238                 nil)))
239         (apply #'murk-msg (append (list tags src cmd) params)))
240     (error "Failed to parse string " string)))
241
242 (defun murk-msg->string (msg)
243   (let ((tags (murk-msg-tags msg))
244         (src (murk-msg-src msg))
245         (cmd (murk-msg-cmd msg))
246         (params (murk-msg-params msg)))
247     (murk--filtered-join
248      (if tags (concat "@" tags) nil)
249      (if src (concat ":" src) nil)
250      cmd
251      (if (> (length params) 1)
252          (string-join (seq-take params (- (length params) 1)) " ")
253        nil)
254      (if (> (length params) 0)
255          (concat ":" (elt params (- (length params) 1)))
256        nil))))
257
258
259 ;;; Contexts and Servers
260 ;;
261
262 ;; A context is a list (server name ...) where name is a string
263 ;; representing either a channel name or nick, and server is a symbol
264 ;; identifying the server.
265 ;;
266 ;; Each server has a special context (server) used for messages
267 ;; to/from the server itself.
268
269 (defvar murk-contexts nil
270   "List of currently-available contexts.
271 The head of this list is always the current context.")
272
273 (defun murk-current-context ()
274   "Returns the current context."
275   (if murk-contexts
276       (car murk-contexts)
277     nil))
278
279 (defun murk-context-server (ctx) (elt ctx 0))
280 (defun murk-context-name (ctx) (elt ctx 1))
281
282 ;;; Buffer
283 ;;
284
285 (defun murk-render-prompt ()
286   (with-current-buffer "*murk*"
287     (let ((update-point (= murk-input-marker (point)))
288           (update-window-points (mapcar (lambda (w)
289                                           (list (= (window-point w) murk-input-marker)
290                                                 w))
291                                         (get-buffer-window-list nil nil t))))
292       (save-excursion
293         (set-marker-insertion-type murk-prompt-marker nil)
294         (set-marker-insertion-type murk-input-marker t)
295         (let ((inhibit-read-only t))
296           (delete-region murk-prompt-marker murk-input-marker)
297           (goto-char murk-prompt-marker)
298           (insert
299            (propertize (let ((ctx (murk-current-context)))
300                          (if ctx
301                            (concat (murk-context-name) "@" (murk-context-server ctx))
302                          ""))
303                        'face 'murk-context
304                        'read-only t)
305            (propertize murk-prompt-string
306                        'face 'murk-prompt
307                        'read-only t)
308            (propertize " " ; Need this to be separate to mark it as rear-nonsticky
309                        'read-only t
310                        'rear-nonsticky t)))
311         (set-marker-insertion-type murk-input-marker nil))
312       (if update-point
313           (goto-char murk-input-marker))
314       (dolist (v update-window-points)
315         (if (car v)
316             (set-window-point (cadr v) murk-input-marker))))))
317   
318 (defvar murk-prompt-marker nil
319   "Marker for prompt position in murk buffer.")
320
321 (defvar murk-input-marker nil
322   "Marker for prompt position in murk buffer.")
323
324 (defun murk-setup-header ()
325   ;; To do
326   )
327
328 (defun murk-setup-buffer ()
329   (with-current-buffer (get-buffer-create "*murk*")
330     (setq-local scroll-conservatively 1)
331     (setq-local buffer-invisibility-spec nil)
332     (if (markerp murk-prompt-marker)
333         (set-marker murk-prompt-marker (point-max))
334       (setq murk-prompt-marker (point-max-marker)))
335     (if (markerp murk-input-marker)
336         (set-marker murk-input-marker (point-max))
337       (setq murk-input-marker (point-max-marker)))
338     (goto-char (point-max))
339     (murk-render-prompt)
340     (if murk-display-header
341         (murk-setup-header))))
342
343 (defun murk-clear-buffer ()
344   "Completely erase all non-prompt and non-input text from murk buffer."
345   (with-current-buffer "*murk*"
346     (let ((inhibit-read-only t))
347       (delete-region (point-min) murk-prompt-marker))))
348
349
350 ;;; Output formatting and highlighting
351 ;;
352
353 (defun murk--fill-strings (col indent &rest strings)
354   (with-temp-buffer
355     (setq buffer-invisibility-spec nil)
356     (let ((fill-column col)
357           (adaptive-fill-regexp (rx-to-string `(= ,indent anychar))))
358       (apply #'insert strings)
359       (fill-region (point-min) (point-max) nil t)
360       (buffer-string))))
361
362 (defun murk-context->string (context)
363   (if context
364       (concat (murk-context-name) "@" (murk-context-server context))
365     nil))
366
367 (defun murk-display-string (context prefix &rest strings)
368   (with-current-buffer "*murk*"
369     (save-excursion
370       (goto-char murk-prompt-marker)
371       (let* ((inhibit-read-only t)
372              (old-pos (marker-position murk-prompt-marker))
373              (padded-timestamp (concat (format-time-string "%H:%M ")))
374              (padded-prefix (if prefix (concat prefix " ") ""))
375              (context-atom (if context (intern (murk-context->string context)) nil)))
376         (insert-before-markers
377          (murk--fill-strings
378           80
379           (+ (length padded-timestamp)
380              (length padded-prefix))
381           (propertize padded-timestamp
382                       'face 'murk-timestamp
383                       'read-only t
384                       'context context
385                       'invisible context-atom)
386           (propertize padded-prefix
387                       'read-only t
388                       'context context
389                       'invisible context-atom)
390           (murk-add-formatting
391            (propertize (concat (apply #'murk-buttonify-urls strings) "\n")
392                        'read-only t
393                        'context context
394                        'invisible context-atom)))))))
395   (murk-scroll-windows-to-last-line))
396
397 (defun murk-display-notice (context &rest notices)
398   (murk-display-string
399    context
400    (propertize murk-notice-prefix 'face 'murk-notice)
401    (apply #'concat notices)))
402
403 (defun murk-display-error (&rest messages)
404   (murk-display-string
405    nil
406    (propertize murk-error-prefix 'face 'murk-error)
407    (apply #'concat messages)))
408
409 (defun murk--start-of-final-line ()
410   (with-current-buffer "*murk*"
411     (save-excursion
412       (goto-char (point-max))
413       (line-beginning-position))))
414
415 (defun murk-scroll-windows-to-last-line ()
416   (with-current-buffer "*murk*"
417     (dolist (window (get-buffer-window-list))
418       (if (>= (window-point window) (murk--start-of-final-line))
419           (with-selected-window window
420             (recenter -1))))))
421
422
423
424 (defconst murk-url-regex
425   (rx (:
426        (group (+ alpha))
427        "://"
428        (group (or (+ (any alnum "." "-"))
429                   (+ (any alnum ":"))))
430        (opt (group (: ":" (+ digit))))
431        (opt (group (: "/"
432                       (opt
433                        (* (any alnum "-/.,#:%=&_?~@+"))
434                        (any alnum "-/#:%=&_~@+")))))))
435   "Imperfect regex used to find URLs in plain text.")
436
437 (defun murk-click-url (button)
438   (browse-url (button-get button 'url)))
439
440 (defun murk-buttonify-urls (&rest strings)
441   "Turn substrings which look like urls in STRING into clickable buttons."
442   (with-temp-buffer
443     (apply #'insert strings)
444     (goto-char (point-min))
445     (while (re-search-forward murk-url-regex nil t)
446       (let ((url (match-string 0)))
447         (make-text-button (match-beginning 0)
448                           (match-end 0)
449                           'action #'murk-click-url
450                           'url url
451                           'follow-link t
452                           'face 'button
453                           'help-echo "Open URL in browser.")))
454     (buffer-string)))
455
456 (defun murk-add-formatting (string)
457   (with-temp-buffer
458     (insert string)
459     (goto-char (point-min))
460     (let ((bold nil)
461           (italics nil)
462           (underline nil)
463           (strikethrough nil)
464           (prev-point (point)))
465       (while (re-search-forward (rx (or (any "\x02\x1D\x1F\x1E\x0F")
466                                         (: "\x03" (+ digit) (opt "," (* digit)))))
467                                 nil t)
468         (let ((beg (+ (match-beginning 0) 1)))
469           (if bold
470               (add-face-text-property prev-point beg '(:weight bold)))
471           (if italics
472               (add-face-text-property prev-point beg '(:slant italic)))
473           (if underline
474               (add-face-text-property prev-point beg '(:underline t)))
475           (if strikethrough
476               (add-face-text-property prev-point beg '(:strike-through t)))
477           (pcase (match-string 0)
478             ("\x02" (setq bold (not bold)))
479             ("\x1D" (setq italics (not italics)))
480             ("\x1F" (setq underline (not underline)))
481             ("\x1E" (setq strikethrough (not strikethrough)))
482             ("\x0F" ; Reset
483              (setq bold nil)
484              (setq italics nil)
485              (setq underline nil)
486              (setq strikethrough nil))
487             (_))
488           (delete-region (match-beginning 0) (match-end 0))
489           (setq prev-point (point)))))
490     (buffer-string)))
491
492
493 ;;; Message evaluation
494 ;;
495
496 (defun murk-eval-msg-string (server string)
497   (if murk-debug
498       (murk-display-string nil nil string))
499   (let* ((msg (murk-string->msg string)))
500     (pcase (murk-msg-cmd msg)
501       ("PING"
502        (murk-send-msg server
503         (murk-msg nil nil "PONG" (murk-msg-params msg))))
504
505       ("PONG")
506
507       (_
508        (murk-display-notice nil (murk-msg->string msg))))))
509
510 ;;; Commands
511 ;;
512
513 (defvar murk-command-table
514   '(("DEBUG" "Toggle debug mode on/off." murk-command-debug murk-boolean-completions)
515     ("HEADER" "Toggle display of header." murk-command-header murk-boolean-completions)
516     ("CONNECT" "Connect to an IRC network." murk-command-connect murk-network-completions)
517     ("NETWORKS" "List known IRC networks." murk-command-networks)
518     ("QUIT" "Disconnect from current network." murk-command-quit)
519     ("NICK" "Change nick." murk-command-nick)
520     ("MSG" "Send private message to user." murk-command-msg murk-nick-completions)
521     ("CLEAR" "Clear buffer text." murk-command-clear murk-context-completions)
522     ("HELP" "Display help on client commands." murk-command-help murk-help-completions))
523   "Table of commands explicitly supported by murk.")
524
525 (defun murk-boolean-completions ()
526   '("on" "off"))
527
528 (defun murk-network-completions ()
529   (mapcar (lambda (row) (car row)) murk-networks))
530
531 (defun murk-command-help (params)
532   (if params
533       (let* ((cmd-str (upcase (car params)))
534              (row (assoc cmd-str murk-command-table #'equal)))
535         (if row
536             (progn
537               (murk-display-notice nil "Help for \x02" cmd-str "\x02:")
538               (murk-display-notice nil "  " (elt row 1)))
539           (murk-display-notice nil "No such (client-interpreted) command.")))
540     (murk-display-notice nil "Client-interpreted commands:")
541     (dolist (row murk-command-table)
542       (murk-display-notice nil "  \x02" (elt row 0) "\x02: " (elt row 1)))
543     (murk-display-notice nil "Use /HELP COMMAND to display information about a specific command.")))
544
545 (defun murk-command-debug (params)
546   (setq murk-debug 
547         (if params
548             (if (equal (upcase (car params)) "ON")
549                 t
550               nil)
551           (not murk-debug)))
552   (murk-display-notice nil "Debug mode now " (if murk-debug "on" "off") "."))
553
554 (defun murk-command-clear (params)
555   (if (not params)
556       (murk-clear-buffer)
557     (dolist (context params)
558       (murk-clear-context context))))
559
560 (defun murk-command-connect (params)
561   (if params
562       (let ((network (car params)))
563         (murk-display-notice nil "Attempting to connect to " network "...")
564         (murk-connect network))
565     (murk-display-notice nil "Usage: /connect <network>")))
566
567 (defun murk-command-networks (params)
568   (murk-display-notice nil "Currently-known networks:")
569   (dolist (row murk-networks)
570     (seq-let (network server port &rest others) row
571       (murk-display-notice nil "\t" network
572                            " [" server
573                            " " (number-to-string port) "]")))
574   (murk-display-notice nil "(Modify the `murk-networks' variable to add more.)"))
575
576
577
578 ;;; Command entering
579 ;;
580
581 (defun murk-enter-string (string)
582   (if (string-prefix-p "/" string)
583       (pcase string
584         ((rx (: "/" (let cmd-str (+ (not whitespace)))
585                 (opt (+ whitespace)
586                      (let params-str (+ anychar))
587                      string-end)))
588          (let ((command-row (assoc (upcase  cmd-str) murk-command-table #'equal))
589                (params (if params-str
590                            (split-string params-str nil t)
591                          nil)))
592            (if (and command-row (elt command-row 2))
593                (funcall (elt command-row 2) params)
594              (murk-send-msg (murk-msg nil nil (upcase cmd-str) params)))))
595         (_
596          (murk-display-error "Badly formed command.")))
597     (unless (string-empty-p string)
598       (if (murk-current-context)
599           (progn
600             (murk-send-msg server
601                            (murk-msg nil nil "PRIVMSG"
602                                      (murk-context-name murk-current-context)
603                                      string))
604             (murk-display-message murk-nick (murk-context->string (murk-current-context)) string))
605         (murk-display-error "No current context.")))))
606
607
608 ;;; Command history
609 ;;
610
611 (defvar murk-history nil
612   "Commands and messages sent in current session.")
613
614 (defvar murk-history-index nil)
615
616 (defun murk-history-cycle (delta)
617   (when murk-history
618     (with-current-buffer "*murk*"
619       (if murk-history-index
620           (setq murk-history-index
621                 (max 0
622                      (min (- (length murk-history) 1)
623                           (+ delta murk-history-index))))
624         (setq murk-history-index 0))
625       (delete-region murk-input-marker (point-max))
626       (insert (elt murk-history murk-history-index)))))
627
628
629 ;;; Interactive commands
630 ;;
631
632 (defun murk-enter ()
633   "Enter current contents of line after prompt."
634   (interactive)
635   (with-current-buffer "*murk*"
636     (let ((line (buffer-substring murk-input-marker (point-max))))
637       (push line murk-history)
638       (setq murk-history-index nil)
639       (let ((inhibit-read-only t))
640         (delete-region murk-input-marker (point-max)))
641       (murk-enter-string line))))
642
643 (defun murk-complete-input ()
644   (interactive)
645   (let ((completion-ignore-case t))
646     (when (>= (point) murk-input-marker)
647       (pcase (buffer-substring murk-input-marker (point))
648         ((rx (: "/" (let cmd-str (+ (not whitespace))) (+ " ") (* (not whitespace)) string-end))
649          (let ((space-idx (save-excursion
650                             (re-search-backward " " murk-input-marker t)))
651                (table-row (assoc (upcase cmd-str) murk-command-table #'equal)))
652            (if (and table-row (elt table-row 3))
653                (let* ((completions-nospace (funcall (elt table-row 3)))
654                       (completions (mapcar (lambda (el) (concat el " ")) completions-nospace)))
655                  (completion-in-region (+ 1 space-idx) (point) completions)))))
656         ((rx (: "/" (* (not whitespace)) string-end))
657          (message (buffer-substring murk-input-marker (point)))
658          (completion-in-region murk-input-marker (point)
659                                (mapcar (lambda (row) (concat "/" (car row) " "))
660                                        murk-command-table)))
661         (_
662          (let* ((end (max murk-input-marker (point)))
663                 (space-idx (save-excursion
664                              (re-search-backward " " murk-input-marker t)))
665                 (start (if space-idx (+ 1 space-idx) murk-input-marker)))
666            (unless (string-prefix-p "/" (buffer-substring start end))
667              (let* ((users (murk-get-context-users murk-current-context))
668                     (users-no@ (mapcar
669                                 (lambda (u) (car (split-string u "@" t)))
670                                 users)))
671                (completion-in-region start end users-no@)))))))))
672
673 ;;; Mode
674 ;;
675
676 (defvar murk-mode-map
677   (let ((map (make-sparse-keymap)))
678     (define-key map (kbd "RET") 'murk-enter)
679     (define-key map (kbd "TAB") 'murk-complete-input)
680     (when (fboundp 'evil-define-key*)
681       (evil-define-key* 'motion map
682         (kbd "TAB") 'murk-complete-input))
683     map))
684
685 (define-derived-mode murk-mode text-mode "murk"
686   "Major mode for murk.")
687
688 (when (fboundp 'evil-set-initial-state)
689   (evil-set-initial-state 'murk-mode 'insert))
690
691 ;;; Main start procedure
692 ;;
693
694 (defun murk ()
695   "Start murk or just switch to the murk buffer if one already exists."
696   (interactive)
697   (if (get-buffer "*murk*")
698       (switch-to-buffer "*murk*")
699     (switch-to-buffer "*murk*")
700     (murk-mode)
701     (murk-setup-buffer))
702   "Started murk.")
703
704
705 ;;; murk.el ends here