Loads and loads and loads of updates.
[syinit] / 10-pkgs-sy.el
index 3539f10..836205f 100644 (file)
@@ -1,11 +1,11 @@
 ;; 10-pkgs-sy.el --- Various XE Package Settings   -*- Emacs-Lisp -*-
 
-;; Copyright (C) 2007 - 2013 Steve Youngs
+;; Copyright (C) 2007 - 2020 Steve Youngs
 
 ;;     Author: Steve Youngs <steve@sxemacs.org>
 ;; Maintainer: Steve Youngs <steve@sxemacs.org>
 ;;    Created: <2007-12-02>
-;; Time-stamp: <Thursday Dec 31, 2015 01:17:46 steve>
+;; Time-stamp: <Wednesday Feb 12, 2020 15:30:24 steve>
 ;;   Download: <http://bastard.steveyoungs.com/~steve/SXEmacs/inits/>
 ;;   HTMLised: <http://bastard.steveyoungs.com/~steve/SXEmacs/htmlinits/10-pkgs-sy.html>
 ;;   Git Repo: git clone http://git.sxemacs.org/syinit
@@ -47,7 +47,8 @@
 ;;
 ;;   I want to point out that I DO NOT blindly install the "sumo"
 ;;   packages.  I only install what I need and use.  And I absolutely
-;;   DO NOT have the "fsf-compat" package installed.
+;;   DO NOT have the "fsf-compat" package installed, although I do
+;;   have overlay.el from there.  It just makes my life a tad easier.
 
 ;;; Credits:
 ;;
 
 ;:*======================
 ;:* func-menu
+(require 'func-menu)
 (add-hook 'find-file-hooks 'fume-setup-buffer)
 (add-hook 'Manual-mode-hook 'turn-on-fume-mode)
-(define-key global-map "\C-cl" 'fume-list-functions)
-(define-key global-map "\C-cg" 'fume-prompt-function-goto)
-(define-key global-map '(control button3) 'mouse-function-menu)
+(define-key fume-mode-map [(control button3)] #'mouse-function-menu)
 (setq
  fume-display-in-modeline-p t
- fume-menubar-menu-location "File")
+ fume-menu-path '("View"))
 
 ;:*======================
 ;:* font-lock
-(remove-hook 'font-lock-mode-hook 'turn-on-fast-lock)
+;(remove-hook 'font-lock-mode-hook 'turn-on-fast-lock)
 (require 'font-lock)
 
 ;:*======================
 ;:* recent-files.el --- Maintain menu of recently opened files.
 (when (featurep 'menubar)
   (require 'recent-files)
-  (setq recent-files-non-permanent-submenu t)
+  (setq recent-files-non-permanent-submenu t
+       recent-files-menu-path '("File")
+       recent-files-add-menu-before "Insert File..."
+       recent-files-save-file
+       (expand-file-name ".recent-files.el" user-init-directory)
+       recent-files-dont-include
+       '(#r"\.config/sxemacs/\(howm\|diary\).*$"
+         #r"sxemacs/timelog$"
+         #r"info/dir$"
+         #r"\.\(newsrc*\|bbdb\)$"
+         #r"init\.d\.el"))
   (recent-files-initialize))
 
 ;:*======================
 ;:* Kyle Jones' redo package.
 (when running-xemacs
   (require 'redo)
-  (global-set-key "\C-^" 'redo)         ; for tty-s...
-  (global-set-key [(control ?6)] 'redo) ; ...and for X
-  (global-set-key "\M-_" 'redo))        ; universal
+  (global-set-key [(control f2)] 'redo))
+
 (require 'scroll-in-place)
 
 ;:*======================
 ;:  not end the comment.  Blank lines do not get comments.
 (require 'newcomment)
 (global-set-key '(control f12)  'comment-or-uncomment-region)
-(global-set-key '(meta f12) 'uncomment-or-uncomment-region)
+(global-set-key '(meta f12) 'comment-or-uncomment-region)
+
 
 ;:*======================
 ;:* parens that mark sexpressions
 
 ;:*======================
 ;:* Speedbar
+;;; FIXME: <<< Speedbar Tooltips
+;;; >>> ~/programming/SXEmacs/packages/xemacs-packages/speedbar/speedbar.el
 (setq
  speedbar-query-confirmation-method 'none-but-delete
  speedbar-show-unknown-files t
                                 speedbar-trim-words-tag-hierarchy
                                 speedbar-simple-group-tag-hierarchy
                                 speedbar-sort-tag-hierarchy)
- speedbar-track-mouse-flag t
- speedbar-use-tool-tips-flag t
;; speedbar-track-mouse-flag t
;; speedbar-use-tool-tips-flag t
  speedbar-visiting-tag-hook 'speedbar-recenter-to-top)
 
 (when (featurep 'menubar)
                                   (frame-visible-p speedbar-frame))]
                   "--"))
 (global-set-key [(f4)] 'speedbar-get-focus)
+(require 'sb-image)
 (require 'sb-info)
 (require 'sb-texinfo)
 (eval-after-load "speedbar" '(load-library "sb-texinfo"))
 (autoload 'w3-speedbar-buttons "sb-w3"
   "W3 specific speedbar button generator.")
 
-;; Speedbar frame props (so I can use matched windows in Sawfish)
+;;; Speedbar frame props
+;;  'name' (so I can use matched windows in Sawfish)
 (setq speedbar-frame-plist
       (plist-put speedbar-frame-plist 'name "Speedbar::Frame"))
+;; No scrollbars
+(setq speedbar-frame-plist
+      (plist-put speedbar-frame-plist 'scrollbar-height 0))
+(setq speedbar-frame-plist
+      (plist-put speedbar-frame-plist 'scrollbar-width 0))
+;; A little wider than default
+(setq speedbar-frame-plist
+      (plist-put speedbar-frame-plist 'width 25))
+
+;; FIXME: see... <<< PKGFix
+;; Try to load the speedbar on the right of the current frame
+(defalias 'dframe-reposition-frame-xemacs 'dframe-reposition-frame-emacs)
+(setq speedbar-default-position 'right)
+
+;; Speedbar only does the repositioning thing if the frame has to be
+;; created.  If you have only closed the speedbar frame with 'q'
+;; instead of deleting it with 'Q' then the frame remains live.  As
+;; there is no perceptible speed difference of coming back from
+;; either a closed or deleted speedbar frame the following will
+;; force a delete-frame even if you are only closing it.
+(defun sy-speedbar-kill ()
+  (when (frame-live-p speedbar-frame)
+    (delete-frame speedbar-frame)))
+
+(add-hook 'speedbar-before-delete-hook #'sy-speedbar-kill)
+
+
 ;:*======================
 ;:* Shell-mode
 (autoload 'ansi-color-for-comint-mode-on "ansi-color" nil t)
 ;:*======================
 ;:* Balloon Help (now in calendar settings)
 
+
 ;:*======================
 ;:* Version Control
 (vc-load-vc-hooks)
+;; #'vc-load-vc-hooks brings in vc-xemacs which adds this hook. I
+;; would never need it.
+(remove-hook 'find-file-hooks 'vc-xemacs-hg-find-file-hook)
 (setq
- vc-handled-backends '(Arch SVN GIT CVS MCVS RCS)
+ ;; I pretty much only use git now so there's no point in VC trying to
+ ;; handle any other type.
+ vc-handled-backends '(GIT)
  vc-follow-symlinks t)
 
 ;:*======================
 ; :* Eshell
 ;(require 'pcmpl-arch)
 (setq 
+ eshell-directory-name
+ (file-name-as-directory
+  (expand-file-name "eshell" user-init-directory))
  eshell-ask-to-save-history 'always
  eshell-save-history-on-exit t
  eshell-banner-message (concat "Welcome to Eshell on "
                               ("Perl"       . "perl-insert.pl")
                               ("Sh"         . "sh-insert.sh")))
 
-(add-to-list 'auto-insert-path '"~/etc/SXEmacs/templates/")
+(add-to-list 'auto-insert-path '"~/documents/Templates/")
 
 ;; Don't auto-insert into AucTeX style .els
 (defadvice TeX-auto-store (around no-auto-insert activate)
 ;:*=======================
 ;:* My git shit
 (require 'sy-git)
+(require 'git)
 
 ;:*======================
 ;:* Emacs Lisp List
 ;:* Howm thing. (this needs mule, but that is default so no biggie)
 (require 'howm)
 
+(setq
+ howm-directory (file-name-as-directory
+                (expand-file-name "howm" user-init-directory))
+ howm-keyword-file (expand-file-name "howm-keys" user-init-directory)
+ howm-history-file (expand-file-name "howm-history" user-init-directory))
+
 ;; howm has the unfortunate name that ends in `wm' which is what
 ;; winmgr-mode uses, so nuke winmgr-mode from auto-mode-alist
 (remove-alist 'auto-mode-alist "\\.[^/]*wm2?\\(?:rc\\)?\\'")
 
 ;; Another problem with howm... it fucks up window configuration
 (defadvice howm-keyword-search (before howm-save-kw (&rest args) activate)
 "Save window configuration before viewing howm buffers."
 (window-configuration-to-register ?h))
+ "Save window configuration before viewing howm buffers."
+ (window-configuration-to-register ?h))
 
 (defadvice howm-list-grep-fixed (before howm-save-win1 (&rest args) activate)
 "Save window configuration before viewing howm buffers."
 (window-configuration-to-register ?h))
+ "Save window configuration before viewing howm buffers."
+ (window-configuration-to-register ?h))
 
 (defadvice howm-list-grep (before howm-save-win (&rest args) activate)
 "Save window configuration before viewing howm buffers."
 (window-configuration-to-register ?h))
+ "Save window configuration before viewing howm buffers."
+ (window-configuration-to-register ?h))
 
 (defadvice howm-list-todo (before howm-save-win (&rest args) activate)
 "Save window configuration before viewing howm buffers."
 (window-configuration-to-register ?h))
+ "Save window configuration before viewing howm buffers."
+ (window-configuration-to-register ?h))
 
 (defadvice howm-list-active-todo (before howm-save-win (&rest args) activate)
 "Save window configuration before viewing howm buffers."
 (window-configuration-to-register ?h))
+ "Save window configuration before viewing howm buffers."
+ (window-configuration-to-register ?h))
 
 (defadvice riffle-kill-buffer (after howm-restore-win (&rest args) activate)
   "Restore the original window configuration."
   (jump-to-register ?h))
 
-(setq howm-directory (file-name-as-directory
-                     (expand-file-name "howm" user-init-directory)))
-
 ;; howm fucks up font-lock'ing like you wouldn't believe, adding a
 ;; call to `turn-on-font-lock' here at least restores a certain level
 ;; of normalcy.
 
 ;; Turn it on where I need it
 (add-hook 'lisp-interaction-mode-hook #'turn-on-howm-mode)
-;; You gotta be fooking kidding me, this prevents lisp-initd.el from
-;; compiling the generated .el (moved to init.el)
-;(add-hook 'emacs-lisp-mode-hook #'turn-on-howm-mode)
 (add-hook 'text-mode-hook #'turn-on-howm-mode)
 (add-hook 'latex-mode-hook #'turn-on-howm-mode)
 (add-hook 'c-mode-hook #'turn-on-howm-mode)
 (add-hook 'sh-mode-hook #'turn-on-howm-mode)
+;; You gotta be fooking kidding me, this prevents lisp-initd.el from
+;; compiling the generated .el (moved to init.el)
+;;;;; (add-hook 'emacs-lisp-mode-hook #'turn-on-howm-mode)
 
 ;; Turn it off where I don't
-(add-hook 'emchat-log-mode-hook #'turn-off-howm-mode)
 (add-hook 'html-mode-hook #'turn-off-howm-mode)
 (add-hook 'texinfo-mode-hook #'turn-off-howm-mode)
 
-;;; Various other howm problem fixes
+;; Various other howm problem fixes
 
 ;; I'm having a big problem with howm/font-lock/message-mode playing
 ;; nicely together.  This gives me font-locking in message-mode, plus
 ;; howm functionality, but no howm font-locking.  I can live without
 ;; howm font-lock in one buffer.
 (add-hook 'message-mode-hook #'(lambda ()
-                                (font-lock-mode)
-                                (font-lock-mode)))
+                                (font-lock-mode)
+                                (font-lock-mode)))
 ;; XEtla/howm probs
 ;(add-hook 'xetla-changelog-mode-hook #'turn-on-font-lock)
 ;(add-hook 'xetla-log-edit-mode-hook #'turn-on-font-lock)
 ;; ChangeLogs
 (add-hook 'change-log-mode-hook #'font-lock-mode)
 
-;;:*=====================
-;;:* snap!
-;;  save/load snapshot of application to/from text
-;;  Usage:
-;; 
-;;  (1) M-x snap-record on application, e.g. Wanderlust.
-;;  (2) Yank (C-y) on any buffer, e.g. *scratch* or ~/memo.txt.
-;;  (3) M-x snap-play on yanked text ==> snapshot (1) is restored.
+;:*=====================
+;:* snap!
+;; save/load snapshot of application to/from text
+;; Usage:
+
+;; (1) M-x snap-record on application, e.g. Wanderlust.
+;; (2) Yank (C-y) on any buffer, e.g. *scratch* or ~/memo.txt.
+;; (3) M-x snap-play on yanked text ==> snapshot (1) is restored.
 (require 'snap)
 
-;;;; env var trickery.
+;; env var trickery.
 (setq snap-abbreviate-environment-variables
       '("HOME" "JAVA_HOME" "module_path"))