Skip to content

Commit 31dcfc0

Browse files
committed
Resolve conflicts due to code move on master branch
1 parent fd1a4c4 commit 31dcfc0

File tree

1 file changed

+8
-56
lines changed

1 file changed

+8
-56
lines changed

hibtypes.el

+8-56
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
;; Author: Bob Weiner
44
;;
55
;; Orig-Date: 19-Sep-91 at 20:45:31
6-
;; Last-Mod: 5-Apr-24 at 23:23:04 by Mats Lidell
6+
;; Last-Mod: 6-Apr-24 at 00:06:20 by Mats Lidell
77
;;
88
;; SPDX-License-Identifier: GPL-3.0-or-later
99
;;
@@ -219,8 +219,14 @@ in all buffers."
219219
(mapcar #'get-file-buffer (hyrolo-get-file-list))))))
220220
(let ((address (mail-address-at-p)))
221221
(when address
222+
;; Initialize user-specified mail reader if need be.
223+
(if (and (symbolp hmail:init-function)
224+
(fboundp hmail:init-function)
225+
(listp (symbol-function hmail:init-function))
226+
(eq 'autoload (car (symbol-function hmail:init-function))))
227+
(funcall hmail:init-function))
222228
(ibut:label-set address (match-beginning 1) (match-end 1))
223-
(hact 'mail-other-window nil address)))))
229+
(hact hmail:compose-mail-function nil address)))))
224230

225231
;;; ========================================================================
226232
;;; Displays files and directories when a valid pathname is activated.
@@ -342,60 +348,6 @@ display options."
342348

343349
(load "hsys-www")
344350

345-
;;; ========================================================================
346-
;;; Composes mail, in another window, to the e-mail address at point.
347-
;;; ========================================================================
348-
349-
(defun mail-address-at-p ()
350-
"Return e-mail address, a string, that point is within or nil."
351-
(let ((case-fold-search t))
352-
(save-excursion
353-
(skip-chars-backward "^ \t\n\r\f\"\'(){}[];:<>|")
354-
(and (or (looking-at hypb:mail-address-regexp)
355-
(looking-at (concat "mailto:" hypb:mail-address-regexp)))
356-
(save-match-data
357-
(string-match hypb:mail-address-tld-regexp (match-string-no-properties 1)))
358-
(match-string-no-properties 1)))))
359-
360-
(defib mail-address ()
361-
"If on an e-mail address, compose mail to that address in another window.
362-
363-
Applies to any major mode in `hypb:mail-address-mode-list', the HyRolo match
364-
buffer, any buffer attached to a file in `hyrolo-file-list', or any buffer with
365-
\"mail\" or \"rolo\" (case-insensitive) within its name.
366-
367-
If `hypb:mail-address-mode-list' is set to nil, this button type is active
368-
in all buffers."
369-
(when (let ((case-fold-search t))
370-
(or
371-
(and (or (null hypb:mail-address-mode-list)
372-
(apply #'derived-mode-p hypb:mail-address-mode-list))
373-
(not (string-match "-Elements\\'" (buffer-name)))
374-
;; Don't want this to trigger within an OOBR-FTR buffer.
375-
(not (string-match "\\`\\(OOBR.*-FTR\\|oobr.*-ftr\\)"
376-
(buffer-name)))
377-
(not (string-equal "*Implementors*" (buffer-name))))
378-
(and
379-
(string-match "mail\\|rolo" (buffer-name))
380-
;; Don't want this to trigger in a mail/news summary buffer.
381-
(not (or (hmail:lister-p) (hnews:lister-p))))
382-
(when (boundp 'hyrolo-display-buffer)
383-
(equal (buffer-name) hyrolo-display-buffer))
384-
(and buffer-file-name
385-
(boundp 'hyrolo-file-list)
386-
(set:member (current-buffer)
387-
(mapcar #'get-file-buffer (hyrolo-get-file-list))))))
388-
(let ((address (mail-address-at-p)))
389-
(when address
390-
;; Initialize user-specified mail reader if need be.
391-
(if (and (symbolp hmail:init-function)
392-
(fboundp hmail:init-function)
393-
(listp (symbol-function hmail:init-function))
394-
(eq 'autoload (car (symbol-function hmail:init-function))))
395-
(funcall hmail:init-function))
396-
(ibut:label-set address (match-beginning 1) (match-end 1))
397-
(hact hmail:compose-mail-function nil address)))))
398-
399351
;;; ========================================================================
400352
;;; Handles internal references within an annotated bibliography, delimiters=[]
401353
;;; ========================================================================

0 commit comments

Comments
 (0)