From 487951419022fe425c18ab53aeabb9f0ac214029 Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Mon, 13 May 2013 17:34:23 +0200 Subject: Add emacs-24.3 --- .../app-editors/emacs/files/emacs-exherbo.el.in | 1 + .../emacs/files/emacs-python-docstrings.patch | 40 ++++++++++++++++++++++ 2 files changed, 41 insertions(+) create mode 100644 packages/app-editors/emacs/files/emacs-exherbo.el.in create mode 100644 packages/app-editors/emacs/files/emacs-python-docstrings.patch (limited to 'packages/app-editors/emacs/files') diff --git a/packages/app-editors/emacs/files/emacs-exherbo.el.in b/packages/app-editors/emacs/files/emacs-exherbo.el.in new file mode 100644 index 0000000..08c8523 --- /dev/null +++ b/packages/app-editors/emacs/files/emacs-exherbo.el.in @@ -0,0 +1 @@ +(setq source-directory "/usr/src/emacs") diff --git a/packages/app-editors/emacs/files/emacs-python-docstrings.patch b/packages/app-editors/emacs/files/emacs-python-docstrings.patch new file mode 100644 index 0000000..0baa5f6 --- /dev/null +++ b/packages/app-editors/emacs/files/emacs-python-docstrings.patch @@ -0,0 +1,40 @@ +diff --git a/python.el b/python.el +index 54a657a..f01360c 100644 +--- a/lisp/progmodes/python.el ++++ b/lisp/progmodes/python.el +@@ -405,6 +405,23 @@ The type returned can be `comment', `string' or `paren'." + 'python-info-ppss-comment-or-string-p + #'python-syntax-comment-or-string-p "24.3") + ++(defun python-doc-string-at-p (pos) ++ "Check to see if there is a docstring at POS." ++ (save-excursion ++ (goto-char pos) ++ (if (looking-at-p "'''\\|\"\"\"") ++ (progn ++ (python-nav-backward-statement) ++ (looking-at "\\`\\|class \\|def ")) ++ nil))) ++ ++(defun python-font-lock-syntactic-face-function (state) ++ (if (nth 3 state) ++ (if (python-doc-string-at-p (nth 8 state)) ++ font-lock-doc-face ++ font-lock-string-face) ++ font-lock-comment-face)) ++ + (defvar python-font-lock-keywords + ;; Keywords + `(,(rx symbol-start +@@ -3226,7 +3243,10 @@ if that value is non-nil." + 'python-nav-forward-sexp) + + (set (make-local-variable 'font-lock-defaults) +- '(python-font-lock-keywords nil nil nil nil)) ++ '(python-font-lock-keywords ++ nil nil nil nil ++ (font-lock-syntactic-face-function ++ . python-font-lock-syntactic-face-function))) + + (set (make-local-variable 'syntax-propertize-function) + python-syntax-propertize-function) -- cgit v1.2.3-54-g00ecf