(locate-library (package--autoloads-file-name pkg))))
(pfile (prin1-to-string file)))
(insert "(let ((load-true-file-name " pfile ")\
-(load-file-name " pfile "))\n")
+\(load-file-name " pfile "))\n")
(insert-file-contents file)
;; Fixup the special #$ reader form and throw away comments.
(while (re-search-forward "#\\$\\|^;\\(.*\n\\)" nil 'move)
:version "24.3")
(defcustom yank-transform-functions nil
- "List of functions to run on strings to be yanked.
+ "Hook run on strings to be yanked.
Each function in this list will be called (in order) with the
string to be yanked as the sole argument, and should return the (possibly)
transformed string.
The functions will be called with the destination buffer as the current
buffer, and with point at the place where the string is to be inserted."
- :type '(repeat function)
+ :type 'hook
:version "29.1"
:group 'killing)
It also runs the string through `yank-transform-functions'."
;; Allow altering the yank string.
- (dolist (func yank-transform-functions)
- (setq string (funcall func string)))
+ (run-hook-wrapped 'yank-transform-functions
+ (lambda (f) (setq string (funcall f string))))
(let (to)
(while (setq to (next-single-property-change 0 'yank-handler string))
(insert-for-yank-1 (substring string 0 to))