]> git.eshelyaron.com Git - emacs.git/commitdiff
Merge from origin/emacs-28
authorStefan Kangas <stefan@marxist.se>
Sat, 2 Jul 2022 07:33:51 +0000 (09:33 +0200)
committerStefan Kangas <stefan@marxist.se>
Sat, 2 Jul 2022 07:33:51 +0000 (09:33 +0200)
1c3d107cb5 Fix "C-u C-x =" for SPC
7e33618bbc ; * src/fns.c (Frequire): Fix a typo in the doc string.  (...
6908309827 Doc fixes: don't refer to some obsolete items
dc3cb749f3 Remove obsolete cust-print from elisp index
9ffbbddf8e * admin/make-tarball.txt: Minor clarifications.
f5421104e9 Fix external image conversion on MS-Windows
6f22631a63 * doc/emacs/buffers.texi (Indirect Buffers): Mention modif...

# Conflicts:
# doc/emacs/buffers.texi
# lisp/emacs-lisp/nadvice.el
# lisp/image/image-converter.el

1  2 
doc/emacs/buffers.texi
doc/lispref/edebug.texi
lisp/descr-text.el
lisp/emacs-lisp/nadvice.el
lisp/image/image-converter.el
lisp/vc/diff-mode.el
src/fns.c

index 94e9d2760ec9dd84e52deebf36e24679f7732daf,a1ad4926be75b9e497c65e781519f085881d39a4..120c957ff865df1739840c53e53fb96ffe12f640
@@@ -643,12 -646,14 +644,20 @@@ buffer in another window
  named @var{indirect-name} from a buffer @var{base-buffer}, prompting for
  both using the minibuffer.
  
 +@vindex clone-indirect-buffer-hook
 +  The functions that create indirect buffers run the hook
 +@code{clone-indirect-buffer-hook} after creating the indirect buffer.
 +When this hook runs, the newly created indirect buffer is the current
 +buffer.
 +
+ Note: When a modification is made to the text of a buffer, the
+ modification hooks are run only in the base buffer, because most of
+ the functions on those hooks are not prepared to work correctly in
+ indirect buffers.  So if you need a modification hook function in an
+ indirect buffer, you need to manually add that function to the hook
+ @emph{in the base buffer} and then make the function operate in the
+ desired indirect buffer.
  @node Buffer Convenience
  @section Convenience Features and Customization of Buffer Handling
  
Simple merge
Simple merge
index 00c9e5438b815bad74fd11bb10b20d4f93fdc871,eae4a0f0ec891f277d6782fc4060e9c111cc7114..2d5a1b5e77b987318eda71355328abf17b0a6056
@@@ -286,34 -273,11 +286,34 @@@ different, but `function-equal' will ho
            ((symbolp place)              `(default-value ',place))
            (t place))))
  
 +(defun nadvice--make-docstring (sym)
 +  (let* ((main (documentation (symbol-function sym) 'raw))
 +         (ud (help-split-fundoc main 'pcase))
 +         (doc (or (cdr ud) main))
 +         (col1width (apply #'max (mapcar (lambda (x)
 +                                           (string-width (symbol-name (car x))))
 +                                         advice--how-alist)))
 +         (table (mapconcat (lambda (x)
 +                             (format (format " %%-%ds %%s" col1width)
 +                                     (car x) (nth 2 x)))
 +                           advice--how-alist "\n"))
 +         (table (if global-prettify-symbols-mode
 +                    (replace-regexp-in-string "(lambda\\>" "(λ" table t t)
 +                  table))
 +         (combined-doc
 +          (if (not (string-match "<<>>" doc))
 +              doc
 +            (replace-match table t t doc))))
 +    (if ud (help-add-fundoc-usage combined-doc (car ud)) combined-doc)))
 +
 +(put 'add-function 'function-documentation
 +     '(nadvice--make-docstring 'add-function))
 +
  ;;;###autoload
 -(defmacro add-function (where place function &optional props)
 +(defmacro add-function (how place function &optional props)
    ;; TODO:
 -  ;; - maybe let `where' specify some kind of predicate and use it
 +  ;; - maybe let `how' specify some kind of predicate and use it
-   ;;   to implement things like mode-local or eieio-defmethod.
+   ;;   to implement things like mode-local or cl-defmethod.
    ;;   Of course, that only makes sense if the predicates of all advices can
    ;;   be combined and made more efficient.
    ;; :before is like a normal add-hook on a normal hook.
@@@ -352,8 -325,8 +352,8 @@@ is also interactive.  There are 3 cases
    (declare
     ;;(indent 2)
     (debug (form [&or symbolp ("local" form) ("var" sexp) gv-place]
--           form &optional form)))
 -  `(advice--add-function ,where (gv-ref ,(advice--normalize-place place))
++                form &optional form)))
 +  `(advice--add-function ,how (gv-ref ,(advice--normalize-place place))
                           ,function ,props))
  
  (declare-function comp-subr-trampoline-install "comp")
index 9440c623f90f42303178fab4de882964c9e87e93,d3d560f021907dae36118cbb8075977fab87c6f7..9ce46f01a33748630738bee71cdef80a7c841107
@@@ -249,15 -233,15 +250,16 @@@ Only suffixes that map to `image-mode' 
                         ;; We have the image data in SOURCE.
                         (progn
                           (insert source)
-                          (apply #'call-process-region (point-min) (point-max)
-                                 (car command) t t nil
-                                 (append
-                                  (cdr command)
-                                  (list (format "%s:-"
-                                                (image-converter--mime-type
-                                                 image-format))
+                          (let ((coding-system-for-write 'no-conversion))
+                            (apply #'call-process-region (point-min) (point-max)
+                                   (car command) t t nil
+                                   (append
+                                    (cdr command)
+                                    (list (format "%s:-"
+                                                  (image-converter--mime-type
+                                                   image-format))
 -                                         "png:-")))))
 +                                       (concat image-convert-to-format
-                                                ":-")))))
++                                               ":-"))))))
                       ;; SOURCE is a file name.
                       (apply #'call-process (car command)
                              nil t nil
      (unless (zerop (if image-format
                         (progn
                           (insert source)
-                          (apply #'call-process-region
-                                 (point-min) (point-max) (car command)
-                                 t '(t nil) nil
-                                 (append
-                                  (cdr command)
-                                  (list "-i" "-"
-                                        "-c:v" image-convert-to-format
-                                        "-f" "image2pipe" "-"))))
+                          (let ((coding-system-for-write 'no-conversion))
+                            (apply #'call-process-region
+                                   (point-min) (point-max) (car command)
+                                   t '(t nil) nil
+                                   (append
+                                    (cdr command)
+                                    (list "-i" "-"
 -                                         "-c:v" "png"
++                                         "-c:v" image-convert-to-format
+                                          "-f" "image2pipe" "-")))))
                       (apply #'call-process
                              (car command)
                              nil '(t nil) nil
Simple merge
diff --cc src/fns.c
Simple merge