(put 'downcase-region 'disabled nil)

;; Záporná hodnota "nil" způsobí zneviditelnění pozice kurzoru ve stavovém řádku.
(setq column-number-mode t)

;; V případě záporné hodnoty "nil" dojde k zvukovému upozornění namísto probliknutí obrazovky.
(setq visible-bell t)

;; Zde je nastavení pomocí voleb v "customize"... dired, jabber, e-mail a browser.
(custom-set-variables
  ;; custom-set-variables was added by Custom.
  ;; If you edit it by hand, you could mess it up, so be careful.
  ;; Your init file should contain only one such instance.
  ;; If there is more than one, they won't work right.
 '(column-number-mode t)
 '(dired-recursive-copies (quote always))
 '(dired-recursive-deletes (quote always))
 '(gnus-init-file "~/.gnus")
 '(gnus-site-init-file nil)
 '(gnus-suppress-duplicates t)
 '(jabber-history-enable-rotation t)
 '(jabber-history-enabled t)
 '(jabber-use-global-history nil)
 '(mail-from-style (quote angles))
 '(mail-specify-envelope-from t)
 '(mail-user-agent (quote gnus-user-agent))
 '(mailclient-place-body-on-clipboard-flag nil)
 '(mm-inline-text-html-with-images t)
 '(nnmail-treat-duplicates (quote delete))
 '(pop3-mailhost "x.x.x")
 '(read-mail-command (quote gnus))
 '(rmail-file-name "~/Mail/RMAIL")
 '(sendmail-program "/usr/sbin/exim4")
 '(sr-avfs-handlers-alist (quote (("\\.[jwesh]ar$" . "#uzip/") ("\\.xpi$" . "#uzip/") ("\\.iso$" . "#iso9660/") ("." . "#/") ("\\.\\(?:tar\\.gz\\|tgz\\)$" . "tar xvzf %f *") ("\\.tar\\.bz2$" . "tar xvjf %f *") ("\\.rar$" . "#urar/"))))
 '(sr-avfs-root "~/.avfs")
 '(sr-mirror-unionfs-impl (quote funionfs))
 '(text-mode-hook (quote (text-mode-hook-identify)))
 '(transient-mark-mode (quote identity))
 '(user-mail-address "x@x")
 '(w3m-home-page "http://www.google.cz")
 '(w3m-icon-directory nil t)
 '(w3m-pop-up-frames nil)
 '(w3m-quick-start nil)
 '(w3m-use-cookies t)
 '(w3m-use-favicon nil))
(custom-set-faces
  ;; custom-set-faces was added by Custom.
  ;; If you edit it by hand, you could mess it up, so be careful.
  ;; Your init file should contain only one such instance.
  ;; If there is more than one, they won't work right.
 )

;; Makro na konverzi kodování znakové sady pomocí programu "iconv".
(fset 'konvertuj
   "iconv -f utf-8 -t CP1250 \C-k\C-y > Mivvy/\C-y.txt\C-[OB\C-[OH")
(global-set-key (quote [f12]) 'konvertuj)

;; Uloží do registru pod jménem "e" uvedený soubor.Skok do registru C-x r j e.
(set-register ?e '(file . "~/Dokumenty/Emacs_1"))

;; IDO mode pro doplňování jmen souborů a bufferů.
(require 'ido)
(ido-mode t)

;; Emms
(add-to-list 'load-path "/usr/share/emacs/site-lisp/emms/lisp")
(require 'emms-setup)
(emms-standard)
(emms-default-players)

;; Jabber
(add-to-list 'load-path "/usr/share/emacs/site-lisp/emacs-jabber-0.8.0/")
(require 'jabber)

(defun g-jabber()
"conect jabber and open roster"
(interactive)
(jabber-connect-all)
(jabber-display-roster)
(switch-to-buffer "*-jabber-roster-*"))
(global-set-key (kbd "C-x j") 'g-jabber)
(global-set-key (kbd "C-x M-j") 'jabber-disconnect)

;; Nastavení výchozího názvu bufferu playlistu Emms.
(setq emms-info-asynchronously nil)
(setq emms-playlist-buffer-name "*Hudba*")
(setq emms-source-file-default-directory "~/Hudba/")

;; Tagy 
(autoload 'speedbar "speedbar")
(setq speedbar-fetch-etags-command "/usr/local/bin/etags"
      speedbar-fetch-etags-arguments '("-f" "-"))

(put 'dired-find-alternate-file 'disabled nil)


;; Dalším způsobem je nastavení pomocí "M-x customize-option""ange-ftp-try-passive-mode" na t (Jeho výchozí hodnota je nula, - nil).
  (defvar ange-ftp-hosts-no-pasv '("localhost")
    "*List of hosts that do not need PASV (e.g. hosts within your firewall).
  Used by 'ange-ftp-set-passive'.")	; rephrased, added "*" // era

  (defun ange-ftp-set-passive ()
      "Function to send a PASV command to hosts not named in the variable
  'ange-ft-hosts-no-pasv'. Intended to be called from the hook variable
  'ange-ftp-process-startup-hook'."	; rephrased significantly // era
    (if (not (member host ange-ftp-hosts-no-pasv))
        (ange-ftp-raw-send-cmd proc "passive")))

  (add-hook 'ange-ftp-process-startup-hook 'ange-ftp-set-passive)

;; BBDB
(require 'bbdb)
(bbdb-initialize 'gnus 'message)
(defun my-message-mode-keys ()
  (define-key message-mode-map (kbd "C-c a") 'bbdb-complete-name))
  (add-hook 'message-mode-hook 'my-message-mode-keys)
(setq bbdb-north-american-phone-numbers-p nil)
(setq bbdb-quiet-about-name-mismatches t)
(setq bbdb-use-alternate-names nil)
(setq bbdb-file "~/.bbdb")
(setq bbdb-use-pop-up nil)
(setq bbdb-dwim-net-address-allow-redundancy t)
;;(global-set-key (kbd "M-c b") 'bbdb)

;; Sunrise Commander
(add-to-list 'load-path "/usr/share/emacs/site-lisp/sunrise-commander.el/")
(require 'sunrise-commander)
(require 'sunrise-x-modeline)
(require 'sunrise-x-old-checkpoints)
(require 'sunrise-x-buttons)
