[elpa] master a593b6f: Bump version of other-frame-window.el

2015-11-15 Thread Stephen Leake
branch: master
commit a593b6f4a40bffdd15aba3326379b8f7fb5b0a14
Author: Stephen Leake 
Commit: Stephen Leake 

Bump version of other-frame-window.el

* packages/other-frame-window/other-frame-window.el:
(ofw--set-prefix): FIXME => IMPROVEME.
(ofw-delete-from-overriding): Use remq instead of delq to avoid side
effects on let-bound list.
(ofw-switch-to-buffer-advice): Delete FIXME re emacs 24.3.
(ofw--suspend-and-restore): Fix FIXME.
(other-frame-window-mode): Add autoload.
(other-frame-window-mode): Delete code, FIXME re emacs 24.3.
(ofw-dwim--frame-p, ofw-dwim-open-other): FIXME => IMPROVEME.
---
 packages/other-frame-window/other-frame-window.el |   32 +---
 1 files changed, 8 insertions(+), 24 deletions(-)

diff --git a/packages/other-frame-window/other-frame-window.el 
b/packages/other-frame-window/other-frame-window.el
index 6fc718f..2427ce6 100755
--- a/packages/other-frame-window/other-frame-window.el
+++ b/packages/other-frame-window/other-frame-window.el
@@ -5,7 +5,7 @@
 ;; Author: Stephen Leake 
 ;; Maintainer: Stephen Leake 
 ;; Keywords: frame window
-;; Version: 1.0.1
+;; Version: 1.0.2
 ;; Package-Requires: ((emacs "24.4"))
 ;;
 ;; This file is part of GNU Emacs.
@@ -123,8 +123,8 @@
   "Remove ourselves from 'display-buffer-overriding-action' action list, if 
present."
   (let ((functions (car display-buffer-overriding-action))
 (attrs (cdr display-buffer-overriding-action)))
-(setq functions (delq #'ofw-display-buffer-other-frame
-  (delq #'ofw-display-buffer-other-window functions)))
+(setq functions (remq #'ofw-display-buffer-other-frame
+  (remq #'ofw-display-buffer-other-window functions)))
 (setq display-buffer-overriding-action
   (when (or functions attrs) (cons functions attrs)
 
@@ -165,10 +165,10 @@ Intended for 'display-buffer-overriding-action'."
   ;; Reset for next display-buffer call.
   (ofw-delete-from-overriding)
 
+  ;; IMPROVEME: prompt for a frame if more than 2
   (or (display-buffer-use-some-frame buffer alist)
   (display-buffer-pop-up-frame buffer alist)))
 
-;; FIXME: use defadvice for Emacs 24.3
 (defun ofw-switch-to-buffer-advice (orig-fun buffer
  norecord force-same-window)
   "Change `switch-to-buffer' to call `pop-to-buffer'.
@@ -178,14 +178,9 @@ This allows `switch-to-buffer' to respect 
`ofw-other-window',
   (pop-to-buffer buffer (list #'display-buffer-same-window) norecord)
 (funcall orig-fun buffer norecord force-same-window)))
 
-;; FIXME: use defadvice for Emacs 24.3
 (defun ofw--suspend-and-restore (orig-func  args)
   "Call ORIG-FUNC without any ofw actions on 
'display-buffer-overriding-action'."
   (let ((display-buffer-overriding-action display-buffer-overriding-action))
-;; FIXME: ofw-delete-from-overriding operates destructively, so the
-;; subsequent "restore" step only works if our ofw actions were all at the
-;; very beginning display-buffer-overriding-action (in which case `delq'
-;; happens not to be destructive).
 (ofw-delete-from-overriding)
 (apply orig-func args)))
 
@@ -253,23 +248,12 @@ Enable mode if ARG is positive."
  (setq display-buffer-base-action (cons functions attrs)))
 
;; Change switch-to-buffer to use display-buffer
-   (if (fboundp 'advice-add) ;Emacsā‰„24.4
-   (advice-add 'switch-to-buffer :around #'ofw-switch-to-buffer-advice)
-  ;; FIXME: `ad-activate' affects all pieces of advice of that
-  ;; function, which is not what we want!
- ;; (ad-activate 'switch-to-buffer)
-  )
+   (advice-add 'switch-to-buffer :around #'ofw-switch-to-buffer-advice)
 
;; Completing-read  pops up a buffer listing completions;
;; that should not respect or consume
;; ofw-frame-window-prefix-arg.
-   (if (fboundp 'advice-add)
-   (advice-add 'read-from-minibuffer
-:around #'ofw--suspend-and-restore)
-  ;; FIXME: `ad-activate' affects all pieces of advice of that
-  ;; function, which is not what we want!
- ;; (ad-activate 'read-from-minibuffer)
-  )
+   (advice-add 'read-from-minibuffer :around #'ofw--suspend-and-restore)
)
 
 ;; else disable
@@ -327,7 +311,7 @@ that allows the selected frame)."
 
 (defun ofw-dwim--frame-p ()
   "Return non-nil if the prefix is for \"other-frame\" rather than window."
-  ;; FIXME: Comparing functions is ugly/hackish!
+  ;; IMPROVEME: Comparing functions is ugly/hackish!
   (memq #'ofw-display-buffer-other-frame
 (car display-buffer-overriding-action)))
 
@@ -347,7 +331,7 @@ that allows the selected frame)."
   "Show current buffer in other frame or window."
   (interactive)
   (if (ofw-dwim--frame-p)
-  

[elpa] master 5ef4a76: * sm-c-mode.el (sm-c-font-lock-keywords): Match function defs.

2015-11-15 Thread Stefan Monnier
branch: master
commit 5ef4a76cd1064e95ba3a7db21bb3de6bd9cafb7b
Author: Stefan Monnier 
Commit: Stefan Monnier 

* sm-c-mode.el (sm-c-font-lock-keywords): Match function defs.

* sm-c-mode-test.c: New file.
---
 packages/sm-c-mode/sm-c-mode-test.c |   50 +++
 packages/sm-c-mode/sm-c-mode.el |   20 +-
 2 files changed, 69 insertions(+), 1 deletions(-)

diff --git a/packages/sm-c-mode/sm-c-mode-test.c 
b/packages/sm-c-mode/sm-c-mode-test.c
new file mode 100644
index 000..3a1f1b6
--- /dev/null
+++ b/packages/sm-c-mode/sm-c-mode-test.c
@@ -0,0 +1,50 @@
+/* -*- sm-c -*- */
+
+#define toto /* bla
+bla */ \
+ if (a) { \
+   f \
+ }
+
+DEFUN ()
+
+int main (void)
+{
+  if (a)
+do
+  if (b)
+if (c)
+  printf ("hello\n");
+else
+  printf ("there\n");
+  else
+printf ("elsewhere\n");
+while (6);
+  else if (b)
+printf ("wow\n");
+  else
+if (c)
+  printf ("weee\n");
+else
+  printf ("wop\n");
+
+  switch (a)
+{
+case 1:
+  {
+if (a)
+  {
+y = 5;
+case 2:
+x = 3;
+  }
+  }
+}
+}
+
+static struct myownspecialstruct
+  *testfunction
+  (args)
+{
+  return NULL;
+}
diff --git a/packages/sm-c-mode/sm-c-mode.el b/packages/sm-c-mode/sm-c-mode.el
index f582677..3771169 100644
--- a/packages/sm-c-mode/sm-c-mode.el
+++ b/packages/sm-c-mode/sm-c-mode.el
@@ -622,7 +622,25 @@ Typically 2 for GNU style and `tab-width' for Linux style."
  ;; "case" already handled above.
  (delete "case" kws)))
 "\\_>"))
- (0 font-lock-keyword-face
+ (0 font-lock-keyword-face))
+(,(let* ((spc0 "\\(?:\n?[ \t]\\|/\\*.*?\\*/\\)*")
+ (spc1 (concat "\n?[ \t]" spc0))
+ (id "\\(?:\\sw\\|\\s_\\)+"))
+(cl-flet ((repeat (repetition  res)
+  (concat "\\(?:" (apply #'concat res) "\\)"
+  (pcase repetition
+((pred symbolp) (symbol-name repetition))
+(1 "")
+  (concat
+   "^"
+   (repeat '* "\\*" spc0)
+   (repeat '* id (repeat 1 spc1 "\\|" spc0 "\\*" spc0))
+   "\\(" id "\\)[ \t\n]*(")))
+ (1
+  (prog1 font-lock-function-name-face
+(if (< (match-beginning 0) (line-beginning-position))
+(put-text-property (match-beginning 0) (match-end 0)
+   'font-lock-multiline t)))
 
 
 ;;;###autoload



[elpa] master e7f5f54: edit TODO list

2015-11-15 Thread Michael Heerdegen
branch: master
commit e7f5f549fbfb740b911fb7f33b42381ecece56d8
Author: Michael Heerdegen 
Commit: Michael Heerdegen 

edit TODO list
---
 packages/el-search/el-search.el |   10 ++
 1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/packages/el-search/el-search.el b/packages/el-search/el-search.el
index b286e07..bb33225 100644
--- a/packages/el-search/el-search.el
+++ b/packages/el-search/el-search.el
@@ -207,6 +207,8 @@
 ;;
 ;; TODO:
 ;;
+;; - highlight matches around point in a timer
+;;
 ;; - implement backward searching
 ;;
 ;; - improve docstrings
@@ -214,10 +216,10 @@
 ;; - handle more reader syntaxes, e.g. #n, #n#
 ;;
 ;; - Implement sessions; add multi-file support based on iterators.  A
-;; file list is read in (or the user can specify an iterator as a
-;; variable).  The state in the current buffer is just (buffer
-;; . marker).  Or should this be abstracted into an own lib?  Could be
-;; named "files-session" or so.
+;;   file list is read in (or the user can specify an iterator as a
+;;   variable).  The state in the current buffer is just (buffer
+;;   . marker).  Or should this be abstracted into an own lib?  Could
+;;   be named "files-session" or so.