Remove superfluous "Advising Function" section
This commit is contained in:
parent
80713070f4
commit
cc52a4c1f1
49
README.org
49
README.org
@ -683,55 +683,6 @@ for technical information.
|
||||
(allow-no-window . t))))
|
||||
#+end_src
|
||||
|
||||
* [[info:elisp#Advising Functions][Advising functions (info)]]
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: sec:advising-function
|
||||
:END:
|
||||
|
||||
#+caption[Toggle any advice]:
|
||||
#+caption: Toggle any advice.
|
||||
#+name: lst:toggle-any-advice
|
||||
#+begin_src emacs-lisp -n
|
||||
(with-eval-after-load 'emacs
|
||||
(defun advice-toggle (symbol where function &optional props)
|
||||
"Toggle between states after `advice-remove' and `advice-add'."
|
||||
(let ((how "%s `%s' advice `%s' %s `%s'"))
|
||||
(if (advice-member-p function symbol)
|
||||
(progn
|
||||
(message how "Removal of" where function "from" symbol)
|
||||
(advice-remove symbol function))
|
||||
(message how "Addition of" where function "to" symbol)
|
||||
(advice-add symbol where function props)))))
|
||||
#+end_src
|
||||
|
||||
#+caption[Toggle specific advice]:
|
||||
#+caption: Toggle specific advice.
|
||||
#+name: lst:toggle-specific-advice
|
||||
#+begin_src emacs-lisp -n
|
||||
(with-eval-after-load 'emacs
|
||||
(defun toggle-eww-display-pdf-around ()
|
||||
"Toggle `eww-display-advice' advice."
|
||||
(interactive)
|
||||
(advice-toggle 'eww-display-pdf :around #'eww-display-pdf-as-binary))
|
||||
|
||||
(defun toggle-ilog-timer-function-after ()
|
||||
"Toggle `ilog-timer-function' advice."
|
||||
(interactive)
|
||||
(advice-toggle 'ilog-timer-function :after #'ilog-ensure-ilog-buffer-window))
|
||||
|
||||
(defun toggle-keycast-log-update-buffer-override ()
|
||||
"Toggle `keycast-log-update-buffer' advice."
|
||||
(interactive)
|
||||
(advice-toggle 'keycast-log-update-buffer
|
||||
:override #'keycast-log-update-buffer-plain))
|
||||
|
||||
(defun toggle-org-babel-python-format-session-value-override ()
|
||||
"Toggle `org-babel-python-format-session-value' advice."
|
||||
(interactive)
|
||||
(advice-toggle 'org-babel-python-format-session-value
|
||||
:override #'org-babel-python-format-session-value-override)))
|
||||
#+end_src
|
||||
|
||||
* [[info:emacs#Bookmarks][Bookmarks (info)]]
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: sec:bookmarks
|
||||
|
Loading…
Reference in New Issue
Block a user