Emacs: fixed BROWSER bug for sudo.
parent
cbb53ddc37
commit
c766652506
|
@ -88,7 +88,7 @@ case "$mimetype" in
|
||||||
# Syntax highlight for text files:
|
# Syntax highlight for text files:
|
||||||
text/* | */xml)
|
text/* | */xml)
|
||||||
try highlight --out-format=ansi "$path" && { dump | trim; exit 5; } || exit 2;;
|
try highlight --out-format=ansi "$path" && { dump | trim; exit 5; } || exit 2;;
|
||||||
# FIXME: does not work!
|
# TODO: does not work!
|
||||||
# highlight --out-format=xterm256 -s zmrok "$path" | head -n $maxln
|
# highlight --out-format=xterm256 -s zmrok "$path" | head -n $maxln
|
||||||
|
|
||||||
# Ascii-previews of images:
|
# Ascii-previews of images:
|
||||||
|
|
|
@ -38,7 +38,7 @@
|
||||||
(autoload 'linum-mode "linum" "toggle line numbers on/off" t)
|
(autoload 'linum-mode "linum" "toggle line numbers on/off" t)
|
||||||
;; (setq linum-format "%-4d ")
|
;; (setq linum-format "%-4d ")
|
||||||
(setq linum-format "%d ")
|
(setq linum-format "%d ")
|
||||||
(global-linum-mode 1) ;; FIXME: This may generate warnings with emacsclient. Bug?
|
(global-linum-mode 1) ;; TODO: This may generate warnings with emacsclient. Bug?
|
||||||
(define-key my-keys-minor-mode-map (kbd "C-<f5>") 'linum-mode) ;; Toggle line numbers.
|
(define-key my-keys-minor-mode-map (kbd "C-<f5>") 'linum-mode) ;; Toggle line numbers.
|
||||||
|
|
||||||
;; Indentation
|
;; Indentation
|
||||||
|
@ -90,21 +90,20 @@
|
||||||
(windmove-default-keybindings))
|
(windmove-default-keybindings))
|
||||||
|
|
||||||
;; Browser
|
;; Browser
|
||||||
;; (setq browse-url-generic-program
|
(setq browse-url-generic-program
|
||||||
;; (executable-find
|
(executable-find
|
||||||
;; (lambda ()
|
(let ((b (getenv "BROWSER")))
|
||||||
;; (if (getenv "BROWSERsd")
|
(if b b "w3m" )))
|
||||||
;; (getenv "BROWSERsd")
|
browse-url-browser-function 'browse-url-generic)
|
||||||
;; (format "dwb")
|
|
||||||
;; )
|
|
||||||
;; ))
|
|
||||||
;; browse-url-browser-function 'browse-url-generic)
|
|
||||||
|
|
||||||
;; (setq browse-url-generic-program (executable-find (getenv "BROWSER"))
|
|
||||||
;; browse-url-browser-function 'browse-url-generic)
|
|
||||||
|
|
||||||
;; Default ispell dictionnay
|
;; Default ispell dictionnay
|
||||||
(setq ispell-dictionary "fr")
|
;; (setq ispell-dictionary "fr")
|
||||||
|
(define-key my-keys-minor-mode-map
|
||||||
|
(kbd "C-<f7>")
|
||||||
|
(lambda () (interactive) (ispell-change-dictionary "en")))
|
||||||
|
(define-key my-keys-minor-mode-map
|
||||||
|
(kbd "C-<f8>")
|
||||||
|
(lambda () (interactive) (ispell-change-dictionary "fr")))
|
||||||
|
|
||||||
;; Use color escape sequences. Only use if needed.
|
;; Use color escape sequences. Only use if needed.
|
||||||
;; (add-hook 'shell-mode-hook 'ansi-color-for-comint-mode-on)
|
;; (add-hook 'shell-mode-hook 'ansi-color-for-comint-mode-on)
|
||||||
|
|
|
@ -108,7 +108,7 @@
|
||||||
c-mode lua-mode python-mode
|
c-mode lua-mode python-mode
|
||||||
latex-mode html-mode texinfo-mode))
|
latex-mode html-mode texinfo-mode))
|
||||||
|
|
||||||
;; FIXME: fix C functions color.
|
;; TODO: fix C functions color.
|
||||||
;; (font-lock-add-keywords
|
;; (font-lock-add-keywords
|
||||||
;; 'c-mode
|
;; 'c-mode
|
||||||
;; '(
|
;; '(
|
||||||
|
@ -125,7 +125,7 @@
|
||||||
;; "Font Lock mode face used to highlight format specifiers."
|
;; "Font Lock mode face used to highlight format specifiers."
|
||||||
;; :group 'font-lock-faces)
|
;; :group 'font-lock-faces)
|
||||||
|
|
||||||
;; FIXME: disable highlighting outside of string.
|
;; TODO: disable highlighting outside of string.
|
||||||
;; (add-hook
|
;; (add-hook
|
||||||
;; 'c-mode-common-hook
|
;; 'c-mode-common-hook
|
||||||
;; (lambda ()
|
;; (lambda ()
|
||||||
|
@ -136,7 +136,7 @@
|
||||||
;; ("\\(%%\\)"
|
;; ("\\(%%\\)"
|
||||||
;; 1 font-lock-format-specifier-face t)) )))
|
;; 1 font-lock-format-specifier-face t)) )))
|
||||||
|
|
||||||
;; FIXME: Does not work.
|
;; TODO: Does not work.
|
||||||
;; (add-hook
|
;; (add-hook
|
||||||
;; 'c-mode-common-hook
|
;; 'c-mode-common-hook
|
||||||
;; (set-face-foreground 'compilation-column-number "magenta")
|
;; (set-face-foreground 'compilation-column-number "magenta")
|
||||||
|
|
|
@ -183,7 +183,7 @@ function titlecase(string,x) {
|
||||||
# Double exception 1: Set 1st word of string in Cap case
|
# Double exception 1: Set 1st word of string in Cap case
|
||||||
# Need to handle potential internal single/double quotes like
|
# Need to handle potential internal single/double quotes like
|
||||||
# "A Day in the Life" or 'On the Waterfront'
|
# "A Day in the Life" or 'On the Waterfront'
|
||||||
# WARNING: here we consider digits as part of a work (as in 1st, 2nd, etc.)
|
## WARNING: here we consider digits as part of a work (as in 1st, 2nd, etc.)
|
||||||
match(a, /[A-Za-z0-9]/)
|
match(a, /[A-Za-z0-9]/)
|
||||||
a = toupper(substr(a,1,RSTART)) substr(a,RSTART+1)
|
a = toupper(substr(a,1,RSTART)) substr(a,RSTART+1)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue