;;; -*- Mode: Emacs-Lisp -*-
;;;
;;; Time-stamp: <1999-09-02, 17:13:25, mrz@isun34>
;;
;; [1999-07-09] .XEMACS-functions
;; (C) René Scholz
]+>" nil t) (replace-match "
")) (goto-char (point-min))
(while(search-forward-regexp "" nil t) (replace-match ""))
(goto-char (point-min))
(while(search-forward-regexp "<[/a-z0-9A-Z]+>" nil t)
(upcase-region (match-beginning 0) (match-end 0)) )
(goto-char (point-min))
(while(search-forward "" nil t) (replace-match "")) (goto-char (point-min))
(while(search-forward "" nil t) (replace-match "")) (goto-char (point-min))
)
)
(defun my-edlex-word ()
"Translate word into german via edLex."
(interactive)
(save-excursion
(mouse-set-point (mouse-position-as-motion-event))
(split-window-vertically)
(backward-word 1) (mark-word 1)
(copy-to-register 1234 (region-beginning) (region-end))
(zmacs-deactivate-region) (backward-word -1)
(setq english_word (get-register 1234))
;(message "word= |%s|" english_word)
(shell-command (concat "edLex " english_word "&"))
(read-string "(press return) ")
(other-window 1) (delete-window) (other-window -1)
)
)
(defun my-load-bookmarks-from-default-dir ()
"Lädt das Bookmarks-File .emacs.bmk aus dem aktuellen Verzeichnis
(default-directory), falls vorhanden."
(interactive)
(if (file-readable-p (concat default-directory ".emacs.bmk" ))
(progn
(message "Loading bookmarks from file: %s.emacs.bmk" default-directory)
(bookmark-load ".emacs.bmk")
(setq bookmark-default-file (concat default-directory ".emacs.bmk"))
(define-key global-map '(shift button3) 'bookmark-menu-jump)
)
))
;; Popup window with buffer list ; from XEmacs FAQ (2.61)
(defun my-cw-build-buffers ()
"Popup the buffer menu."
(interactive "@")
(run-hooks 'activate-menubar-hook)
(popup-menu (car (find-menu-item current-menubar '("Buffers"))))
)
;; Popup window with recent files list
(defun my-recent-files-build-buffers ()
"Popup the recent files menu."
(interactive "@")
(run-hooks 'activate-menubar-hook)
(popup-menu (car (find-menu-item current-menubar '("Recent Files"))))
)
(defun my-write-blank-timestamp ()
"Schreibt leeren Timestamp vor aktuelle Zeile."
(interactive)
(beginning-of-line)
(insert "Time-stamp: <>\n")
(previous-line 1)
)
(global-set-key '(alt t) 'my-write-blank-timestamp)
(defconst my-time-stamp-month-numbers
'(("Jan" . 1) ("Feb" . 2) ("Mar" . 3) ("Apr" . 4) ("May" . 5) ("Jun" . 6)
("Jul" . 7) ("Aug" . 8) ("Sep" . 9) ("Oct" . 10) ("Nov" . 11) ("Dec" . 12))
"Alist of months and their number.")
(defun my-ISO-date ()
"Return the current date as a string in \"YYYY-MM-DD\" form."
(let ((date (current-time-string)))
(format "%s-%02d-%02d"
(substring date -4)
(cdr (assoc (substring date 4 7) my-time-stamp-month-numbers))
(string-to-int (substring date 8 10)))))
(defun my-write-script-header ()
"Schreibt einen Header für Scripte (Perl/Shell usw) vor aktuelle Zeile.
Es werden eingefügt: [ISO-DATE]