Replace personal function redefinitions with around advices
This way the original function definition is left intact and can be found via the help buffer. The manual overwrite of `org-ql--link-regexp` has been left as it is, as it's a `cl-defun` definition and I am not quite sure how turn this into an ELisp around advice without breaking things. The manual fix for `enriched-decode-display-prop` has also been left untouched, maybe this should be an around advice as well?
This commit is contained in:
parent
1eee33ea5d
commit
8511ebb82a
10
init.el
10
init.el
|
@ -964,7 +964,10 @@
|
||||||
;; this to only parse what we are looking for. This makes tag
|
;; this to only parse what we are looking for. This makes tag
|
||||||
;; search *much* faster!
|
;; search *much* faster!
|
||||||
(with-eval-after-load 'org
|
(with-eval-after-load 'org
|
||||||
(defun org-cached-entry-get (pom property)
|
(define-advice org-cached-entry-get (:around
|
||||||
|
(orig-fun pom property)
|
||||||
|
speed-up-cache-lookup)
|
||||||
|
(ignore orig-fun)
|
||||||
(if (or (eq t org-use-property-inheritance)
|
(if (or (eq t org-use-property-inheritance)
|
||||||
(and (stringp org-use-property-inheritance)
|
(and (stringp org-use-property-inheritance)
|
||||||
(let ((case-fold-search t))
|
(let ((case-fold-search t))
|
||||||
|
@ -1761,8 +1764,9 @@ point to the beginning of buffer first."
|
||||||
;; and the mail as well. Redefining `mm-copy-to-buffer' to also
|
;; and the mail as well. Redefining `mm-copy-to-buffer' to also
|
||||||
;; search for ^\r\n might help.
|
;; search for ^\r\n might help.
|
||||||
|
|
||||||
(defun mm-copy-to-buffer ()
|
(define-advice mm-copy-to-buffer (:around (orig-fun) also-consider-crlf)
|
||||||
"Copy the contents of the current buffer to a fresh buffer."
|
"Overwrite `mm-copy-to-buffer' to allow for CRLF in addition to LF."
|
||||||
|
(ignore orig-fun)
|
||||||
(let ((obuf (current-buffer))
|
(let ((obuf (current-buffer))
|
||||||
(mb enable-multibyte-characters)
|
(mb enable-multibyte-characters)
|
||||||
beg)
|
beg)
|
||||||
|
|
Loading…
Reference in New Issue