commit cef4899354b08d2a8997b7e729b7f965039c61a0
Author: Pavel Sanda <[email protected]>
Date:   Tue Oct 13 22:30:58 2026 +0200

    Remove LFUN_BUFFER_AUTO_SAVE (bug #13374)
    
    Automatic saving is driven by the timer and does not use the LFUN anymore;
    there is no reasonable use for triggering it by hand, so remove the
    LFUN together with its emacs/xemacs bindings.
    
    Assisted-by: Claude Opus 5.5
---
 lib/RELEASE-NOTES    |  3 +++
 lib/bind/emacs.bind  |  2 --
 lib/bind/xemacs.bind |  2 --
 src/Buffer.cpp       |  8 --------
 src/FuncCode.h       |  1 -
 src/LyXAction.cpp    | 10 ----------
 6 files changed, 3 insertions(+), 23 deletions(-)

diff --git a/lib/RELEASE-NOTES b/lib/RELEASE-NOTES
index 28fb8badde..799cf4c0c8 100644
--- a/lib/RELEASE-NOTES
+++ b/lib/RELEASE-NOTES
@@ -84,6 +84,9 @@
 - keymap-primary, keymap-secondary and keymap-toggle have been removed
   in favor of keymap-select (see above).
 
+- buffer-auto-save has been removed (bug 13374). It was a leftover from former
+  implementation; automatic saving is now configured in the preferences.
+
 !!!The following LyX function has been added and then removed in 2.6 
development cycle:
 
 !!!The following layout-related changes has been done in 2.6 development cycle:
diff --git a/lib/bind/emacs.bind b/lib/bind/emacs.bind
index 777bc36fd2..2e1d9f72eb 100644
--- a/lib/bind/emacs.bind
+++ b/lib/bind/emacs.bind
@@ -79,7 +79,6 @@ Format 5
 \bind "~S-M-quotedbl"          "quote-insert inner"
 \bind "~S-C-quotedbl"          "quote-insert outer auto plain"
 
-\bind "C-x a"                  "buffer-auto-save"
 #\bind "C-x b"                 "buffer-previous"
 \bind "C-x d"                  "buffer-new"
 \bind "C-x g"                  "buffer-view ps"
@@ -98,7 +97,6 @@ Format 5
 \bind "C-x v i"                "vc-register"
 \bind "C-x bracketleft"        "screen-up"
 \bind "C-x bracketright"       "screen-down"
-\bind "C-x C-a"                "buffer-auto-save"
 \bind "C-x C-b"                "menu-open view"
 \bind "C-x C-c"                "lyx-quit"
 \bind "C-x C-d"                "buffer-new"
diff --git a/lib/bind/xemacs.bind b/lib/bind/xemacs.bind
index 438da65c84..b4a68efdf4 100644
--- a/lib/bind/xemacs.bind
+++ b/lib/bind/xemacs.bind
@@ -80,7 +80,6 @@ Format 5
 \bind "~S-M-quotedbl"          "quote-insert inner"
 \bind "~S-C-quotedbl"          "quote-insert outer auto plain"
 
-\bind "C-x a"                  "buffer-auto-save"
 # not currently supported
 #\bind "C-x b"                 "buffer-previous"
 \bind "C-x d"                  "buffer-new"
@@ -100,7 +99,6 @@ Format 5
 #\bind "C-x w"                  "buffer-write-as"
 \bind "C-x bracketleft"        "screen-up"
 \bind "C-x bracketright"       "screen-down"
-\bind "C-x C-a"                "buffer-auto-save"
 \bind "C-x C-b"                "menu-open view"        # list all buffers
 \bind "C-x C-c"                "lyx-quit"
 \bind "C-x C-d"                "buffer-new"
diff --git a/src/Buffer.cpp b/src/Buffer.cpp
index 6332fd5d14..433e7d2545 100644
--- a/src/Buffer.cpp
+++ b/src/Buffer.cpp
@@ -2858,9 +2858,6 @@ bool Buffer::getStatus(FuncRequest const & cmd, 
FuncStatus & flag) const
                // FIXME: There is need for a command-line import.
                //case LFUN_BUFFER_IMPORT:
 
-       case LFUN_BUFFER_AUTO_SAVE:
-               break;
-
        case LFUN_BUFFER_EXPORT_CUSTOM:
                // FIXME: Nothing to check here?
                break;
@@ -3092,11 +3089,6 @@ void Buffer::dispatch(FuncRequest const & func, 
DispatchResult & dr)
                break;
        */
 
-       case LFUN_BUFFER_AUTO_SAVE:
-               autoSave();
-               resetAutosaveTimers();
-               break;
-
        case LFUN_BRANCH_ACTIVATE:
        case LFUN_BRANCH_DEACTIVATE:
        case LFUN_BRANCH_MASTER_ACTIVATE:
diff --git a/src/FuncCode.h b/src/FuncCode.h
index d8ad69e67b..238cec2511 100644
--- a/src/FuncCode.h
+++ b/src/FuncCode.h
@@ -42,7 +42,6 @@ enum FuncCode
        LFUN_BUFFER_CLOSE,
        LFUN_LYX_QUIT,
        // 10
-       LFUN_BUFFER_AUTO_SAVE,
        LFUN_UNDO,
        LFUN_REDO,
        LFUN_PASTE,
diff --git a/src/LyXAction.cpp b/src/LyXAction.cpp
index 6d844da8e9..1920cf0f17 100644
--- a/src/LyXAction.cpp
+++ b/src/LyXAction.cpp
@@ -526,16 +526,6 @@ void LyXAction::init()
                { LFUN_BUFFER_ANONYMIZE, "buffer-anonymize", Noop, Edit },
 
 
-/*!
- * \var lyx::FuncCode lyx::LFUN_BUFFER_AUTO_SAVE
- * \li Action: Saves the current buffer to a temporary file.
- * \li Notion: Saves the current buffer to a file named "#filename#". This LFUN
-               is called automatically by LyX, to "autosave" the current 
buffer.
- * \li Syntax: buffer-auto-save
- * \endvar
- */
-               { LFUN_BUFFER_AUTO_SAVE, "buffer-auto-save", Noop, Buffer },
-
 /*!
  * \var lyx::FuncCode lyx::LFUN_BUFFER_BEGIN
  * \li Action: Move the cursor to the beginning of the document.
-- 
lyx-cvs mailing list
[email protected]
https://lists.lyx.org/mailman/listinfo/lyx-cvs

Reply via email to