.emacs-my
changeset 974 a044269d57e0
parent 973 cb197c1eeb15
child 975 75ac0063fd22
equal deleted inserted replaced
973:cb197c1eeb15 974:a044269d57e0
  1834 ;; (setq erc-kill-queries-on-quit t)
  1834 ;; (setq erc-kill-queries-on-quit t)
  1835 ;; Kill buffers for server messages after quitting the server
  1835 ;; Kill buffers for server messages after quitting the server
  1836 ;; (setq erc-kill-server-buffer-on-quit t)
  1836 ;; (setq erc-kill-server-buffer-on-quit t)
  1837 
  1837 
  1838 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1838 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
       
  1839 (message "devel, programming")
       
  1840 
       
  1841 (which-func-mode 1)
       
  1842 
       
  1843 (add-to-list 'auto-mode-alist '("\\.cu$" . c-mode))
       
  1844 
       
  1845 (defun my-c++-header-file-p ()
       
  1846   "Return non-nil, if in a C++ header."
       
  1847   (and (string-match "\\.h$"
       
  1848                      (or (buffer-file-name)
       
  1849                          (buffer-name)))
       
  1850        (save-excursion
       
  1851          (re-search-forward "\\_<class\\_>" nil t))))
       
  1852 
       
  1853 (when (>= emacs-major-version 22)
       
  1854   (add-to-list 'magic-mode-alist '(my-c++-header-file-p . c++-mode))
       
  1855   )
       
  1856 
       
  1857 (setq-default comment-style (quote indent))
       
  1858 (setq-default comment-column 44)
       
  1859 (setq-default comment-fill-column my-fill-column)
       
  1860 
       
  1861 (mapc (lambda (hook) (add-hook hook (lambda () (setq fill-column my-fill-column)) ))
       
  1862       (append my-devel-mode-hook-list my-text-mode-hook-list))
       
  1863 
       
  1864 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
       
  1865 (message "diff, patch, ediff, emerge")
       
  1866 
       
  1867 (setq diff-switches "-u")
       
  1868 
       
  1869 (setq ediff-diff-options "")
       
  1870 (setq ediff-custom-diff-options "-u")
       
  1871 (setq ediff-window-setup-function 'ediff-setup-windows-plain)
       
  1872 (setq ediff-split-window-function 'split-window-vertically)
       
  1873 
       
  1874 (when window-system
       
  1875   (eval-after-load 'diff-mode
       
  1876     '(progn
       
  1877        (set-face-foreground 'diff-added-face "DarkGreen")
       
  1878        (set-face-foreground 'diff-removed-face "DarkRed")
       
  1879   )))
       
  1880 
       
  1881 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1839 (message "vc-mode, VCS, version control, cvs, svn, mercurial, hg, bazaar, bzr, git, fossil")
  1882 (message "vc-mode, VCS, version control, cvs, svn, mercurial, hg, bazaar, bzr, git, fossil")
  1840 
  1883 
  1841 ;; `-b' switch to ignore changes in whitespaces.
  1884 ;; `-b' switch to ignore changes in whitespaces.
  1842 ;; (setq vc-git-diff-switches "-b")
  1885 ;; (setq vc-git-diff-switches "-b")
  1843 ;; (setq vc-diff-switches "-b")
  1886 ;; (setq vc-diff-switches "-b")
  1889 (message "DVC")
  1932 (message "DVC")
  1890 
  1933 
  1891 (when (featurep 'dvc-emacs)
  1934 (when (featurep 'dvc-emacs)
  1892   (setq dvc-tips-enabled nil)
  1935   (setq dvc-tips-enabled nil)
  1893   )
  1936   )
  1894 
       
  1895 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
       
  1896 (message "devel, programming")
       
  1897 
       
  1898 (which-func-mode 1)
       
  1899 
       
  1900 (add-to-list 'auto-mode-alist '("\\.cu$" . c-mode))
       
  1901 
       
  1902 (defun my-c++-header-file-p ()
       
  1903   "Return non-nil, if in a C++ header."
       
  1904   (and (string-match "\\.h$"
       
  1905                      (or (buffer-file-name)
       
  1906                          (buffer-name)))
       
  1907        (save-excursion
       
  1908          (re-search-forward "\\_<class\\_>" nil t))))
       
  1909 
       
  1910 (when (>= emacs-major-version 22)
       
  1911   (add-to-list 'magic-mode-alist '(my-c++-header-file-p . c++-mode))
       
  1912   )
       
  1913 
       
  1914 (setq-default comment-style (quote indent))
       
  1915 (setq-default comment-column 44)
       
  1916 (setq-default comment-fill-column my-fill-column)
       
  1917 
       
  1918 (mapc (lambda (hook) (add-hook hook (lambda () (setq fill-column my-fill-column)) ))
       
  1919       (append my-devel-mode-hook-list my-text-mode-hook-list))
       
  1920 
       
  1921 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
       
  1922 (message "diff, patch, ediff, emerge")
       
  1923 
       
  1924 (setq diff-switches "-u")
       
  1925 
       
  1926 (setq ediff-diff-options "")
       
  1927 (setq ediff-custom-diff-options "-u")
       
  1928 (setq ediff-window-setup-function 'ediff-setup-windows-plain)
       
  1929 (setq ediff-split-window-function 'split-window-vertically)
       
  1930 
       
  1931 (when window-system
       
  1932   (eval-after-load 'diff-mode
       
  1933     '(progn
       
  1934        (set-face-foreground 'diff-added-face "DarkGreen")
       
  1935        (set-face-foreground 'diff-removed-face "DarkRed")
       
  1936   )))
       
  1937 
  1937 
  1938 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1938 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1939 (message "indenting")
  1939 (message "indenting")
  1940 
  1940 
  1941 (setq standard-indent 4)
  1941 (setq standard-indent 4)