emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/progmodes/cc-engine.el


From: Martin Stjernholm
Subject: [Emacs-diffs] Changes to emacs/lisp/progmodes/cc-engine.el
Date: Sun, 22 May 2005 20:04:00 -0400

Index: emacs/lisp/progmodes/cc-engine.el
diff -c emacs/lisp/progmodes/cc-engine.el:1.39 
emacs/lisp/progmodes/cc-engine.el:1.40
*** emacs/lisp/progmodes/cc-engine.el:1.39      Sat May 14 11:29:04 2005
--- emacs/lisp/progmodes/cc-engine.el   Mon May 23 00:03:59 2005
***************
*** 24,32 ****
  ;; GNU General Public License for more details.
  
  ;; You should have received a copy of the GNU General Public License
! ;; along with GNU Emacs; see the file COPYING.  If not, write to
! ;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
! ;; Boston, MA 02111-1307, USA.
  
  ;;; Commentary:
  
--- 24,32 ----
  ;; GNU General Public License for more details.
  
  ;; You should have received a copy of the GNU General Public License
! ;; along with this program; see the file COPYING.  If not, write to
! ;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
! ;; Boston, MA 02110-1301, USA.
  
  ;;; Commentary:
  
***************
*** 3198,3203 ****
--- 3198,3204 ----
        ;; when font-lock refontifies the current line only.
        (when (save-excursion
              (and (= (forward-line 1) 0)
+                  (bolp)               ; forward-line has funny behavior at 
eob.
                   (or (< (c-point 'eol) cfd-limit)
                       (progn (backward-char)
                              (not (eq (char-before) ?\\))))))
***************
*** 4551,4557 ****
                 ;; operator token preceded by "operator".
                 (save-excursion
                   (and (c-safe (c-backward-sexp) t)
!                       (looking-at "operator\\([^_]\\|$\\)")))
                 (and (eq (char-before) ?<)
                      (c-with-syntax-table c++-template-syntax-table
                        (if (c-safe (goto-char (c-up-list-forward (point))))
--- 4552,4558 ----
                 ;; operator token preceded by "operator".
                 (save-excursion
                   (and (c-safe (c-backward-sexp) t)
!                       (looking-at "operator\\>\\([^_]\\|$\\)")))
                 (and (eq (char-before) ?<)
                      (c-with-syntax-table c++-template-syntax-table
                        (if (c-safe (goto-char (c-up-list-forward (point))))
***************
*** 6104,6110 ****
                ;; Note: We use the fact that lim is always after any
                ;; preceding brace sexp.
                (while (and (zerop (c-backward-token-2 1 t lim))
!                           (not (looking-at "[;<,=]"))))
                (or (memq (char-after) '(?, ?=))
                    (and (c-major-mode-is 'c++-mode)
                         (zerop (c-backward-token-2 1 nil lim))
--- 6105,6116 ----
                ;; Note: We use the fact that lim is always after any
                ;; preceding brace sexp.
                (while (and (zerop (c-backward-token-2 1 t lim))
!                           (or (not (looking-at "[;<,=]"))
!                               (and c-overloadable-operators-regexp
!                                    (looking-at 
c-overloadable-operators-regexp)
!                                    (save-excursion
!                                      (zerop (c-backward-token-2 1 nil lim))
!                                      (looking-at "operator\\>[^_]"))))))
                (or (memq (char-after) '(?, ?=))
                    (and (c-major-mode-is 'c++-mode)
                         (zerop (c-backward-token-2 1 nil lim))
***************
*** 6237,6243 ****
           ;; CASE 5I: ObjC method definition.
           ((and c-opt-method-key
                 (looking-at c-opt-method-key))
!           (c-beginning-of-statement-1 lim)
            (c-add-syntax 'objc-method-intro (c-point 'boi)))
             ;; CASE 5P: AWK pattern or function or continuation
             ;; thereof.
--- 6243,6257 ----
           ;; CASE 5I: ObjC method definition.
           ((and c-opt-method-key
                 (looking-at c-opt-method-key))
!           (c-beginning-of-statement-1 nil t)
!           (if (= (point) indent-point)
!               ;; Handle the case when it's the first (non-comment)
!               ;; thing in the buffer.  Can't look for a 'same return
!               ;; value from cbos1 since ObjC directives currently
!               ;; aren't recognized fully, so that we get 'same
!               ;; instead of 'previous if it moved over a preceding
!               ;; directive.
!               (goto-char (point-min)))
            (c-add-syntax 'objc-method-intro (c-point 'boi)))
             ;; CASE 5P: AWK pattern or function or continuation
             ;; thereof.
***************
*** 6316,6326 ****
           ;; CASE 5K: we are at an ObjC method definition
           ;; continuation line.
           ((and c-opt-method-key
!                (progn
                   (c-beginning-of-statement-1 lim)
                   (beginning-of-line)
!                  (looking-at c-opt-method-key)))
!           (c-add-syntax 'objc-method-args-cont (point)))
           ;; CASE 5L: we are at the first argument of a template
           ;; arglist that begins on the previous line.
           ((eq (char-before) ?<)
--- 6330,6342 ----
           ;; CASE 5K: we are at an ObjC method definition
           ;; continuation line.
           ((and c-opt-method-key
!                (save-excursion
!                  (goto-char indent-point)
                   (c-beginning-of-statement-1 lim)
                   (beginning-of-line)
!                  (when (looking-at c-opt-method-key)
!                    (setq placeholder (point)))))
!           (c-add-syntax 'objc-method-args-cont placeholder))
           ;; CASE 5L: we are at the first argument of a template
           ;; arglist that begins on the previous line.
           ((eq (char-before) ?<)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]