Skip to content

Commit

Permalink
[todo] Minor formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
thoni56 committed May 8, 2024
1 parent c6f3789 commit d839ad8
Showing 1 changed file with 27 additions and 19 deletions.
46 changes: 27 additions & 19 deletions editors/emacs/c-xref.el
Original file line number Diff line number Diff line change
Expand Up @@ -3137,26 +3137,30 @@ Special hotkeys available:
(setq defc (c-xref-server-dispatch-get-int-attr c-xref_PPCA_DEFINITION))
(setq interfc (c-xref-server-dispatch-get-int-attr c-xref_PPCA_INTERFACE))
(setq upp (c-xref-server-dispatch-get-int-attr c-xref_PPCA_TREE_UP))
(if (eq selected 1) (setq sch "+") (setq sch " "))
(if (eq selected 1)
(setq sch "+") (setq sch " "))
(if ct-flag
(setq prefix "")
(setq prefix (format "%s %s " sch (c-xref-references-counts rd ru)))
)
(insert (format "\n%s%s" prefix deps))
(if (eq upp 1) (insert "("))
(if (eq upp 1)
(insert "("))
(setq bb (point))
(insert clas)
(setq fc nil)
(if (eq defc 1)
(if (eq interfc 1)
(setq fc 'bold-italic)
(setq fc 'bold-italic)
(setq fc 'bold)
)
(if (eq interfc 1)
(setq fc 'italic)
))
(if fc (put-text-property bb (point) 'face fc))
(if (eq upp 1) (insert ")"))
(if fc
(put-text-property bb (point) 'face fc))
(if (eq upp 1)
(insert ")"))
(setq i (c-xref-server-parse-xml-tag ss i len))
(c-xref-server-dispatch-require-end-ctag c-xref_PPC_CLASS)
(setq i (c-xref-server-parse-xml-tag ss i len))
Expand All @@ -3174,25 +3178,28 @@ Special hotkeys available:
(c-xref-erase-buffer)
(setq i (c-xref-server-parse-xml-tag ss i len))
(while (or (equal c-xref-server-ctag c-xref_PPC_VIRTUAL_SYMBOL)
(equal c-xref-server-ctag c-xref_PPC_SYMBOL))
(equal c-xref-server-ctag c-xref_PPC_SYMBOL))
(setq tlen (c-xref-server-dispatch-get-int-attr c-xref_PPCA_LEN))
(setq symbol (c-xref-char-list-substring ss i (+ i tlen)))
(setq i (+ i tlen))
(if (equal c-xref-server-ctag c-xref_PPC_SYMBOL)
(progn
(setq divnewline "\n")
(setq selected (c-xref-server-dispatch-get-int-attr c-xref_PPCA_SELECTED))
(setq rd (c-xref-server-dispatch-get-int-attr c-xref_PPCA_DEF_REFN))
(setq ru (c-xref-server-dispatch-get-int-attr c-xref_PPCA_REFN))
(if (equal selected 1) (setq sch "+") (setq sch " "))
(insert (format "%s%s %s %s" divnewline sch (c-xref-references-counts rd ru) symbol))
(if (<= firstline 0) (setq firstline (count-lines 1 (point))))
(setq i (c-xref-server-parse-xml-tag ss i len))
(c-xref-server-dispatch-require-end-ctag c-xref_PPC_SYMBOL)
(setq i (c-xref-server-parse-xml-tag ss i len))
)
(setq divnewline "\n")
(setq selected (c-xref-server-dispatch-get-int-attr c-xref_PPCA_SELECTED))
(setq rd (c-xref-server-dispatch-get-int-attr c-xref_PPCA_DEF_REFN))
(setq ru (c-xref-server-dispatch-get-int-attr c-xref_PPCA_REFN))
(if (equal selected 1) (setq sch "+")
(setq sch " "))
(insert (format "%s%s %s %s" divnewline sch (c-xref-references-counts rd ru) symbol))
(if (<= firstline 0)
(setq firstline (count-lines 1 (point))))
(setq i (c-xref-server-parse-xml-tag ss i len))
(c-xref-server-dispatch-require-end-ctag c-xref_PPC_SYMBOL)
(setq i (c-xref-server-parse-xml-tag ss i len))
)
(insert (format "%s\n== %s" divnewline symbol))
(if (<= firstline 0) (setq firstline (+ (count-lines 1 (point)) 1)))
(if (<= firstline 0)
(setq firstline (+ (count-lines 1 (point)) 1)))
(setq i (c-xref-server-parse-xml-tag ss i len))
(c-xref-server-dispatch-require-end-ctag c-xref_PPC_VIRTUAL_SYMBOL)
(setq i (c-xref-server-dispatch-classh-lines ss i len dispatch-data nil))
Expand All @@ -3202,7 +3209,8 @@ Special hotkeys available:
(c-xref-server-dispatch-require-end-ctag c-xref_PPC_SYMBOL_RESOLUTION)
(c-xref-line-hightlight 0 (point-max) nil 1 nil nil)
(goto-char (point-min))
(if (> firstline 0) (c-xref-goto-line firstline))
(if (> firstline 0)
(c-xref-goto-line firstline))
(setq buffer-read-only t)
i
))
Expand Down

0 comments on commit d839ad8

Please sign in to comment.