emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Customize buttons that change user's customfileshouldaskforconfirmat


From: Richard Stallman
Subject: Re: Customize buttons that change user's customfileshouldaskforconfirmation
Date: Wed, 09 Feb 2005 03:11:07 -0500

Do these changes fix the two problems?


*** cus-edit.el 30 Jan 2005 06:05:44 -0500      1.209
--- cus-edit.el 09 Feb 2005 02:59:47 -0500      
***************
***************
*** 1299,1305 ****
    (widget-create 'push-button
                 :tag "Save for Future Sessions"
                 :help-echo "\
! Make your editing in this buffer take effect for future Emacs sessions."
                 :action (lambda (widget &optional event)
                           (Custom-save)))
    (if custom-reset-button-menu
--- 1396,1403 ----
    (widget-create 'push-button
                 :tag "Save for Future Sessions"
                 :help-echo "\
! Make your editing in this buffer take effect for future Emacs sessions.
! This updates your Emacs initialization file or creates a new one one."
                 :action (lambda (widget &optional event)
                           (Custom-save)))
    (if custom-reset-button-menu
***************
*** 3720,3738 ****
  (defun custom-file ()
    "Return the file name for saving customizations."
    (or custom-file
!       (let ((user-init-file user-init-file)
!           (default-init-file
!             (if (eq system-type 'ms-dos) "~/_emacs" "~/.emacs")))
!       (when (null user-init-file)
!         (if (or (file-exists-p default-init-file)
!                 (and (eq system-type 'windows-nt)
!                      (file-exists-p "~/_emacs")))
!             ;; Started with -q, i.e. the file containing
!             ;; Custom settings hasn't been read.  Saving
!             ;; settings there would overwrite other settings.
!             (error "Saving settings from \"emacs -q\" would overwrite 
existing customizations"))
!         (setq user-init-file default-init-file))
!       user-init-file)))
  
  (defun custom-save-delete (symbol)
    "Visit `custom-file' and delete all calls to SYMBOL from it.
--- 3801,3811 ----
  (defun custom-file ()
    "Return the file name for saving customizations."
    (or custom-file
!       user-init-file
!       ;; Started with -q, i.e. the file containing
!       ;; Custom settings hasn't been read.  Saving
!       ;; settings there would overwrite other settings.
!       (error "Saving settings is not allowed in \"emacs -q\"")))
  
  (defun custom-save-delete (symbol)
    "Visit `custom-file' and delete all calls to SYMBOL from it.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]