 
 ;;  From http://oremacs.com/2015/01/05/youtube-dl
 (defun ar/youtube-dowload ()
+  "Download youtube video from url in clipboard."
   (interactive)
   (let* ((str (current-kill 0))
          (default-directory "~/Downloads")

(setq desktop-restore-eager 10)

(defun ar/desktop-save ()
  "Write the desktop save file to ~/.emacs.d"
  (desktop-save (expand-file-name "~/.emacs.d/")))

(run-with-idle-timer 300 t 'ar/desktop-save)

(defun ar/load-all-files (pattern)
  "Load all files found by PATTERN, ie. (ar/load-all-files '~/*.el')"
  (dolist (file (file-expand-wildcards pattern))
    (load file)))


(add-hook 'objc-mode-hook 'ar/objc-mode-hook-function)

(defun ar/java-mode-hook-function ()
  "Called when entering `java-mode'."
  ;; 100-column limit for java.
  (set-fill-column 100)
  ;; 2-char indent for java.
