aboutsummaryrefslogtreecommitdiffstats
path: root/src/buffer.c
diff options
context:
space:
mode:
authorStefan Monnier2021-12-27 19:47:23 -0500
committerStefan Monnier2021-12-27 20:59:16 -0500
commit1a724cc2d2e7f08b9fcad569c8cacf126ad55791 (patch)
tree007c8a962d6d717046dfdbc2cf87228b2cac5a7c /src/buffer.c
parent0f9ec379eb8ae4ca228b87145edf04d6c8e88516 (diff)
downloademacs-1a724cc2d2e7f08b9fcad569c8cacf126ad55791.tar.gz
emacs-1a724cc2d2e7f08b9fcad569c8cacf126ad55791.zip
Replace uniquify.el's advice with direct calls
This fixes bug#1338. * src/buffer.c (Frename_buffer): Call `uniquify--rename-buffer-advice`. * lisp/files.el (create-file-buffer): Call`uniquify--create-file-buffer-advice`. * lisp/uniquify.el (uniquify--rename-buffer-advice) (uniquify--create-file-buffer-advice): Don't add them as advice any more. Adjust their calling convention accordingly.
Diffstat (limited to 'src/buffer.c')
-rw-r--r--src/buffer.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/buffer.c b/src/buffer.c
index 9d8892a797a..a2fd0a83bce 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -1552,7 +1552,7 @@ This does not change the name of the visited file (if any). */)
1552 1552
1553 /* Catch redisplay's attention. Unless we do this, the mode lines for 1553 /* Catch redisplay's attention. Unless we do this, the mode lines for
1554 any windows displaying current_buffer will stay unchanged. */ 1554 any windows displaying current_buffer will stay unchanged. */
1555 update_mode_lines = 11; 1555 bset_update_mode_line (current_buffer);
1556 1556
1557 XSETBUFFER (buf, current_buffer); 1557 XSETBUFFER (buf, current_buffer);
1558 Fsetcar (Frassq (buf, Vbuffer_alist), newname); 1558 Fsetcar (Frassq (buf, Vbuffer_alist), newname);
@@ -1562,6 +1562,9 @@ This does not change the name of the visited file (if any). */)
1562 1562
1563 run_buffer_list_update_hook (current_buffer); 1563 run_buffer_list_update_hook (current_buffer);
1564 1564
1565 call2 (intern ("uniquify--rename-buffer-advice"),
1566 BVAR (current_buffer, name), unique);
1567
1565 /* Refetch since that last call may have done GC. */ 1568 /* Refetch since that last call may have done GC. */
1566 return BVAR (current_buffer, name); 1569 return BVAR (current_buffer, name);
1567} 1570}