.emacs-my
changeset 1282 c4bc43d16082
parent 1281 0e2a8e5f75b1
child 1288 6333a733046f
equal deleted inserted replaced
1281:0e2a8e5f75b1 1282:c4bc43d16082
     6 ;; placed in public domain.
     6 ;; placed in public domain.
     7 ;;
     7 ;;
     8 ;; Config file for GNU Emacs.
     8 ;; Config file for GNU Emacs.
     9 ;;
     9 ;;
    10 ;; For load order see README.
    10 ;; For load order see README.
       
    11 
       
    12 (with-no-warnings (require 'cl))
    11 
    13 
    12 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    14 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    13 (message "recentf")
    15 (message "recentf")
    14 
    16 
    15 (eval-and-compile
    17 (eval-and-compile
    85 ;; (setq user-full-name "Oleksandr Gavenko")
    87 ;; (setq user-full-name "Oleksandr Gavenko")
    86 ;; (setq user-mail-address "gavenkoa@gmail.com")
    88 ;; (setq user-mail-address "gavenkoa@gmail.com")
    87 ;; (setq user-nick "gavenkoa")
    89 ;; (setq user-nick "gavenkoa")
    88 ;; (setq user-home-page "http://gavenkoa.users.sf.net")
    90 ;; (setq user-home-page "http://gavenkoa.users.sf.net")
    89 
    91 
    90 (unless (and (boundp 'user-nick) (stringp user-nick))
    92 (defvar user-nick (user-login-name)
    91   (setq user-nick (user-login-name)) )
    93   "My nick name.")
    92 ;; auto-insert and copyright package use this to insert copyright owner. Gnus
    94 ;; auto-insert and copyright package use this to insert copyright owner. Gnus
    93 ;; uses this for Organization header.
    95 ;; uses this for Organization header.
    94 (setenv "ORGANIZATION"
    96 (setenv "ORGANIZATION"
    95         (concat
    97         (concat
    96          user-full-name
    98          user-full-name
    97          " <" user-mail-address  ">"
    99          " <" user-mail-address  ">"
    98          (when (boundp 'user-home-page) (concat ", " user-home-page))))
   100          (when (boundp 'user-home-page) (concat ", " user-home-page))))
    99 
   101 
   100 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
   102 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
   101 (message "my defun, defmacro, defvar")
   103 (message "my defun, defmacro, defvar")
   102 
       
   103 (require 'cl)
       
   104 
   104 
   105 (defmacro my-filter (pred list)
   105 (defmacro my-filter (pred list)
   106   "Construct list with elements from LIST which satisfy PRED."
   106   "Construct list with elements from LIST which satisfy PRED."
   107   (let ( (r (make-symbol "r_")) )
   107   (let ( (r (make-symbol "r_")) )
   108     `(let ( (,r (list nil)) )
   108     `(let ( (,r (list nil)) )
   174   (interactive)
   174   (interactive)
   175   (let* ( (cur-buffer (current-buffer)) (new-buffer (get-buffer-create (concat (buffer-name cur-buffer) "-funcs.el"))) symb )
   175   (let* ( (cur-buffer (current-buffer)) (new-buffer (get-buffer-create (concat (buffer-name cur-buffer) "-funcs.el"))) symb )
   176     (while (search-forward-regexp "([[:alnum:]*]" nil t)
   176     (while (search-forward-regexp "([[:alnum:]*]" nil t)
   177       (setq symb (thing-at-point 'symbol))
   177       (setq symb (thing-at-point 'symbol))
   178       (with-current-buffer new-buffer
   178       (with-current-buffer new-buffer
   179         (insert-string symb)
   179         (insert symb)
   180         (insert-char ?\n 1)))
   180         (insert-char ?\n 1)))
   181     (switch-to-buffer new-buffer)
   181     (switch-to-buffer new-buffer)
   182     (shell-command-on-region (point-min) (point-max) "sort -u" nil t)
   182     (shell-command-on-region (point-min) (point-max) "sort -u" nil t)
   183     ))
   183     ))
   184 
   184