Mercurial > hg > xemacs-beta
comparison lisp/menubar-items.el @ 361:7347b34c275b r21-1-10
Import from CVS: tag r21-1-10
author | cvs |
---|---|
date | Mon, 13 Aug 2007 10:58:40 +0200 |
parents | 8429d81ab209 |
children | 30d2cfa1092a |
comparison
equal
deleted
inserted
replaced
360:0f00b38cfccb | 361:7347b34c275b |
---|---|
960 | 960 |
961 | 961 |
962 (defun maybe-add-init-button () | 962 (defun maybe-add-init-button () |
963 "Don't call this. | 963 "Don't call this. |
964 Adds `Load .emacs' button to menubar when starting up with -q." | 964 Adds `Load .emacs' button to menubar when starting up with -q." |
965 ;; by Stig@hackvan.com | |
966 (cond | 965 (cond |
967 (init-file-user nil) | 966 (init-file-user nil) |
968 ((file-exists-p (expand-file-name ".emacs" "~")) | 967 ((file-exists-p (expand-file-name ".emacs" "~")) |
969 (add-menu-button nil | 968 (add-menu-button |
970 ["Load .emacs" | 969 nil |
971 (progn (delete-menu-item '("Load .emacs")) | 970 ["Load .emacs" |
972 (load-user-init-file (user-login-name))) | 971 (progn |
973 ] | 972 (mapc #'(lambda (buf) |
974 "Help")) | 973 (with-current-buffer buf |
974 (delete-menu-item '("Load .emacs")))) | |
975 (buffer-list)) | |
976 (load-user-init-file (user-login-name))) | |
977 ] | |
978 "Help")) | |
975 (t nil))) | 979 (t nil))) |
976 | 980 |
977 (add-hook 'before-init-hook 'maybe-add-init-button) | 981 (add-hook 'before-init-hook 'maybe-add-init-button) |
978 | 982 |
979 | 983 |