summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2016-01-11 22:48:10 -0800
committerJohn Wiegley <johnw@newartisans.com>2016-01-11 22:48:10 -0800
commit4b739f70a54579b134ab6da313a3d665640a6a3f (patch)
treea5c8bba0bd10e8c4b2de062d6a5f905ac139f121 /lisp
parent540bfa7680268a55fc617ffb822e962cb9fb6c59 (diff)
parent43662a240b682de94299e797452ba56d01a04883 (diff)
downloademacs-4b739f70a54579b134ab6da313a3d665640a6a3f.tar.gz
emacs-4b739f70a54579b134ab6da313a3d665640a6a3f.tar.bz2
emacs-4b739f70a54579b134ab6da313a3d665640a6a3f.zip
Merge from origin/emacs-25
43662a2 ; Clarify that xref is still experimental 0a6e6ca ; * admin/release-process: Remove some obsolete records. c2e9e3d * lisp/progmodes/fortran.el (fortran-make-syntax-propertize-function): 8637f3d (semantic-symref-derive-find-filepatterns): Return a list 0a7ad07 ; Re-arrange xref-related entries in NEWS. fe903ef Fix xref-find-references on MS-Windows 55a28d8 ; Fixed visual bell artifact problem on NextStep. d064034 Document new features of tildify-mode 964bea7 Document new features of Whitespace mode cd68f47 Improve documentation of new Hide-IfDef features 723b8bf Fix regression in font-locking cl-assert and cl-check-type
Diffstat (limited to 'lisp')
-rw-r--r--lisp/cedet/semantic/symref/grep.el39
-rw-r--r--lisp/emacs-lisp/lisp-mode.el5
-rw-r--r--lisp/progmodes/fortran.el4
-rw-r--r--lisp/progmodes/xref.el5
-rw-r--r--lisp/textmodes/tildify.el4
5 files changed, 29 insertions, 28 deletions
diff --git a/lisp/cedet/semantic/symref/grep.el b/lisp/cedet/semantic/symref/grep.el
index 52c8d3b972c..3b544d9f912 100644
--- a/lisp/cedet/semantic/symref/grep.el
+++ b/lisp/cedet/semantic/symref/grep.el
@@ -53,6 +53,8 @@ and those hits returned.")
See find -name man page for format.")
(defun semantic-symref-derive-find-filepatterns (&optional mode)
+ ;; FIXME: This should be moved to grep.el, where it could be used
+ ;; for "C-u M-x grep" as well.
"Derive a list of file patterns for the current buffer.
Looks first in `semantic-symref-filepattern-alist'. If it is not
there, it then looks in `auto-mode-alist', and attempts to derive something
@@ -64,28 +66,20 @@ Optional argument MODE specifies the `major-mode' to test."
(when (not pat)
;; No hit, try auto-mode-alist.
(dolist (X auto-mode-alist)
- (when (eq (cdr X) mode)
- ;; Only take in simple patterns, so try to convert this one.
- (let ((Xp
- (cond ((string-match "\\\\\\.\\([^\\'>]+\\)\\\\'" (car X))
- (concat "*." (match-string 1 (car X))))
- (t nil))))
- (when Xp
- (setq pat (cons Xp pat))))
- )))
+ (when (and (eq (cdr X) mode)
+ ;; Only take in simple patterns, so try to convert this one.
+ (string-match "\\\\\\.\\([^\\'>]+\\)\\\\'" (car X)))
+ (push (concat "*." (match-string 1 (car X))) pat))))
;; Convert the list into some find-flags.
- (cond ((= (length pat) 1)
- (concat "-name \"" (car pat) "\""))
- ((consp pat)
- (concat "\\( "
- (mapconcat (lambda (s)
- (concat "-name \"" s "\""))
- pat
- " -o ")
- " \\)"))
- (t
- (error "Customize `semantic-symref-filepattern-alist' for %s" major-mode))
- )))
+ (if (null pat)
+ (error "Customize `semantic-symref-filepattern-alist' for %S"
+ major-mode)
+ (let ((args `("-name" ,(car pat))))
+ (if (null (cdr args))
+ args
+ `("(" ,@args
+ ,@(apply #'nconc (mapcar (lambda (s) `("-o" "-name" ,s)) pat))
+ ")"))))))
(defvar grepflags)
(defvar greppattern)
@@ -147,7 +141,8 @@ This shell should support pipe redirect syntax."
;; Find the root of the project, and do a find-grep...
(let* (;; Find the file patterns to use.
(rootdir (semantic-symref-calculate-rootdir))
- (filepattern (semantic-symref-derive-find-filepatterns))
+ (filepatterns (semantic-symref-derive-find-filepatterns))
+ (filepattern (mapconcat #'shell-quote-argument filepatterns " "))
;; Grep based flags.
(grepflags (cond ((eq (oref tool :resulttype) 'file)
"-l ")
diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el
index 4bb1466c930..574ecef0cde 100644
--- a/lisp/emacs-lisp/lisp-mode.el
+++ b/lisp/emacs-lisp/lisp-mode.el
@@ -383,7 +383,8 @@ This will generate compile-time constants from BINDINGS."
((eq type 'type) font-lock-type-face)
((or (not (match-string 2)) ;; Normal defun.
(and (match-string 2) ;; Setf function.
- (match-string 4))) font-lock-function-name-face)))
+ (match-string 4)))
+ font-lock-function-name-face)))
nil t)))
"Subdued level highlighting for Lisp modes.")
@@ -403,7 +404,7 @@ This will generate compile-time constants from BINDINGS."
(2 font-lock-constant-face nil t))
;; Erroneous structures.
(,(concat "(" el-errs-re "\\_>")
- (1 font-lock-warning-face))
+ (1 font-lock-warning-face prepend))
;; Words inside \\[] tend to be for `substitute-command-keys'.
(,(concat "\\\\\\\\\\[\\(" lisp-mode-symbol-regexp "\\)\\]")
(1 font-lock-constant-face prepend))
diff --git a/lisp/progmodes/fortran.el b/lisp/progmodes/fortran.el
index 82e81b23f50..bd08d3fd16d 100644
--- a/lisp/progmodes/fortran.el
+++ b/lisp/progmodes/fortran.el
@@ -496,12 +496,12 @@ This is used to fontify fixed-format Fortran comments."
;; worth the trouble (about 0.5% of slow down).
(eval ;I hate `eval', but it's hard to avoid it here.
`(syntax-propertize-rules
- ("^[cd\\*]" (0 "<"))
+ ("^[CcDd\\*]" (0 "<"))
;; We mark all chars after line-length as "comment-start", rather than
;; just the first one. This is so that a closing ' that's past the
;; line-length will indeed be ignored (and will result in a string that
;; leaks into subsequent lines).
- ((format "^[^cd\\*\t\n].\\{%d\\}\\(.+\\)" (1- line-length))
+ ((format "^[^CcDd\\*\t\n].\\{%d\\}\\(.+\\)" (1- line-length))
(1 "<")))))
(defvar fortran-font-lock-keywords fortran-font-lock-keywords-1
diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el
index fe0af0c3430..26471b0df3f 100644
--- a/lisp/progmodes/xref.el
+++ b/lisp/progmodes/xref.el
@@ -19,6 +19,11 @@
;;; Commentary:
+;; NOTE: The xref API is still experimental and can change in major,
+;; backward-incompatible ways. Everyone is encouraged to try it, and
+;; report to us any problems or use cases we hadn't anticiated, by
+;; sending an email to emacs-devel, or `M-x report-emacs-bug'.
+;;
;; This file provides a somewhat generic infrastructure for cross
;; referencing commands, in particular "find-definition".
;;
diff --git a/lisp/textmodes/tildify.el b/lisp/textmodes/tildify.el
index b11569cd14c..eb799c09510 100644
--- a/lisp/textmodes/tildify.el
+++ b/lisp/textmodes/tildify.el
@@ -282,7 +282,7 @@ corresponding text part and can be either:
CALLBACK is a function accepting two arguments -- REG-BEG and REG-END -- that
will be called for portions of the buffer outside of the environments defined by
-PAIRS regexes.
+PAIRS regexps.
The function will return as soon as CALLBACK returns nil or point goes past END.
CALLBACK may be called on portions of the buffer outside of [BEG END); in fact
@@ -479,7 +479,7 @@ which is assumed to be a space character, should be replaced with a hard space."
;;;###autoload
(define-minor-mode tildify-mode
- "Adds electric behaviour to space character.
+ "Adds electric behavior to space character.
When space is inserted into a buffer in a position where hard space is required
instead (determined by `tildify-space-pattern' and `tildify-space-predicates'),