]> git.eshelyaron.com Git - emacs.git/commitdiff
(completion-separator-self-insert-command)
authorRichard M. Stallman <rms@gnu.org>
Sun, 23 Sep 2007 15:27:38 +0000 (15:27 +0000)
committerRichard M. Stallman <rms@gnu.org>
Sun, 23 Sep 2007 15:27:38 +0000 (15:27 +0000)
(completion-separator-self-insert-autofilling):
If `self-insert-command' has been remapped, use the substitute.

lisp/completion.el

index b8bf5bd93b8d785098597a866984b3b97c4ac2bc..c2e9ac9493f74bde012d483949d4e700ca0e9700 100644 (file)
@@ -2231,15 +2231,19 @@ Patched to remove the most recent completion."
 
 (defun completion-separator-self-insert-command (arg)
   (interactive "p")
-  (use-completion-before-separator)
-  (self-insert-command arg))
+  (if (command-remapping 'self-insert-command)
+      (funcall (command-remapping 'self-insert-command) arg)
+    (use-completion-before-separator)
+    (self-insert-command arg)))
 
 (defun completion-separator-self-insert-autofilling (arg)
   (interactive "p")
-  (use-completion-before-separator)
-  (self-insert-command arg)
-  (and auto-fill-function
-       (funcall auto-fill-function)))
+  (if (command-remapping 'self-insert-command)
+      (funcall (command-remapping 'self-insert-command) arg)
+    (use-completion-before-separator)
+    (self-insert-command arg)
+    (and auto-fill-function
+        (funcall auto-fill-function))))
 
 ;;-----------------------------------------------
 ;; Wrapping Macro